]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit79ec56f0a07e10f779e7fda555c3749d3e0c3c05
tree707c85940c630b7d0aa61eb0cfe2c4fef9d2c381
parent2c6cc7c8b9780f052b613be1cb67bf87901cee3f
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