xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Paul Durrant <Paul.Durrant@citrix.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 04:24:41 -0600	[thread overview]
Message-ID: <56EBE57902000078000DE476@prv-mh.provo.novell.com> (raw)
In-Reply-To: <c50120a6347c4c60a508d2c2e231f289@AMSPEX02CL03.citrite.net>

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

>> > +    /*
>> > +     * 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.

Jan


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

  reply	other threads:[~2016-03-18 10:24 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 [this message]
2016-03-18 10:30         ` Paul Durrant
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=56EBE57902000078000DE476@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=Stefano.Stabellini@citrix.com \
    --cc=keir@xen.org \
    --cc=wei.liu2@citrix.com \
    --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
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).