From: Rusty Russell <rusty@rustcorp.com.au>
To: Johannes Stezenbach <js@sig21.net>
Cc: lguest@ozlabs.org, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Jeremy Fitzhardinge <jeremy@goop.org>,
Arjan van de Ven <arjan@infradead.org>,
Gaurav Kukreja <mailme.gaurav@gmail.com>
Subject: Re: [Lguest] 2.6.33 guest crash (was: Re: 2.6.32-rc5 guest crash)
Date: Tue, 30 Mar 2010 14:57:14 +1030 [thread overview]
Message-ID: <201003301457.14590.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20100314212310.GA3388@sig21.net>
On Mon, 15 Mar 2010 07:53:10 am Johannes Stezenbach wrote:
> On Sun, Mar 14, 2010 at 06:34:59PM +0100, I wrote:
> >
> > Am I correct to assume that I can avoid the issue
> > by switching to a 64bit kernel (on host + guest)?
>
> Silly question ;-/
>
> So what would be the real fix?
That patch broke Real Machines. The real answer is actually to do some
more emulation in the host; I like lguest but I can't really justify many
lguest-specific hacks outside the lguest dirs.
There are a few patches needed to make Linus' latest work, I'll post them
soon. But for this specific issue, how's this?
Subject: lguest: workaround cmpxchg8b_emu by ignoring cli in the guest.
It's only used by cmpxchg8b_emu (see db677ffa5f5a for the gory
details), and fixing that to be paravirt aware would be more work than
simply ignoring it (and AFAICT only help lguest).
(We can't emulate it properly: the popf which expects to restore interrupts
does not trap).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: virtualization@lists.osdl.org
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
--- a/drivers/lguest/x86/core.c
+++ b/drivers/lguest/x86/core.c
@@ -288,6 +288,18 @@ static int emulate_insn(struct lg_cpu *c
insn = lgread(cpu, physaddr, u8);
/*
+ * Around 2.6.33, the kernel started using an emulation for the
+ * cmpxchg8b instruction in early boot on many configurations. This
+ * code isn't paravirtualized, and it tries to disable interrupts.
+ * Ignore it, which will Mostly Work.
+ */
+ if (insn == 0xfa) {
+ /* "cli", or Clear Interrupt Enable instruction. Skip it. */
+ cpu->regs->eip++;
+ return 1;
+ }
+
+ /*
* 0x66 is an "operand prefix". It means it's using the upper 16 bits
* of the eax register.
*/
next prev parent reply other threads:[~2010-03-30 4:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091025175521.GA13300@sig21.net>
2009-10-26 3:56 ` [Lguest] 2.6.32-rc5 guest crash Rusty Russell
2009-10-26 11:38 ` [tip:x86/urgent] x86: Side-step lguest problem by only building cmpxchg8b_emu for pre-Pentium tip-bot for Rusty Russell
2009-10-26 19:11 ` [Lguest] 2.6.32-rc5 guest crash Johannes Stezenbach
2010-03-14 17:34 ` [Lguest] 2.6.33 guest crash (was: Re: 2.6.32-rc5 guest crash) Johannes Stezenbach
2010-03-14 21:23 ` Johannes Stezenbach
2010-03-30 4:27 ` Rusty Russell [this message]
2010-03-30 4:51 ` [Lguest] 2.6.33 guest crash Jeremy Fitzhardinge
2010-04-13 15:29 ` [Lguest] 2.6.33 guest crash (was: Re: 2.6.32-rc5 guest crash) Johannes Stezenbach
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=201003301457.14590.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=arjan@infradead.org \
--cc=jeremy@goop.org \
--cc=js@sig21.net \
--cc=lguest@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailme.gaurav@gmail.com \
--cc=mingo@elte.hu \
/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