diff options
author | Liu, Jinsong <jinsong.liu@intel.com> | 2014-02-24 10:58:09 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-25 20:17:12 +0100 |
commit | 390bd528ae1c14d0b7f5db8225984f98617b3357 (patch) | |
tree | 90a06cecd26afb5853e5f9fbe2a61969256f4112 /arch/x86/kvm/x86.c | |
parent | 0dd376e709975779cf43f368498c5c0eec843b02 (diff) | |
download | lwn-390bd528ae1c14d0b7f5db8225984f98617b3357.tar.gz lwn-390bd528ae1c14d0b7f5db8225984f98617b3357.zip |
KVM: x86: Enable Intel MPX for guest
From 44c2abca2c2eadc6f2f752b66de4acc8131880c4 Mon Sep 17 00:00:00 2001
From: Liu Jinsong <jinsong.liu@intel.com>
Date: Mon, 24 Feb 2014 18:12:31 +0800
Subject: [PATCH v5 3/3] KVM: x86: Enable Intel MPX for guest
This patch enable Intel MPX feature to guest.
Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 33fa9e348d18..6530019116b0 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -616,6 +616,9 @@ int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) if (xcr0 & ~valid_bits) return 1; + if ((!(xcr0 & XSTATE_BNDREGS)) != (!(xcr0 & XSTATE_BNDCSR))) + return 1; + kvm_put_guest_xcr0(vcpu); vcpu->arch.xcr0 = xcr0; |