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? I
notice nestedsvm.c open-codes many of the accesses, but elsewhere I see just
one such case. The field name has a leading underscore for this reason, iirc.

Jan

Reply via email to