xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>, "Keir (Xen.org)" <keir@xen.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@citrix.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v5 2/2] x86/hvm/viridian: Enable APIC assist enlightenment
Date: Fri, 18 Mar 2016 10:30:15 +0000	[thread overview]
Message-ID: <a9814f53debe40e29f317bb4d7515e6d@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <56EBE57902000078000DE476@prv-mh.provo.novell.com>

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 18 March 2016 10:25
> To: Paul Durrant
> Cc: Andrew Cooper; Ian Jackson; Stefano Stabellini; Wei Liu; xen-
> devel@lists.xenproject.org; Keir (Xen.org)
> Subject: RE: [PATCH v5 2/2] x86/hvm/viridian: Enable APIC assist
> enlightenment
> 
> >>> On 18.03.16 at 11:06, <Paul.Durrant@citrix.com> wrote:
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> Sent: 17 March 2016 16:43
> >> >>> On 17.03.16 at 13:13, <paul.durrant@citrix.com> wrote:
> >> > @@ -1170,10 +1183,27 @@ int vlapic_has_pending_irq(struct vcpu *v)
> >> >           !nestedhvm_vcpu_in_guestmode(v) )
> >> >          return irr;
> >> >
> >> > +    /*
> >> > +     * If APIC assist was used then there may have been no EOI so
> >> > +     * we need to clear the requisite bit from the ISR here, before
> >> > +     * comparing with the IRR.
> >> > +     */
> >> > +    if ( viridian_complete_apic_assist(v, &vector) &&
> >> > +         vector != -1 )
> >>
> >> Afaict "vector" is uninitialized here when initialize_apic_assist()
> >> didn't run for that vCPU yet (which includes the case where no
> >> Viridian emulation is active at all).
> >>
> >
> > Yes, vector will be uninitialized in that case but viridian
> > _complete_apic_assist() will return 0 (because the va will be zero) and so
> > the second clause of the if will not be evaluated.
> 
> Ah, true. But raises the question why viridian_complete_apic_assist()
> doesn't return the vector then rather then using indirection.
> 

Yes, I guess that would be more obvious.

> >> > +    /*
> >> > +     * This vector is edge triggered and there are no lower priority
> >> > +     * vectors pending, so we can use APIC assist to avoid exiting
> >> > +     * for EOI.
> >> > +     */
> >> > +    viridian_start_apic_assist(v, vector);
> >> >
> >> > +done:
> >>
> >> Labels indented by at least one space please.
> >
> > OK, sorry, emacs keeps moving them back.
> 
> That's very unfriendly of it.
> 

Indeed.

  Paul

> Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-18 10:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 12:13 [PATCH v4 0/2] x86/hvm/viridian: APIC assist Paul Durrant
2016-03-17 12:13 ` [PATCH v5 1/2] x86/hvm/viridian: keep APIC assist page mapped Paul Durrant
2016-03-17 12:13 ` [PATCH v5 2/2] x86/hvm/viridian: Enable APIC assist enlightenment Paul Durrant
2016-03-17 16:43   ` Jan Beulich
2016-03-18 10:06     ` Paul Durrant
2016-03-18 10:24       ` Jan Beulich
2016-03-18 10:30         ` Paul Durrant [this message]
2016-03-18 10:58           ` Ian Jackson

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=a9814f53debe40e29f317bb4d7515e6d@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Stefano.Stabellini@citrix.com \
    --cc=keir@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [PATCH v5 2/2] x86/hvm/viridian: Enable APIC assist enlightenment' \
    /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

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).