Message ID | 0a8fabe0-3741-ebc2-d89e-cb3a849a2683@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/svm: invert valid condition in svm_get_pending_event() | expand |
On 18/08/2023 5:03 pm, Jinoh Kang wrote: > Fixes: 9864841914c2 ("x86/vm_event: add support for VM_EVENT_REASON_INTERRUPT") > Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com> Yeah, that's just straight up broken. I'm not aware of anyone having used this in anger on AMD systems yet. Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> I've tweaked the commit message a little bit on commit, to make it clearer what you're doing. (You're not making the valid condition invalid, which is one interpretation of "invert" in that context).
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 01dd592d9b83..beb076ea8d62 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2415,7 +2415,7 @@ static bool cf_check svm_get_pending_event( { const struct vmcb_struct *vmcb = v->arch.hvm.svm.vmcb; - if ( vmcb->event_inj.v ) + if ( !vmcb->event_inj.v ) return false; info->vector = vmcb->event_inj.vector;
Fixes: 9864841914c2 ("x86/vm_event: add support for VM_EVENT_REASON_INTERRUPT") Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com> --- xen/arch/x86/hvm/svm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)