Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1222406rwb; Fri, 23 Sep 2022 09:38:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6i6aJsstXGd8jOOCk7mfbJHwKnjVsTEIqZmOW99nwJv9n8ppJhfJGr7j4DGKRrRvkSTC5C X-Received: by 2002:a05:6402:350a:b0:452:8c84:8b with SMTP id b10-20020a056402350a00b004528c84008bmr9400483edd.93.1663951101909; Fri, 23 Sep 2022 09:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663951101; cv=none; d=google.com; s=arc-20160816; b=cF27qS85fjBNmQ2mqMuff5+emen0VZV4PJX8cnhrIp4vz38kvLRdr1aFfiHkw77kJg /N5lQxS79RWu4vUBAMBfbRCLW8e8JqW+S24KzAUx0YDTB8njc75S0+EUmsiUjy0VW+cX bLtwvt0hAwffb7wT1QH2U8vQGVfN6HaKh9KP6QaxPllwPW2dde3k6MP2T0XOdJ7jByYr O3FBfRe5Sej6b92xw96OYNbEnccKvI3iBwEdNUA7EtPZaULyXN04mkPKd7Xt86CKJ7Mg zeeTiapiMpS9kRpSSao1bJKPVpLn55x68w0c9Fm4iEagXQHYuay8w4ng4pGsbwPMlIUX K3zQ== 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=6qQ+eq4nibr/Ku2NavzFVBkW9JiPbz0ZkF+/jAKNHUU=; b=MaOU9+i3gtlweNznpmaX3jXQPMIxEuz4eajLUwhQQGBkXlupnhdz01DqAl6Qsilqsk LgCclVlvMTCCQzj4NhMMBgST9AA00GleCnMqNXsKHJ9pB7AYP/0MRwfxa60b/HZQRYax 1u1kVBhl8xTU9BLjZ38fBPhybV3zMSBHlNq7IYxlL4tXU9SaSVRNEk6RQYJQKi8vp6d/ wrfp3eZH3Sp8c3MXn7jKhnk+L1lCRoypOqcTYZ4aGVUazpqt86ID0v9Vf+YT+r2mI0LC 1zqJv5lCcO/FMuDtgXOqY5dwKRdwbQaMBzAMlcoAafTondrvafPy9Xp2CNiMxX5NOrAz oAxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iv+i8Mo8; 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 s18-20020a056402165200b0044665ff00fdsi7535362edx.558.2022.09.23.09.37.55; Fri, 23 Sep 2022 09:38:21 -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=iv+i8Mo8; 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 S231767AbiIWQYN (ORCPT + 99 others); Fri, 23 Sep 2022 12:24:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbiIWQXo (ORCPT ); Fri, 23 Sep 2022 12:23:44 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1220812C1C5 for ; Fri, 23 Sep 2022 09:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663950223; x=1695486223; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Ohgz4vUkNpBw0/bFzU4TdicddjZG3hCBlJt1N4VxeBU=; b=iv+i8Mo8jHT7+A0aStP4XZZlc8QJ2Lz7CFbGD69NOnzmu87DKCtG5ST/ t9KjJnzVzUHpgds+FuXyB5rwfamKnWrDNg2+GEeY/TU8rYlnxvzTQiuwy mWmeok6DGlaeZVj5FCzgTsw1M0S93vBABzQFv8XeusQP0XL2CBTnIAxAs zptsW+Fqh4nqrow0PQxIKbw5gCBEZ3vXxedRPKTrxj6iDx2m2WFA0bOCG qMDO66K5lVSOYg5HA0gxb7F8nbUDkVUCrC1ONMCL7j5qu4Jv1gDL0tFZK OUdIwAmjM+ls/cyB7vq6H4kxVeRIPm4GdXjOWihxQfhn+E+4fyzmJ9cP7 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="326957726" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="326957726" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 09:23:42 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="651003049" Received: from hanjulee-mobl1.amr.corp.intel.com (HELO [10.252.138.32]) ([10.252.138.32]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 09:23:40 -0700 Message-ID: <21e4a613-cf21-6d90-17e7-91aa960bdafa@intel.com> Date: Fri, 23 Sep 2022 09:23:40 -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: <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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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:44, Ashok Raj wrote: >> 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? > If you *can't* send tagged memory to the device, what is the > role the device need to play? > > For now you can only send proper VA's that are canonical. Today, yes, you have to keep tagged addresses away from devices. They must be sequestered in a place that only the CPU can find them. The observation that Kirill and I had is that there are thing that are done solely on the device today -- like accessing a translated address twice -- without IOMMU involvement. We were trying to figure out how that would work in the future once tagged addresses are exposed to devices and they implement all the new PCI magic. After our private chat, I think the answer is that devices *have* a role to play. Device-side logic must know how to untag memory before asking for translation or even *deciding* to ask for address translation. But, hopefully, the communicating that untagging information to the device will be done in a device-agnostic, standardized way, just how PASIDs or ATS are handled today.