WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Serial console hangs with Linux 2.6.20 HVM guest

To: Anders Kaseorg <andersk@xxxxxxx>
Subject: Re: [Xen-devel] Serial console hangs with Linux 2.6.20 HVM guest
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 5 Feb 2009 17:04:23 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 05 Feb 2009 09:05:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1233800599.5398.0.camel@balanced-tree>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <1233800599.5398.0.camel@balanced-tree>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Anders Kaseorg writes ("[Xen-devel] Serial console hangs with Linux 2.6.20 HVM 
guest"):
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=40b36daad0ac704e6d5c1b75789f371ef5b053c1

Thanks for this.  However looking at the code I'm not sure that's
what's actually going on.  Very old versions of qemu did have the bug
that patch describes, but it was fixed in qemu upstream in 2004 in
this commit:

  commit 60e336dbb837ef4d5053433f9ee391feb102be36
  Author: bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
  Date:   Tue Aug 24 21:55:28 2004 +0000

      serial interrupt fix (Hampa Hug)

      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1049 
c046a42c-6fe2-441c-8c8c-71466251a162

As far as I can see this fix is included in all relevant versions of
qemu.  The upstream Linux changeset seems like it would fix any
general IRQ loss problem with the UART.

If you can reproduce this problem, I would like to try to debug it.

Probably the best way is to attach to the running qemu with gdb:
  * Add
       CFLAGS += -g -O0
    to xen-unstable.hg/.config (creating it if necessary) and rebuild
    and install the resulting qemu-dm binary where it will be built.
  * Start the VM in the usual way.
  * cd to the qemu-xen-unstable tree (probably tools/ioemu-remote);
    use ps to find the pid of qemu-dm, and say
        gdb i386-dm/qemu-dm <pid>
    and then at the gdb prompt say
        handle SIGUSR2 nostop noprint
        break serial_ioport_write if (addr&7)==1
        cont
  * do whatever it is that makes the VM stuck
  * when it next stops it will be in serial_ioport_write setting
    the IER.  So
        print val
        print *s
    and email the output to this list.

NB I haven't tested this recipe.  If you get syntax errors or
something doesn't work I'll actually do so and let you know what to
type.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel