]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: support XSAVES usage in the host
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Nov 2014 18:05:07 +0000 (19:05 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Dec 2014 12:57:05 +0000 (13:57 +0100)
commit328a9a909a52c6cd0365685cc58c900ea73c2d7f
tree7779c9c8d78cbe289779c22f1e0d04ee0a49afa0
parent08e0c62a018a7de730f7bce3cfd8fe8337c2b909
KVM: x86: support XSAVES usage in the host

Userspace is expecting non-compacted format for KVM_GET_XSAVE, but
struct xsave_struct might be using the compacted format.  Convert
in order to preserve userspace ABI.

Likewise, userspace is passing non-compacted format for KVM_SET_XSAVE
but the kernel will pass it to XRSTORS, and we need to convert back.

Fixes: a33edb6fedd1712db1dea1727af61a1bf5f5c6bc
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: stable@vger.kernel.org
Cc: H. Peter Anvin <hpa@linux.intel.com>
Tested-by: Nadav Amit <namit@cs.technion.ac.il>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c