On Wed, Mar 27, 2013 at 03:02:01PM +0100, Stefan Hajnoczi wrote: > On Wed, Mar 27, 2013 at 02:32:19PM +0100, Stefan Hajnoczi wrote: > > On Tue, Mar 26, 2013 at 11:10:35PM +0800, 张磊强 wrote: > > > Hi, Paolo && Stefan: > > > > > > When I test the dataplane feature with qemu master, I find that > > > Windows (Windows 7 and Windows 2003) VM will hang if dataplane is > > > enabled. But if I try to start a Fedora VM, it can start normally. > > > > > > The command I boot QEMU is: > > > x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 1024 -smp 2 -drive > > > file=win7.img,if=none,id=drive-virtio-disk,format=raw,cache=none,aio=native > > > -device > > > virtio-blk-pci,config-wce=off,scsi=off,x-data-plane=on,drive=drive-virtio-disk,id=virtio-disk > > > > > > I found the similar bug has reported some days ago: > > > http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02200.html > > > . And a patch for this bug has already committed by Paolo at Mar 13: > > > http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02200.html > > > . > > > > > > But it cannot work under my environment. Could you give me some advise > > > to debug this problem ? I can provide more information if need. > > > > Hi, > > I haven't gotten to the bottom of it yet but wanted to let you know that > > I'm seeing a hang at the boot screen after the installer reboots. The > > Windows logo animation runs but the guest seems unable to make progress. > > > > Will let you know when there is a fix. The guest I'm testing is Windows > > 7 Professional 64-bit. > > > > As a workaround you can set x-data-plane=off to boot the guest for the > > first time. Subsequent boots will succeed with x-data-plane=on. > > Next data point, it's not caused by the Paolo's AioContext conversion. > This means it's unrelated to the recent bug that you mentioned. > > The boot gets stuck immediately after the switch from the BIOS > virtio-blk driver to the Windows viostor driver. We get two requests > (VIRTIO_BLK_T_GET_ID and VIRTIO_BLK_T_READ) and then the guest stops. > The descriptor index of the second request has been incremented, perhaps > the guest is not receiving host->guest notifies.
Okay, getting closer to the root cause now. The guest driver has not enabled MSI-X and the guest notifier that dataplane uses is not hooked up to anything. When MSI-X is enabled the guest notifier is hooked up to irqfd and when MSI-X is disabled it is supposed to bounce back into QEMU which issues an ioctl for the interrupt. We've gotten into a state where the guest notifier exists but nothing is listening to it :). Therefore the guest is stuck waiting for virtio-blk I/O requests to complete. Stefan