aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2007-05-17 08:50:34 -0400
committerAvi Kivity <avi@qumranet.com>2007-07-16 05:05:41 -0400
commitb3f37707b05e9ce82d5bec660e9d0b15452ee9a0 (patch)
treea4d210f6449be292cfd9171c3e3e972ff2773234 /drivers/kvm/vmx.c
parentcd2276a795b013d1416c96b38eec90a66cdd10c4 (diff)
KVM: VMX: Handle #SS faults from real mode
Instructions with address size override prefix opcode 0x67 Cause the #SS fault with 0 error code in VM86 mode. Forward them to the emulator. Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index c4c553588a20..a05bfa085877 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1488,7 +1488,11 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,
1488 if (!vcpu->rmode.active) 1488 if (!vcpu->rmode.active)
1489 return 0; 1489 return 0;
1490 1490
1491 if (vec == GP_VECTOR && err_code == 0) 1491 /*
1492 * Instruction with address size override prefix opcode 0x67
1493 * Cause the #SS fault with 0 error code in VM86 mode.
1494 */
1495 if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0)
1492 if (emulate_instruction(vcpu, NULL, 0, 0) == EMULATE_DONE) 1496 if (emulate_instruction(vcpu, NULL, 0, 0) == EMULATE_DONE)
1493 return 1; 1497 return 1;
1494 return 0; 1498 return 0;