From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: [PATCH 0/5][RESEND] Split the emulator: decode & execute Date: Tue, 18 Sep 2007 11:26:25 +0200 Message-ID: <46EF99C1.4070801@bull.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0881340344==" To: kvm-devel Return-path: 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) --===============0881340344== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4025D3298ABB13A4268DE671" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4025D3298ABB13A4268DE671 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable These patches split the emulator in two parts: one to decode the instruct= ion, the other to execute it. The decode part is then called only when needed.= [PATCH 1/5] x86_emulate-remove_unused, some cleanup: remove unused functi= ons [PATCH 2/5] x86_emulate-context, move all x86_emulate_memop() common vari= ables between decode and execute to a structure decode_cache. struct decode_cache { u8 twobyte; u8 b; u8 lock_prefix; u8 rep_prefix; u8 op_bytes; u8 ad_bytes; struct operand src; struct operand dst; unsigned long *override_base; unsigned int d; unsigned long regs[NR_VCPU_REGS]; unsigned long eip; /* modrm */ u8 modrm; u8 modrm_mod; u8 modrm_reg; u8 modrm_rm; u8 use_modrm_ea; unsigned long modrm_ea; unsigned long modrm_val; }; [PATCH 3/5] x86_emulate-decode_insn, move all decoding process to functio= n x86_decode_insn(). [PATCH 4/5] x86_emulate-split, emulate_instruction() calls now x86_decode= _insn() and x86_emulate_insn(). x86_emulate_insn() is x86_emulate_memop() without the decoding part. [PATCH 5/5] x86_emulate-optimize, move emulate_ctxt to kvm_vcpu to keep e= mulate context when we exit from kvm module. Call x86_decode_insn() = only when needed. Modify x86_emulate_insn() to not modify the cont= ext if it must be re-entered. Signed-off-by: Laurent Vivier --=20 ------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org -------------- "Software is hard" - Donald Knuth --------------enig4025D3298ABB13A4268DE671 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) iD8DBQFG75nF9Kffa9pFVzwRAjpHAKC8/iF807HtEyIYihsFaKt2GDuFMwCgkM0a qhYdpZ8sNKouBWqE9Kd424E= =My0v -----END PGP SIGNATURE----- --------------enig4025D3298ABB13A4268DE671-- --===============0881340344== 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/ --===============0881340344== 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 --===============0881340344==--