Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jason J. Herne and committed by
Christian Borntraeger
e000b8e0 0850e921

+11 -3
+2 -1
Documentation/virtual/kvm/devices/vm.txt
··· 140 140 u8 kmo[16]; # valid with Message-Security-Assist-Extension 4 141 141 u8 pcc[16]; # valid with Message-Security-Assist-Extension 4 142 142 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 144 145 }; 145 146 146 147 Parameters: address of a buffer to load the subfunction blocks from.
+2 -1
arch/s390/include/uapi/asm/kvm.h
··· 141 141 __u8 kmo[16]; /* with MSA4 */ 142 142 __u8 pcc[16]; /* with MSA4 */ 143 143 __u8 ppno[16]; /* with MSA5 */ 144 - __u8 reserved[1824]; 144 + __u8 kma[16]; /* with MSA8 */ 145 + __u8 reserved[1808]; 145 146 }; 146 147 147 148 /* kvm attributes for crypto */
+4
arch/s390/kvm/kvm-s390.c
··· 276 276 __cpacf_query(CPACF_PPNO, (cpacf_mask_t *) 277 277 kvm_s390_available_subfunc.ppno); 278 278 279 + if (test_facility(146)) /* MSA8 */ 280 + __cpacf_query(CPACF_KMA, (cpacf_mask_t *) 281 + kvm_s390_available_subfunc.kma); 282 + 279 283 if (MACHINE_HAS_ESOP) 280 284 allow_cpu_feat(KVM_S390_VM_CPU_FEAT_ESOP); 281 285 /*
+1
arch/s390/tools/gen_facilities.c
··· 82 82 78, /* enhanced-DAT 2 */ 83 83 130, /* instruction-execution-protection */ 84 84 131, /* enhanced-SOP 2 and side-effect */ 85 + 146, /* msa extension 8 */ 85 86 -1 /* END */ 86 87 } 87 88 },
+2 -1
tools/arch/s390/include/uapi/asm/kvm.h
··· 131 131 __u8 kmo[16]; /* with MSA4 */ 132 132 __u8 pcc[16]; /* with MSA4 */ 133 133 __u8 ppno[16]; /* with MSA5 */ 134 - __u8 reserved[1824]; 134 + __u8 kma[16]; /* with MSA8 */ 135 + __u8 reserved[1808]; 135 136 }; 136 137 137 138 /* kvm attributes for crypto */