On Fri, Feb 08, 2013 at 06:32:22PM +0100, Viktor Mihajlovski wrote: > This commit adds the QEMU driver support for CCW addresses. The > current QEMU only allows virtio devices to be attached to the > CCW bus. We named the new capability indicating that support > QEMU_CAPS_VIRTIO_CCW accordingly. > > The fact that CCW devices can only be assigned to domains with a > machine type of s390-ccw-virtio requires a modification in the > capability handling approach. > > First, the QEMU binary name alone will not suffice for capability > lookup, we need the machine type as well. For that purpose we > mangle the machine type into the cache lookup key. > > The other thing is that the device support probing will > unfortunately always return both the old virtio-*-s390 > and the new virtio-*-ccw devices. This makes it impossible to > choose the correct default device address type if the domain > definition XML doesn't contain explict addresses. > Therefore we apply a fix up in the cache lookup: depending > on the machine type we clear either the VIRTIO_S390 or the > VIRTIO_CCW capability. I'm not a fan of this approach. The capabilities data is reflecting what the QEMU binary is capable of supporting, *regardless* of what guest config is chosen. The decision about whether to use S390 or CCW based on the machine type value, should be made by the internal method at the point when it actually assigns addresses, not when we create the capabilities initially. Your approach here means we're going to be storing many many more capabilities instances, and we're going to be re-probing the QEMU binaries for each machine type. This is absolutely not something we want todo. 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list