From: Huw Davies Date: Wed, 16 Apr 2014 09:02:51 +0000 (+0100) Subject: KVM: VMX: Advance rip to after an ICEBP instruction X-Git-Tag: MMI-PSA29.97-13-9~11772^2~11^2~66 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd2a445a94d2ab6b39fb623dc02fee48d01a565a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reviewed-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- 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) (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) { vcpu->arch.dr6 &= ~15; vcpu->arch.dr6 |= dr6; + if (!(dr6 & ~DR6_RESERVED)) /* icebp */ + skip_emulated_instruction(vcpu); + kvm_queue_exception(vcpu, DB_VECTOR); return 1; }