All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH] x86/xen: no need to explicitly register an NMI callback
Date: Tue, 17 Jun 2014 11:08:34 +0200	[thread overview]
Message-ID: <8738f3c38t.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <1402938558-14542-1-git-send-email-david.vrabel@citrix.com> (David Vrabel's message of "Mon, 16 Jun 2014 18:09:18 +0100")

David Vrabel <david.vrabel@citrix.com> writes:

> Remove xen_enable_nmi() to fix a 64-bit guest crash when registering
> the NMI callback on Xen 3.1 and earlier.
>
> It's not needed since the NMI callback is set by a set_trap_table
> hypercall (in xen_load_idt() or xen_write_idt_entry()).
>
> It's also broken since it only set the current VCPU's callback.
>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Smoke tested with RHEL5 Xen and x86_64 PV guest + Xen-4.3.2 and x86_64
PV guest.

Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>

> ---
>  arch/x86/xen/setup.c |    9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> index 821a11a..3f96911 100644
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -590,13 +590,7 @@ void xen_enable_syscall(void)
>  	}
>  #endif /* CONFIG_X86_64 */
>  }
> -void xen_enable_nmi(void)
> -{
> -#ifdef CONFIG_X86_64
> -	if (register_callback(CALLBACKTYPE_nmi, (char *)nmi))
> -		BUG();
> -#endif
> -}
> +
>  void __init xen_pvmmu_arch_setup(void)
>  {
>  	HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
> @@ -611,7 +605,6 @@ void __init xen_pvmmu_arch_setup(void)
>
>  	xen_enable_sysenter();
>  	xen_enable_syscall();
> -	xen_enable_nmi();
>  }
>
>  /* This function is not called for HVM domains */

-- 
  Vitaly

      reply	other threads:[~2014-06-17  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 17:09 [PATCH] x86/xen: no need to explicitly register an NMI callback David Vrabel
2014-06-17  9:08 ` Vitaly Kuznetsov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738f3c38t.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.