summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.h
diff options
context:
space:
mode:
authorPaolo Bonzini2013-10-02 16:06:14 +0200
committerGleb Natapov2013-10-03 11:29:04 +0200
commit647e23bb333ff196e7be8ae08c842d855fb850f6 (patch)
treea71cae213807d51e30ad5e942281dfdfd55db99f /arch/x86/kvm/x86.h
parentvirt/kvm/iommu.c: Add leading zeros to device's BDF notation in debug messages (diff)
downloadkernel-qcow2-linux-647e23bb333ff196e7be8ae08c842d855fb850f6.tar.gz
kernel-qcow2-linux-647e23bb333ff196e7be8ae08c842d855fb850f6.tar.xz
kernel-qcow2-linux-647e23bb333ff196e7be8ae08c842d855fb850f6.zip
KVM: x86: mask unsupported XSAVE entries from leaf 0Dh index 0
XSAVE entries that KVM does not support are reported by KVM_GET_SUPPORTED_CPUID for leaf 0Dh index 0 if the host supports them; they should be left out unless there is also hypervisor support for them. Sub-leafs are correctly handled in supported_xcr0_bit, fix index 0 to match. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.h')
-rw-r--r--arch/x86/kvm/x86.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h
index e224f7a671b6..587fb9ede436 100644
--- a/arch/x86/kvm/x86.h
+++ b/arch/x86/kvm/x86.h
@@ -122,6 +122,7 @@ int kvm_write_guest_virt_system(struct x86_emulate_ctxt *ctxt,
gva_t addr, void *val, unsigned int bytes,
struct x86_exception *exception);
+#define KVM_SUPPORTED_XCR0 (XSTATE_FP | XSTATE_SSE | XSTATE_YMM)
extern u64 host_xcr0;
extern struct static_key kvm_no_apic_vcpu;