RE: pci-stub error and MSI-X for KVM guest

Fischer, Anna
2010-01-04T11:43:35Z

> Subject: RE: pci-stub error and MSI-X for KVM guest
>
> > Subject: Re: pci-stub error and MSI-X for KVM guest
> >
> > * Fischer, Anna (anna.fischer@hp.com) wrote:
> > > > Subject: Re: pci-stub error and MSI-X for KVM guest
> > > > > This works fine in principle and I can see the PCI device in the
> > > > > guest under lspci. However, the 82576 VF driver requires the OS
> > > > > to support MSI-X. My Fedora installation is configured with MSI-
> X,
> > > > > e.g. CONFIG_PCI_MSI is 'y'. When I load the driver it tells me
> it
> > > > cannot
> > > > > initialize MSI-X for the device, and under /proc/interrupts I
> can
> > see
> > > > > that MSI-X does not seem to work. Is this a KVM/QEMU limitation?
> > It
> > > > works
> > > > > for me when running the VF driver under a non-virtualized Linux
> > system.
> > > >
> > > > No, this should work fine. QEMU/KVM supports MSI-X to guest as
> well
> > as
> > > > VFs.
> > >
> > > Actually, I just got this to work. However, it only works if I call
> > > qemu-kvm from the command line, while it doesn't work when I start
> > > the guest via the virt-manager. So this seems to be an issue with
> > > Fedora's virt-manager rather than with KVM/QEMU. If I call qemu-kvm
> > > from the command line then I get the pci-stub messages saying 'irq
> xx
> > > for MSI/MSI-x' when the guest boots up and the VF device works just
> > fine
> > > inside the guest. When I start the guest using virt-manager then I
> > don't
> > > see any of these irq allocation messages from pci-stub. Any idea
> what
> > > the problem could be here?
> >
> > No, sounds odd. Can you:
> >
> > # virsh dumpxml [domain]
> >
> > and show the output of the hostdev XML section?
>
> <hostdev mode='subsystem' type='pci' managed='yes'>
>
>
>
> </hostdev>
>
> The device to assign is at 0000:03:10.3, dmesg shows:
>
> pci-stub 0000:03:10.3: enabling device (0000 -> 0002)
> assign device: host bdf = 3:10:3

I forgot, here is the process that the virt-manager GUI creates, e.g. this is the one that does not work.

qemu 3072 1 4 11:26 ? 00:00:33 /usr/bin/qemu-kvm -S -M pc-0.11 -m 1024 -smp 1 -name FC10-2 -uuid b811b278-fae2-a3cc-d51d-8f5b078b2477 -monitor unix:/var/lib/libvirt/qemu/FC10-2.monitor,server,nowait -boot c -drive file=/var/lib/libvirt/images/FC10-2.img,if=virtio,index=0,boot=on -drive file=/home/af/Download/Fedora-12-x86_64-Live-KDE.iso,if=ide,media=cdrom,index=2 -net none -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-gb -vga cirrus -soundhw es1370 -pcidevice host=03:10.3

Note that this one does work from the command line, but not via the GUI.

For the debugging to work, I need the '-s' option to be added too...

Cheers,
Anna