Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9797399ybi; Wed, 24 Jul 2019 10:07:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxas077YlKDB1D0mpHEevkNptDkx0DckHbWPoVkojfXcg9rgqB99f8JLXcyDZJX8cJ6qfdA X-Received: by 2002:a63:5452:: with SMTP id e18mr66057914pgm.232.1563988020911; Wed, 24 Jul 2019 10:07:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563988020; cv=pass; d=google.com; s=arc-20160816; b=YgIMOHcKI0ZyaThhCg2A/FnYqJcRomfmo9wge/f4If0pEdsc74fTeRTjjWjIjllKbR jubm1BetEPa4OysePGbjpuN7w2WtJOGMFoNBG4fKOh8yA35LNpI3F/aYB5rzn1r3pKEe DqcHPvVyLNSNtzgfckc5lt5UtdWRaTFgO3Yi59GfPSTnR+0EV/Hx6jRW79mD3zKhNvbL UzMj7mroN+m9jLDcxn7RkFhnUl6J3LzBVQXl1hd/Q+4U33F8d6I1Hwf3DLlD+AaMoM+G Uw2orrBqQf4oQvS07JNGc1+wh1R0BzuLHxPt1sGySTvIYBTQLPxD/awePh5OEWpLBceQ 5NqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=95v9hTjNjX05jPmYXWrCEZIxgJzaaYNopRlP6dA/qes=; b=JLkCNvmx5ZuYazxVjYk+3M/BKnzIkuqENgHzvz4jn8VcKF/nw1VfGhw5gAEI+0c0yJ ZKxxtSk+utQdVeajmRAzRgxGXde8BWVOxO3CU18jCqvCVlI/fUHt928N0mKjifql21/h PxMsJDt6Dyo5b+tdybdanaTOY6ZHvLAPTa/6A83qth3nmOFE4WC1dfS+sy3621hvVy9j O6kJiMO68IxZkArr4Hps2bOix/6VmDf+392lpTyX8h8JItL0Rsf5UcU2YVndY9FGmByP Q7eh3GWeLr0KL80d1WhvbyTgFtxodVBMOK3qRyqt0yd12PfZdzbtr45BjZY/kHl2788P 00mA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=W8Xl7ku6; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i71si13462055pge.3.2019.07.24.10.06.45; Wed, 24 Jul 2019 10:07:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=W8Xl7ku6; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728171AbfGXQmj (ORCPT + 99 others); Wed, 24 Jul 2019 12:42:39 -0400 Received: from mail-eopbgr680086.outbound.protection.outlook.com ([40.107.68.86]:23525 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726316AbfGXQmj (ORCPT ); Wed, 24 Jul 2019 12:42:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LzVuK9KLGbmb5Nq+4rBZb6yvjH9ghN7CXGUzz6E8LK+48Rx9EGHPOds1Iv8rQDRcOueEBk4SoWEmuzlpZlj9bdcaEbc6RIZf5pT7IOqw4noO1Vh1OxExbV1cL/wGDpmvFQR+0aHAhn3wUEYBPs3ywBV3UTSe/ygLBNXZT+LY9ZM0SkQkk4HPLFHt7/3Ii8GGL8pwDUFA5hrHXlcqofW0yfmfewaifyuvwM56s5XFpRzfqCSdnzhI4sc7tBEy1zZlPY1SUGFgK47AaND/GmShLaYH6WMBosEbLIKcT/EllHDfg3teXfiLeqOdBsAFi7aqOTaLOG2IiSVRwwFGPBocWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=95v9hTjNjX05jPmYXWrCEZIxgJzaaYNopRlP6dA/qes=; b=JXv15IGK98hLsoc36l2+G9hqHVzy7OI4oszaZUfTv16BJNFWiMkVEFGUGtObY/7kSOtqfyudxdNXWNQJjCz9GCCpqPYlhHLC/vgaieuBj/Cp9ybg5sGTU0VK42KQ2vG++mLVquu3LssAE4iAfEeIso2N3nowHSE5F/nciZ2Lebzc2+v6QMCtojokSXy+GxW0Thi9wF814R6obd3gmIEnLzGSN9MsgrOVM7fm4+c/wOaob/sUehS+Z6WcKsfnbvHH/rCRoQy+CC/ApCQV9bnL9d0esSdLBJjQ03Gr6qAQ1gVCRZHslvksIQaKHRVnlPJXBNGH3UAWMPw/vzX5GKeNVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=amd.com;dmarc=pass action=none header.from=amd.com;dkim=pass header.d=amd.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=95v9hTjNjX05jPmYXWrCEZIxgJzaaYNopRlP6dA/qes=; b=W8Xl7ku6sijOylU8auT/ekXEWG6niGXDND2oyzoozam6IrD24Mcev0CCiyM5TU1dAS0J0vB03EkHk+RzLSgWb7mxXIL9IgcxGs6alWQNTa3h9s0teEH2yZpfH1kjJiDo3t1H9LWFmvWaIrp2vgN0ic3EcUMXwhmJ6zw37TyPq1k= Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.104.150) by DM6PR12MB2763.namprd12.prod.outlook.com (20.176.118.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.10; Wed, 24 Jul 2019 16:42:35 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::9c3d:8593:906c:e4f7]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::9c3d:8593:906c:e4f7%6]) with mapi id 15.20.2094.013; Wed, 24 Jul 2019 16:42:35 +0000 From: "Lendacky, Thomas" To: "Kirill A. Shutemov" CC: "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Lianbo Jiang Subject: Re: [PATCH] dma-direct: Force unencrypted DMA under SME for certain DMA masks Thread-Topic: [PATCH] dma-direct: Force unencrypted DMA under SME for certain DMA masks Thread-Index: AQHVN1HbhkVejMp04kW0O/tJG/K57qbaAcwAgAANJYA= Date: Wed, 24 Jul 2019 16:42:35 +0000 Message-ID: References: <10b83d9ff31bca88e94da2ff34e30619eb396078.1562785123.git.thomas.lendacky@amd.com> <20190724155530.hlingpcirjcf2ljg@box> In-Reply-To: <20190724155530.hlingpcirjcf2ljg@box> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR06CA0022.namprd06.prod.outlook.com (2603:10b6:805:8e::35) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:182::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c94b40c5-ca89-499c-79a2-08d71055ee70 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DM6PR12MB2763; x-ms-traffictypediagnostic: DM6PR12MB2763: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 0108A997B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(136003)(376002)(366004)(396003)(346002)(189003)(199004)(5660300002)(6486002)(66476007)(53546011)(229853002)(386003)(4326008)(66556008)(66946007)(6506007)(14454004)(6116002)(26005)(8936002)(3846002)(6512007)(71190400001)(71200400001)(102836004)(54906003)(6916009)(186003)(316002)(66446008)(81156014)(81166006)(64756008)(6246003)(256004)(52116002)(68736007)(31696002)(31686004)(25786009)(53936002)(8676002)(2906002)(7736002)(7416002)(305945005)(2616005)(476003)(36756003)(486006)(478600001)(6436002)(11346002)(66066001)(99286004)(86362001)(446003)(76176011);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB2763;H:DM6PR12MB3163.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: OE6o+gTZ3ZmQ+ZfSYJD7cCDH3ZAON0wW+wyat2P0i01aBOgD1Z98zyNguVWa6AbnIYMfyl9jiYPWnOg9yLRKxAPR+lYCjo0ekxEPxTQVVzSKEWvEAaX8QRfuX751MSR/rWDc7VsmIlPQQuoBZzQm6RuhvvQTjnrT1fVHJ6eYyHpapaxPIbW+E6hx6xSugdewvssJNRHTbPgriKuirKaG1n7169cAdZKTX3lS4/S1/O8fEANilSwS9qs3pZNkEa1gnmHK01ib/x2+mTzXE531u1HHRBuOU7e+VJtg2SnYAGcg4Re25BXsXwEiK5BlW4NeWCkIpk15SaYRdshegQlrb3EH3RJIvzrLtUTxqZLdBgjdGgfnQa30q7WN2Ck8jJ12k0vBkJQCd3AzA262HZuhb5EzwGkp2D46aZyeAtRFFq4= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c94b40c5-ca89-499c-79a2-08d71055ee70 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2019 16:42:35.6746 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tlendack@amd.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2763 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gNy8yNC8xOSAxMDo1NSBBTSwgS2lyaWxsIEEuIFNodXRlbW92IHdyb3RlOg0KPiBPbiBXZWQs IEp1bCAxMCwgMjAxOSBhdCAwNzowMToxOVBNICswMDAwLCBMZW5kYWNreSwgVGhvbWFzIHdyb3Rl Og0KPj4gQEAgLTM1MSw2ICszNTUsMzIgQEAgYm9vbCBzZXZfYWN0aXZlKHZvaWQpDQo+PiAgfQ0K Pj4gIEVYUE9SVF9TWU1CT0woc2V2X2FjdGl2ZSk7DQo+PiAgDQo+PiArLyogT3ZlcnJpZGUgZm9y IERNQSBkaXJlY3QgYWxsb2NhdGlvbiBjaGVjayAtIEFSQ0hf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