Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2021174pxb; Thu, 11 Feb 2021 02:07:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJygXp4PCzy4RdrABgxSeCf4oJJX7PdDozwx5S0GxKLgEWb9QaiWX4drupzNaLuVmbcz1pcZ X-Received: by 2002:a17:907:2bef:: with SMTP id gv47mr7781382ejc.457.1613038021476; Thu, 11 Feb 2021 02:07:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613038021; cv=none; d=google.com; s=arc-20160816; b=HMk35SEoh/WUkB+HpiGY7ewzc5Aeeu04kfkQtr1OHJboeImDoir5eGx7hnP1WRNRjh ovuPDGJs5+3NWPBJbbZtbidKxm6GGRGmmcqIzI9+CR+ZGXgI2jBhfDfpdNL5biJUEN4H ZifA/eqD2fo3CKCrVU4XqYCcGmowNrcvjkR+c2KK8UIHlWzNgQ6581B/moqxppI8tY7O BQdojPdSNS1uR5NofpKDrEkAiVCoOPg0SeWks3q+wj0quCfY24aG1qvJUPZ4yeH5tHOS pGucURjMMUSGKcLR6O2MB/WyYTGc6cfZejZG+67XjqDcE4i3K0jDAb6byjuPpwQr45tV cntQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=ndQGxU97zwcTtGmOgWgHwwzvSZKy+G3UDRCZyKT5G4U=; b=ufB5jo1B+qEYSh7HmFmQTm8Ecipu1CG4XCaF+M+7dVOId0kHBj0mI8z7MiV9sJ+sH2 v69Q7w1SKXwskG04PFAKyLb5OyJ4h7FsmmBtFRRV7pJJwdnagwFyS3nkDWlYA2fpRn6z 5OC7pkmdN2cGdCyP+RgUHMmHxbqT5J6fli/8bgti0hHixsZO9cQEWggGZcz2eQQQuhEz dXRQ9NwN+IQajzQJJjZlWr/zVE3wlRKHZsiW23a1lhH9Qk4WY1AlYzSuSHL/asxR4tHG HcOp4kjjaCS1I3b4jfsfLbPSZ9/ucNh+tU7yDACekJJsWNyV+DIhnUHqpVD/nBLZtvLp ZFRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si3507829edj.442.2021.02.11.02.06.38; Thu, 11 Feb 2021 02:07:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229867AbhBKKGD (ORCPT + 99 others); Thu, 11 Feb 2021 05:06:03 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2543 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbhBKKDg (ORCPT ); Thu, 11 Feb 2021 05:03:36 -0500 Received: from fraeml743-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DbsWS2GH8z67mBT; Thu, 11 Feb 2021 17:57:56 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml743-chm.china.huawei.com (10.206.15.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 11 Feb 2021 11:02:53 +0100 Received: from localhost (10.47.31.44) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Thu, 11 Feb 2021 10:02:52 +0000 Date: Thu, 11 Feb 2021 10:01:52 +0000 From: Jonathan Cameron To: Dan Williams CC: Ben Widawsky , , "Linux ACPI" , Linux Kernel Mailing List , linux-nvdimm , Linux PCI , Bjorn Helgaas , Chris Browy , Christoph Hellwig , David Hildenbrand , David Rientjes , Ira Weiny , Jon Masters , Rafael Wysocki , "Randy Dunlap" , Vishal Verma , "John Groves (jgroves)" , "Kelley, Sean V" Subject: Re: [PATCH v2 2/8] cxl/mem: Find device capabilities Message-ID: <20210211100152.00000667@Huawei.com> In-Reply-To: References: <20210210000259.635748-1-ben.widawsky@intel.com> <20210210000259.635748-3-ben.widawsky@intel.com> <20210210174104.0000710a@Huawei.com> <20210210185319.chharluce2ly4cne@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.31.44] X-ClientProxiedBy: lhreml709-chm.china.huawei.com (10.201.108.58) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Feb 2021 11:54:29 -0800 Dan Williams wrote: > > > ... > > > > > > > +static void cxl_mem_mbox_timeout(struct cxl_mem *cxlm, > > > > + struct mbox_cmd *mbox_cmd) > > > > +{ > > > > + struct device *dev = &cxlm->pdev->dev; > > > > + > > > > + dev_dbg(dev, "Mailbox command (opcode: %#x size: %zub) timed out\n", > > > > + mbox_cmd->opcode, mbox_cmd->size_in); > > > > + > > > > + if (IS_ENABLED(CONFIG_CXL_MEM_INSECURE_DEBUG)) { > > > > > > Hmm. Whilst I can see the advantage of this for debug, I'm not sure we want > > > it upstream even under a rather evil looking CONFIG variable. > > > > > > Is there a bigger lock we can use to avoid chance of accidental enablement? > > > > Any suggestions? I'm told this functionality was extremely valuable for NVDIMM, > > though I haven't personally experienced it. > > Yeah, there was no problem with the identical mechanism in LIBNVDIMM > land. However, I notice that the useful feature for LIBNVDIMM is the > option to dump all payloads. This one only fires on timeouts which is > less useful. So I'd say fix it to dump all payloads on the argument > that the safety mechanism was proven with the LIBNVDIMM precedent, or > delete it altogether to maintain v5.12 momentum. Payload dumping can > be added later. I think I'd drop it for now - feels like a topic that needs more discussion. Also, dumping this data to the kernel log isn't exactly elegant - particularly if we dump a lot more of it. Perhaps tracepoints? > > [..] > > > > diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h > > > > index e709ae8235e7..6267ca9ae683 100644 > > > > --- a/include/uapi/linux/pci_regs.h > > > > +++ b/include/uapi/linux/pci_regs.h > > > > @@ -1080,6 +1080,7 @@ > > > > > > > > /* Designated Vendor-Specific (DVSEC, PCI_EXT_CAP_ID_DVSEC) */ > > > > #define PCI_DVSEC_HEADER1 0x4 /* Designated Vendor-Specific Header1 */ > > > > +#define PCI_DVSEC_HEADER1_LENGTH_MASK 0xFFF00000 > > > > > > Seems sensible to add the revision mask as well. > > > The vendor id currently read using a word read rather than dword, but perhaps > > > neater to add that as well for completeness? > > > > > > Having said that, given Bjorn's comment on clashes and the fact he'd rather see > > > this stuff defined in drivers and combined later (see review patch 1 and follow > > > the link) perhaps this series should not touch this header at all. > > > > I'm fine to move it back. > > Yeah, we're playing tennis now between Bjorn's and Christoph's > comments, but I like Bjorn's suggestion of "deduplicate post merge" > given the bloom of DVSEC infrastructure landing at the same time. I guess it may depend on timing of this. Personally I think 5.12 may be too aggressive. As long as Bjorn can take a DVSEC deduplication as an immutable branch then perhaps during 5.13 this tree can sit on top of that. Jonathan