From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: Serial console hangs with Linux 2.6.20 HVM guest Date: Tue, 10 Feb 2009 15:34:05 +0000 Message-ID: <18833.40557.119090.48930@mariner.uk.xensource.com> References: <1233800599.5398.0.camel@balanced-tree> <18827.7191.646173.99255@mariner.uk.xensource.com> <1233862446.5676.28.camel@balanced-tree> <1233870772.5676.40.camel@balanced-tree> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1233870772.5676.40.camel@balanced-tree> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anders Kaseorg Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Anders Kaseorg writes ("Re: [Xen-devel] Serial console hangs with Linux 2.6.20 HVM guest"): > In case this is more interesting, here is a log of all the breakpoints > hit during a Linux boot, up to the point where it hangs: > > http://web.mit.edu/andersk/Public/xen-serial-log Thanks, that's great. But I think it's a kernel bug. The last thing the kernel does is read the IIR (Interrupt Identification Register) twice at a time when the transmit FIFO is empty. Reading the IIR is (sadly) not a side-effect-free operation; specifically, it cancels any outstanding transmit fifo/buffer empty interrupt[1]. So the first time it gets told `Transmit Holding Register Empty interrupt', but that has the effect of clearing the interrupt so the second time it reads the IIRC it gets `no interrupt pending'. [1] I'm getting this out of the National Semiconductor datasheet for the PC16550D, document number TL/C/8652, June 1995. See for example section 8.11 `FIFO Interrupt Mode Operation' item A: The transmit holding register interrupt (02) occurs when the XMIT FIFO is empty; it is cleared as soon as the transmitter holding register is written to ([...]) or the IIR is read. As far as I can see qemu-dm is emulating this accurately. Can you point me at the exact kernel source code you're using ? Thanks, Ian.