[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] x86/hvm: re-work viridian APIC assist code



> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf
> Of Paul Durrant
> Sent: 05 September 2018 10:43
> To: 'David Woodhouse' <dwmw2@xxxxxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Eslam Elnikety <elnikety@xxxxxxxxx>; Andrew Cooper
> <Andrew.Cooper3@xxxxxxxxxx>; Shan Haitao <haitao.shan@xxxxxxxxx>; Jan
> Beulich <jbeulich@xxxxxxxx>
> Subject: Re: [Xen-devel] [PATCH v2] x86/hvm: re-work viridian APIC assist
> code
> 
> > -----Original Message-----
> > From: David Woodhouse [mailto:dwmw2@xxxxxxxxxxxxx]
> > Sent: 05 September 2018 10:40
> > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> > Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Jan Beulich
> > <jbeulich@xxxxxxxx>; Eslam Elnikety <elnikety@xxxxxxxxx>; Shan Haitao
> > <haitao.shan@xxxxxxxxx>
> > 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@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.