x86/svm: invert valid condition in svm_get_pending_event()
PATCH 1/1 x86/svm: invert valid condition in svm_get_pending_event()
Fixes 9864841914c2 ("x86/vm_event: add support for VM_EVENT_REASON_INTERRUPT")
Signed-off-by Jinoh Kang <[email protected]>
--- xen/arch/x86/hvm/svm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -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;
Signature · 1 line
2.41.0
Quoted 2 lines · Jinoh Kang
Fixes 9864841914c2 ("x86/vm_event: add support for VM_EVENT_REASON_INTERRUPT")Signed-off-by Jinoh Kang <[email protected]>
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 <[email protected]>
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).