]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: caps: Introduce capability for 'device_id' property of 'scsi-disk'
authorPeter Krempa <pkrempa@redhat.com>
Mon, 28 Jan 2019 08:30:41 +0000 (09:30 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 8 Feb 2019 07:48:33 +0000 (08:48 +0100)
The property allows to control the guest-visible content of the vendor
specific designator of the 'Device Identification' page of a SCSI
device's VPD (vital product data).

QEMU was leaking the id string of -drive as the value if the 'serial' of
the disk was not specified. Switching to -blockdev would impose an ABI
change.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml

index 01e189510b9a5a0f17296fa31e1398d83c87950f..24d416f436f8a260e23e6595d3d7f24f201cc3af 100644 (file)
@@ -524,6 +524,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               /* 325 */
               "memory-backend-file.pmem",
               "nvdimm.unarmed",
+              "scsi-disk.device_id",
     );
 
 
@@ -1157,6 +1158,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsSCSIDisk[] = {
     { "wwn", QEMU_CAPS_SCSI_DISK_WWN },
     { "share-rw", QEMU_CAPS_DISK_SHARE_RW },
     { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
+    { "device_id", QEMU_CAPS_SCSI_DISK_DEVICE_ID },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsIDEDrive[] = {
index 18abd555f466d7cb2c69f5f6fcc74c4f7474ee8b..928cf78e3d50d1343f825a1c072e6ddd5f14425a 100644 (file)
@@ -504,6 +504,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     /* 325 */
     QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */
     QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed= */
+    QEMU_CAPS_SCSI_DISK_DEVICE_ID, /* 'device_id' property of scsi disk */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index e09d4ca04fdbe5e3fb94421ccc1bd30b60c6399d..ab7c0dc7f9d1759091e8fbe5622ea754fe7ee8b2 100644 (file)
   <flag name='memory-backend-file.align'/>
   <flag name='memory-backend-file.pmem'/>
   <flag name='nvdimm.unarmed'/>
+  <flag name='scsi-disk.device_id'/>
   <version>3001050</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100758</microcodeVersion>