diff options
author | 2016-01-15 14:11:46 +0100 | |
---|---|---|
committer | 2016-02-10 13:12:48 +0100 | |
commit | f6aa6dc44948739be39c20bbcbbe8cff5d77fe18 (patch) | |
tree | 63695a4fe2a96834663ebdcaa948318f50a1e1d5 /arch/s390/kvm | |
parent | KVM: x86: consolidate different ways to test for in-kernel LAPIC (diff) | |
download | linux-f6aa6dc44948739be39c20bbcbbe8cff5d77fe18.tar.gz linux-f6aa6dc44948739be39c20bbcbbe8cff5d77fe18.tar.bz2 linux-f6aa6dc44948739be39c20bbcbbe8cff5d77fe18.zip |
KVM: s390: allow sync of fp registers via vregs
If we have MACHINE_HAS_VX, the floating point registers are stored
in the vector register format, event if the guest isn't enabled for vector
registers. So we can allow KVM_SYNC_VRS as soon as MACHINE_HAS_VX is
available.
This can in return be used by user space to support floating point
registers via struct kvm_run when the machine has vector registers.
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 4af21c771f9b..8fcdf9836321 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1414,7 +1414,10 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) KVM_SYNC_PFAULT; if (test_kvm_facility(vcpu->kvm, 64)) vcpu->run->kvm_valid_regs |= KVM_SYNC_RICCB; - if (test_kvm_facility(vcpu->kvm, 129)) + /* fprs can be synchronized via vrs, even if the guest has no vx. With + * MACHINE_HAS_VX, (load|store)_fpu_regs() will work with vrs format. + */ + if (MACHINE_HAS_VX) vcpu->run->kvm_valid_regs |= KVM_SYNC_VRS; if (kvm_is_ucontrol(vcpu->kvm)) |