summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/uapi/asm
diff options
context:
space:
mode:
authorDavid Hildenbrand2015-03-19 17:36:43 +0100
committerChristian Borntraeger2016-06-10 12:07:13 +0200
commit15c9705f0c8af2d19dede9866aec364746b269ef (patch)
tree6db191e053d4b6ae0c9a08c75a060e6869371cae /arch/s390/include/uapi/asm
parentKVM: s390: Add mnemonic print to kvm_s390_intercept_prog (diff)
downloadkernel-qcow2-linux-15c9705f0c8af2d19dede9866aec364746b269ef.tar.gz
kernel-qcow2-linux-15c9705f0c8af2d19dede9866aec364746b269ef.tar.xz
kernel-qcow2-linux-15c9705f0c8af2d19dede9866aec364746b269ef.zip
KVM: s390: interface to query and configure cpu features
For now, we only have an interface to query and configure facilities indicated via STFL(E). However, we also have features indicated via SCLP, that have to be indicated to the guest by user space and usually require KVM support. This patch allows user space to query and configure available cpu features for the guest. Please note that disabling a feature doesn't necessarily mean that it is completely disabled (e.g. ESOP is mostly handled by the SIE). We will try our best to disable it. Most features (e.g. SCLP) can't directly be forwarded, as most of them need in addition to hardware support, support in KVM. As we later on want to turn these features in KVM explicitly on/off (to simulate different behavior), we have to filter all features provided by the hardware and make them configurable. Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include/uapi/asm')
-rw-r--r--arch/s390/include/uapi/asm/kvm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/include/uapi/asm/kvm.h b/arch/s390/include/uapi/asm/kvm.h
index 3b8e99ef9d58..a8559f265e26 100644
--- a/arch/s390/include/uapi/asm/kvm.h
+++ b/arch/s390/include/uapi/asm/kvm.h
@@ -93,6 +93,14 @@ struct kvm_s390_vm_cpu_machine {
__u64 fac_list[256];
};
+#define KVM_S390_VM_CPU_PROCESSOR_FEAT 2
+#define KVM_S390_VM_CPU_MACHINE_FEAT 3
+
+#define KVM_S390_VM_CPU_FEAT_NR_BITS 1024
+struct kvm_s390_vm_cpu_feat {
+ __u64 feat[16];
+};
+
/* kvm attributes for crypto */
#define KVM_S390_VM_CRYPTO_ENABLE_AES_KW 0
#define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW 1