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

Re: [Xen-devel] [PATCH v2 2/5] arm: implement vcpu_mark_events_pending



On Fri, 24 Feb 2012, Ian Campbell wrote:
> On Fri, 2012-02-24 at 14:15 +0000, Stefano Stabellini wrote:
> > On Fri, 24 Feb 2012, David Vrabel wrote:
> > > On 24/02/12 10:33, Ian Campbell wrote:
> > > > On Thu, 2012-02-23 at 18:21 +0000, Stefano Stabellini wrote:
> > > >> Implement vcpu_mark_events_pending using the vgic to inject INT 63, 
> > > >> that
> > > >> we reserve for Xen usage.
> > > > 
> > > > Does this require a trap when the guest acks or EOIs this interrupt?
> > > > What about maintenance interrupts arising from injecting this?
> > 
> > Yes, we would get a maintenance interrupt in the hypervisor every time
> > the guest EOI's it.
> 
> We really want to avoid those.

yep

> > > > Might we want to instead inject this interrupt as an SGI, so that it
> > > > appears as a per-VCPU interrupt?
> > > 
> > > I don't think it's possible to register a SGI handler in Linux
> > > currently.  The mapping of IRQ numbers to GIC interrupts skips over the
> > > SGIs.  This would be easy to fix I think.
> > 
> > A per-vcpu interrupt that doesn't require an EOI would be ideal, however
> > like David wrote, it is not possible to register an SGI handler in Linux
> > at the moment. I'll give it a look though.
> 
> Do SGIs avoid the EOI and maintenance interrupt issues though?
 
SGI (or PPI) would avoid maintenance interrupt issues if we don't ask
for any maintenance interrupts in the LR.

It is easy to determine if an event notification interrupt has already
been EOI'd by the guest just looking at the evtchn_upcall_pending bit in
the shared_info page.
Also we can safely assume that there is at most one event notification
interrupt pending at any time in any set of LR registers because we
never inject more than a single event notification interrupt in one pcpu
(see vcpu_mark_events_pending).
Therefore checking for event notification interrupts that need to be
cleaned whenever we receive a maintenance interrupt and whenever we want
to inject a new interrupt should be enough.

More details and actual code in the next patch series.

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


 


Rackspace

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