KVM: x86 emulator: streamline decode of segment registers
authorAvi Kivity <avi@redhat.com>
Tue, 13 Sep 2011 07:45:49 +0000 (10:45 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Sep 2011 16:52:56 +0000 (19:52 +0300)
commitc191a7a0f4d3b17cc6cee1d3f721dfe23fc7d6c6
tree7d71811d87b84250b3f205a12ab68fd59f00b803
parent41ddf9784cb91c9e4d3a218eef3551bebe9c7362
KVM: x86 emulator: streamline decode of segment registers

The opcodes

  push %seg
  pop %seg
  l%seg, %mem, %reg  (e.g. lds/les/lss/lfs/lgs)

all have an segment register encoded in the instruction.  To allow reuse,
decode the segment number into src2 during the decode stage instead of the
execution stage.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c