From: Paul Durrant <xadimgnik@gmail.com>
To: "'Roger Pau Monné'" <roger.pau@citrix.com>
Cc: <xen-devel@lists.xenproject.org>, "'Wei Liu'" <wl@xen.org>,
"'Jan Beulich'" <jbeulich@suse.com>,
"'Andrew Cooper'" <andrew.cooper3@citrix.com>
Subject: RE: [PATCH 4/5] x86/viridian: switch synic to use the new EOI callback
Date: Thu, 13 Aug 2020 10:36:07 +0100 [thread overview]
Message-ID: <005a01d67155$2c689aa0$8539cfe0$@xen.org> (raw)
In-Reply-To: <20200813085732.GE975@Air-de-Roger>
> -----Original Message-----
> From: Roger Pau Monné <roger.pau@citrix.com>
> Sent: 13 August 2020 09:58
> To: paul@xen.org
> Cc: xen-devel@lists.xenproject.org; 'Wei Liu' <wl@xen.org>; 'Jan Beulich' <jbeulich@suse.com>; 'Andrew
> Cooper' <andrew.cooper3@citrix.com>
> Subject: Re: [PATCH 4/5] x86/viridian: switch synic to use the new EOI callback
>
> On Thu, Aug 13, 2020 at 09:33:43AM +0100, Paul Durrant wrote:
> > > -----Original Message-----
> > > From: Roger Pau Monne <roger.pau@citrix.com>
> > > Sent: 12 August 2020 13:47
> > > To: xen-devel@lists.xenproject.org
> > > Cc: Roger Pau Monne <roger.pau@citrix.com>; Paul Durrant <paul@xen.org>; Wei Liu <wl@xen.org>; Jan
> > > Beulich <jbeulich@suse.com>; Andrew Cooper <andrew.cooper3@citrix.com>
> > > Subject: [PATCH 4/5] x86/viridian: switch synic to use the new EOI callback
> > >
> > > Switch synic interrupts to use an EOI callback in order to execute the
> > > logic tied to the end of interrupt. This allows to remove the synic
> > > call in vlapic_handle_EOI.
> > >
> > > Move and rename viridian_synic_ack_sint now that it can be made
> > > static.
> > >
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > ---
> > > I'm unsure about the logic in viridian_synic_deliver_timer_msg, as it
> > > seems to only set the vector in msg_pending when the message is
> > > already pending?
> >
> > See section 11.10.3 of the TLFS (SynIC Message Flags)...
> >
> > "The MessagePending flag indicates whether or not there are any
> > messages pending in the message queue of the synthetic interrupt
> > source. If there are, then an “end of message” must be performed by
> > the guest after emptying the message slot. This allows for
> > opportunistic writes to the EOM MSR (only when required). Note that
> > this flag may be set by the hypervisor upon message delivery or at
> > any time afterwards. The flag should be tested after the message
> > slot has been emptied and if set, then there are one or more pending
> > messages and the “end of message” should be performed."
> >
> > IOW it's a bit like APIC assist in that it tries to avoid a VMEXIT
> > (in this case an access to the EOM MSR) unless it is necessary.
> >
> > Reading the code again I think it may well be possible to get rid of
> > the 'msg_pending' flag since it only appears to be an optimization
> > to avoid testing 'message_type'. I'll try dropping it and see what
> > breaks.
>
Well nothing apparently broke. The EOM handler basically becomes a no-op too, but I think this is fine because we only use the synic for delivering timer messages at the moment.
Paul
next prev parent reply other threads:[~2020-08-13 9:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 12:47 [PATCH 0/5] x86/vlapic: implement EOI callbacks Roger Pau Monne
2020-08-12 12:47 ` [PATCH 1/5] x86/hvm: change EOI exit bitmap helper parameter Roger Pau Monne
2020-08-13 14:12 ` Andrew Cooper
2020-08-14 5:56 ` Tian, Kevin
2020-08-12 12:47 ` [PATCH 2/5] x86/vlapic: introduce an EOI callback mechanism Roger Pau Monne
2020-08-13 14:33 ` Andrew Cooper
2020-08-13 17:41 ` Roger Pau Monné
2020-08-25 5:56 ` Jan Beulich
2020-08-12 12:47 ` [PATCH 3/5] x86/vmsi: use the newly introduced EOI callbacks Roger Pau Monne
2020-08-13 8:19 ` Paul Durrant
2020-08-13 8:50 ` Roger Pau Monné
2020-08-24 14:06 ` Jan Beulich
2020-08-24 14:44 ` Roger Pau Monné
2020-08-24 16:07 ` Jan Beulich
2020-08-24 16:39 ` Roger Pau Monné
2020-08-25 5:47 ` Jan Beulich
2020-08-12 12:47 ` [PATCH 4/5] x86/viridian: switch synic to use the new EOI callback Roger Pau Monne
2020-08-13 8:33 ` Paul Durrant
2020-08-13 8:57 ` Roger Pau Monné
2020-08-13 9:36 ` Paul Durrant [this message]
2020-08-12 12:47 ` [PATCH 5/5] x86/vioapic: switch to use the EOI callback mechanism Roger Pau Monne
2020-08-25 8:35 ` Jan Beulich
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='005a01d67155$2c689aa0$8539cfe0$@xen.org' \
--to=xadimgnik@gmail.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=paul@xen.org \
--cc=roger.pau@citrix.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.