]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: fix KVM_SET_XCRS for CPUs that do not support XSAVE
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Oct 2013 14:50:46 +0000 (16:50 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 31 Oct 2013 10:30:46 +0000 (11:30 +0100)
commit5eea16891fc6a3ef6b1fa3dc6491056938766900
tree7714d9f5073951ce554a417a0fb246ed5d424c39
parentf1df4de1f6af5332ca35c58155d3f31240c30fd5
KVM: x86: fix KVM_SET_XCRS for CPUs that do not support XSAVE

The KVM_SET_XCRS ioctl must accept anything that KVM_GET_XCRS
could return.  XCR0's bit 0 is always 1 in real processors with
XSAVE, and KVM_GET_XCRS will always leave bit 0 set even if the
emulated processor does not have XSAVE.  So, KVM_SET_XCRS must
ignore that bit when checking for attempts to enable unsupported
save states.

Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c