All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>,
	'David Woodhouse' <dwmw2@infradead.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Eslam Elnikety <elnikety@amazon.de>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Shan Haitao <haitao.shan@intel.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v2] x86/hvm: re-work viridian APIC assist code
Date: Wed, 5 Sep 2018 10:40:53 +0000	[thread overview]
Message-ID: <c8285b35d7454faeb8bae5d558807522@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <2135f2c459ee45e2a038a9fbc9145392@AMSPEX02CL03.citrite.net>

> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On Behalf
> Of Paul Durrant
> Sent: 05 September 2018 10:43
> To: 'David Woodhouse' <dwmw2@infradead.org>; xen-
> devel@lists.xenproject.org
> Cc: Eslam Elnikety <elnikety@amazon.de>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; Shan Haitao <haitao.shan@intel.com>; Jan
> Beulich <jbeulich@suse.com>
> Subject: Re: [Xen-devel] [PATCH v2] x86/hvm: re-work viridian APIC assist
> code
> 
> > -----Original Message-----
> > From: David Woodhouse [mailto:dwmw2@infradead.org]
> > Sent: 05 September 2018 10:40
> > To: Paul Durrant <Paul.Durrant@citrix.com>; xen-
> devel@lists.xenproject.org
> > Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>; Jan Beulich
> > <jbeulich@suse.com>; Eslam Elnikety <elnikety@amazon.de>; Shan Haitao
> > <haitao.shan@intel.com>
> > Subject: Re: [Xen-devel] [PATCH v2] x86/hvm: re-work viridian APIC assist
> > code
> >
> > On Wed, 2018-09-05 at 09:36 +0000, Paul Durrant wrote:
> > >
> > > I see. Given that Windows has used APIC assist to circumvent its EOI
> > > then I wonder whether we can get away with essentially doing the
> > > same. I.e. for a completed APIC assist found in
> > > vlapic_has_pending_irq() we simply clear the APIC assist and highest
> > > vector in the ISR, rather than calling through to vlapic_EOI_set()
> > > and suffering the overhead. I'll spin up a patch and give it a whirl.
> >
> > I think that's fine if you don't actually pass unmaskable MSIs through
> > to the guest in question, but if you *do* then you still need the EOI
> > to happen properly to "unmask" it.
> >
> > Hence my approach which is basically doing what you said and bypassing
> > the expensive part of hvm_dpci_msi_eoi(), but *only* if there's no
> > unmaskable MSI to worry about.
> 
> Yeah, I'm kind of trusting Windows to only use APIC assist in the case where
> it is sure there is no need to EOI. Perhaps your approach is safer.
> 

Actually the neatest approach would be to get information into the vlapic code as to whether APIC assist is suitable for the given vector so that the code there can selectively enable it, and then Xen would know it was safe to avoid fully emulating an EOI for anything that did have assist enabled.

  Paul

>   Paul
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-09-05 10:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 15:10 [PATCH v2] x86/hvm: re-work viridian APIC assist code Paul Durrant
2018-01-18 16:21 ` Jan Beulich
2018-01-18 16:27   ` Paul Durrant
2018-08-24 23:38 ` David Woodhouse
2018-09-03 10:12   ` Paul Durrant
2018-09-04 20:31     ` David Woodhouse
2018-09-05  9:36       ` Paul Durrant
2018-09-05  9:40         ` David Woodhouse
2018-09-05  9:43           ` Paul Durrant
2018-09-05 10:40             ` Paul Durrant [this message]
2018-09-05 10:45               ` David Woodhouse
2018-09-05 10:48                 ` Paul Durrant
2020-08-11 13:25   ` [Xen-devel] " David Woodhouse
2020-08-12 13:43     ` Roger Pau Monné
2020-08-13  8:10     ` Paul Durrant
2020-08-13  9:45       ` Roger Pau Monné
2020-08-14 14:13         ` David Woodhouse
2020-08-14 14:41           ` Roger Pau Monné
2020-08-19  7:12         ` Jan Beulich
2020-08-19  8:26           ` Roger Pau Monné

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=c8285b35d7454faeb8bae5d558807522@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=dwmw2@infradead.org \
    --cc=elnikety@amazon.de \
    --cc=haitao.shan@intel.com \
    --cc=jbeulich@suse.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 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.