All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Yanan Wang" <wangyanan55@huawei.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	libvir-list@redhat.com,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Fam Zheng" <fam@euphon.net>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	qemu-block@nongnu.org, "Klaus Jensen" <its@irrelevant.dk>,
	"Keith Busch" <kbusch@kernel.org>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Klaus Jensen" <k.jensen@samsung.com>,
	"Christoph Hellwig" <hch@lst.de>
Subject: [PULL 06/11] hw/nvme: do not auto-generate eui64
Date: Fri,  3 Jun 2022 21:53:49 +0200	[thread overview]
Message-ID: <20220603195354.705516-7-its@irrelevant.dk> (raw)
In-Reply-To: <20220603195354.705516-1-its@irrelevant.dk>

From: Klaus Jensen <k.jensen@samsung.com>

We cannot provide auto-generated unique or persistent namespace
identifiers (EUI64, NGUID, UUID) easily. Since 6.1, namespaces have been
assigned a generated EUI64 of the form "52:54:00:<namespace counter>".
This is will be unique within a QEMU instance, but not globally.

Revert that this is assigned automatically and immediately deprecate the
compatibility parameter. Users can opt-in to this with the
`eui64-default=on` device parameter or set it explicitly with
`eui64=UINT64`.

Cc: libvir-list@redhat.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
 docs/about/deprecated.rst | 7 +++++++
 hw/core/machine.c         | 1 +
 hw/nvme/ns.c              | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index e19bcba24240..47a8628b5601 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -296,6 +296,13 @@ contains native support for this feature and thus use of the option
 ROM approach is obsolete. The native SeaBIOS support can be activated
 by using ``-machine graphics=off``.
 
+``-device nvme-ns,eui64-default=on|off`` (since 7.1)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In QEMU versions 6.1, 6.2 and 7.0, the ``nvme-ns`` generates an EUI-64
+identifer that is not globally unique. If an EUI-64 identifer is required, the
+user must set it explicitly using the ``nvme-ns`` device parameter ``eui64``.
+
 
 Block device options
 ''''''''''''''''''''
diff --git a/hw/core/machine.c b/hw/core/machine.c
index bb0dc8f6a93d..c53548d0b138 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -43,6 +43,7 @@
 
 GlobalProperty hw_compat_7_0[] = {
     { "arm-gicv3-common", "force-8-bit-prio", "on" },
+    { "nvme-ns", "eui64-default", "on"},
 };
 const size_t hw_compat_7_0_len = G_N_ELEMENTS(hw_compat_7_0);
 
diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c
index af6504fad2d8..06a04131f192 100644
--- a/hw/nvme/ns.c
+++ b/hw/nvme/ns.c
@@ -641,7 +641,7 @@ static Property nvme_ns_props[] = {
     DEFINE_PROP_SIZE("zoned.zrwas", NvmeNamespace, params.zrwas, 0),
     DEFINE_PROP_SIZE("zoned.zrwafg", NvmeNamespace, params.zrwafg, -1),
     DEFINE_PROP_BOOL("eui64-default", NvmeNamespace, params.eui64_default,
-                     true),
+                     false),
     DEFINE_PROP_END_OF_LIST(),
 };
 
-- 
2.36.1



  parent reply	other threads:[~2022-06-03 19:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 19:53 [PULL 00/11] hw/nvme updates Klaus Jensen
2022-06-03 19:53 ` [PULL 01/11] hw/nvme: fix narrowing conversion Klaus Jensen
2022-06-03 19:53 ` [PULL 02/11] hw/nvme: add missing return statement Klaus Jensen
2022-06-03 19:53 ` [PULL 03/11] hw/nvme: fix copy cmd for pi enabled namespaces Klaus Jensen
2022-06-03 19:53 ` [PULL 04/11] hw/nvme: fix smart aen Klaus Jensen
2022-06-03 19:53 ` [PULL 05/11] hw/nvme: enforce common serial per subsystem Klaus Jensen
2022-06-03 19:53 ` Klaus Jensen [this message]
2022-06-03 19:53 ` [PULL 07/11] hw/nvme: do not auto-generate uuid Klaus Jensen
2022-06-03 19:53 ` [PULL 08/11] hw/nvme: do not report null uuid Klaus Jensen
2022-06-03 19:53 ` [PULL 09/11] hw/nvme: bump firmware revision Klaus Jensen
2022-06-03 19:53 ` [PULL 10/11] hw/nvme: deprecate the use-intel-id compatibility parameter Klaus Jensen
2022-06-03 19:53 ` [PULL 11/11] hw/nvme: add new command abort case Klaus Jensen
2022-06-04  2:31 ` [PULL 00/11] hw/nvme updates Richard Henderson

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=20220603195354.705516-7-its@irrelevant.dk \
    --to=its@irrelevant.dk \
    --cc=eduardo@habkost.net \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=hch@lst.de \
    --cc=hreitz@redhat.com \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wangyanan55@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.