Port-i386 archive

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

Re: cleaning up NMI handling in trap()



On Sat, Mar 19, 2011 at 12:10:39PM -0500, David Young wrote:
> On Sat, Mar 19, 2011 at 12:09:13PM +0100, Manuel Bouyer wrote:
> > On Fri, Mar 18, 2011 at 05:02:29PM -0500, David Young wrote:
> > > On Fri, Mar 18, 2011 at 09:50:10PM +0100, Manuel Bouyer wrote:
> > > > nmi_dispatch() is not available for xen; but it's now called
> > > > inconditionally from trap(). Did you forget to add a dummy
> > > > implementation for XEN ?
> > > 
> > > I added it to the xen kernel build.  Is there some reason it will not
> > > work on xen?
> > 
> > I guess I missed this from your patch. Well, it'll probably never be
> > called on Xen, as the hypervisor will catch it and will probably panic
> > itself.
> 
> I hope that it doesn't panic the hypervisor!  Another developer's desire
> to force a NetBSD DomU into ddb by sending an NMI with 'xm nmi' is what
> set me down this path. :-)

I don't have such a command in my xm; I guess it's something newer
than Xen 3.3. 
Some more work may be needed on the NetBSD side for this to work
(for a PV guest - for a HVM guest I guess it works out of the box).

BTW, I was talking about a real NMI from hardware, not a emulated one.

> 
> Does the hypervisor provide some other channel for notifying a DomU
> of exceptions with high priority?  Maybe NMI is only intended to be
> available to HVM guests.  When PCI pass-through is used, I wonder if
> there is a Xen-specific channel for telling guests, "PCI SERR# asserted
> on bus 0".

I don't know of this kind of event for this specific example,
but there is a debug even (which cause the guest to print some interesting
infos about its state) and a xen_failsafe_handler() which is a second
callback next to events. With now xen_failsafe_handler() just calls panic,
and I think I've never seen this one fire so I don't know what could cause
it to be called.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index