public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/22] Direct decode in emulator
@ 2010-07-29 12:11 Avi Kivity
  2010-07-29 12:11 ` [PATCH 01/22] KVM: x86 emulator: drop parentheses in repreat macros Avi Kivity
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: Avi Kivity @ 2010-07-29 12:11 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm

Currently the emulator decoder is indirect in two ways: groups are looked up
in a separate table based on group number; and opcode execution is looked up
in a big switch (actually two) after the opcode flags lookup.

This patchset converts groups to direct decode and begins the work for opcode
decode.

The motivations are:
- reduce errors from discrepancies between the two tables (like we had for
  IRET)
- make the code easier to read, removing many switch () statements
- eventually remove the #UD mini-decoder in x86.c by adding subgroup support
  to the emulator

Avi Kivity (22):
  KVM: x86 emulator: drop parentheses in repreat macros
  KVM: x86 emulator: introduce 'struct opcode'
  KVM: x86 emulator: Add wrappers for easily defining opcodes
  KVM: x86 emulator: move group tables to top
  KVM: x86 emulator: reserve group code 0
  KVM: x86 emulator: allow specifying group directly in opcode
  KVM: x86 emulator: convert group 1 to new style
  KVM: x86 emulator: convert group 1A to new style
  KVM: x86 emulator: convert group 3 to new style
  KVM: x86 emulator: convert group 4 to new style
  KVM: x86 emulator: convert group 5 to new style
  KVM: x86 emulator: convert group 7 to new style
  KVM: x86 emulator: convert group 8 to new style
  KVM: x86 emulator: convert group 9 to new style
  KVM: x86 emulator: drop support for old-style groups
  KVM: x86 emulator: move ByteOp and Dst back to bits 0:3
  KVM: x86 emulator: store x86_emulate_ops in emulation context
  KVM: x86 emulator: allow storing emulator execution function in
    decode tables
  KVM: x86 emulator: move x86_decode_insn() downwards
  KVM: x86 emulator: move decode tables downwards
  KVM: x86 emulator: allow repeat macro arguments to contain commas
  KVM: x86 emulator: convert some push instructions to direct decode

 arch/x86/include/asm/kvm_emulate.h |   10 +-
 arch/x86/kvm/emulate.c             | 1253 +++++++++++++++++++-----------------
 arch/x86/kvm/x86.c                 |    7 +-
 3 files changed, 661 insertions(+), 609 deletions(-)


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-07-31  3:26 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 12:11 [PATCH 00/22] Direct decode in emulator Avi Kivity
2010-07-29 12:11 ` [PATCH 01/22] KVM: x86 emulator: drop parentheses in repreat macros Avi Kivity
2010-07-29 12:11 ` [PATCH 02/22] KVM: x86 emulator: introduce 'struct opcode' Avi Kivity
2010-07-29 12:11 ` [PATCH 03/22] KVM: x86 emulator: Add wrappers for easily defining opcodes Avi Kivity
2010-07-29 12:11 ` [PATCH 04/22] KVM: x86 emulator: move group tables to top Avi Kivity
2010-07-29 12:11 ` [PATCH 05/22] KVM: x86 emulator: reserve group code 0 Avi Kivity
2010-07-29 12:11 ` [PATCH 06/22] KVM: x86 emulator: allow specifying group directly in opcode Avi Kivity
2010-07-29 12:11 ` [PATCH 07/22] KVM: x86 emulator: convert group 1 to new style Avi Kivity
2010-07-29 12:11 ` [PATCH 08/22] KVM: x86 emulator: convert group 1A " Avi Kivity
2010-07-29 12:11 ` [PATCH 09/22] KVM: x86 emulator: convert group 3 " Avi Kivity
2010-07-29 12:11 ` [PATCH 10/22] KVM: x86 emulator: convert group 4 " Avi Kivity
2010-07-29 12:11 ` [PATCH 11/22] KVM: x86 emulator: convert group 5 " Avi Kivity
2010-07-29 12:11 ` [PATCH 12/22] KVM: x86 emulator: convert group 7 " Avi Kivity
2010-07-29 12:11 ` [PATCH 13/22] KVM: x86 emulator: convert group 8 " Avi Kivity
2010-07-29 12:11 ` [PATCH 14/22] KVM: x86 emulator: convert group 9 " Avi Kivity
2010-07-29 12:11 ` [PATCH 15/22] KVM: x86 emulator: drop support for old-style groups Avi Kivity
2010-07-29 12:11 ` [PATCH 16/22] KVM: x86 emulator: move ByteOp and Dst back to bits 0:3 Avi Kivity
2010-07-29 12:11 ` [PATCH 17/22] KVM: x86 emulator: store x86_emulate_ops in emulation context Avi Kivity
2010-07-29 12:11 ` [PATCH 18/22] KVM: x86 emulator: allow storing emulator execution function in decode tables Avi Kivity
2010-07-29 12:11 ` [PATCH 19/22] KVM: x86 emulator: move x86_decode_insn() downwards Avi Kivity
2010-07-29 12:11 ` [PATCH 20/22] KVM: x86 emulator: move decode tables downwards Avi Kivity
2010-07-29 12:11 ` [PATCH 21/22] KVM: x86 emulator: allow repeat macro arguments to contain commas Avi Kivity
2010-07-29 12:11 ` [PATCH 22/22] KVM: x86 emulator: convert some push instructions to direct decode Avi Kivity
2010-07-31  1:58 ` [PATCH 00/22] Direct decode in emulator Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox