diff options
author | Avi Kivity <avi@qumranet.com> | 2008-06-16 00:13:41 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 05:42:33 -0400 |
commit | 8684c0af0b2bab770c257e2a04e1546eed35fa56 (patch) | |
tree | ce11e5f74ed45db49aeeee616f856f1059206c8f /arch/x86 | |
parent | b13354f8f092884fa8d79472404de4907b25d579 (diff) |
KVM: x86 emulator: handle undecoded rex.b with r/m = 5 in certain cases
x86_64 does not decode rex.b in certain cases, where the r/m field = 5.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/x86_emulate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 28082913919e..3721cfddc973 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c | |||
@@ -750,6 +750,7 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt, | |||
750 | 750 | ||
751 | switch (base_reg) { | 751 | switch (base_reg) { |
752 | case 5: | 752 | case 5: |
753 | case 13: | ||
753 | if (c->modrm_mod != 0) | 754 | if (c->modrm_mod != 0) |
754 | c->modrm_ea += c->regs[base_reg]; | 755 | c->modrm_ea += c->regs[base_reg]; |
755 | else | 756 | else |
@@ -767,6 +768,7 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt, | |||
767 | } | 768 | } |
768 | break; | 769 | break; |
769 | case 5: | 770 | case 5: |
771 | case 13: | ||
770 | if (c->modrm_mod != 0) | 772 | if (c->modrm_mod != 0) |
771 | c->modrm_ea += c->regs[c->modrm_rm]; | 773 | c->modrm_ea += c->regs[c->modrm_rm]; |
772 | else if (ctxt->mode == X86EMUL_MODE_PROT64) | 774 | else if (ctxt->mode == X86EMUL_MODE_PROT64) |