public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Liam Ni <zhiguangni01@gmail.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	x86@kernel.org, pbonzini@redhat.com, tglx@linutronix.de,
	dave.hansen@linux.intel.com
Subject: Re: [PATCH v2] KVM:x86: Clean up ModR/M "reg" initialization in reg op decoding
Date: Fri, 9 Sep 2022 14:57:39 +0000	[thread overview]
Message-ID: <YxtUYzT7XM5F9YDf@google.com> (raw)
In-Reply-To: <CACZJ9cVSYtda7oyJnMmNDtfZotXZu+0i-c8G8onLqj4sPDkCRg@mail.gmail.com>

On Fri, Sep 09, 2022, Liam Ni wrote:
> On Thu, 8 Sept 2022 at 23:50, Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Thu, Sep 08, 2022, Liam Ni wrote:
> > > From: Liam Ni <zhiguangni01@gmail.com>
> > >
> > > Refactor decode_register_operand() to get the ModR/M register if and
> > > only if the instruction uses a ModR/M encoding to make it more obvious
> > > how the register operand is retrieved.
> > >
> > > Signed-off-by: Liam Ni <zhiguangni01@gmail.com>
> > > ---
> >
> > Pushed to branch `for_paolo/6.1` at:
> >
> >     https://github.com/sean-jc/linux.git
> >
> > with the below nit sqaushed.  Unless you hear otherwise, it will make its way to
> > kvm/queue "soon".
> >
> > Note, the commit IDs are not guaranteed to be stable.
> >
> > >  arch/x86/kvm/emulate.c | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> > > index f092c54d1a2f..879b52af763a 100644
> > > --- a/arch/x86/kvm/emulate.c
> > > +++ b/arch/x86/kvm/emulate.c
> > > @@ -1137,9 +1137,11 @@ static int em_fnstsw(struct x86_emulate_ctxt *ctxt)
> > >  static void decode_register_operand(struct x86_emulate_ctxt *ctxt,
> > >                                   struct operand *op)
> > >  {
> > > -     unsigned reg = ctxt->modrm_reg;
> > > +     unsigned int reg;
> > >
> > > -     if (!(ctxt->d & ModRM))
> > > +     if ((ctxt->d & ModRM))
> >
> > Only need one set of parentheses.
> 
> Sorry,  Should I prepare a new patch?

Nope, all taken care of.  Thanks!

      reply	other threads:[~2022-09-09 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 14:12 [PATCH v2] KVM:x86: Clean up ModR/M "reg" initialization in reg op decoding Liam Ni
2022-09-08 15:50 ` Sean Christopherson
2022-09-09 13:47   ` Liam Ni
2022-09-09 14:57     ` Sean Christopherson [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=YxtUYzT7XM5F9YDf@google.com \
    --to=seanjc@google.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=zhiguangni01@gmail.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