Re: [PATCH v2 15/17] KVM: VMX: Add a helper for NMI handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
> +}




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux