]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86 emulator: fix %rip-relative addressing with immediate source operand
authorAvi Kivity <avi@redhat.com>
Sun, 19 Jun 2011 16:21:11 +0000 (19:21 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 29 Jun 2011 07:09:25 +0000 (10:09 +0300)
commit51e0d2f09b58ae31077d627dca4cc56a8ca956c0
tree64a3928c22676e0e09d5d514708c98cd20aa5a44
parentb8fa7904ed875c88514d8af82c976f1b643395be
KVM: x86 emulator: fix %rip-relative addressing with immediate source operand

%rip-relative addressing is relative to the first byte of the next instruction,
so we need to add %rip only after we've fetched any immediate bytes.

Based on original patch by Li Xin <xin.li@intel.com>.

Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Li Xin <xin.li@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c