Skip to content

Commit e000b8e

Browse files
Jason J. HerneChristian Borntraeger
authored andcommitted
s390: kvm: Cpu model support for msa6, msa7 and msa8
msa6 and msa7 require no changes. msa8 adds kma instruction and feature area. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
1 parent 0850e92 commit e000b8e

5 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎Documentation/virtual/kvm/devices/vm.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ struct kvm_s390_vm_cpu_subfunc {
140140
u8 kmo[16]; # valid with Message-Security-Assist-Extension 4
141141
u8 pcc[16]; # valid with Message-Security-Assist-Extension 4
142142
u8 ppno[16]; # valid with Message-Security-Assist-Extension 5
143-
u8 reserved[1824]; # reserved for future instructions
143+
u8 kma[16]; # valid with Message-Security-Assist-Extension 8
144+
u8 reserved[1808]; # reserved for future instructions
144145
};
145146

146147
Parameters: address of a buffer to load the subfunction blocks from.

‎arch/s390/include/uapi/asm/kvm.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ struct kvm_s390_vm_cpu_subfunc {
141141
__u8 kmo[16]; /* with MSA4 */
142142
__u8 pcc[16]; /* with MSA4 */
143143
__u8 ppno[16]; /* with MSA5 */
144-
__u8 reserved[1824];
144+
__u8 kma[16]; /* with MSA8 */
145+
__u8 reserved[1808];
145146
};
146147

147148
/* kvm attributes for crypto */

‎arch/s390/kvm/kvm-s390.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ static void kvm_s390_cpu_feat_init(void)
276276
__cpacf_query(CPACF_PPNO, (cpacf_mask_t *)
277277
kvm_s390_available_subfunc.ppno);
278278

279+
if (test_facility(146)) /* MSA8 */
280+
__cpacf_query(CPACF_KMA, (cpacf_mask_t *)
281+
kvm_s390_available_subfunc.kma);
282+
279283
if (MACHINE_HAS_ESOP)
280284
allow_cpu_feat(KVM_S390_VM_CPU_FEAT_ESOP);
281285
/*

‎arch/s390/tools/gen_facilities.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ static struct facility_def facility_defs[] = {
8282
78, /* enhanced-DAT 2 */
8383
130, /* instruction-execution-protection */
8484
131, /* enhanced-SOP 2 and side-effect */
85+
146, /* msa extension 8 */
8586
-1 /* END */
8687
}
8788
},

‎tools/arch/s390/include/uapi/asm/kvm.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ struct kvm_s390_vm_cpu_subfunc {
131131
__u8 kmo[16]; /* with MSA4 */
132132
__u8 pcc[16]; /* with MSA4 */
133133
__u8 ppno[16]; /* with MSA5 */
134-
__u8 reserved[1824];
134+
__u8 kma[16]; /* with MSA8 */
135+
__u8 reserved[1808];
135136
};
136137

137138
/* kvm attributes for crypto */

0 commit comments

Comments
 (0)