Skip to content

Split the emulator: decode & execute

Laurent Vivier kvm 2 versions – Applied

Status from this message: Applied all, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/25 patches 2 repliesApplied
  2. v1 posting 1/25 patches 15 repliesSuperseded

Patches in v1 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/5some cleanup: remove unused functionsdrivers/kvm/x86_emulate.c+0 -390 replies
2/5move all x86_emulate_memop() to a structuredrivers/kvm/x86_emulate.c drivers/kvm/x86_emulate.h+541 -4240 replies
3/5move all decoding process to function x86_decode_insn().drivers/kvm/x86_emulate.c+48 -210 replies
4/5emulate_instruction() calls now x86_decode_insn() and x86_emulate_insn()drivers/kvm/kvm_main.c drivers/kvm/x86_emulate.c drivers/kvm/x86_emulate.h+10 -140 replies
5/5Call x86_decode_insn() only when neededdrivers/kvm/kvm.h drivers/kvm/kvm_main.c drivers/kvm/svm.c +2 more+82 -420 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5][RESEND] Split the emulator: decode & execute

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.

[PATCH 1/5] x86_emulate-remove_unused, some cleanup: remove unused functions [PATCH 2/5] x86_emulate-context, move all x86_emulate_memop() common variables

            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 function

            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 emulate
context when we exit from kvm module. Call x86_decode_insn() only when needed. Modify x86_emulate_insn() to not modify the context if it must be re-entered.

Signature · 2 lines
------------- Laurent.Vivier-6ktuUTfB/[email protected]  --------------
          "Software is hard" - Donald Knuth

-------------------------------------------------------------------------
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