mirror of https://gitee.com/openkylin/libvirt.git
qemu: add capabilities flags related to scsi controller
QEMU_CAPS_SCSI_LSI set the flag when "lsi53c895a", bus PCI, alias "lsi" in the output of "qemu -device ?" -device lsi in qemu command line QEMU_CAPS_VIRTIO_SCSI_PCI set the flag when "name "virtio-scsi-pci", bus PCI" in the output of qemu devices query. -device virtio-scsi-pci in qemu command line
This commit is contained in:
parent
b8c298d301
commit
8694c716ae
|
@ -170,6 +170,8 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
|
|||
"balloon-event",
|
||||
|
||||
"bridge", /* 100 */
|
||||
"lsi",
|
||||
"virtio-scsi-pci",
|
||||
|
||||
);
|
||||
|
||||
|
@ -1455,6 +1457,11 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
|
|||
strstr(str, "name \"virtio-serial-s390\""))
|
||||
qemuCapsSet(flags, QEMU_CAPS_VIRTIO_S390);
|
||||
|
||||
if (strstr(str, "name \"lsi53c895a\""))
|
||||
qemuCapsSet(flags, QEMU_CAPS_SCSI_LSI);
|
||||
if (strstr(str, "name \"virtio-scsi-pci\""))
|
||||
qemuCapsSet(flags, QEMU_CAPS_VIRTIO_SCSI_PCI);
|
||||
|
||||
/* Prefer -chardev spicevmc (detected earlier) over -device spicevmc */
|
||||
if (!qemuCapsGet(flags, QEMU_CAPS_CHARDEV_SPICEVMC) &&
|
||||
strstr(str, "name \"spicevmc\""))
|
||||
|
|
|
@ -136,6 +136,8 @@ enum qemuCapsFlags {
|
|||
QEMU_CAPS_VIRTIO_S390 = 98, /* -device virtio-*-s390 */
|
||||
QEMU_CAPS_BALLOON_EVENT = 99, /* Async event for balloon changes */
|
||||
QEMU_CAPS_NETDEV_BRIDGE = 100, /* bridge helper support */
|
||||
QEMU_CAPS_SCSI_LSI = 101, /* -device lsi */
|
||||
QEMU_CAPS_VIRTIO_SCSI_PCI = 102, /* -device virtio-scsi-pci */
|
||||
|
||||
QEMU_CAPS_LAST, /* this must always be the last item */
|
||||
};
|
||||
|
|
|
@ -482,7 +482,8 @@ mymain(void)
|
|||
QEMU_CAPS_PCI_ROMBAR,
|
||||
QEMU_CAPS_NO_ACPI,
|
||||
QEMU_CAPS_VIRTIO_BLK_SG_IO,
|
||||
QEMU_CAPS_CPU_HOST);
|
||||
QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_SCSI_LSI);
|
||||
DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
QEMU_CAPS_NO_REBOOT,
|
||||
|
@ -677,7 +678,8 @@ mymain(void)
|
|||
QEMU_CAPS_FSDEV_WRITEOUT,
|
||||
QEMU_CAPS_SCSI_BLOCK,
|
||||
QEMU_CAPS_SCSI_CD,
|
||||
QEMU_CAPS_IDE_CD);
|
||||
QEMU_CAPS_IDE_CD,
|
||||
QEMU_CAPS_SCSI_LSI);
|
||||
DO_TEST("qemu-1.1.0", 1001000, 0, 0,
|
||||
QEMU_CAPS_VNC_COLON,
|
||||
QEMU_CAPS_NO_REBOOT,
|
||||
|
@ -755,7 +757,9 @@ mymain(void)
|
|||
QEMU_CAPS_NO_USER_CONFIG,
|
||||
QEMU_CAPS_HDA_MICRO,
|
||||
QEMU_CAPS_NEC_USB_XHCI,
|
||||
QEMU_CAPS_NETDEV_BRIDGE);
|
||||
QEMU_CAPS_NETDEV_BRIDGE,
|
||||
QEMU_CAPS_SCSI_LSI,
|
||||
QEMU_CAPS_VIRTIO_SCSI_PCI);
|
||||
|
||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue