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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to