From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, armbru@redhat.com, pbonzini@redhat.com,
pkrempa@redhat.com, berrange@redhat.com, eblake@redhat.com,
libvir-list@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 3/3] scsi-disk: Deprecate device_id fallback to BlockBackend name
Date: Fri, 25 Jan 2019 18:46:53 +0100 [thread overview]
Message-ID: <20190125174653.4604-4-kwolf@redhat.com> (raw)
In-Reply-To: <20190125174653.4604-1-kwolf@redhat.com>
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 <kwolf@redhat.com>
---
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.
-@section Device options
+@section 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"@}}
+@subsection 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)
--
2.20.1
next prev parent reply other threads:[~2019-01-25 17:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 17:46 [Qemu-devel] [PATCH 0/3] scsi-disk: Device Identification fixes Kevin Wolf
2019-01-25 17:46 ` [Qemu-devel] [PATCH 1/3] scsi-disk: Don't use empty string as device id Kevin Wolf
2019-01-29 12:30 ` Philippe Mathieu-Daudé
2019-01-29 16:37 ` Markus Armbruster
2019-01-30 11:39 ` Kevin Wolf
2019-01-25 17:46 ` [Qemu-devel] [PATCH 2/3] scsi-disk: Add device_id property Kevin Wolf
2019-01-28 8:50 ` Peter Krempa
2019-01-28 9:08 ` Peter Krempa
2019-01-28 14:41 ` Kevin Wolf
2019-01-28 16:55 ` Markus Armbruster
2019-01-28 17:49 ` Kevin Wolf
2019-01-29 7:10 ` Markus Armbruster
2019-01-29 12:25 ` [Qemu-devel] [libvirt] " Peter Krempa
2019-01-29 9:40 ` [Qemu-devel] " Peter Krempa
2019-01-25 17:46 ` Kevin Wolf [this message]
2019-01-29 15:58 ` [Qemu-devel] [PATCH 3/3] scsi-disk: Deprecate device_id fallback to BlockBackend name Daniel P. Berrangé
2019-02-04 9:56 ` Kevin Wolf
2019-02-04 10:06 ` Daniel P. Berrangé
2019-01-25 20:52 ` [Qemu-devel] [PATCH 0/3] scsi-disk: Device Identification fixes Eric Blake
2019-02-01 12:51 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190125174653.4604-4-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=libvir-list@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).