Re: [PATCH v3 74/75] x86/sev-es: Handle NMI State

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

 



On Tue, Apr 28, 2020 at 05:17:24PM +0200, Joerg Roedel wrote:
> diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
> index 27d1016ec840..8898002e5600 100644
> --- a/arch/x86/kernel/nmi.c
> +++ b/arch/x86/kernel/nmi.c
> @@ -511,6 +511,13 @@ NOKPROBE_SYMBOL(is_debug_stack);
>  dotraplinkage notrace void
>  do_nmi(struct pt_regs *regs, long error_code)
>  {
> +	/*
> +	 * Re-enable NMIs right here when running as an SEV-ES guest. This might
> +	 * cause nested NMIs, but those can be handled safely.
> +	 */
> +	if (sev_es_active())
> +		sev_es_nmi_complete();

Pls move the comment and the sev_es_active() check into
the sev_es_nmi_complete() function.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette



[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