KVM: x86: mask unsupported XSAVE entries from leaf 0Dh index 0
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Oct 2013 14:06:14 +0000 (16:06 +0200)
committerGleb Natapov <gleb@redhat.com>
Thu, 3 Oct 2013 09:29:04 +0000 (12:29 +0300)
commit647e23bb333ff196e7be8ae08c842d855fb850f6
treea71cae213807d51e30ad5e942281dfdfd55db99f
parent29242cb5c63b1f8e12e8055ba1a6c3e0004fa86d
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>
arch/x86/kvm/cpuid.c
arch/x86/kvm/x86.h