aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-01 08:13:22 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:50:38 -0400
commit342fc63095e2d676f209b202d41a3f670dd9bf08 (patch)
tree1f03fd31ed06e283b7ae25748cc1f6c2f2d6f8bf /arch/x86/kvm/emulate.c
parent5a506b125f1c97c846654ebacc913a136284e42b (diff)
KVM: x86 emulator: switch LEA to use SrcMem decoding
The NoAccess flag will prevent memory from being accessed. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 80efe76c1ab8..b8aa667b52bd 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2153,7 +2153,7 @@ static struct opcode opcode_table[256] = {
2153 /* 0x88 - 0x8F */ 2153 /* 0x88 - 0x8F */
2154 D(ByteOp | DstMem | SrcReg | ModRM | Mov), D(DstMem | SrcReg | ModRM | Mov), 2154 D(ByteOp | DstMem | SrcReg | ModRM | Mov), D(DstMem | SrcReg | ModRM | Mov),
2155 D(ByteOp | DstReg | SrcMem | ModRM | Mov), D(DstReg | SrcMem | ModRM | Mov), 2155 D(ByteOp | DstReg | SrcMem | ModRM | Mov), D(DstReg | SrcMem | ModRM | Mov),
2156 D(DstMem | SrcNone | ModRM | Mov), D(ModRM | DstReg), 2156 D(DstMem | SrcNone | ModRM | Mov), D(ModRM | SrcMem | NoAccess | DstReg),
2157 D(ImplicitOps | SrcMem16 | ModRM), G(0, group1A), 2157 D(ImplicitOps | SrcMem16 | ModRM), G(0, group1A),
2158 /* 0x90 - 0x97 */ 2158 /* 0x90 - 0x97 */
2159 X8(D(SrcAcc | DstReg)), 2159 X8(D(SrcAcc | DstReg)),
@@ -2895,7 +2895,7 @@ special_insn:
2895 c->dst.val = ops->get_segment_selector(c->modrm_reg, ctxt->vcpu); 2895 c->dst.val = ops->get_segment_selector(c->modrm_reg, ctxt->vcpu);
2896 break; 2896 break;
2897 case 0x8d: /* lea r16/r32, m */ 2897 case 0x8d: /* lea r16/r32, m */
2898 c->dst.val = c->modrm_ea; 2898 c->dst.val = c->src.addr.mem;
2899 break; 2899 break;
2900 case 0x8e: { /* mov seg, r/m16 */ 2900 case 0x8e: { /* mov seg, r/m16 */
2901 uint16_t sel; 2901 uint16_t sel;