Avi Kivity wrote: > Laurent Vivier wrote: >> These patches split the emulator in two parts: one to decode the >> instruction, >> the other to execute it. The decode part is then called only when needed. >> >> > > Patchset looks good, but fails booting FC6 x86-64 on Intel. It may be a > merge error (did not apply cleanly due to other changes). I pushed this > as a 'split-emulator' branch on the kvm.git repository. >
I think I found the bug (not a merge error...): I just supposed that an
instruction fetch cannot failed.
I wrote:
r = x86_decode_insn(&emulate_ctxt, &emulate_ops);
if (r)
return EMULATE_FAIL;
vcpu->mmio_is_write = 0;
vcpu->pio.string = 0;
r = x86_emulate_insn(&emulate_ctxt, &emulate_ops);
...
It should be:
vcpu->mmio_is_write = 0;
vcpu->pio.string = 0;
r = x86_decode_insn(&emulate_ctxt, &emulate_ops);
if (r == 0) {
r = x86_emulate_insn(&emulate_ctxt, &emulate_ops);
if (vcpu->pio.string)
return EMULATE_DO_MMIO;
}
if ((r || vcpu->mmio_is_write) && run) {
...
}
if (r) {
...
}
Laurent
--
------------- [EMAIL PROTECTED] --------------
"Software is hard" - Donald Knuth
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/kvm-devel
