KVM: x86: do not save guest-unsupported XSAVE state
authorRadim Krčmář <rkrcmar@redhat.com>
Wed, 1 Feb 2017 13:19:53 +0000 (14:19 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Fri, 3 Feb 2017 17:43:08 +0000 (18:43 +0100)
commit00c87e9a70a17b355b81c36adedf05e84f54e10d
treef1df0f8dcba15c286da9b83e6373e4ddd2b73e5e
parent566cf877a1fcb6d6dc0126b076aad062054c2637
KVM: x86: do not save guest-unsupported XSAVE state

Saving unsupported state prevents migration when the new host does not
support a XSAVE feature of the original host, even if the feature is not
exposed to the guest.

We've masked host features with guest-visible features before, with
4344ee981e21 ("KVM: x86: only copy XSAVE state for the supported
features") and dropped it when implementing XSAVES.  Do it again.

Fixes: df1daba7d1cb ("KVM: x86: support XSAVES usage in the host")
Cc: stable@vger.kernel.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/x86.c