[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6v0_ZzleQWsw2_k@google.com>
Date: Tue, 11 Feb 2025 17:10:21 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Binbin Wu <binbin.wu@...ux.intel.com>
Cc: pbonzini@...hat.com, kvm@...r.kernel.org, rick.p.edgecombe@...el.com,
kai.huang@...el.com, adrian.hunter@...el.com, reinette.chatre@...el.com,
xiaoyao.li@...el.com, tony.lindgren@...el.com, isaku.yamahata@...el.com,
yan.y.zhao@...el.com, chao.gao@...el.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 15/17] KVM: VMX: Add a helper for NMI handling
On Tue, Feb 11, 2025, Binbin Wu wrote:
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 012649688e46..228a7e51b6a5 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -7212,6 +7212,20 @@ static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu,
> }
> }
>
> +noinstr void vmx_handle_nmi(struct kvm_vcpu *vcpu)
> +{
> + if ((u16)vmx_get_exit_reason(vcpu).basic != EXIT_REASON_EXCEPTION_NMI ||
> + !is_nmi(vmx_get_intr_info(vcpu)))
Align indentation.
> + return;
> +
> + kvm_before_interrupt(vcpu, KVM_HANDLING_NMI);
> + if (cpu_feature_enabled(X86_FEATURE_FRED))
> + fred_entry_from_kvm(EVENT_TYPE_NMI, NMI_VECTOR);
> + else
> + vmx_do_nmi_irqoff();
> + kvm_after_interrupt(vcpu);
> +}
Powered by blists - more mailing lists