kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2] KVM: VMX: Improve handle_external_interrupt_irqoff inline assembly
Date: Mon, 27 Apr 2020 15:30:35 -0700	[thread overview]
Message-ID: <20200427223035.GV14870@linux.intel.com> (raw)
In-Reply-To: <CAFULd4bJR0bHCkbHdioBtKCs6=cRyrj8v6XYCezrNLUTf8OwgA@mail.gmail.com>

On Mon, Apr 27, 2020 at 10:08:01PM +0200, Uros Bizjak wrote:
> On Mon, Apr 27, 2020 at 9:25 PM Sean Christopherson
> <sean.j.christopherson@intel.com> wrote:
> >
> > On Sun, Apr 26, 2020 at 01:52:55PM +0200, Uros Bizjak wrote:
> > > Improve handle_external_interrupt_irqoff inline assembly in several ways:
> > > - use "n" operand constraint instead of "i" and remove
> >
> > What's the motivation for using 'n'?  The 'i' variant is much more common,
> > i.e. less likely to trip up readers.
> >
> >   $ git grep -E "\"i\"\s*\(" | wc -l
> >   768
> >   $ git grep -E "\"n\"\s*\(" | wc -l
> >   11

...

> PUSH is able to use "i" here, since the operand is word wide. But, do
> we really want to allow symbol references and labels here?

No, but on the other hand, I doubt this particular code is going to change
much.  I don't have a strong preference.

> > >   unneeded %c operand modifiers and "$" prefixes
> > > - use %rsp instead of _ASM_SP, since we are in CONFIG_X86_64 part
> > > - use $-16 immediate to align %rsp
> >
> > Heh, this one depends on the reader, I find 0xfffffffffffffff0 to be much
> > more intuitive, though admittedly also far easier to screw up.
> 
> I was beaten by this in the past ... but don't want to bikeshed here.

I'm good with either approach.  Same as above, the argument for keeping the
existing code is that it's there, it works, and from some people it's more
readable.

  reply	other threads:[~2020-04-27 22:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 11:52 [PATCH v2] KVM: VMX: Improve handle_external_interrupt_irqoff inline assembly Uros Bizjak
2020-04-27 19:25 ` Sean Christopherson
2020-04-27 20:08   ` Uros Bizjak
2020-04-27 22:30     ` Sean Christopherson [this message]
2020-04-28 12:31       ` Uros Bizjak
2020-04-28 13:48 ` Paolo Bonzini
2020-05-03 22:23   ` Uros Bizjak
2020-05-03 23:08     ` Uros Bizjak

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=20200427223035.GV14870@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=ubizjak@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;
as well as URLs for NNTP newsgroup(s).