aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorChirayu Desai <cdesai@cyanogenmod.org>2013-06-29 12:19:32 +0530
committerChirayu Desai <cdesai@cyanogenmod.org>2013-06-29 12:19:32 +0530
commit5dd3308e81c660adaf95ff9d1efd699d0ad94b41 (patch)
tree01d73a37cdc3573dadc9630a36f7b62df7a83ce8 /arch/x86/kvm/x86.c
parenta921f81fdcfec509021fcfe19dbca8650f95e7aa (diff)
parent863c94fa3948619d3e425f9a3c61e6baf72ee666 (diff)
downloadkernel_samsung_aries-5dd3308e81c660adaf95ff9d1efd699d0ad94b41.zip
kernel_samsung_aries-5dd3308e81c660adaf95ff9d1efd699d0ad94b41.tar.gz
kernel_samsung_aries-5dd3308e81c660adaf95ff9d1efd699d0ad94b41.tar.bz2
Merge tag 'v3.0.84' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into HEAD
This is the 3.0.84 stable release
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 15e79a6..34afae8 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -548,8 +548,6 @@ int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr)
if (index != XCR_XFEATURE_ENABLED_MASK)
return 1;
xcr0 = xcr;
- if (kvm_x86_ops->get_cpl(vcpu) != 0)
- return 1;
if (!(xcr0 & XSTATE_FP))
return 1;
if ((xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE))
@@ -563,7 +561,8 @@ int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr)
int kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr)
{
- if (__kvm_set_xcr(vcpu, index, xcr)) {
+ if (kvm_x86_ops->get_cpl(vcpu) != 0 ||
+ __kvm_set_xcr(vcpu, index, xcr)) {
kvm_inject_gp(vcpu, 0);
return 1;
}