No kernels supported by upstream libvirt have the feature.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
if (virDomainDiskDefValidateSource(disk->src) < 0)
return -1;
+ if (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("unfiltered sgio is no longer supported"));
+ return -1;
+ }
+
/* Validate LUN configuration */
if (disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) {
if (virDomainDiskDefSourceLUNValidate(disk->src) < 0)
"address type"));
return -1;
}
+ if (hostdev->source.subsys.u.scsi.sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("unfiltered sgio is no longer supported"));
+ return -1;
+ }
break;
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST:
if (hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE &&
+++ /dev/null
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
- <disk type='block' device='lun' rawio='no' sgio='unfiltered'>
- <source dev='/dev/HostVG/QEMUGuest1'/>
- <target dev='hda' bus='scsi'/>
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
- </disk>
- <disk type='block' device='lun' sgio='filtered'>
- <source dev='/dev/HostVG/QEMUGuest2'/>
- <target dev='hdb' bus='scsi'/>
- <address type='drive' controller='0' bus='0' target='1' unit='1'/>
- </disk>
- <controller type='scsi' index='0' model='virtio-scsi'/>
- <controller type='scsi' index='1' model='lsilogic'/>
- <controller type='usb' index='0'/>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <memballoon model='virtio'/>
- </devices>
-</domain>
+++ /dev/null
-<domain type='qemu'>
- <name>QEMUGuest2</name>
- <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219100</memory>
- <currentMemory unit='KiB'>219100</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
- <disk type='block' device='disk'>
- <source dev='/dev/HostVG/QEMUGuest2'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
- </disk>
- <controller type='scsi' index='0' model='virtio-scsi'/>
- <controller type='usb' index='0'/>
- <controller type='ide' index='0'/>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <hostdev mode='subsystem' type='scsi' managed='yes' sgio='unfiltered' rawio='yes'>
- <source>
- <adapter name='scsi_host0'/>
- <address bus='0' target='0' unit='0'/>
- </source>
- <address type='drive' controller='0' bus='0' target='4' unit='8'/>
- </hostdev>
- <memballoon model='virtio'/>
- </devices>
-</domain>
+++ /dev/null
-<domain type='qemu'>
- <name>QEMUGuest2</name>
- <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219100</memory>
- <currentMemory unit='KiB'>219100</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
- <disk type='block' device='disk'>
- <source dev='/dev/HostVG/QEMUGuest2'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
- </disk>
- <controller type='scsi' index='0' model='virtio-scsi'/>
- <controller type='usb' index='0'/>
- <controller type='ide' index='0'/>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <hostdev mode='subsystem' type='scsi' managed='yes' sgio='unfiltered'>
- <source>
- <adapter name='scsi_host0'/>
- <address bus='0' target='0' unit='0'/>
- </source>
- <address type='drive' controller='0' bus='0' target='4' unit='8'/>
- </hostdev>
- <memballoon model='virtio'/>
- </devices>
-</domain>
+++ /dev/null
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
- <disk type='block' device='lun' rawio='no' sgio='unfiltered'>
- <driver name='qemu' type='raw'/>
- <source dev='/dev/HostVG/QEMUGuest1'/>
- <target dev='hda' bus='scsi'/>
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
- </disk>
- <disk type='block' device='lun' sgio='filtered'>
- <driver name='qemu' type='raw'/>
- <source dev='/dev/HostVG/QEMUGuest2'/>
- <target dev='hdb' bus='scsi'/>
- <address type='drive' controller='0' bus='0' target='1' unit='1'/>
- </disk>
- <controller type='scsi' index='0' model='virtio-scsi'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
- </controller>
- <controller type='scsi' index='1' model='lsilogic'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
- </controller>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <audio id='1' type='none'/>
- <memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
- </memballoon>
- </devices>
-</domain>
+++ /dev/null
-<domain type='qemu'>
- <name>QEMUGuest2</name>
- <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219100</memory>
- <currentMemory unit='KiB'>219100</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
- <disk type='block' device='disk'>
- <driver name='qemu' type='raw'/>
- <source dev='/dev/HostVG/QEMUGuest2'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
- </disk>
- <controller type='scsi' index='0' model='virtio-scsi'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
- </controller>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
- </controller>
- <controller type='ide' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <audio id='1' type='none'/>
- <hostdev mode='subsystem' type='scsi' managed='yes' sgio='unfiltered' rawio='yes'>
- <source>
- <adapter name='scsi_host0'/>
- <address bus='0' target='0' unit='0'/>
- </source>
- <address type='drive' controller='0' bus='0' target='4' unit='8'/>
- </hostdev>
- <memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
- </memballoon>
- </devices>
-</domain>
+++ /dev/null
-<domain type='qemu'>
- <name>QEMUGuest2</name>
- <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219100</memory>
- <currentMemory unit='KiB'>219100</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
- <disk type='block' device='disk'>
- <driver name='qemu' type='raw'/>
- <source dev='/dev/HostVG/QEMUGuest2'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0' target='0' unit='0'/>
- </disk>
- <controller type='scsi' index='0' model='virtio-scsi'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
- </controller>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
- </controller>
- <controller type='ide' index='0'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <audio id='1' type='none'/>
- <hostdev mode='subsystem' type='scsi' managed='yes' sgio='unfiltered'>
- <source>
- <adapter name='scsi_host0'/>
- <address bus='0' target='0' unit='0'/>
- </source>
- <address type='drive' controller='0' bus='0' target='4' unit='8'/>
- </hostdev>
- <memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
- </memballoon>
- </devices>
-</domain>
ARG_END);
DO_TEST_NOCAPS("numad-static-vcpu-no-numatune");
- DO_TEST("disk-scsi-lun-passthrough-sgio",
- QEMU_CAPS_SCSI_LSI,
- QEMU_CAPS_VIRTIO_SCSI,
- QEMU_CAPS_SCSI_DISK_WWN,
- QEMU_CAPS_SCSI_BLOCK);
DO_TEST("disk-scsi-disk-vpd",
QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN);
DO_TEST_NOCAPS("disk-source-pool");
DO_TEST("hostdev-scsi-shareable",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_SCSI_LSI);
- DO_TEST("hostdev-scsi-sgio",
- QEMU_CAPS_VIRTIO_SCSI,
- QEMU_CAPS_SCSI_LSI);
- DO_TEST("hostdev-scsi-rawio",
- QEMU_CAPS_VIRTIO_SCSI,
- QEMU_CAPS_SCSI_LSI);
DO_TEST("hostdev-scsi-autogen-address",
QEMU_CAPS_VIRTIO_SCSI,