Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6501339pxb; Wed, 17 Feb 2021 06:20:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsScmpkOwCN8zrjzz9UxGwRgkN3EWtaw1CACm4qEcIIghwc8hBmFlmGY1D0yOJB33I1trt X-Received: by 2002:a17:906:ad9:: with SMTP id z25mr26092998ejf.513.1613571609505; Wed, 17 Feb 2021 06:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613571609; cv=none; d=google.com; s=arc-20160816; b=WSnBqnHLj7LUfD5Ud1GACD29f/dsr2U0ORl5nvPQ7Wo6KxbWldaQxWYPhQl0BpGnNK LDHL3DwRnp7grNMe5MF1pTgELdQOnXdBuKpDLBA9tSgJl+63bMkIaB8AxnjyDntsg9hx s6PgWLVycfh7lzU3UEaL6zIRo8u7kMAYm0XyvHTZpEuJiLZGCrRPCZeFxKxGKvoqvlwA UQ8MDxTcn+TMHn9nopoMEEHioKzmFR0DKs6j3euL4CAgCL0U3eij4/wFb4xRNO5AHRE5 Fd1SFR+ZPESZNHi5au8dpXzV8DWHLxQZtTu5FGnFkiR+VJBN4BX/x+/feso3dp9j390l dMRw== 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=1k0lteOmbqBbpiUMVMk9JPX6C/g+AxVedG3kBlk6Z4Y=; b=xzRfcdad0HX/82qJnsTybUUA7bk+8o04xoKUChLJr5DkVWCp4uxb55OOjHrotCJ73q 3dHEB6WdMwjy7JfZmg7HO49+xliu9vG/LK7NMWjvw6vXJ+svdMmmaMYCsf8JCmWVKdiu ubyJBtrXrK3nvuYJQ5184X5ragXfrFatVSCwgV4w6SyNen2QP49xenXOL3vLaQCz9B0M H4XFGjZYx0sE5QA72a4NnyQ+TYCZBwMmKT+qpio9BbSEfd85hET2RU92+jknLoFp99JD nSihycW3pa/ciuFEt2WnIOfj5noWi5fMZtGwk2aFnCYWICGo759SdAZswv2iLICdF3ST NcMw== 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 88si1418195edr.198.2021.02.17.06.19.43; Wed, 17 Feb 2021 06:20:09 -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 S233375AbhBQOSx (ORCPT + 99 others); Wed, 17 Feb 2021 09:18:53 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2581 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232371AbhBQOSv (ORCPT ); Wed, 17 Feb 2021 09:18:51 -0500 Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DgfwT1hRjz67qL6; Wed, 17 Feb 2021 22:14:17 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml715-chm.china.huawei.com (10.206.15.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 17 Feb 2021 15:18:08 +0100 Received: from localhost (10.47.29.73) 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; Wed, 17 Feb 2021 14:18:06 +0000 Date: Wed, 17 Feb 2021 14:16:59 +0000 From: Jonathan Cameron To: Ben Widawsky CC: , , , , , Bjorn Helgaas , "Chris Browy" , Christoph Hellwig , "Dan Williams" , David Hildenbrand , David Rientjes , Ira Weiny , "Jon Masters" , Rafael Wysocki , Randy Dunlap , Vishal Verma , "John Groves (jgroves)" , "Kelley, Sean V" , kernel test robot , Stephen Rothwell , Al Viro Subject: Re: [PATCH v5 4/9] cxl/mem: Add basic IOCTL interface Message-ID: <20210217141659.000064ec@Huawei.com> In-Reply-To: <20210217040958.1354670-5-ben.widawsky@intel.com> References: <20210217040958.1354670-1-ben.widawsky@intel.com> <20210217040958.1354670-5-ben.widawsky@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.29.73] X-ClientProxiedBy: lhreml704-chm.china.huawei.com (10.201.108.53) 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 Tue, 16 Feb 2021 20:09:53 -0800 Ben Widawsky wrote: > Add a straightforward IOCTL that provides a mechanism for userspace to > query the supported memory device commands. CXL commands as they appear > to userspace are described as part of the UAPI kerneldoc. The command > list returned via this IOCTL will contain the full set of commands that > the driver supports, however, some of those commands may not be > available for use by userspace. > > Memory device commands first appear in the CXL 2.0 specification. They > are submitted through a mailbox mechanism specified in the CXL 2.0 > specification. > > The send command allows userspace to issue mailbox commands directly to > the hardware. The list of available commands to send are the output of > the query command. The driver verifies basic properties of the command > and possibly inspect the input (or output) payload to determine whether > or not the command is allowed (or might taint the kernel). > > Reported-by: kernel test robot # bug in earlier revision > Reported-by: Stephen Rothwell > Cc: Al Viro > Signed-off-by: Ben Widawsky > Reviewed-by: Dan Williams (v2) Reviewed-by: Jonathan Cameron