diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c2cf75f5ff7469ac98bb4ef5c72d52ea22ad7d7a..8bf07360cf9dfa1f167cbbf8ad475afb52490c71 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2091,9 +2091,9 @@ control how many devices can be connected through the controller. A "scsi" controller has an optional attribute model, which is one of "auto", "buslogic", - "ibmvscsi", "lsilogic", "lsias1068", "virtio-scsi" or "vmpvscsi". - A "usb" controller has an optional attribute model, - which is one of "piix3-uhci", "piix4-uhci", "ehci", + "ibmvscsi", "lsilogic", "lsisas1068", "lsisas1078", "virtio-scsi" or + "vmpvscsi". A "usb" controller has an optional attribute + model, which is one of "piix3-uhci", "piix4-uhci", "ehci", "ich9-ehci1", "ich9-uhci1", "ich9-uhci2", "ich9-uhci3", "vt82c686b-uhci", "pci-ohci" or "nec-xhci". Additionally, since 0.10.0, if the USB bus needs to be diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 32a69153ad55a7005978c6fbc06d76e03a26b107..8d7e6db0d9ca15029ce0856a81c3469dc7221fe2 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1391,6 +1391,7 @@ vmpvscsi ibmvscsi virtio-scsi + lsisas1078 piix3-uhci piix4-uhci ehci diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 159a23dc645da79b69257a8eda1994c105ae9936..0ef67beba96aca382c9e99580ddd4077f0e2834a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -304,7 +304,8 @@ VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAS "lsisas1068", "vmpvscsi", "ibmvscsi", - "virtio-scsi"); + "virtio-scsi", + "lsisas1078"); VIR_ENUM_IMPL(virDomainControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST, "piix3-uhci", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a750a1f862e01016d7221c844a96adc9137fa737..c3b26083c5493d52b92710ada2c8a6f1e89a7392 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -695,6 +695,7 @@ enum virDomainControllerModelSCSI { VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI, + VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST }; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 50f8084426b9b2164cf6c9676a645a425e8b8de5..3840b418dae11e63f566a16392c091b5fe923464 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -212,6 +212,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "rng-egd", "virtio-ccw", "dtb", + "megasas", ); struct _virQEMUCaps { @@ -1329,6 +1330,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "virtio-scsi-pci", QEMU_CAPS_VIRTIO_SCSI }, { "virtio-scsi-s390", QEMU_CAPS_VIRTIO_SCSI }, { "virtio-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI }, + { "megasas", QEMU_CAPS_SCSI_MEGASAS }, { "spicevmc", QEMU_CAPS_DEVICE_SPICEVMC }, { "qxl-vga", QEMU_CAPS_DEVICE_QXL_VGA }, { "qxl", QEMU_CAPS_DEVICE_QXL }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index b0f8c5b6d65613773f83d903eb2c6b28b6a47791..7101f67049e90ea91274384ab5d7ec0b72a469ff 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -173,6 +173,7 @@ enum virQEMUCapsFlags { QEMU_CAPS_OBJECT_RNG_EGD = 131, /* EGD protocol daemon for rng */ QEMU_CAPS_VIRTIO_CCW = 132, /* -device virtio-*-ccw */ QEMU_CAPS_DTB = 133, /* -dtb file */ + QEMU_CAPS_SCSI_MEGASAS = 134, /* -device megasas */ QEMU_CAPS_LAST, /* this must always be the last item */ }; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 006f83d18276197195bec7be74897296ccc9eb30..a0c278f759ef4580b0b6c903af318b2e51224033 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -500,7 +500,7 @@ qemuSetScsiControllerModel(virDomainDefPtr def, if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_LSI)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("This QEMU doesn't support " - "lsi scsi controller")); + "the LSI 53C895A SCSI controller")); return -1; } break; @@ -515,6 +515,14 @@ qemuSetScsiControllerModel(virDomainDefPtr def, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI: /*TODO: need checking work here if necessary */ break; + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078: + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_MEGASAS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("This QEMU doesn't support " + "the LSI SAS1078 controller")); + return -1; + } + break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported controller model: %s"), @@ -3544,6 +3552,9 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI: virBufferAddLit(&buf, "spapr-vscsi"); break; + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078: + virBufferAddLit(&buf, "megasas"); + break; default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported controller model: %s"), diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index c604bd2b30c8ae189dd6a9654895dac903484a10..d7eee0937c8f083d88ba54e807594c82a16ab59e 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -511,7 +511,8 @@ VIR_ENUM_IMPL(virVMXControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST, "lsisas1068", "pvscsi", "UNUSED ibmvscsi", - "UNUSED virtio-scsi"); + "UNUSED virtio-scsi", + "UNUSED lsisas1078"); diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 059fa861f58202f39e6b512f5edecc428d03a2c5..a28109af2a3fed4a75af4439cf4c6d98ee4d9f46 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -912,7 +912,8 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_USB_SERIAL, QEMU_CAPS_DEVICE_USB_NET, - QEMU_CAPS_DTB); + QEMU_CAPS_DTB, + QEMU_CAPS_SCSI_MEGASAS); DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -1017,7 +1018,8 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_USB_SERIAL, QEMU_CAPS_DEVICE_USB_NET, - QEMU_CAPS_DTB); + QEMU_CAPS_DTB, + QEMU_CAPS_SCSI_MEGASAS); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.args new file mode 100644 index 0000000000000000000000000000000000000000..c4d5f87e5d2171009fcf2354681b056557029d01 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.args @@ -0,0 +1,9 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ +pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor \ +unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -device \ +megasas,id=scsi0,bus=pci.0,addr=0x3 -usb -drive file=/dev/HostVG/QEMUGuest1,\ +if=none,id=drive-ide0-0-0 -device ide-drive,bus=ide.0,unit=0,\ +drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/tmp/scsidisk.img,if=none,\ +id=drive-scsi0-0-4-0 -device scsi-disk,bus=scsi0.0,channel=0,scsi-id=4,lun=0,\ +drive=drive-scsi0-0-4-0,id=scsi0-0-4-0 -device virtio-balloon-pci,\ +id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.xml new file mode 100644 index 0000000000000000000000000000000000000000..9a496aebde7ec754d61a1e7f9dd86e52b42e5b94 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ + + + +
+ + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5e7adf575869af390c8d52b5af6c80ab3bdf356b..38787ace497ba48eb270de9f3786320700840b3c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -550,6 +550,9 @@ mymain(void) DO_TEST("disk-scsi-virtio-scsi", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_VIRTIO_SCSI); + DO_TEST("disk-scsi-megasas", + QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_SCSI_MEGASAS); DO_TEST("disk-sata-device", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_ICH9_AHCI); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 899414df5f62de08e3223df8eaa89d24a3a2a593..ba9aa96db26701cbf3d2cc5da8f9158a9b0ed796 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -179,6 +179,7 @@ mymain(void) DO_TEST("disk-scsi-device"); DO_TEST("disk-scsi-vscsi"); DO_TEST("disk-scsi-virtio-scsi"); + DO_TEST("disk-scsi-megasas"); DO_TEST_FULL("disk-mirror", false, WHEN_ACTIVE); DO_TEST_FULL("disk-mirror", true, WHEN_INACTIVE); DO_TEST("graphics-listen-network");