Skip to contentSkip to conversation

hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node

PATCH Applied Niklas Cassel via 2 participants 3 messages Jun 28, 2022 – Jul 7, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node

Since commit 916b0f0b5264 ("hw/nvme: change nvme-ns 'shared' default") the default value of nvme-ns param 'shared' is set to true, regardless if there is a nvme-subsys node or not.

On a system without a nvme-subsys node, a namespace will never be able to be attached to more than one controller, so for this configuration, it is counterintuitive for this parameter to be set by default.

Force the nvme-ns param 'shared' to false for configurations where there is no nvme-subsys node, as the namespace will never be able to attach to more than one controller anyway.

---
 hw/nvme/ns.c | 2 ++
 1 file changed, 2 insertions(+)
hw/nvme/ns.c +2 -0
index 870c3ca1a2..62a1f97be0 100644
@@ -546,6 +546,8 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
     int i;
 
     if (!n->subsys) {
+        /* If no subsys, the ns cannot be attached to more than one ctrl. */
+        ns->params.shared = false;
         if (ns->params.detached) {
             error_setg(errp, "detached requires that the nvme device is "
                        "linked to an nvme-subsys device");
Signature · 1 line
2.36.1
#1 lore raw

On Tue, Jun 28, 2022 at 02:22:09PM +0200, Niklas Cassel via wrote:

Hello Peter,

It seems that mailman configuration on qemu-devel is rewriting the "From:" field to "From: Niklas Cassel via <[email protected]>"

If found this old thread about the same issue:
https://qemu-devel.nongnu.narkive.com/6hm8Fbvz/mailing-list-vs-dmarc-and-microsoft-com-s-p-reject-policy

Which says that this can happen when using p=reject policy.

However, doing a bcc to another of my personal addresses, it looks like the SKIM/SPF/DMARC is all passing, and non of them seem to have p=reject:

ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass [email protected] header.s=dkim.wdc.com header.b=TTwPBUcS;
       spf=pass (google.com: domain of [email protected] designates 216.71.153.141 as permitted sender) smtp.mailfrom="[email protected]";
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com
Return-Path: <[email protected]>
Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com. [216.71.153.141])
        by mx.google.com with ESMTPS id sd33-20020a1709076e2100b00711f20051f2si13306645ejc.697.2022.06.28.05.22.25
        for <[email protected]>
        (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 28 Jun 2022 05:22:26 -0700 (PDT)
Received-SPF: pass (google.com: domain of [email protected] designates 216.71.153.141 as permitted sender) client-ip=216.71.153.141;
Authentication-Results: mx.google.com;
       dkim=pass [email protected] header.s=dkim.wdc.com header.b=TTwPBUcS;
       spf=pass (google.com: domain of [email protected] designates 216.71.153.141 as permitted sender) smtp.mailfrom="[email protected]";
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE)

Any idea why mailmain is rewriting the "From:" field for my messages?

Kind regards,
Niklas

Applied
#2 lore raw
In reply to Niklas Cassel via
Quoted 33 lines · Niklas Cassel

Since commit 916b0f0b5264 ("hw/nvme: change nvme-ns 'shared' default") the default value of nvme-ns param 'shared' is set to true, regardless if there is a nvme-subsys node or not.

On a system without a nvme-subsys node, a namespace will never be able to be attached to more than one controller, so for this configuration, it is counterintuitive for this parameter to be set by default.

Force the nvme-ns param 'shared' to false for configurations where there is no nvme-subsys node, as the namespace will never be able to attach to more than one controller anyway.

---
 hw/nvme/ns.c | 2 ++
 1 file changed, 2 insertions(+)
hw/nvme/ns.c +2 -0
index 870c3ca1a2..62a1f97be0 100644
@@ -546,6 +546,8 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
     int i;
 
     if (!n->subsys) {
+        /* If no subsys, the ns cannot be attached to more than one ctrl. */
+        ns->params.shared = false;
         if (ns->params.detached) {
             error_setg(errp, "detached requires that the nvme device is "
                        "linked to an nvme-subsys device");
Signature · 1 line
2.36.1

Thanks Niklas,

Applied to nvme-next.