Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, Kevin Tian <kevin.tian@intel.com>,
	Wei Liu <wl@xen.org>, Jun Nakajima <jun.nakajima@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] x86/vmx: reorder code in vmx_deliver_posted_intr
Date: Fri, 31 Jul 2020 15:56:56 +0200
Message-ID: <20200731135656.GB88772@Air-de-Roger> (raw)
In-Reply-To: <505b30dc-e504-918e-e676-70d856b76899@suse.com>

On Fri, Jul 31, 2020 at 03:05:52PM +0200, Jan Beulich wrote:
> On 30.07.2020 16:03, Roger Pau Monne wrote:
> > Remove the unneeded else branch, which allows to reduce the
> > indentation of a larger block of code, while making the flow of the
> > function more obvious.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
> One minor request (could likely be taken care of while
> committing):
> 
> > @@ -2014,41 +2016,36 @@ static void vmx_deliver_posted_intr(struct vcpu *v, u8 vector)
> >           * VMEntry as it used to be.
> >           */
> >          pi_set_on(&v->arch.hvm.vmx.pi_desc);
> > +        vcpu_kick(v);
> > +        return;
> >      }
> > -    else
> > -    {
> > -        struct pi_desc old, new, prev;
> >  
> > -        prev.control = v->arch.hvm.vmx.pi_desc.control;
> > +    prev.control = v->arch.hvm.vmx.pi_desc.control;
> >  
> > -        do {
> > -            /*
> > -             * Currently, we don't support urgent interrupt, all
> > -             * interrupts are recognized as non-urgent interrupt,
> > -             * Besides that, if 'ON' is already set, no need to
> > -             * sent posted-interrupts notification event as well,
> > -             * according to hardware behavior.
> > -             */
> > -            if ( pi_test_sn(&prev) || pi_test_on(&prev) )
> > -            {
> > -                vcpu_kick(v);
> > -                return;
> > -            }
> > -
> > -            old.control = v->arch.hvm.vmx.pi_desc.control &
> > -                          ~((1 << POSTED_INTR_ON) | (1 << POSTED_INTR_SN));
> > -            new.control = v->arch.hvm.vmx.pi_desc.control |
> > -                          (1 << POSTED_INTR_ON);
> > +    do {
> > +        /*
> > +         * Currently, we don't support urgent interrupt, all
> > +         * interrupts are recognized as non-urgent interrupt,
> > +         * Besides that, if 'ON' is already set, no need to
> > +         * sent posted-interrupts notification event as well,
> > +         * according to hardware behavior.
> > +         */
> 
> Would be nice to s/sent/send/ here as you move it (maybe also
> remove the plural from "posted-interrupts") and - if possible -
> re-flow for the now increased space on the right side.

Oh, sure, I should have realized myself. Feel free to adjust at commit
if you don't mind. I would also adjust 'non-urgent interrupts'.

Thanks, Roger.


  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 14:03 Roger Pau Monne
2020-07-31 13:05 ` Jan Beulich
2020-07-31 13:56   ` Roger Pau Monné [this message]
2020-08-14  5:49 ` Tian, Kevin

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=20200731135656.GB88772@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git