aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/x86_emulate.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index b049b6bf9a71..2a9db4d90bac 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -138,7 +138,7 @@ static u16 opcode_table[256] = {
138 /* 0x88 - 0x8F */ 138 /* 0x88 - 0x8F */
139 ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov, 139 ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov,
140 ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov, 140 ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
141 0, ModRM | DstReg, 141 DstMem | SrcReg | ModRM | Mov, ModRM | DstReg,
142 DstReg | SrcMem | ModRM | Mov, Group | Group1A, 142 DstReg | SrcMem | ModRM | Mov, Group | Group1A,
143 /* 0x90 - 0x9F */ 143 /* 0x90 - 0x9F */
144 0, 0, 0, 0, 0, 0, 0, 0, 144 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1518,6 +1518,19 @@ special_insn:
1518 break; 1518 break;
1519 case 0x88 ... 0x8b: /* mov */ 1519 case 0x88 ... 0x8b: /* mov */
1520 goto mov; 1520 goto mov;
1521 case 0x8c: { /* mov r/m, sreg */
1522 struct kvm_segment segreg;
1523
1524 if (c->modrm_reg <= 5)
1525 kvm_get_segment(ctxt->vcpu, &segreg, c->modrm_reg);
1526 else {
1527 printk(KERN_INFO "0x8c: Invalid segreg in modrm byte 0x%02x\n",
1528 c->modrm);
1529 goto cannot_emulate;
1530 }
1531 c->dst.val = segreg.selector;
1532 break;
1533 }
1521 case 0x8d: /* lea r16/r32, m */ 1534 case 0x8d: /* lea r16/r32, m */
1522 c->dst.val = c->modrm_ea; 1535 c->dst.val = c->modrm_ea;
1523 break; 1536 break;