提交 ebc0b50e 编写于 作者: J Ján Tomko

qemu: deprecate QEMU_CAPS_DRIVE_SERIAL

Implied by QEMU >= 1.2.0.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 cc77a2b7
......@@ -3637,7 +3637,6 @@ static qemuMonitorCallbacks callbacks = {
static void
virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
{
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_SDL);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_RTC);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VHOST_NET);
......
......@@ -73,7 +73,7 @@ typedef enum {
X_QEMU_CAPS_0_10, /* features added in qemu-0.10.0 or later */
X_QEMU_CAPS_PCIDEVICE, /* PCI device assignment supported */
X_QEMU_CAPS_MEM_PATH, /* mmap'ped guest backing supported */
QEMU_CAPS_DRIVE_SERIAL, /* -driver serial= available */
X_QEMU_CAPS_DRIVE_SERIAL, /* -driver serial= available */
/* 20 */
X_QEMU_CAPS_XEN_DOMID, /* -xen-domid */
......
......@@ -1340,14 +1340,12 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk,
if (qemuCaps) {
if (disk->serial &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) {
if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI &&
disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("scsi-block 'lun' devices do not support the "
"serial property"));
return -1;
}
disk->bus == VIR_DOMAIN_DISK_BUS_SCSI &&
disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("scsi-block 'lun' devices do not support the "
"serial property"));
return -1;
}
if (disk->cachemode == VIR_DOMAIN_DISK_CACHE_DIRECTSYNC &&
......@@ -1685,7 +1683,6 @@ qemuBuildDiskFrontendAttributeErrorPolicy(virDomainDiskDefPtr disk,
static void
qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk,
virQEMUCapsPtr qemuCaps,
virBufferPtr buf)
{
/* generate geometry command string */
......@@ -1702,8 +1699,7 @@ qemuBuildDiskFrontendAttributes(virDomainDiskDefPtr disk,
virDomainDiskGeometryTransTypeToString(disk->geometry.trans));
}
if (disk->serial &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_SERIAL)) {
if (disk->serial) {
virBufferAddLit(buf, ",serial=");
virBufferEscape(buf, '\\', " ", "%s", disk->serial);
}
......@@ -1752,7 +1748,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
/* Format attributes for the drive itself (not the storage backing it) which
* we've formatted historically with -drive */
qemuBuildDiskFrontendAttributes(disk, qemuCaps, &opt);
qemuBuildDiskFrontendAttributes(disk, &opt);
/* While this is a frontend attribute, it only makes sense to be used when
* legacy -drive is used. In modern qemu the 'ide-cd' or 'scsi-cd' are used.
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -3,7 +3,6 @@
<selfctime>0</selfctime>
<selfvers>0</selfvers>
<usedQMP/>
<flag name='drive-serial'/>
<flag name='enable-kvm'/>
<flag name='sdl'/>
<flag name='rtc'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -4,7 +4,6 @@
<selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='drive-serial'/>
<flag name='sdl'/>
<flag name='rtc'/>
<flag name='vhost-net'/>
......
......@@ -26,7 +26,7 @@ endpoint=client,verify-peer=yes \
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\
id=drive-virtio-disk0,cache=none \
id=drive-virtio-disk0,serial=eb90327c-8302-4725-9e1b-4e85ed4dc251,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
id=virtio-disk0 \
-object tls-creds-x509,id=objvirtio-disk1_tls0,dir=/etc/pki/libvirt-vxhs,\
......@@ -34,11 +34,11 @@ endpoint=client,verify-peer=yes \
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk1_tls0,\
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc252,\
file.server.host=192.168.0.2,file.server.port=9999,format=raw,if=none,\
id=drive-virtio-disk1,cache=none \
id=drive-virtio-disk1,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,\
id=virtio-disk1 \
-drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc253,\
file.server.host=192.168.0.3,file.server.port=9999,format=raw,if=none,\
id=drive-virtio-disk2,cache=none \
id=drive-virtio-disk2,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,\
id=virtio-disk2
......@@ -23,6 +23,6 @@ server,nowait \
-usb \
-drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\
id=drive-virtio-disk0,cache=none \
id=drive-virtio-disk0,serial=eb90327c-8302-4725-9e1b-4e85ed4dc251,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
id=virtio-disk0
......@@ -23,7 +23,7 @@ server,nowait \
-device lsi,id=scsi1,bus=pci.0,addr=0x4 \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-scsi0-0-1-0,\
readonly=on \
serial=WD-WMAP9A966149,readonly=on \
-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,\
id=scsi0-0-1-0,wwn=0x5000c50015ea71ac \
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-scsi0-0-0-0 \
......
......@@ -948,8 +948,7 @@ mymain(void)
DO_TEST_PARSE_ERROR("disk-drive-fmt-cow", QEMU_CAPS_DRIVE_BOOT);
DO_TEST_PARSE_ERROR("disk-drive-fmt-dir", QEMU_CAPS_DRIVE_BOOT);
DO_TEST_PARSE_ERROR("disk-drive-fmt-iso", QEMU_CAPS_DRIVE_BOOT);
DO_TEST("disk-drive-shared",
QEMU_CAPS_DRIVE_SERIAL);
DO_TEST("disk-drive-shared", NONE);
DO_TEST_PARSE_ERROR("disk-drive-shared-qcow", NONE);
DO_TEST("disk-drive-shared-locking",
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DISK_SHARE_RW);
......@@ -1097,8 +1096,7 @@ mymain(void)
QEMU_CAPS_SCSI_BLOCK,
QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI);
DO_TEST("disk-serial",
QEMU_CAPS_KVM,
QEMU_CAPS_DRIVE_SERIAL);
QEMU_CAPS_KVM);
DO_TEST_PARSE_ERROR("disk-fdc-incompatible-address",
NONE);
DO_TEST_PARSE_ERROR("disk-ide-incompatible-address",
......@@ -2007,7 +2005,7 @@ mymain(void)
QEMU_CAPS_IDE_CD);
DO_TEST("disk-ide-wwn",
QEMU_CAPS_IDE_CD,
QEMU_CAPS_DRIVE_SERIAL, QEMU_CAPS_IDE_DRIVE_WWN);
QEMU_CAPS_IDE_DRIVE_WWN);
DO_TEST("disk-geometry", NONE);
DO_TEST("disk-blockio",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册