On 19/02/2026 4:26 pm, Jan Beulich wrote:
> On 18.02.2026 15:48, Abdelkareem Abdelsaamad wrote:
>> --- a/xen/arch/x86/hvm/svm/intr.c
>> +++ b/xen/arch/x86/hvm/svm/intr.c
>> @@ -33,6 +33,14 @@ static void svm_inject_nmi(struct vcpu *v)
>>      u32 general1_intercepts = vmcb_get_general1_intercepts(vmcb);
>>      intinfo_t event;
>>  
>> +    if ( vmcb->_vintr.fields.vnmi_enable )
>> +    {
>> +        if ( !vmcb->_vintr.fields.vnmi_pending )
>> +            vmcb->_vintr.fields.vnmi_pending = 1;
> Why the (inner) conditional?
>
> Also, as I think Teddy had already indicated before, might we better not use
> the _vintr field directly, but rather use the vmcb_[gs]et_vintr() wrappers?

vNMI is not covered by the TPR cleanbit, and needs to avoid that
setter.  This register is a complete mess, given how it's grown over the
generations.

Leave it opencoded for now, and I'll see about cleaning things up when
getting properly into the nested virt work.

~Andrew

Reply via email to