Skip to content

Commit fd2a445

Browse files
hdmdaviesmatosatti
authored andcommitted
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>
1 parent 63b5cf0 commit fd2a445

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kvm/vmx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4841,6 +4841,9 @@ static int handle_exception(struct kvm_vcpu *vcpu)
48414841
(KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) {
48424842
vcpu->arch.dr6 &= ~15;
48434843
vcpu->arch.dr6 |= dr6;
4844+
if (!(dr6 & ~DR6_RESERVED)) /* icebp */
4845+
skip_emulated_instruction(vcpu);
4846+
48444847
kvm_queue_exception(vcpu, DB_VECTOR);
48454848
return 1;
48464849
}

0 commit comments

Comments
 (0)