summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Farman <farman@linux.vnet.ibm.com>2014-06-09 10:57:26 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-03-06 13:49:33 +0100
commit68c557501b008515cb86c9a36c75f4e82e14a819 (patch)
tree43ae3a7fcfe7296550f0c95e72407a55a0901ad7 /include
parent1f289a8429022f112be9817a81ff07308eb78a9c (diff)
downloadlinux-stable-68c557501b008515cb86c9a36c75f4e82e14a819.tar.gz
linux-stable-68c557501b008515cb86c9a36c75f4e82e14a819.tar.bz2
linux-stable-68c557501b008515cb86c9a36c75f4e82e14a819.zip
KVM: s390: Allocate and save/restore vector registers
Define and allocate space for both the host and guest views of the vector registers for a given vcpu. The 32 vector registers occupy 128 bits each (512 bytes total), but architecturally are paired with 512 additional bytes of reserved space for future expansion. The kvm_sync_regs structs containing the registers are union'ed with 1024 bytes of padding in the common kvm_run struct. The addition of 1024 bytes of new register information clearly exceeds the existing union, so an expansion of that padding is required. When changing environments, we need to appropriately save and restore the vector registers viewed by both the host and guest, into and out of the sync_regs space. The floating point registers overlay the upper half of vector registers 0-15, so there's a bit of data duplication here that needs to be carefully avoided. Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/kvm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 805570650062..82634a492fe0 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -324,7 +324,7 @@ struct kvm_run {
__u64 kvm_dirty_regs;
union {
struct kvm_sync_regs regs;
- char padding[1024];
+ char padding[2048];
} s;
};
@@ -760,6 +760,7 @@ struct kvm_ppc_smmu_info {
#define KVM_CAP_PPC_ENABLE_HCALL 104
#define KVM_CAP_CHECK_EXTENSION_VM 105
#define KVM_CAP_S390_USER_SIGP 106
+#define KVM_CAP_S390_VECTOR_REGISTERS 107
#ifdef KVM_CAP_IRQ_ROUTING