On Fri, Jul 20, 2007 at 09:57:55AM +0300, Avi Kivity wrote:
> Avi Kivity wrote:
> >> Please tell me what I can do to help debugging this problem.
> >> Alternatively I have uploaded an image to reproduce the problem here:
> >> http://temp.aurel32.net/kfreebsd-amd64.img.g
> >>
> >
> > I've downloaded the image and booted it three times using kvm HEAD.
> > Each time I got to the login prompt.
> >
> > Is this always reproducible? Can you check with kvm HEAD (not that I
> > think of anything that could have fixed this).
> >
> >
>
> Sorry, that was on Intel. It reproduces easily on AMD.
By comparing the cases were the old and the new condition are different,
I have found that the problem occurs for the lmsw and smsw instructions.
The patch below is very ugly, but it workarounds the problem.
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 21ce977..6c1523f 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1206,11 +1206,13 @@ twobyte_insn:
goto cannot_emulate;
*(u16 *)&_regs[modrm_rm]
= realmode_get_cr(ctxt->vcpu, 0);
+ no_wb = 1;
break;
case 6: /* lmsw */
if (modrm_mod != 3)
goto cannot_emulate;
realmode_lmsw(ctxt->vcpu, (u16)modrm_val, &_eflags);
+ no_wb = 1;
break;
case 7: /* invlpg*/
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' [EMAIL PROTECTED] | [EMAIL PROTECTED]
`- people.debian.org/~aurel32 | www.aurel32.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel