[libvirt] [Question] About ivshmemory device and slot number confliction.

Hello, I want to use ivshmemory device which is supported by qemu, but libvirt does not support it. So I use qemu:commandline to make ivshmemory device in qemu command pass-through. But then hot-plug a virtio-net device failed. The reason is that a qemu:commandline pci device's slot number is assigned by qemu not libvirt. And hot-plug device's slot is assigned by libvirt. So it failed beacause of slot confliction. I have two questions to ask: 1. Why libvirt does not support ivshmemory device? If libvirt intends to support it, when? 2. Can libvirt handle with qemu:commandline pci device's slot number? Just like pci:commandline to assign a slot number. what's your opinion? Best Regards, -WangYufei

On Tue, Jan 28, 2014 at 09:17:46 +0000, Wangyufei (James) wrote:
Hello,
I want to use ivshmemory device which is supported by qemu, but libvirt does not support it. So I use qemu:commandline to make ivshmemory device in qemu command pass-through. But then hot-plug a virtio-net device failed. The reason is that a qemu:commandline pci device's slot number is assigned by qemu not libvirt. And hot-plug device's slot is assigned by libvirt. So it failed beacause of slot confliction.
I have two questions to ask: 1. Why libvirt does not support ivshmemory device? If libvirt intends to support it, when?
There were some attempts to start implementing ivshmemory support for libvirt but no real patches were provided. It seems nobody is interested enough to actually write support for this in libvirt.
2. Can libvirt handle with qemu:commandline pci device's slot number? Just like pci:commandline to assign a slot number. what's your opinion?
No. If you use qemu:commandline you need to handle that yourself and explicitly specify PCI addresses when hotplugging additional devices so that no collision occurs. Jirka

On Tue, Jan 28, 2014 at 09:17:46AM +0000, Wangyufei (James) wrote:
Hello,
I want to use ivshmemory device which is supported by qemu, but libvirt does not support it. So I use qemu:commandline to make ivshmemory device in qemu command pass-through. But then hot-plug a virtio-net device failed. The reason is that a qemu:commandline pci device's slot number is assigned by qemu not libvirt. And hot-plug device's slot is assigned by libvirt. So it failed beacause of slot confliction.
Yes, that's pretty much expected behaviour if you use qemu:commandline for adding more devices, since this is all invisible as far as libvirt is concerned.
I have two questions to ask: 1. Why libvirt does not support ivshmemory device? If libvirt intends to support it, when?
No one has ever done the work required to support it. We need two things to handle it. First we need to be able to configure the guest, but second we need to actually have a ivmshm daemon in the host to support it. The existing ivmshm daemon was just a proof of concept demo by the original developers and not something that is intended for real world use. Their recommendation is that libvirt provide a daemon for this role. We'd love to see someone work on this....
2. Can libvirt handle with qemu:commandline pci device's slot number? Just like pci:commandline to assign a slot number. what's your opinion?
No, qemu:commandline is intended to be completely opaque to libvirt. We don't want to get into the business of parsing command line strings to guess PCI slot numbers. The right solution is to propperly support ivmshm. Daniel -- |: 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 :|
participants (3)
-
Daniel P. Berrange
-
Jiri Denemark
-
Wangyufei (James)