Messages in this thread |  | | Date | Tue, 28 Apr 2026 11:19:35 -0700 | | Subject | Re: [PATCH v4 5/7] KVM: SVM: Inject MCEs when Restricted Injection is active | | From | Melody Wang <> |
| |
Hi Joerg,
On 4/28/26 3:50 AM, Joerg Rodel wrote: > On Fri, Apr 24, 2026 at 05:42:09PM +0000, Melody Wang wrote: >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index 0a1b63c63d1a..420f1ec0dcfb 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -10789,6 +10789,12 @@ static int kvm_check_and_inject_events(struct kvm_vcpu *vcpu, >> kvm_update_dr7(vcpu); >> } >> >> + if (vcpu->arch.exception.vector == MC_VECTOR) { >> + r = static_call(kvm_x86_mce_allowed)(vcpu); >> + if (!r) >> + goto out_except; > > If this path is taken the warning at the bottom of the function will trigger. I > think the target needs to be out: instead of out_except. > Yes, I think you are right. If MC is not allowed, I should simply return directly instead of noodling through the rest of the function.
Thanks, Melody > -Joerg
-- Thanks, Melody
|  |