Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2369070rwl; Sat, 1 Apr 2023 06:43:36 -0700 (PDT) X-Google-Smtp-Source: AKy350ZoHE9iMcNZ3E7+2VW4LwbscbRc53p7aveuhzYpxd1tbKqjSISPJeJm0xuQ1dcL+0iWgpbW X-Received: by 2002:a17:902:e541:b0:1a0:7422:939a with SMTP id n1-20020a170902e54100b001a07422939amr39970363plf.4.1680356615900; Sat, 01 Apr 2023 06:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680356615; cv=none; d=google.com; s=arc-20160816; b=YJKecB6SZDR1AhLdE/yliJiKvcA5eZgLWdg4MJ3g5V1gU2WXQr5jOrgtBuiztlG5FY cPQB5AO7IuRL1ty22XXD4lQTgyyDSCLUc3UpEAvPk8V0xfgPOo0z0KxPSeZQu0FMzyWj VlNqtLW4IR6J6TTByTNoY0w1XJWo4XI4cpyQSEaFtSAeOpuLe3EbU3ZokVgBr28vRr8A lLQIU/Hj8IhTSaC7g4VT+EveTTA8yU59IBkrzef9d0hCfx/I0YxRFfJcc5HwLk/R8/7/ AceuNi+eUHKpGbK+CAF0njJsr6qA6aifA4PqQwxd0NyTnRa4VUl39jRRbiJDfCGq2bEf xb/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=MGDw3LSoHc2Sl7/a58xYOC8GL0mNn8admlKudw66hSw=; b=VgwMYGi6b2JKnT0iU1dFUYRvg9OeEzh3efLin/suH/ldh4dvyUKPDv+f0LrWKajRnZ IoMp3e5MqBp9ndG1TlTq7vqbZ2t+zJmAcVyXXDcRoAn6H02SS5ryp8sM5+jsdo2orJ+1 2fwOuUYYOHyah9m6351HF6UYPr4PfAAUk8H5kxCQbvnp+ln5jMiqqQfWEE2G/e6qVjq/ AO5XSjPfOdvnXKKmMnK0aWmpzQcFPGVeN4Y3viPEuj4wZhxva/rUNOgETEtTbVOAsUuW LhhUu5oQ0jH/aj2SJiQkw7PXrQfm6y45Eosuot+maz3zUzivDN5jcaihC4m4XVcc3GlQ 1pNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gStNySng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a635904000000b005136987a02esi4683220pgb.728.2023.04.01.06.43.24; Sat, 01 Apr 2023 06:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gStNySng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229976AbjDANlW (ORCPT + 99 others); Sat, 1 Apr 2023 09:41:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjDANlV (ORCPT ); Sat, 1 Apr 2023 09:41:21 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C89EA1BF5D; Sat, 1 Apr 2023 06:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680356480; x=1711892480; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=oo7ZKkfMW2SRqFUeLHxvdNWhSGFJwlIB/+Xmjgc78Gw=; b=gStNySngv6hBlCCLjn05CcNI4CPhDHKCOdP6jvNLSkCNVvD2CFbegrXm lQKqLxDlZTRRJjdq2RXRU4Qlc2CypWeqFh60TVq3WfXY0EIAyOxxyfKVE 4V4tk14pIInSDs3vErDhphlizyDLgVlDsfGfzU+zyDwxaAkh5TVJKW1dt 31HWg30M0b9mzavxdls7iVlGMKSl/SGyQqGwoumGq845eu9ELvs3nrXiS Cp5Ffu3cbzLjOos3noMoqmAtxj/9K2VocmIysWN3OBjWjCSuD4NQozP1h yU6OQwW9kiso+KlutjNqMaEaM/y3aAPSMKe9XuheRmQ+AlO4bjXCaPuB9 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10667"; a="406690580" X-IronPort-AV: E=Sophos;i="5.98,310,1673942400"; d="scan'208";a="406690580" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2023 06:41:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10667"; a="931516604" X-IronPort-AV: E=Sophos;i="5.98,310,1673942400"; d="scan'208";a="931516604" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.211.241]) ([10.254.211.241]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2023 06:41:16 -0700 Message-ID: <2a5d6d53-f86a-43b4-b3cd-4c78951bc6ff@linux.intel.com> Date: Sat, 1 Apr 2023 21:41:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Cc: baolu.lu@linux.intel.com, Will Deacon , David Woodhouse , Raj Ashok , "Tian, Kevin" , Yi Liu , "Yu, Fenghua" , Dave Jiang , Tony Luck , "Zanussi, Tom" Subject: Re: [PATCH v3 1/7] iommu/vt-d: Use non-privileged mode for all PASIDs Content-Language: en-US To: Jacob Pan , LKML , iommu@lists.linux.dev, Robin Murphy , Jason Gunthorpe , Joerg Roedel , dmaengine@vger.kernel.org, vkoul@kernel.org References: <20230331231137.1947675-1-jacob.jun.pan@linux.intel.com> <20230331231137.1947675-2-jacob.jun.pan@linux.intel.com> From: Baolu Lu In-Reply-To: <20230331231137.1947675-2-jacob.jun.pan@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/4/1 7:11, Jacob Pan wrote: > Supervisor Request Enable (SRE) bit in a PASID entry is for permission > checking on DMA requests. When SRE = 0, DMA with supervisor privilege > will be blocked. However, for in-kernel DMA this is not necessary in that > we are targeting kernel memory anyway. There's no need to differentiate > user and kernel for in-kernel DMA. > > Let's use non-privileged (user) permission for all PASIDs used in kernel, > it will be consistent with DMA without PASID (RID_PASID) as well. > > Signed-off-by: Jacob Pan Reviewed-by: Lu Baolu Best regards, baolu