[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH 3/3] scsi-disk: Deprecate device_id fallback to Bloc

From: Kevin Wolf
Subject: [Qemu-block] [PATCH 3/3] scsi-disk: Deprecate device_id fallback to BlockBackend name
Date: Fri, 25 Jan 2019 18:46:53 +0100

We should never have exposed BlockBackend names to the guest, it's a
host detail. Deprecate this behaviour. Users who need to maintain the
guest ABI can explicitly set the value with the device_id property.

Signed-off-by: Kevin Wolf <address@hidden>
 hw/scsi/scsi-disk.c  |  5 +++++
 qemu-deprecated.texi | 22 +++++++++++++++++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index e74e1e7c48..38f1fe2570 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2366,6 +2366,11 @@ static void scsi_realize(SCSIDevice *dev, Error **errp)
             const char *str = blk_name(s->qdev.conf.blk);
             if (str && *str) {
                 s->device_id = g_strdup(str);
+                warn_report("Using the backend drive ID for the Device "
+                            "Identification VPD page is deprecated. "
+                            "Please specify the serial or device_id options "
+                            "explicitly to avoid guest-visible changes in "
+                            "future QEMU versions.");
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 219206a836..a426d8245d 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -146,7 +146,7 @@ This machine type uses an unmaintained firmware, broken in 
lots of ways,
 and unable to start post-2004 operating systems. 40p machine type should be
 used instead.
address@hidden Device options
address@hidden Devices
 @subsection Block device options
@@ -170,6 +170,26 @@ The above, converted to the current supported format:
 @code{json:@{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"@}}
address@hidden scsi-disk device identification (since 4.0.0)
+The Device Identification VPD page of ``scsi-disk'' devices contains a vendor
+specific designator that can be explicitly specified using the ``device_id''
+property since 4.0.0.
+If ``device_id'' is not given, the implementation falls back to reusing any
+specified serial number for this field. If the serial number is not given
+either and ``drive=X'' was used where ``X'' is a drive ID, this drive ID is
+given to the guest instead. This is backend information that should not
+to be exposed to guests.
+Therefore, this behaviour is deprecated and future versions will change the
+guest-visible behaviour (e.g. by leaving out the vendor specific designator)
+for the case that neither ``device_id'' nor a serial number are given, but a
+drive ID is used to create the device.
+If you need the guest-visible information to stay unchanged, add an explicit
+``device_id'' option to your QEMU invocation.
 @subsection vio-spapr-device device options
 @subsubsection "irq": "" (since 3.0.0)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]