Subject: Re: port-xen/29999: ctrl_if_interrupt IPL problem
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-bugs
Date: 04/19/2005 09:04:37
On Tue, Apr 19, 2005 at 09:06:57AM +0900, YAMAMOTO Takashi wrote:
> hi,
> 
> > We could move __ctrl_if_tx_tasklet() to run from the softintr. This would
> > fix the wakeup issue.
> > For softintr_schedule(), we could probably use IPL_SOFTXENEVT instead of
> > IPL_SOFTNET, and call ctrl_if_softintr_handler() from the assemby code
> > instead. This should take care of the issue.
> 
> you mean (ab)using softintr() as xenevt does?

Yes

> i think it should work.
> 
> (although i'm not entirely happy with how xenevt works,
> making hacks similar is a good thing :-)
> 
> > IPL_CTRL needs to be very high because the console I/O is done though
> > control messages on guest domains, and there's no way to poll for keyboard
> > input. So, to get ddb working in guest domains, we need to have control
> > events enabled while in ddb.
> 
> "keyboard input" meant "console input"?

Yes, sorry for the bad wordings here

> 
> > I guess we could also be busy-looping waiting for the event, but it
> > would not be nice to other guests domains.
> 
> if there's a way to poll events (i couldn't find any),
> i think it's better to use it because ddb needs to do busy-loop anyway.

Not here, xenconscn_getc() calls HYPERVISOR_yield() when it waits for
input, so it won't consume CPU. But HYPERVISOR_yield() won't return unless
interrupts are enabled.

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