diff options
author | Huw Davies <huw@codeweavers.com> | 2014-04-16 05:02:51 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2014-04-22 17:37:43 -0400 |
commit | fd2a445a94d2ab6b39fb623dc02fee48d01a565a (patch) | |
tree | 82f5f73c92f313a19c756ee9664783fa6268dc37 /arch/x86/kvm | |
parent | 63b5cf04f4ede6046cc8771789e5ac40529f30e8 (diff) |
KVM: VMX: Advance rip to after an ICEBP instruction
When entering an exception after an ICEBP, the saved instruction
pointer should point to after the instruction.
This fixes the bug here: https://bugs.launchpad.net/qemu/+bug/1119686
Signed-off-by: Huw Davies <huw@codeweavers.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/vmx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index eb3f2b1b764c..8fb56e4cdf91 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -4841,6 +4841,9 @@ static int handle_exception(struct kvm_vcpu *vcpu) | |||
4841 | (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) { | 4841 | (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) { |
4842 | vcpu->arch.dr6 &= ~15; | 4842 | vcpu->arch.dr6 &= ~15; |
4843 | vcpu->arch.dr6 |= dr6; | 4843 | vcpu->arch.dr6 |= dr6; |
4844 | if (!(dr6 & ~DR6_RESERVED)) /* icebp */ | ||
4845 | skip_emulated_instruction(vcpu); | ||
4846 | |||
4844 | kvm_queue_exception(vcpu, DB_VECTOR); | 4847 | kvm_queue_exception(vcpu, DB_VECTOR); |
4845 | return 1; | 4848 | return 1; |
4846 | } | 4849 | } |