[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Rats nest with domain pirq initialisation
On Wed, Sep 05, 2018 at 01:39:18PM +0100, Andrew Cooper wrote: > On 05/09/18 13:25, Jan Beulich wrote: > >>>> On 05.09.18 at 14:04, <andrew.cooper3@xxxxxxxxxx> wrote: > >> On 05/09/18 08:24, Jan Beulich wrote: > >>>>>> On 04.09.18 at 20:44, <andrew.cooper3@xxxxxxxxxx> wrote: > >>>> The path which blows up is: > >>>> > >>>> arch_domain_destroy() > >>>> free_domain_pirqs() > >>>> unmap_domain_pirq() > >>>> irq_deny_access() > >>>> rangeset_remove_singleton((d)->irq_caps, i) > >>> But what IRQ do we find to unmap here? There can't be any that have > >>> been mapped, when ->irq_caps is still NULL. IOW I don't currently see > >>> how domain_pirq_to_irq() would legitimately return a positive value at > >>> this point in time, yet that's what guards the calls to > >>> unmap_domain_pirq(). > >> It is pirq 2 which explodes, which is the first of the redundant pirq > >> structures allocated for legacy routing. > >> > >> I'm not sure I understand this code well enough to comment on why > >> domain_pirq_to_irq() returns a positive value at this point, but I'm > >> going to go out on a limb and suggest it might be related to our > >> unnecessary(?) preallocation. > > I've meanwhile considered this as the reason, too. And iirc the > > pre-allocation is because guests (including Dom0) bypass some of > > the setup they would do for non-legacy IRQs. This may have been > > just a XenoLinux (mis)behavior, but even then I'm not convinced > > we could easily alter things. > > Bypass which setup? One way or another they have to bind the irq before > it can be used, so I still don't see why any structure preallocation is > needed. (Reservation of legacy irq numbers, perahps.) For PIRQs you need to first allocate a PIRQ, then configure it and bind the PIRQ to an event channel. I have no idea, but it wouldn't seem that weird that old Dom0 kernels would assume that legacy IRQs (<16) are already allocated, and just configure and bind them. Last time I looked when working on legacy PVH support for FreeBSD pvops Linux would correctly allocate legacy PIRQs before attempting to bind them, but I haven't looked at classic xenolinux Dom0 kernels. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |