xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Sebastian Faerber <faerber@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs
Date: Mon, 12 May 2014 10:21:45 -0400	[thread overview]
Message-ID: <20140512142144.GC2837@phenom.dumpdata.com> (raw)
In-Reply-To: <CAB4HUd2JXwytktjpU0upY2KDTTGJfdqibtaOkh34hQ-zK2BK9Q@mail.gmail.com>

On Fri, May 09, 2014 at 10:28:29PM +0200, Sebastian Faerber wrote:
> >
> > Isn't it Xen 3.x based? The Linux pvops kernels I thought only
> > were 4.0 and further compatible?
> 
> Yes, it's Xen 3.x based but i can boot pvops kernels up to 3.11.
> 
> > But anyhow, I presume the:
> >
> > ffffffff810041fd
> >
> > maps to the 'ud2' instruction in 'xen_enable_nmi' ?
> 
> Correct.
> 
> > If you take the 'BUG()' out does it continue running?
> 
> You're right - it works
> 
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -559,8 +559,7 @@ void xen_enable_syscall(void)
>  void __cpuinit xen_enable_nmi(void)
>  {
>  #ifdef CONFIG_X86_64
> -       if (register_callback(CALLBACKTYPE_nmi, nmi))
> -               BUG();
> +       register_callback(CALLBACKTYPE_nmi, nmi);
>  #endif
>  }
>  void __init xen_arch_setup(void)
> 
> 
> Thanks Konrad!
> Would it be possible to guard the NMI Feature so older Xen Versions don't get
> confused and run into this BUG()?

Could you patch your kernel with this patch to double check that it is OK?

Is it OK for me to put 'Reported-and-Tested-by: Sebastian Faerber <email>'
on it?

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 201d09a..c19ae00 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -746,11 +746,14 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
 		 */
 		;
 #endif
-	} else if (addr == (unsigned long)nmi)
+	} else if (addr == (unsigned long)nmi) {
 		/*
-		 * Use the native version as well.
+		 * Use the native version as well, but for RHEL5
+		 * hypervisors it is not implemented.
 		 */
-		;
+		if (!xen_running_on_version_or_later(4,0))
+			return 0;
+	}
 	else {
 		/* Some other trap using IST? */
 		if (WARN_ON(val->ist != 0))
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 0982233..aa3fd34 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -576,6 +576,8 @@ void xen_enable_syscall(void)
 }
 void xen_enable_nmi(void)
 {
+	if (!xen_running_on_version_or_later(4,0))
+		return;
 #ifdef CONFIG_X86_64
 	if (register_callback(CALLBACKTYPE_nmi, (char *)nmi))
 		BUG();


> 
> Regards,
> Sebastian

  reply	other threads:[~2014-05-12 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 19:55 Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs Sebastian Faerber
2014-05-09 20:02 ` Konrad Rzeszutek Wilk
2014-05-09 20:28   ` Sebastian Faerber
2014-05-12 14:21     ` Konrad Rzeszutek Wilk [this message]
2014-05-13  8:18       ` Sebastian Faerber
2014-05-13 18:45         ` Konrad Rzeszutek Wilk

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=20140512142144.GC2837@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=faerber@gmail.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).