From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2] KVM: vmx: Advance rip to after an ICEBP instruction. Date: Mon, 28 Apr 2014 12:18:21 +0200 Message-ID: <535E2AED.7050303@redhat.com> References: <1397638971-12840-1-git-send-email-huw@codeweavers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Marcelo Tosatti , Jan Kiszka To: Huw Davies , kvm Return-path: Received: from mx1.redhat.com ([209.132.183.28]:19401 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754957AbaD1KT5 (ORCPT ); Mon, 28 Apr 2014 06:19:57 -0400 In-Reply-To: <1397638971-12840-1-git-send-email-huw@codeweavers.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 16/04/2014 11:02, Huw Davies ha scritto: > 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 > > --- > v2: Mask off DR6_RESERVED before comparing to zero. > > arch/x86/kvm/vmx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 1f68c58..930a0df 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; > } > This was applied to kvm/next by Marcelo. Thanks for contributing to KVM! Paolo