* Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs
@ 2014-05-09 19:55 Sebastian Faerber
2014-05-09 20:02 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Faerber @ 2014-05-09 19:55 UTC (permalink / raw)
To: xen-devel
Hi,
i'm running into problems booting Kernel 3.12 (and newer) as a PV
guest on a CentOS 5 Xen Hypervisor and dom0.
I tracked this problem down to the commit
6efa20e49b9cb1db1ab66870cc37323474a75a13 (xen: Support 64-bit PV guest
receiving NMIs)
Host CPU is a Intel Xeon L5630
(XEN) traps.c:405:d12 Unhandled invalid opcode fault/trap [#6] in
domain 12 on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 12 (vcpu#0) crashed on cpu#4:
(XEN) ----[ Xen-3.1.2-371.8.1.el5 x86_64 debug=n Not tainted ]----
(XEN) CPU: 4
(XEN) RIP: e033:[<ffffffff810041fd>]
(XEN) RFLAGS: 0000000000000282 CONTEXT: guest
(XEN) rax: ffffffffffffffea rbx: 0000000000000000 rcx: ffffffff81b6f078
(XEN) rdx: 0000000000000000 rsi: ffffffff81a01ee0 rdi: 0000000000000000
(XEN) rbp: ffffffff81afd020 rsp: ffffffff81a01ea8 r8: 0000000000000000
(XEN) r9: ffff880000000000 r10: 0000000000007ff0 r11: 00000000ffffffff
(XEN) r12: 0000000001000000 r13: ffffffff81a01fa0 r14: 0000000000001000
(XEN) r15: 0000000000000000 cr0: 0000000080050033 cr4: 00000000000026b0
(XEN) cr3: 000000095083a000 cr2: 0000000000000000
(XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: e02b cs: e033
(XEN) Guest stack trace from rsp=ffffffff81a01ea8:
(XEN) ffffffff81b6f078 00000000ffffffff ffffffff810041fd 000000010000e030
(XEN) 0000000000010082 ffffffff81a01ee0 000000000000e02b ffffffff00010004
(XEN) ffffffff8171df10 ffffffff81a8b634 ffffffff00010001 ffffffff8171f4d0
(XEN) 0000000000000000 ffffffff81a8dbe0 0000000000000000 ffffffff81713916
(XEN) ffffffff81a24de0 ffffffff00000010 ffffffff81a01f88 ffffffff81a01f48
(XEN) ffffffff81b7401a ffffffffffffffff ffffffff81afd020 0000000000000000
(XEN) 0000000000000000 0000000000000000 0000000000000000 ffffffff81a87b11
(XEN) ffffffff81b78810 ffffffff819292a8 0000000000000000 ffffffff81087747
(XEN) 0000000000000000 0000000080000000 0000000000000000 0000000000000000
(XEN) 0000000000000000 ffffffff81a8ad9a 0000000000000000 0000000100000000
(XEN) 20200800000206c2 0f89837180982221 0000000000000000 0f00000060c0c748
(XEN) ccccccccccccc305 cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
(XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
I admit the Xen Version in CentOS 5 is very old but maybe someone
could take a look?
I'm happy to test patches or try to get more information if needed.
Regards,
Sebastian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs
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
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-05-09 20:02 UTC (permalink / raw)
To: Sebastian Faerber; +Cc: xen-devel
On Fri, May 09, 2014 at 09:55:20PM +0200, Sebastian Faerber wrote:
> Hi,
>
> i'm running into problems booting Kernel 3.12 (and newer) as a PV
> guest on a CentOS 5 Xen Hypervisor and dom0.
> I tracked this problem down to the commit
> 6efa20e49b9cb1db1ab66870cc37323474a75a13 (xen: Support 64-bit PV guest
> receiving NMIs)
>
> Host CPU is a Intel Xeon L5630
>
> (XEN) traps.c:405:d12 Unhandled invalid opcode fault/trap [#6] in
> domain 12 on VCPU 0 [ec=0000]
> (XEN) domain_crash_sync called from entry.S
> (XEN) Domain 12 (vcpu#0) crashed on cpu#4:
> (XEN) ----[ Xen-3.1.2-371.8.1.el5 x86_64 debug=n Not tainted ]----
> (XEN) CPU: 4
> (XEN) RIP: e033:[<ffffffff810041fd>]
> (XEN) RFLAGS: 0000000000000282 CONTEXT: guest
> (XEN) rax: ffffffffffffffea rbx: 0000000000000000 rcx: ffffffff81b6f078
> (XEN) rdx: 0000000000000000 rsi: ffffffff81a01ee0 rdi: 0000000000000000
> (XEN) rbp: ffffffff81afd020 rsp: ffffffff81a01ea8 r8: 0000000000000000
> (XEN) r9: ffff880000000000 r10: 0000000000007ff0 r11: 00000000ffffffff
> (XEN) r12: 0000000001000000 r13: ffffffff81a01fa0 r14: 0000000000001000
> (XEN) r15: 0000000000000000 cr0: 0000000080050033 cr4: 00000000000026b0
> (XEN) cr3: 000000095083a000 cr2: 0000000000000000
> (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: e02b cs: e033
> (XEN) Guest stack trace from rsp=ffffffff81a01ea8:
> (XEN) ffffffff81b6f078 00000000ffffffff ffffffff810041fd 000000010000e030
> (XEN) 0000000000010082 ffffffff81a01ee0 000000000000e02b ffffffff00010004
> (XEN) ffffffff8171df10 ffffffff81a8b634 ffffffff00010001 ffffffff8171f4d0
> (XEN) 0000000000000000 ffffffff81a8dbe0 0000000000000000 ffffffff81713916
> (XEN) ffffffff81a24de0 ffffffff00000010 ffffffff81a01f88 ffffffff81a01f48
> (XEN) ffffffff81b7401a ffffffffffffffff ffffffff81afd020 0000000000000000
> (XEN) 0000000000000000 0000000000000000 0000000000000000 ffffffff81a87b11
> (XEN) ffffffff81b78810 ffffffff819292a8 0000000000000000 ffffffff81087747
> (XEN) 0000000000000000 0000000080000000 0000000000000000 0000000000000000
> (XEN) 0000000000000000 ffffffff81a8ad9a 0000000000000000 0000000100000000
> (XEN) 20200800000206c2 0f89837180982221 0000000000000000 0f00000060c0c748
> (XEN) ccccccccccccc305 cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
> (XEN) cccccccccccccccc cccccccccccccccc cccccccccccccccc cccccccccccccccc
>
> I admit the Xen Version in CentOS 5 is very old but maybe someone
> could take a look?
Isn't it Xen 3.x based? The Linux pvops kernels I thought only
were 4.0 and further compatible?
But anyhow, I presume the:
ffffffff810041fd
maps to the 'ud2' instruction in 'xen_enable_nmi' ?
If you take the 'BUG()' out does it continue running?
> I'm happy to test patches or try to get more information if needed.
>
> Regards,
>
> Sebastian
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs
2014-05-09 20:02 ` Konrad Rzeszutek Wilk
@ 2014-05-09 20:28 ` Sebastian Faerber
2014-05-12 14:21 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Faerber @ 2014-05-09 20:28 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel
>
> 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()?
Regards,
Sebastian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs
2014-05-09 20:28 ` Sebastian Faerber
@ 2014-05-12 14:21 ` Konrad Rzeszutek Wilk
2014-05-13 8:18 ` Sebastian Faerber
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-05-12 14:21 UTC (permalink / raw)
To: Sebastian Faerber; +Cc: xen-devel
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs
2014-05-12 14:21 ` Konrad Rzeszutek Wilk
@ 2014-05-13 8:18 ` Sebastian Faerber
2014-05-13 18:45 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Faerber @ 2014-05-13 8:18 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel
>
> 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?
Your patch works, thanks for taking care of the issue, much appreciated!
Sure, you can include me in your commit.
Could you also CC this patch to the stable kernel people? Would be
great if i could
run unmodified kernels once the commit gets picked up.
>
> 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();
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regression since Linux Kernel 3.12 due to 64bit pvguest NMIs
2014-05-13 8:18 ` Sebastian Faerber
@ 2014-05-13 18:45 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-05-13 18:45 UTC (permalink / raw)
To: Sebastian Faerber; +Cc: xen-devel
On Tue, May 13, 2014 at 10:18:53AM +0200, Sebastian Faerber wrote:
> >
> > 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?
>
> Your patch works, thanks for taking care of the issue, much appreciated!
> Sure, you can include me in your commit.
Excellent.
> Could you also CC this patch to the stable kernel people? Would be
> great if i could
> run unmodified kernels once the commit gets picked up.
>
Sure.
> >
> > 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();
> >
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-13 18:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-05-13 8:18 ` Sebastian Faerber
2014-05-13 18:45 ` Konrad Rzeszutek Wilk
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).