From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Kaseorg Subject: Serial console hangs with Linux 2.6.20 HVM guest Date: Tue, 03 Feb 2009 20:50:53 -0500 Message-ID: <1233712253.5023.4.camel@balanced-tree> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org I am seeing a problem with the Xen emulated serial console. When running a Linux 2.6.20 HVM guest that has CONFIG_HOTPLUG_CPU=3Dn, the guest blocks on output to the console until it receives input keypresses from `xm console`. This prevents the guest from booting up without banging on some keys, and makes interactive use of the console difficult. By bisecting Linux kernel commits, I found that the bug goes away in commit 40b36daad0ac704e6d5c1b75789f371ef5b053c1 (v2.6.21-rc1~261), which is a workaround for buggy UARTs on certain HP machines. http://git.kernel.org/?p=3Dlinux/kernel/git/torvalds/linux-2.6.git;a=3Dco= mmit;h=3D40b36daad0ac704e6d5c1b75789f371ef5b053c1 =E2=80=9CThe patch below works around a minor bug found in the UART of th= e remote management card used in many HP ia64 and parisc servers (aka the Diva UARTs). The problem is that the UART does not reassert the THRE interrupt if it has been previously cleared and the IIR THRI bit is re-enabled. This can produce a very annoying failure mode when used as a serial console, allowing a boot/reboot to hang indefinitely until an RX interrupt kicks it into working again (ie. an unattended reboot could stall).=E2=80=9D That matches my symptoms exactly, which suggests that the Xen UART probably has a similar bug. I=E2=80=99ve seen this in Xen 3.2.1 and 3.3.1. (My host is running Debia= n Lenny amd64, with the Xen dom0 kernel 2.6.24-23-xen from Ubuntu Hardy, on a server with two quad-core Xeons.) Anders