This patch series completed the support for the first 3 parts of Paolo's proposal: http://permalink.gmane.org/gmane.comp.emulators.libvirt/50428 The 3 parts are: * SCSI controller models * Stable addressing for SCSI devices * LUN passthrough: block devices [PATCH 1/10] and [PATCH 2/10] add two new "scsi" controllers, "ibmvscsi" and "virtio-scsi". [PATCH 3/10] adds a helper functions to get a disk controller's model. [PATCH 4/10] introduces attribute "target" for device addressing XML. Updates lots of tests to be consistent with the newly introduced attribute. [PATCH 6/10] builds the qemu command line for the new addressing format. The logic is: 1) If the disk controller model is "lsilogic": -drive file=/dev/sda,if=none,id=drive-scsi0-0-3,\ format=raw -device scsi-disk,bus=scsi0.0,\ scsi-id=0,drive=drive-scsi0-0-3-0,id=scsi0-0-3-0 libvirt attrs --> qdev properties: bus=scsi<controller>.0 scsi-id=<unit> 2) If the disk controller model is other else: The command line will be like: -drive file=/dev/sda,if=none,id=drive-scsi0-0-3-0,\ format=raw -device scsi-disk,bus=scsi0.0,channel=0,\ scsi-id=3,lun=0,drive=drive-scsi0-0-3-0,id=scsi0-0-3-0 libvirt attrs --> qdev properties: bus=scsi<controller>.0 channel=<bus> scsi-id=<target> lun=<unit> Paolo Bonzini (2) qemu: add ibmvscsi controller model qemu: add virtio-scsi controller model Osier Yang (5) conf: Add helper function to look up disk controller conf: Introduce new attribute for device address format qemu: New cap flag to indicate if channel is supported qemu: Build command line for the new address format tests: Add tests for virtio-scsi and ibmvscsi v1 ~ v2: * [PATCH 3/10] is removed * "target" will be formated to all bus type, once it's device address is of type "drive". * Error if "target != 0" and the disk bus is not SCSI or the scsi controller model is "lsilogic". * [PATCH 9/10] and [PATCH 8/10] are meged into [PATCH 4/7] docs/formatdomain.html.in | 16 ++- docs/schemas/domaincommon.rng | 12 ++ src/conf/domain_conf.c | 38 ++++- src/conf/domain_conf.h | 6 + src/libvirt_private.syms | 1 + src/qemu/qemu_capabilities.c | 4 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 156 +++++++++++++++++--- src/qemu/qemu_command.h | 7 +- src/qemu/qemu_hotplug.c | 12 +- src/vmx/vmx.c | 4 +- tests/domainsnapshotxml2xmlout/disk_snapshot.xml | 12 +- tests/domainsnapshotxml2xmlout/full_domain.xml | 2 +- tests/domainsnapshotxml2xmlout/metadata.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-bios.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml | 4 +- .../qemuxml2argv-blkiotune-device.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml | 2 +- .../qemuxml2argv-boot-complex-bootindex.xml | 10 +- .../qemuxml2argvdata/qemuxml2argv-boot-complex.xml | 10 +- .../qemuxml2argvdata/qemuxml2argv-boot-floppy.xml | 4 +- ...uxml2argv-boot-menu-disable-drive-bootindex.xml | 2 +- .../qemuxml2argv-boot-menu-disable-drive.xml | 2 +- .../qemuxml2argv-boot-menu-disable.xml | 2 +- .../qemuxml2argv-boot-menu-enable.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-boot-network.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml | 6 +- tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml | 2 +- .../qemuxml2argv-channel-guestfwd.xml | 2 +- .../qemuxml2argv-channel-spicevmc-old.xml | 2 +- .../qemuxml2argv-channel-spicevmc.xml | 2 +- .../qemuxml2argv-channel-virtio-auto.xml | 2 +- .../qemuxml2argv-channel-virtio.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-clock-france.xml | 2 +- .../qemuxml2argv-clock-localtime.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml | 2 +- .../qemuxml2argv-clock-variable.xml | 2 +- .../qemuxml2argv-console-compat-auto.xml | 2 +- .../qemuxml2argv-console-compat-chardev.xml | 2 +- .../qemuxml2argv-console-compat.xml | 2 +- .../qemuxml2argv-console-virtio-many.xml | 2 +- .../qemuxml2argv-console-virtio.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml | 4 +- .../qemuxml2argv-disk-cdrom-empty.xml | 4 +- tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml | 4 +- .../qemuxml2argv-disk-copy_on_read.xml | 2 +- .../qemuxml2argv-disk-drive-boot-cdrom.xml | 4 +- .../qemuxml2argv-disk-drive-boot-disk.xml | 4 +- .../qemuxml2argv-disk-drive-cache-directsync.xml | 4 +- .../qemuxml2argv-disk-drive-cache-unsafe.xml | 4 +- .../qemuxml2argv-disk-drive-cache-v1-none.xml | 4 +- .../qemuxml2argv-disk-drive-cache-v1-wb.xml | 4 +- .../qemuxml2argv-disk-drive-cache-v1-wt.xml | 4 +- .../qemuxml2argv-disk-drive-cache-v2-none.xml | 4 +- .../qemuxml2argv-disk-drive-cache-v2-wb.xml | 4 +- .../qemuxml2argv-disk-drive-cache-v2-wt.xml | 4 +- ...muxml2argv-disk-drive-error-policy-enospace.xml | 4 +- .../qemuxml2argv-disk-drive-error-policy-stop.xml | 4 +- ...rgv-disk-drive-error-policy-wreport-rignore.xml | 4 +- .../qemuxml2argv-disk-drive-fat.xml | 2 +- .../qemuxml2argv-disk-drive-fmt-qcow.xml | 4 +- .../qemuxml2argv-disk-drive-network-nbd.xml | 2 +- .../qemuxml2argv-disk-drive-network-rbd-auth.xml | 2 +- ...emuxml2argv-disk-drive-network-rbd-ceph-env.xml | 2 +- .../qemuxml2argv-disk-drive-network-rbd.xml | 2 +- .../qemuxml2argv-disk-drive-network-sheepdog.xml | 2 +- .../qemuxml2argv-disk-drive-no-boot.xml | 6 +- .../qemuxml2argv-disk-drive-readonly-disk.xml | 4 +- .../qemuxml2argv-disk-drive-readonly-no-device.xml | 4 +- .../qemuxml2argv-disk-drive-shared.xml | 4 +- .../qemuxml2argvdata/qemuxml2argv-disk-floppy.xml | 6 +- .../qemuxml2argv-disk-ioeventfd.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml | 8 +- .../qemuxml2argv-disk-sata-device.xml | 2 +- .../qemuxml2argv-disk-scsi-device.xml | 6 +- .../qemuxml2argv-disk-scsi-virtio-scsi.args | 9 + .../qemuxml2argv-disk-scsi-virtio-scsi.xml | 32 ++++ .../qemuxml2argv-disk-scsi-vscsi.args | 8 + .../qemuxml2argv-disk-scsi-vscsi.xml | 32 ++++ .../qemuxml2argv-disk-snapshot.xml | 6 +- .../qemuxml2argv-disk-transient.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-disk-virtio.xml | 4 +- .../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml | 4 +- tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml | 2 +- .../qemuxml2argv-floppy-drive-fat.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml | 2 +- .../qemuxml2argv-graphics-listen-network.xml | 2 +- .../qemuxml2argv-graphics-listen-network2.xml | 2 +- .../qemuxml2argv-graphics-sdl-fullscreen.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2 +- .../qemuxml2argv-graphics-spice-compression.xml | 2 +- .../qemuxml2argv-graphics-spice-qxl-vga.xml | 2 +- .../qemuxml2argv-graphics-spice-timeout.xml | 2 +- .../qemuxml2argv-graphics-spice.xml | 2 +- .../qemuxml2argv-graphics-vnc-sasl.xml | 2 +- .../qemuxml2argv-graphics-vnc-socket.xml | 2 +- .../qemuxml2argv-graphics-vnc-tls.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 2 +- .../qemuxml2argv-hostdev-pci-address.xml | 2 +- .../qemuxml2argv-hostdev-usb-address.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml | 2 +- .../qemuxml2argv-input-usbmouse-addr.xml | 2 +- .../qemuxml2argv-input-usbmouse.xml | 2 +- .../qemuxml2argv-input-usbtablet.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-lease.xml | 4 +- .../qemuxml2argv-machine-aliases1.xml | 2 +- .../qemuxml2argv-machine-aliases2.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-memtune.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-metadata.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-migrate.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-minimal.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml | 2 +- .../qemuxml2argv-misc-no-reboot.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml | 2 +- .../qemuxml2argv-multifunction-pci-device.xml | 2 +- .../qemuxml2argv-net-bandwidth.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-net-client.xml | 2 +- .../qemuxml2argv-net-eth-ifname.xml | 2 +- .../qemuxml2argv-net-eth-names.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-net-mcast.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-net-server.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-net-user.xml | 2 +- .../qemuxml2argv-net-virtio-device.xml | 2 +- .../qemuxml2argv-net-virtio-network-portgroup.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml | 2 +- .../qemuxml2argv-nographics-vga.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-nographics.xml | 2 +- .../qemuxml2argv-numatune-memory.xml | 2 +- .../qemuxml2argv-parallel-tcp-chardev.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml | 2 +- .../qemuxml2argv-pseries-vio-user-assigned.args | 13 ++- .../qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 13 ++- .../qemuxml2argv-qemu-ns-no-env.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml | 2 +- .../qemuxml2argv-restore-v2-fd.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml | 2 +- .../qemuxml2argv-seclabel-dynamic-baselabel.xml | 2 +- .../qemuxml2argv-seclabel-dynamic-override.xml | 4 +- .../qemuxml2argv-seclabel-dynamic.xml | 2 +- .../qemuxml2argv-seclabel-none.xml | 2 +- .../qemuxml2argv-seclabel-static-relabel.xml | 2 +- .../qemuxml2argv-seclabel-static.xml | 2 +- .../qemuxml2argv-serial-dev-chardev.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml | 2 +- .../qemuxml2argv-serial-file-chardev.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-serial-file.xml | 2 +- .../qemuxml2argv-serial-many-chardev.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-serial-many.xml | 2 +- .../qemuxml2argv-serial-pty-chardev.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml | 2 +- .../qemuxml2argv-serial-target-port-auto.xml | 2 +- .../qemuxml2argv-serial-tcp-chardev.xml | 2 +- .../qemuxml2argv-serial-tcp-telnet-chardev.xml | 2 +- .../qemuxml2argv-serial-tcp-telnet.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml | 2 +- .../qemuxml2argv-serial-udp-chardev.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml | 2 +- .../qemuxml2argv-serial-unix-chardev.xml | 2 +- .../qemuxml2argvdata/qemuxml2argv-serial-unix.xml | 2 +- .../qemuxml2argv-serial-vc-chardev.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-smbios.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-sound.xml | 2 +- tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml | 2 +- tests/qemuxml2argvtest.c | 4 + .../qemuxml2xmlout-balloon-device-auto.xml | 2 +- .../qemuxml2xmlout-channel-virtio-auto.xml | 2 +- .../qemuxml2xmlout-console-compat-auto.xml | 2 +- .../qemuxml2xmlout-console-virtio.xml | 2 +- .../qemuxml2xmlout-disk-cdrom-empty.xml | 4 +- .../qemuxml2xmlout-disk-scsi-device-auto.xml | 4 +- .../qemuxml2xmlout-graphics-listen-network2.xml | 2 +- .../qemuxml2xmlout-graphics-spice-timeout.xml | 2 +- .../qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml | 2 +- .../qemuxml2xmlout-serial-target-port-auto.xml | 2 +- tests/qemuxml2xmltest.c | 4 +- tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml | 2 +- tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml | 12 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml | 6 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-4.xml | 2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml | 4 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml | 4 +- tests/vmx2xmldata/vmx2xml-floppy-device.xml | 2 +- tests/vmx2xmldata/vmx2xml-floppy-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-1.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-2.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-3.xml | 2 +- tests/vmx2xmldata/vmx2xml-gsx-in-the-wild-4.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-ide-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml | 2 +- tests/vmx2xmldata/vmx2xml-scsi-driver.xml | 8 +- tests/vmx2xmldata/vmx2xml-scsi-writethrough.xml | 2 +- tests/vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml | 4 +- tests/vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml | 4 +- 209 files changed, 588 insertions(+), 300 deletions(-) Regards, Osier -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list