aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-10-20 12:55:07 -0400
committerMark Brown <broonie@kernel.org>2014-10-20 13:27:32 -0400
commitb7a40242c82cd73cfcea305f23e67d068dd8401a (patch)
tree251b49d19cd7c371847ae1f951e1b537ca0e1c15 /arch/x86/kvm/emulate.c
parentd26833bfce5e56017bea9f1f50838f20e18e7b7e (diff)
parent9c6de47d53a3ce8df1642ae67823688eb98a190a (diff)
Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Conflicts: drivers/spi/spi-dw-mid.c
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 56657b0bb3bb..03954f7900f5 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1491,9 +1491,6 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
1491 goto exception; 1491 goto exception;
1492 break; 1492 break;
1493 case VCPU_SREG_CS: 1493 case VCPU_SREG_CS:
1494 if (in_task_switch && rpl != dpl)
1495 goto exception;
1496
1497 if (!(seg_desc.type & 8)) 1494 if (!(seg_desc.type & 8))
1498 goto exception; 1495 goto exception;
1499 1496
@@ -4394,8 +4391,11 @@ done_prefixes:
4394 4391
4395 ctxt->execute = opcode.u.execute; 4392 ctxt->execute = opcode.u.execute;
4396 4393
4394 if (unlikely(ctxt->ud) && likely(!(ctxt->d & EmulateOnUD)))
4395 return EMULATION_FAILED;
4396
4397 if (unlikely(ctxt->d & 4397 if (unlikely(ctxt->d &
4398 (NotImpl|EmulateOnUD|Stack|Op3264|Sse|Mmx|Intercept|CheckPerm))) { 4398 (NotImpl|Stack|Op3264|Sse|Mmx|Intercept|CheckPerm))) {
4399 /* 4399 /*
4400 * These are copied unconditionally here, and checked unconditionally 4400 * These are copied unconditionally here, and checked unconditionally
4401 * in x86_emulate_insn. 4401 * in x86_emulate_insn.
@@ -4406,9 +4406,6 @@ done_prefixes:
4406 if (ctxt->d & NotImpl) 4406 if (ctxt->d & NotImpl)
4407 return EMULATION_FAILED; 4407 return EMULATION_FAILED;
4408 4408
4409 if (!(ctxt->d & EmulateOnUD) && ctxt->ud)
4410 return EMULATION_FAILED;
4411
4412 if (mode == X86EMUL_MODE_PROT64 && (ctxt->d & Stack)) 4409 if (mode == X86EMUL_MODE_PROT64 && (ctxt->d & Stack))
4413 ctxt->op_bytes = 8; 4410 ctxt->op_bytes = 8;
4414 4411