* [PATCH] nVMX: Fix erroneous exception bitmap check
@ 2012-03-06 14:39 Nadav Har'El
2012-03-07 10:20 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Nadav Har'El @ 2012-03-06 14:39 UTC (permalink / raw)
To: kvm; +Cc: avi
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>
---
arch/x86/kvm/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- .before/arch/x86/kvm/vmx.c 2012-03-06 16:31:25.000000000 +0200
+++ .after/arch/x86/kvm/vmx.c 2012-03-06 16:31:25.000000000 +0200
@@ -1664,7 +1664,7 @@ static int nested_pf_handled(struct kvm_
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);
--
Nadav Har'El | Tuesday, Mar 6 2012,
nyh@math.technion.ac.il |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |This box was intentionally left blank.
http://nadav.harel.org.il |
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nVMX: Fix erroneous exception bitmap check
2012-03-06 14:39 [PATCH] nVMX: Fix erroneous exception bitmap check Nadav Har'El
@ 2012-03-07 10:20 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2012-03-07 10:20 UTC (permalink / raw)
To: Nadav Har'El; +Cc: kvm
On 03/06/2012 04:39 PM, Nadav Har'El wrote:
> 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.
>
>
Thanks, applied. The patch was whitespace-mangled, please watch out for
this in the future.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-07 10:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 14:39 [PATCH] nVMX: Fix erroneous exception bitmap check Nadav Har'El
2012-03-07 10:20 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox