Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3009768ima; Sun, 3 Feb 2019 11:21:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN66C8sj2KvOgTNr3VPifaiVOt6Xk/EJekLfhsal0WNH89bh7h/z6hW44plNvZuGats4LyKV X-Received: by 2002:a17:902:4624:: with SMTP id o33mr47691898pld.289.1549221665334; Sun, 03 Feb 2019 11:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549221665; cv=none; d=google.com; s=arc-20160816; b=ObxTrAcJU7LqnXyUuK34rFsU+hEKjMdoNz8kIw07do79R9NAXVH9zlajtflXIxEkOi tcGzAx6eexbXk4oxuEhlCgcrw1ZFJssEIhK6jGbfIYMxkZIBKM39HFUOPd5bU4uuSDwS SjDGQSYQd/umxk1rOosysIukb5k6DjtQaUFcUan1Vb5ox/CNBtRPzEoEUOXh0GxIJZKc Ajfq0Dw3tQqAnKkl6d3HxHnoiEW72DjVkcPmZn4ckT1Vr7urD3DdomNa/FL6VVAUOD+z co2ByBkVaUq3lxj+x9f8MPsNM/4/ohSeyBp7yVOcXKxKv5Auy1M4f+8tsYYE2DX8dK4D lB1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GAE0x8+CdnGfSUomCqdCZFwa5+m8ZwkJ7khVTAMV0cc=; b=hQ9Rc4DSZH4IVCSUpWgzD9d/cV2LQeOY0IOptEIBJvkz5kxNFukv8/kCaXTNS4yD8n VsLCoE9tJllNKGdSycZiqs5l66dSSnb5dY9WdktjrsNOn/7Dq2zzlp8i4wGVggkaXJKH 1eCS2ALQgspSlQx2HznJZdjB8B1TGgCcUOj9Oo8wUrkYW0H/I+sLZvWWA1OmNM/56L27 aA+sWGHy7VqRR4XfeOKzRUzJFUsomp3aj+ZYo/rcyhQDnAXC3yH3sTkZ/HXQgsxVifkO +zHfKVXSyaIh0WFbpHNKzWw0BWBP+uL1eqpe/4ylQ1DhrQmpVzO6JbpMxywXOcoSBjuk A7JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RKkEx2bP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 85si148727pfc.145.2019.02.03.11.20.37; Sun, 03 Feb 2019 11:21:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RKkEx2bP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727401AbfBCTNv (ORCPT + 99 others); Sun, 3 Feb 2019 14:13:51 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:42468 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726553AbfBCTNu (ORCPT ); Sun, 3 Feb 2019 14:13:50 -0500 Received: by mail-oi1-f194.google.com with SMTP id w13so9846775oiw.9 for ; Sun, 03 Feb 2019 11:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GAE0x8+CdnGfSUomCqdCZFwa5+m8ZwkJ7khVTAMV0cc=; b=RKkEx2bP88f0QPj6P+JSenTWzYxugjZP3CN6oJIw3x2MXEp3IEfTszaGQOO+umtewU 6Xy0uE8Z+nJ1jtnN6UmCxDnHfWtGJIpMi6SGjWdeh/4WDvZHsazYq39G0mAkJ3c1oiZ+ QAld6w2ZuPlEt7cVK1u+wnljNIL6r4+tnnPWGT9SaR8b8zidyX7bqo0JVlQpOnvDyKiR XUNwEHiQTEwkThFmSHbeA4JPC51xA6dORhp1rO6wV/+W2xZmBZUXCAB7cLENgMmWlT9G r1L/7cIcygJyThjQTcxdiUnxxD/BC5dadnhKWRUzDfI62dmBDCNnblNzBD/MGC505EsF 4pTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GAE0x8+CdnGfSUomCqdCZFwa5+m8ZwkJ7khVTAMV0cc=; b=a4PAbCk9CJ5Z6WR6rZ1eyaVWFA34OcDx4TwMQ1NzT0r5q3buqwIupQtYjKrxRo5xGh X95Q97LsJv1icjNdJPvnRsc6rr6CAm13AKwUqsZRpjYCYciGmtP3d+saPdqK5XfOoOZq DLG1uM9HfIqTRDnq8hL2M7tql00bwrYhEbvUPw84G3VRzIB3Nad2hjqH+PtB2wRmF7bx QBdi1zT+kgONa61pOUsSdUzcqIuUPm2N/lsiRsHXzynZPdeS8inEt3/yuaqzJ7mUVFiH zb0MtRAMzLsRqscm+CNRjQhIeuKZDGnTdAfH6frvaU1fs/LwGoKcJ78haFaMBu32KMI2 knkQ== X-Gm-Message-State: AHQUAubhAiWZckXJkBKX47l48lIJNnfmyQfiQpiHp+t7sCu6I488phgX PjPD5TClz5/xM6l6HeYozY8tG7rOXXtM1MPeup3wgw== X-Received: by 2002:aca:5205:: with SMTP id g5mr5738264oib.149.1549221229499; Sun, 03 Feb 2019 11:13:49 -0800 (PST) MIME-Version: 1.0 References: <154915640488.3541628.4947340559510114602.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: From: Dan Williams Date: Sun, 3 Feb 2019 11:13:38 -0800 Message-ID: Subject: Re: [PATCH] libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family To: Dexuan Cui Cc: "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , Michael Kelley Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 3, 2019 at 10:13 AM Dexuan Cui wrote: > > > From: Dan Williams > > Sent: Sunday, February 3, 2019 9:49 AM > > > ... > > > It looks the namespace created by Ubuntu 19.04 (4.18) is incompatible with > > > the libnvdimm-pending branch + this patch. > > > > This is correct, the configuration switched from label-less by default > > to labeled. > Thanks for the confirmation! > > > > It looks we need to completely disable the label usage for > > NVDIMM_FAMILY_HYPERV > > > due to compability? > > > > It's either going to be a quirk in Linux or a quirk in the Hyper-V > > configuration. I think it's more manageable for Hyper-V to ship a > > "label disable" switch than to try to ship a workaround in Linux. The > > "noblk" quirk in Linux works around the LOCAL bit in the labels. > > However, the namespace mode regression can only be resolved by hiding > > the label capability until the administrator manually switches from > > label-less to labeled operation. > > As I understand, the essence of the issue is: Hyper-V emulates the > label mechanism (i.e. it supports _LSI and LSR), but doesn't do it > right (i.e. it doesn't support _LSW). > > To manage the namespaces, Linux can choose to use label or not. > > If _LSI/_LSR are supported, Linux assumes _LSW is supported as well > and chooses to use label (i.e. the label mode), but since Hyper-V doesn't > support _LSW, Linux fails to change the namespace configuration. No, that's not quite right. The reason Linux does not see the fsdax mode configuration is due to the missing "address abstraction GUID" in the label produced the default Hyper-V configuration. In label-less mode there is no "address abstraction GUID" to validate so it falls back to just using the info-block directly. The _LSW issue is if you wanted to reconfigure a raw namespace to fsdax mode. The current flow tries to delete the label, but that's only for reconfiguration, not the initial boot-up case that is currently failing. The deletion would fail on finding no label-write capability, but to be clear the boot-up case does not perform any writes. > In > Ubuntu 19.04 (4.18), the kernel is not aware of Hyper-V _LSI/_LSR, so > the created namespace is in "label-less" mode, and hence can't be used > with the libnvdimm-pending branch + this patch, unless we add a quirk > in Linux to explicitly not use the label. > > I agree ideally Hyper-V should hide the label capability, and I'll request > Hyper-V team to do that. I hope Hyper-V guys are still able to do that > in time so we won't need a quirk in Linux kernel. After some more thought, the "no regressions" rule means that Linux should ship a quirk for this by default. I think a good heuristic is to disable label support by default if no _LSW method is detected. An opt-in can be specified to accept "read-only" configurations, but that's an exceptional case. I'll send a patch for this. > BTW, I suppose Windows VM should be in "label-less" mode. I expect Windows mandates labeled operation. This label-less concept was something Linux shipped in advance of a specification being ratified and to support early NVDIMMs that don't advertise label space. > Thanks for the help, Dan! Thanks for the quick feedback and testing.