lkml.org 
[lkml]   [2026]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 5/7] KVM: SVM: Inject MCEs when Restricted Injection is active
From
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


\
 
 \ /
  Last update: 2026-04-28 20:20    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog