summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorWanpeng Li2014-12-02 12:21:30 +0100
committerPaolo Bonzini2014-12-05 13:57:16 +0100
commit55412b2eda2b783ef37316eb06ba91fa63ae049d (patch)
tree8eff0de0c34eacb8f9dbb989c4d64e8a5c3cf2c5 /arch/x86/kvm/svm.c
parentKVM: x86: use F() macro throughout cpuid.c (diff)
downloadkernel-qcow2-linux-55412b2eda2b783ef37316eb06ba91fa63ae049d.tar.gz
kernel-qcow2-linux-55412b2eda2b783ef37316eb06ba91fa63ae049d.tar.xz
kernel-qcow2-linux-55412b2eda2b783ef37316eb06ba91fa63ae049d.zip
kvm: x86: Add kvm_x86_ops hook that enables XSAVES for guest
Expose the XSAVES feature to the guest if the kvm_x86_ops say it is available. Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 6b411add23b8..41dd0387cccb 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -4127,6 +4127,11 @@ static bool svm_mpx_supported(void)
return false;
}
+static bool svm_xsaves_supported(void)
+{
+ return false;
+}
+
static bool svm_has_wbinvd_exit(void)
{
return true;
@@ -4414,6 +4419,7 @@ static struct kvm_x86_ops svm_x86_ops = {
.rdtscp_supported = svm_rdtscp_supported,
.invpcid_supported = svm_invpcid_supported,
.mpx_supported = svm_mpx_supported,
+ .xsaves_supported = svm_xsaves_supported,
.set_supported_cpuid = svm_set_supported_cpuid,