KVM: x86: support XSAVES usage in the host
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: f31a9f7c71691569359fa7fb8b0acaa44bce0324
Cc: Fenghua Yu <94fe9a7ec8ff966c1952fe98e39b5ae3a7477695@intel.com>
Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org
Cc: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@linux.intel.com>
Tested-by: Nadav Amit <592678034eb0a2c8d7d04a06101ed8b7dc7101dd@cs.technion.ac.il>
Reviewed-by: Radim Krčmář <e4aea3f2c531804c57884e1d444a6744efb5af4d@redhat.com>
Signed-off-by: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs