From: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: emulation failed but !mmio_needed? rip 10000 fc 0f 01 15
Date: Sat, 24 Nov 2007 12:21:00 +0800 [thread overview]
Message-ID: <200711241221.00548.sheng.yang@intel.com> (raw)
In-Reply-To: <5d649bdb0711231523r5221466cx6ee17979d27ddbc0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Saturday 24 November 2007 07:23:20 Neo Jia wrote:
> hi,
>
> I happened to get a "emulation fail" when running the following command:
>
> System environment: Intel Core 2 Duo (E6600) x86_64 Fedora 8
> (2.6.23.1-49.fc8).
>
> qemu-img create -f qcow debian-testing.img 10G
>
> sudo qemu-system-x86_64 -cdrom
> /home/cjia/download/debian-testing-i386-netinst.iso -hda
> debian-testing.img -boot d -m 1024
>
> Everything works fine until it prompts me that the installation is
> complete and need reboot.
>
> > sudo qemu-system-x86_64 -cdrom
> > /home/cjia/download/debian-testing-i386-netinst.iso -hda
> > debian-testing.img -boot d -m 1024
>
> exception 13 (0)
> rax 0000000000000100 rbx 0000000000000100 rcx 000000000000ffff rdx
> 0000000000000600
> rsi 0000000000000000 rdi 0000000000000000 rsp 0000000000000000 rbp
> 0000000000000000
> r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11
> 0000000000000000
> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
> 0000000000000000
> rip 0000000000010000 rflags 00033003
> cs f000 (000f0000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> tr 0080 (40c00000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> gdt 0/ffff
> idt 0/ffff
> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> code: 00 00 00 00 ea 5b e0 00 f0 31 30 2f 32 38 2f 30 37 00 fc f5 -->
> fc 0f 01 15 92 a0 31 00 b8 18 00 00 00 8e d8 8e c0 8e e0 8e e8 31 c0
> bf 00 30 39 00 b9 7c
> Aborted
>
> ---> dmesg:
>
> kvm: emulating exchange as write
> emulation failed but !mmio_needed? rip 10000 fc 0f 01 15 // I
> searched through the source code but not find a place to generate "but
> !mmio_needed?" string ...
It due to one instruction haven't been emulated: 0xfc(one byte instruction).
Look it up in SDM Vol.2B's opcode map, you can find that's "CLD". And look at
what is CLD in SDM Vol.2, you will find "CLD - Clear direction flag". So we
miss this in x86_emulate.c.
>
> The version of kvm I used for kvm module is
> "694401697ccd822bb08019731c3ee1bb34323d8e" and the kvm-userspace is
> "a57b838b49bc4e4e7439b18d0323385d53e41c7f".
> // Not sure if this is the right way to show the version I am using.
> If not, please correct me, this is the first time I am using git...
Yeah, that's the right ones. :)
>
> Anyway, I really want to get some comments about how to trace this
> problem and would be very glad to dig into it!
Here is the chance! Add this instruction to our x86 emulator. You can take the
implement of "sti" and "cli" as a reference.
Good luck!
>
> Thanks,
> Neo
--
Thanks
Yang, Sheng
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2007-11-24 4:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-23 23:23 emulation failed but !mmio_needed? rip 10000 fc 0f 01 15 Neo Jia
[not found] ` <5d649bdb0711231523r5221466cx6ee17979d27ddbc0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-24 4:21 ` Sheng Yang [this message]
[not found] ` <200711241221.00548.sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2007-11-24 7:48 ` Avi Kivity
2007-11-24 8:44 ` Neo Jia
2007-11-24 8:00 ` Avi Kivity
[not found] ` <4747DA35.6010001-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-24 8:30 ` Neo Jia
2007-11-24 9:45 ` Neo Jia
[not found] ` <5d649bdb0711240145g683f7762h35638e88586202a9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-25 9:44 ` Avi Kivity
[not found] ` <47494402.9020602-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-25 23:30 ` Neo Jia
[not found] ` <474A0590.4050701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2007-11-26 10:16 ` Avi Kivity
[not found] ` <474A9CFE.50106-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-27 7:37 ` Neo Jia
[not found] ` <5d649bdb0711262337v28e7d3ecm246aa580cda0ca8b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-27 8:33 ` Avi Kivity
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=200711241221.00548.sheng.yang@intel.com \
--to=sheng.yang-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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