[Top][All Lists]

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

[Qemu-devel] Hang when using 9p mounts after last Seabios update

From: Daniel P. Berrange
Subject: [Qemu-devel] Hang when using 9p mounts after last Seabios update
Date: Thu, 22 Sep 2011 12:45:11 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

I'm doing some experimentation with application sandboxing and running
QEMU with the following command line:

  exec $QEMU \
    -m 64 \
    -nographic \
    -nodefconfig \
    -nodefaults \
    -kernel ./kernel- \
    -initrd ./initrd- \
    -append 'init=/bin/sh console=ttyS0 debug' \
    -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/ \
virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=org.virttools.sandbox:/ \
    -serial stdio

On 0.14, 0.15 releaes, this all works just fine. On current GIT master,
the guest OS will hang during boot.

The hang always appears to occur when attempting to mount the *last*
virtio9p filesystem exported to the guest.

ie, in the above command line it hangs when mounting the root. If I
passthrough 2 more directories, eg 

    -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/custom-home \
virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=org.virttools.sandbox:/home \
    -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/custom-tmp \
virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=org.virttools.sandbox:/tmp \

then it will hang on the 3rd mount

[    0.798208] virtio-pci 0000:00:05.0: irq 45 for MSI/MSI-X
virt-sandbox-init: insmod /lib/modules/kernel/drivers/net/virtio_net.ko
virt-sandbox-init: insmod /lib/modules/kernel/drivers/virtio/virtio_balloon.ko
virt-sandbox-init: mounting new root on /tmproot
virt-sandbox-init: org.virttools.sandbox:/ -> /tmproot
virt-sandbox-init: chroot
virt-sandbox-init: /dev (tmpfs)
virt-sandbox-init: /dev/pts (devpts)
virt-sandbox-init: /root (tmpfs)
virt-sandbox-init: /sys (sysfs)
virt-sandbox-init: /proc (proc)
virt-sandbox-init: /selinux (selinuxfs)
virt-sandbox-init: org.virttools.sandbox:/home -> /home
virt-sandbox-init: org.virttools.sandbox:/tmp -> /tmp
[    1.036163] input: ImExPS/2 Generic Explorer Mouse as 

Now the really wierd thing.... if I add certain extra PCI device onto
the QEMU command line after all of the 9p filesystem devices, then
the hang goes away. Specifically adding '-vga std' or '-device e1000'
stops it hanging.  Adding '-device virtio-balloon' or '-device i6300esb'
does not prevent the hang.

I bisected the problem in QEMU master to this change which pulls in a
new SeaBios:

  commit d67c3f2cd92aed2247bfa8a9da61a902b7b2ff09
  Author: Gerd Hoffmann <address@hidden>
  Date:   Wed Aug 10 17:34:13 2011 +0200

    seabios: update to master
    commit 8e301472e324b6d6496d8b4ffc66863e99d7a505
    user visible changes in seabios:
      * ahci is enabled by default (and thus in this build).
      * bootorder support for ahci.
      * two-pass pci allocator (orders bars by size for better packing).
    Signed-off-by: Gerd Hoffmann <address@hidden>

I further bisected SeaBios between their 0.6.2 release and the changeset
mentioned above, and got to this changeset in SeaBios:

  commit 01a5c8813b2e709809c07c5d7fab9d1c3ddb4989
  Author: Gerd Hoffmann <address@hidden>
  Date:   Mon Jul 11 09:20:29 2011 +0200

    pci: activate two-pass pci initialization code
    This patch actually enables the two-pass pci initialization and
    deactivates the old pci initialization bits.
    Signed-off-by: Gerd Hoffmann <address@hidden>

Before this changeset everything works fine, after it, i get a hang on
9p mounts.

To reproduce this you will need my custom initrd for mounting 9p filesystems
as the root FS. You can get that here:


|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]