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
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Jan 25, 2019 at 06:46:53PM +0100, Kevin Wolf wrote:
> 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.
I don't think we've deprecated things in the past which would cause
a guest ABI change when finally deleted.
Shouldn't we be instead setting using machine type versioning here,
so that existing machine types keep using the blk_name() fallback
forever, while QEMU 4.0+ machine types avoid blk_name() fallback
immediately.
> 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.");
> }
> }
> }
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Am 29.01.2019 um 16:58 hat Daniel P. Berrangé geschrieben: > On Fri, Jan 25, 2019 at 06:46:53PM +0100, Kevin Wolf wrote: > > 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. > > I don't think we've deprecated things in the past which would cause > a guest ABI change when finally deleted. > > Shouldn't we be instead setting using machine type versioning here, > so that existing machine types keep using the blk_name() fallback > forever, while QEMU 4.0+ machine types avoid blk_name() fallback > immediately. I was going to implement this, but then I wondered if that's actually worthwhile. With -blockdev, you don't get the bad behaviour anyway, and tools that would select new machine types will hopefully also use new backend options. So if we need to keep the bad behaviour around anyway instead of completely removing it as I intended originally, maybe -drive vs. -blockdev is enough to make the difference and we shouldn't change anything at the device model level at all. Kevin -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Mon, Feb 04, 2019 at 10:56:28AM +0100, Kevin Wolf wrote: > Am 29.01.2019 um 16:58 hat Daniel P. Berrangé geschrieben: > > On Fri, Jan 25, 2019 at 06:46:53PM +0100, Kevin Wolf wrote: > > > 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. > > > > I don't think we've deprecated things in the past which would cause > > a guest ABI change when finally deleted. > > > > Shouldn't we be instead setting using machine type versioning here, > > so that existing machine types keep using the blk_name() fallback > > forever, while QEMU 4.0+ machine types avoid blk_name() fallback > > immediately. > > I was going to implement this, but then I wondered if that's actually > worthwhile. With -blockdev, you don't get the bad behaviour anyway, and > tools that would select new machine types will hopefully also use new > backend options. > > So if we need to keep the bad behaviour around anyway instead of > completely removing it as I intended originally, maybe -drive vs. > -blockdev is enough to make the difference and we shouldn't change > anything at the device model level at all. Yeah, that rationale sounds ok to me. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2025 Red Hat, Inc.