From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [PATCH 0/5] Split the emulator: decode & execute Date: Fri, 14 Sep 2007 18:14:38 +0200 Message-ID: <46EAB36E.2060004@bull.net> References: <46D5A151.80000@bull.net> <46E3E3D4.1050206@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0841875349==" Cc: kvm-devel To: Avi Kivity Return-path: In-Reply-To: <46E3E3D4.1050206-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0841875349== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig924380A9477CF5E0FCD488EE" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig924380A9477CF5E0FCD488EE Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 need= ed. >> >> =20 >=20 > 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 thi= s > as a 'split-emulator' branch on the kvm.git repository. >=20 I think I found the bug (not a merge error...): I just supposed that an instruction fetch cannot failed. I wrote: r =3D x86_decode_insn(&emulate_ctxt, &emulate_ops); if (r) return EMULATE_FAIL; vcpu->mmio_is_write =3D 0; vcpu->pio.string =3D 0; r =3D x86_emulate_insn(&emulate_ctxt, &emulate_ops); ... It should be: vcpu->mmio_is_write =3D 0; vcpu->pio.string =3D 0; r =3D x86_decode_insn(&emulate_ctxt, &emulate_ops); if (r =3D=3D 0) { r =3D 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 --=20 ------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org -------------- "Software is hard" - Donald Knuth --------------enig924380A9477CF5E0FCD488EE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD4DBQFG6rNx9Kffa9pFVzwRAhGjAJEBXZg1wMbAVq9y+S8hPpKc5kH2AKCG7cTX SfoxL2LlYLPV+D94xoMCRw== =tJ6a -----END PGP SIGNATURE----- --------------enig924380A9477CF5E0FCD488EE-- --===============0841875349== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ --===============0841875349== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============0841875349==--