OSDN Git Service

KVM: x86: decode_modrm does not regard modrm correctly
authorNadav Amit <namit@cs.technion.ac.il>
Sun, 2 Nov 2014 09:54:41 +0000 (11:54 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Nov 2014 14:44:01 +0000 (15:44 +0100)
commit5b38ab877e5bd6c6564f2f23f25e0c3d4768728a
tree707c85940c630b7d0aa61eb0cfe2c4fef9d2c381
parent4114c27d450bef228be9c7b0c40a888e18a3a636
KVM: x86: decode_modrm does not regard modrm correctly

In one occassion, decode_modrm uses the rm field after it is extended with
REX.B to determine the addressing mode. Doing so causes it not to read the
offset for rip-relative addressing with REX.B=1.

This patch moves the fetch where we already mask REX.B away instead.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c