All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	jan.kiszka@siemens.com
Subject: Re: [PATCH 1/2] KVM: x86: handle hardware breakpoints during emulation
Date: Tue, 04 Jun 2013 16:06:06 +0200	[thread overview]
Message-ID: <51ADF44E.40100@redhat.com> (raw)
In-Reply-To: <20130604125310.GO4725@redhat.com>

Il 04/06/2013 14:53, Gleb Natapov ha scritto:
>> > 
> Yeah. What about:
>  if ((dr6 = guest_debug()))
>    return handle_gues_debug();
>  else if ((dr6 = check_bp()))
>    return handle_bp(dr6);

I'll try either this...

>>>> > >> If you do not want EMULATE_PROCEED, I can just use -1 instead in
>>>> > >> kvm_vcpu_check_breakpoint, and return if r < 0.
>>>> > >>
>>> > > But you need to know what to return EMULATE_DONE or EMULATE_USER_EXIT.
>> > 
>> > Sorry, _not_ return if r < 0.
>> > 
> Function that returns enum or -1? This is worse IMO. Return
> EMULATE_DONE/EMULATE_USER_EXIT via a pointer will be better.

... or this, and see what looks nicer.  But I like

   if (check_bp(&r))
       return r;

Thanks for the review.

Paolo


  reply	other threads:[~2013-06-04 14:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 16:00 [PATCH 0/2] KVM: x86: minimal debugging support during emulation Paolo Bonzini
2013-05-30 16:00 ` [PATCH 1/2] KVM: x86: handle hardware breakpoints " Paolo Bonzini
2013-06-04 11:28   ` Gleb Natapov
2013-06-04 11:33     ` Paolo Bonzini
2013-06-04 11:47       ` Gleb Natapov
2013-06-04 12:19         ` Paolo Bonzini
2013-06-04 12:53           ` Gleb Natapov
2013-06-04 14:06             ` Paolo Bonzini [this message]
2013-05-30 16:00 ` [PATCH 2/2] KVM: x86: handle singlestep " Paolo Bonzini

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=51ADF44E.40100@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.