summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorNadav Har'El <nyh@math.technion.ac.il>2012-03-06 16:39:22 +0200
committerAvi Kivity <avi@redhat.com>2012-03-08 14:14:23 +0200
commit9587190107d0c0cbaccbf7bf6b0245d29095a9ae (patch)
tree22fe97d0bc4df730d7775d9590faccb13d86193b /arch/x86/kvm/vmx.c
parenta223c313cb13e9ab71051fc5b70610a2829a4082 (diff)
downloadblackbird-op-linux-9587190107d0c0cbaccbf7bf6b0245d29095a9ae.tar.gz
blackbird-op-linux-9587190107d0c0cbaccbf7bf6b0245d29095a9ae.zip
KVM: nVMX: Fix erroneous exception bitmap check
The code which checks whether to inject a pagefault to L1 or L2 (in nested VMX) was wrong, incorrect in how it checked the PF_VECTOR bit. Thanks to Dan Carpenter for spotting this. Signed-off-by: Nadav Har'El <nyh@il.ibm.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4a722a0b8e13..2c22fc788da2 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1664,7 +1664,7 @@ static int nested_pf_handled(struct kvm_vcpu *vcpu)
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
/* TODO: also check PFEC_MATCH/MASK, not just EB.PF. */
- if (!(vmcs12->exception_bitmap & PF_VECTOR))
+ if (!(vmcs12->exception_bitmap & (1u << PF_VECTOR)))
return 0;
nested_vmx_vmexit(vcpu);
OpenPOWER on IntegriCloud