Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1192186rwb; Fri, 23 Sep 2022 09:16:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5LbV4fgkb/h9qS6e9JMXzwPLrb4AleXOhhryUFIYYkSveNxtW7Zn7O5RqJYP2vXnafRvtu X-Received: by 2002:a17:902:ec8a:b0:178:488b:cbc2 with SMTP id x10-20020a170902ec8a00b00178488bcbc2mr9599121plg.114.1663949783128; Fri, 23 Sep 2022 09:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663949783; cv=none; d=google.com; s=arc-20160816; b=xYd/1U06clxoev4EagTBhN3zSe5NC8riuSiMd8NN/jl2rytdttmzNd/DTlT1jCeozv N2E3uESc0kU000DnxaDMA+TLBAXYRVqly6sj/nXjzGhWFWZ+9QQG5fnzuyFvD37Vq2Te boPu9yvSV4RDKvlzQNeeoBGGgQHgdQgxq23kohDEoeqfrCQYw/c74b/a+Dny0BM6N4qM jHzrsOYf6mAQW9oAWEJgYTMN9aRk/JBYu2VZsJ+anK9XrMwxEXrBhBW2pfkL0rWJDiXP dG0otMKcBAKJkV8Fyv+9qFOlifxMnB9pEfd5r1yYqpi4k8xmYDGfO9NMILZYdNxalS8v WtKg== 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:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CAeZL6wWKDfwogB/CIlN6qDAofoMpLVHw43t2aZjg58=; b=P/zA4fmU1SmKY79acR+xKgCCgRTnKu/Nw4nQHOarfpvUln7cdTVycYfac3ATE+7suC 5ISFYivXLeZ7ZK2YROGGka9gLLIWn+lbpl7pQiSQ8bEOOf/lB76t0cC0ySnYz0f7Jy1y 06Hh+82kWL6j2r6RkPGhpgiLRB4/ChZuI/F7FkosQ7LaerDR/h2QLiTSq08FjLXZBY6U uX4aPolIaidErH5GlS7BgohIU/OvYqnsv+UwHvkXgpCDmBt1m/4GTdPNad+4CIuQbXLT 8Q02DOVRbyGZz+Qm0VVjhjiaIQQ1khhytUu8t4M5zsmDI6CC2+6yKS3hFrS4M/ehHGeX J4rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IDnVV9JU; 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 t9-20020a655549000000b00434044600e8si9660687pgr.535.2022.09.23.09.16.09; Fri, 23 Sep 2022 09:16:23 -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=IDnVV9JU; 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 S232586AbiIWPbe (ORCPT + 99 others); Fri, 23 Sep 2022 11:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiIWPbc (ORCPT ); Fri, 23 Sep 2022 11:31:32 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF4A3143540 for ; Fri, 23 Sep 2022 08:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663947091; x=1695483091; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=v96tuYGGMJYs8ptS79bcD/41j+v8We2inkrTBpBMyfk=; b=IDnVV9JUE8R0UiiXdQSUEtaSTqTpRDAxl0NUoI1vD7ytrMTUc+wU0Vfz QbGIR0I9qJOAaiQ+VzmZtPfnNv38hySnAuVi2H5EZCFYZfBp87BRaISRp FjLzEGyeZRuaOU6wwtdzLIPLAvKcDXJfqKN15ox27d7uwPWq1udfyxk0x 6mjDp1QAnwcemR3H+QRyGi8CYHy980idFiyvXOIDGXPqJrK6iSiDk0bW+ f0LtQwe5bVb8QDlfxq50SYfmZ7ov+mXMSlSGI0UrAoMx7V3mLxSV6LWtm s6vSM1/PhEBHXoz9pEJIJAHc8EEJGBAQimJ8OhUlmSqYwB4HqCwg85pHM g==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="283714947" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="283714947" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 08:31:14 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="745829440" Received: from hanjulee-mobl1.amr.corp.intel.com (HELO [10.252.138.32]) ([10.252.138.32]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 08:31:13 -0700 Message-ID: Date: Fri, 23 Sep 2022 08:31:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCHv8 00/11] Linear Address Masking enabling Content-Language: en-US To: Ashok Raj Cc: Jason Gunthorpe , "Kirill A. Shutemov" , Jacob Pan , "Kirill A. Shutemov" , Ashok Raj , Dave Hansen , Andy Lutomirski , Peter Zijlstra , x86@kernel.org, Kostya Serebryany , Andrey Ryabinin , Andrey Konovalov , Alexander Potapenko , Taras Madan , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joerg Roedel References: <20220915172858.pl62a5w3m5binxrk@box.shutemov.name> <562dec4d-a39f-b517-58a3-45f691a2d10a@intel.com> <20220923004239.ma2gfrmoezsff4ro@box.shutemov.name> <20220923093826.kjad4qe3clwybeh6@box.shutemov.name> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE 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 9/23/22 08:28, Ashok Raj wrote: >> >> I thought devices also cached address translation responses from the >> IOMMU and stashed them in their own device-local TLB. If the device is >> unaware of the tags, then how does device TLB invalidation work? Would > This is coming a full circle now :-) > > Since the device doesn't understand tagging, SVM and tagging aren't > compatible. If you need SVM, you can only send sanitized pointers to the > device period. In fact our page-request even looks for canonical checks > before doing the page-faulting. > >> all device TLB flushes be full flushes of the devices TLB? If something >> tried to use single-address invalidation, it would need to invalidate >> every possible tag alias because the device wouldn't know that the tags >> *are* tags instead of actual virtual addresses. > Once tagging is extended into the PCI SIG, and devices know to work with > them, so will the IOMMU, then they can all play in the same field. Until > then they are isolated, or let SVM only work with untagged VA's. But, the point that Kirill and I were getting at is still that devices *have* a role to play here. The idea that this can be hidden at the IOMMU layer is pure fantasy. Right?