Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2245669rwe; Sun, 28 Aug 2022 07:02:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR4KTspwJxAP/jg0+uQLraAt4a9Aps0j2/C0bigK2cOpAlEyS91fw3KUZWg/9/NahdBIZ8jy X-Received: by 2002:a17:906:9c82:b0:6df:baa2:9f75 with SMTP id fj2-20020a1709069c8200b006dfbaa29f75mr11245508ejc.762.1661695362041; Sun, 28 Aug 2022 07:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661695362; cv=none; d=google.com; s=arc-20160816; b=uLGDLPWvmqBsSWpgznTFkeYs3zMhdUXK/fIy5JfkWmPg74DXb6eMThSIrcEsvkFQMH 6ovsQ70uQmrVsf4EBRhYFGrJORI4kyc+N5G3RuVfOOYc52BqUmqJCffHnLPOGy+90Eo9 1fs8p+I34JjGDnqdFzaCKtEl0qyXqoAaY8f/DO2KCc7DcKhNytQr1EsFL7XEBy0CEIt7 7bre80Pc5dBm4k/Q/HDr89+iTpbrKDGJwjNYJ7R5oPN1X6w34u/N53Lpxn1iWYc/Kiqy vFoLEp07QTff/iudjffy1k8PP1lQJiOcCg+HAFUCT6HUBrJyVMEPNEOsc/01no5iOeCE u2CA== 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=ml+TtT7k+3sTgmNgUu+OMI31KeQGOJA8jm4abYoB2ro=; b=ZHQmGqu0N26s65Q1zDy0pWuwEvoBxH7fy23Iz+AKl8OZUWZ7Leu2KB5+32V86yIhmK DtsxlR0PpuNt/2YxuwGwAd0z3yDn1k/JsnB2//VYIscG11wGUrr7U37erhITaWVJ2TOf wQQXgRH7FfsndgUoesy0+VVbCRBH0fnP5OGm1WHCDv3O23YwZuvyfhRsLkUQPeyE5L7v DAYia3nL+WNz6Ab4NDZ/JoKdDgm172cVlue/Nui74UZgvLVjCwuXdMlz18f0XQr+3rGg uvybCiz3lbtKRs8Aw2P76ADyfk4a3Huk3FwPQ7UqyZ/TZbkrsC4WfWqeCqEXcvZAUFoX MmIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RlBichpN; 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 v26-20020a170906565a00b00734bfaa41b2si4050763ejr.69.2022.08.28.07.02.14; Sun, 28 Aug 2022 07:02:42 -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=RlBichpN; 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 S229661AbiH1N5a (ORCPT + 99 others); Sun, 28 Aug 2022 09:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbiH1N52 (ORCPT ); Sun, 28 Aug 2022 09:57:28 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123C032D8A; Sun, 28 Aug 2022 06:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661695048; x=1693231048; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=y4cNfjDDXR16p7aBOCe2GLlX4JBhY0BsBXSjUlii/Og=; b=RlBichpN+zQhXtoA6F2lMHFyog/ULZw5Lul/UXMaNEkFclETsPS3jRCx 3F4Fc6/ZLedbQl83gPOBDjyW8k0B/EVB/TM1Ipq7H2taKC9mmn8dNqReL aatRPLUcaqnSjk67s5ySd2mF9amEyFfO02zwPVUQB5OrxkEraJl3O4i0H ebbu4/n0VnYNf0E04je6v3TJc903FgkLS8lrJzMjNWj18tEAZtjpxjVPI zHcesrMfze3G4+KT7lAjI6hdpSRN471YlhOhPDAxHBPceGemLSRRDG34o qEB6/jrRaLyGcxD99xMWE+sIzSFe1RMGxVUwsyKkvbs677I9W9Scpn40/ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10453"; a="296015609" X-IronPort-AV: E=Sophos;i="5.93,270,1654585200"; d="scan'208";a="296015609" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2022 06:57:27 -0700 X-IronPort-AV: E=Sophos;i="5.93,270,1654585200"; d="scan'208";a="672065818" Received: from cyue-mobl1.ccr.corp.intel.com (HELO [10.254.209.98]) ([10.254.209.98]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2022 06:57:23 -0700 Message-ID: Date: Sun, 28 Aug 2022 21:57:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cc: baolu.lu@linux.intel.com, Joerg Roedel , Christoph Hellwig , Bjorn Helgaas , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Dave Jiang , Fenghua Yu , Vinod Koul , Eric Auger , Liu Yi L , Jacob jun Pan , Zhangfei Gao , Zhu Tony , iommu@lists.linux.dev, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jean-Philippe Brucker Subject: Re: [PATCH v12 12/17] arm-smmu-v3/sva: Add SVA domain support Content-Language: en-US To: Jason Gunthorpe References: <20220826121141.50743-1-baolu.lu@linux.intel.com> <20220826121141.50743-13-baolu.lu@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 2022/8/26 22:56, Jason Gunthorpe wrote: > On Fri, Aug 26, 2022 at 08:11:36PM +0800, Lu Baolu wrote: > >> +static const struct iommu_domain_ops arm_smmu_sva_domain_ops = { >> + .set_dev_pasid = arm_smmu_sva_set_dev_pasid, > Do we want to permit drivers to not allow a SVA domain to be set on a > RID? > > It seems like a weird restriction to me Conceptually as long as the page table is compatible and user pages are pinned (or I/O page fault is supported), the device drivers are valid to set SVA domain to a RID. But I don't see a real use case as far as I can see. A reasonable use case is sharing EPT between KVM and IOMMU. That demands a new type of domain and implements its own .set_dev for page table attachment. Best regards, baolu