public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Huw Davies <huw@codeweavers.com>, kvm <kvm@vger.kernel.org>
Cc: Gleb Natapov <gleb@kernel.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH v2] KVM: vmx: Advance rip to after an ICEBP instruction.
Date: Mon, 28 Apr 2014 12:18:21 +0200	[thread overview]
Message-ID: <535E2AED.7050303@redhat.com> (raw)
In-Reply-To: <1397638971-12840-1-git-send-email-huw@codeweavers.com>

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 <huw@codeweavers.com>
>
> ---
> 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

      parent reply	other threads:[~2014-04-28 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  9:02 [PATCH v2] KVM: vmx: Advance rip to after an ICEBP instruction Huw Davies
2014-04-16  9:22 ` Jan Kiszka
2014-04-28 10:18 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=535E2AED.7050303@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@kernel.org \
    --cc=huw@codeweavers.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox