Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10043894ybi; Wed, 24 Jul 2019 14:50:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0acc7bnboZ8VJe4mcNJNWtVYOtCAN2kqBPmC7T8E+gt9H7zqAWlM3QaoQa/32nNKpOXpk X-Received: by 2002:a63:5459:: with SMTP id e25mr18316846pgm.366.1564005031105; Wed, 24 Jul 2019 14:50:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564005031; cv=pass; d=google.com; s=arc-20160816; b=FY4ojbf05ynD1eVc1N5ObsfBRtZn2cqnzcTBqd5lhumnjaH1/OD+fpf98fBuUNoVZ3 +93IxJwQhm4rnw3qtoS2Ob6krgpQv++vTCco59Qk9ORZV0TOc1aVuHo7YZLIc22Bsc8E kpqgjaY2n9fkF7GU220bMV4J1NeGzGLB4juT4RL3oX5Ne9Jl9zCT/pKV8PqM8DTes6QD sivt05LeDOMN+PkhSNRZlYbp2lJ+qG4bfNBB+x4QICY4I1QFbRKDnQkrxvtSKZLT7DrE ovYRNHbTBFaDMl1itI2b8XRhWMW318qICxdJLi6JKJ6X7gnancFGKJBmpdharIAYAee1 AwiA== 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=eJjYGFa4uv+c0SPjGFCRoEA4tVq7L8w1kjZ94YRAzq0=; b=QZ2PkQh10Pr3sk1iXIbgKrV+KSN/5uwQPfOC+ayaXamATPR4Ti1AgpgeJzFbXJ/kYd hodJlz3/PxgspgC6kcb2TR7beXGJIen++EEwb5hphOK4RG97/cjQ2TSvtgtWFDg8Ejcm 1rDFy9h+ZXhqmWP65ouZzYL/RLhZ9cD8MQ2mQWZ5EH66rhDRMCIE4PImMiEBdMEJ4+iy jwG59QCZoFDFyrTJhQO6WDzMGkuWMk/b720ffpx1Yg6Bfb0lR8BOOYgEV90oAFZZT9e7 DwU+VYDtSpGVAWqhQf8zgq9y3OZ2KiDT//zED63QGWfGMQF7kBpx1r+QtMG7rnF0u2pB R/tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amdcloud-onmicrosoft-com header.b=MCKHO5SI; 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 k73si17009940pje.10.2019.07.24.14.50.16; Wed, 24 Jul 2019 14:50:31 -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=MCKHO5SI; 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 S1727564AbfGXSa1 (ORCPT + 99 others); Wed, 24 Jul 2019 14:30:27 -0400 Received: from mail-eopbgr730076.outbound.protection.outlook.com ([40.107.73.76]:46299 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387668AbfGXSa1 (ORCPT ); Wed, 24 Jul 2019 14:30:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ViO3LTAoff4sRxjI2wsuI0UfccEUAuD+ZuXLatOnrt4ubCFEy3EBE269HgFpGUUMPvnKp2PuGEvTOHD5XdXjbA0L4U5sMN6tQlgGF3Lno9zRI49R8sQoonVBQkce/MgCt5wCZaNrwoB9byeuPTRxtsyfYdAO1id/ZlQBGAhu8oG9mK78N7ObB0/xbF/MjBHwquv9+5k+b8+RTy02fnazucXmjbrtWTOxQFj70EKhzIbOYN9bgM524fVKltgtkaHdU+4CeT9HotkaouHjMT03N7npJvWKdI6Wnyab7dSH1w5OO21P215BCFfAcWRB97Zmh2yDAEE+f1pgdzXGbGRqFA== 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=eJjYGFa4uv+c0SPjGFCRoEA4tVq7L8w1kjZ94YRAzq0=; b=LMlOOsm3GBtdJMIOk2OHwai4WYtUAaatzWLytWzgPzqALD9zyGTO6Fh1oCdeFNUylEXKrNnoajluXTw9M4D8pvkK1ushit5+pp3cWjHf6R1v7pPmhAQ5nBn6YefvdEeAO1S8CkL+esMoZgtwxNfhb1Lk58XFZXRc/RCl3W9yz4QMe9F+/sLGmns/1CexPHhLij4B09sLU1aH7sOvBiIxIHzq53+xzUC//zPKQc3jKPWS81qKRTT26IfIrxtX0FklRB+6fpI+9VG/jnATtMBb+xEbZBU5mC8XbLuwnGZbudvzowE0CSbPMh4Xo3QujhIN21SEjvBfEpyD8AafdSdVaw== 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=eJjYGFa4uv+c0SPjGFCRoEA4tVq7L8w1kjZ94YRAzq0=; b=MCKHO5SI0mM+rxtq4rOCxeEWM+gXOado4h2KVYW+/0Ctx30lDXTRqdLci7b29TqixgoIkZa4Uw39kzYWeWIH+NzSSo1NMsNvBeQ/BieqJNDZuuBw46K+2Ymjw+1RtwGth11vIEkQ3woMq8DCSd+13hNRs7lkXbXrD1a2Hn93/10= Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.104.150) by DM6PR12MB2633.namprd12.prod.outlook.com (20.176.116.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Wed, 24 Jul 2019 18:30:21 +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 18:30:21 +0000 From: "Lendacky, Thomas" To: "Kirill A. Shutemov" CC: Robin Murphy , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , Christoph Hellwig , Marek Szyprowski , 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/K57qbaAcwAgAANJYCAAAaagIAAB+IAgAAKaYCAAAU3gA== Date: Wed, 24 Jul 2019 18:30:21 +0000 Message-ID: <9f9bfd05-0010-9050-20f0-8c89b2f039ef@amd.com> References: <10b83d9ff31bca88e94da2ff34e30619eb396078.1562785123.git.thomas.lendacky@amd.com> <20190724155530.hlingpcirjcf2ljg@box> <20190724181139.yebja5yflzjgfxlx@box> In-Reply-To: <20190724181139.yebja5yflzjgfxlx@box> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0401CA0031.namprd04.prod.outlook.com (2603:10b6:803:2a::17) 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: 6b0c5075-7f33-49bc-c248-08d71064fc4d 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:DM6PR12MB2633; x-ms-traffictypediagnostic: DM6PR12MB2633: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0108A997B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(39860400002)(396003)(346002)(376002)(366004)(189003)(199004)(102836004)(26005)(71190400001)(386003)(486006)(71200400001)(186003)(478600001)(3846002)(53936002)(68736007)(6506007)(36756003)(52116002)(8676002)(53546011)(76176011)(6116002)(66066001)(6246003)(6486002)(446003)(305945005)(11346002)(2616005)(476003)(31686004)(7736002)(6512007)(66476007)(6436002)(66556008)(14454004)(8936002)(66946007)(25786009)(81166006)(316002)(5660300002)(81156014)(64756008)(66446008)(86362001)(31696002)(54906003)(4326008)(2906002)(229853002)(99286004)(7416002)(6916009)(256004);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB2633;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: 7ZlNCMICRuclaan2SoDLA8MBRQUVatZWpOJawVBoYMMCmWrT0PPWqq6SgLF9crRgCiK6wrYKhb+TuCIcE0gxCPXG/4h5y1zqYK7YNTYPkfetauq4qi3exSen6xdx0RXzQH7gWfveSxmMgTywiIWwUUc79aKkymPcUiJ2fDebNvHIXjhwYECqZoIaytl7vxkXac4qwb3HDXMTfwxEbPfHYT05hjKlW+oD7gfp0uLbsC5oMaXbOM41UFt+Mqdfgz41RxEzfUc2deI8Yl+vK2nXp6fqml0yc8PWUXDUXxBnUIwpzI1/BPJ6WEMsWpjr2D8nynllPnrmuQrt787wT8Tt5JqOHqZXqO1L7panL06QZRidN4fmJUuplFSmQNpW8Vr1tvLf3vRK5M7KXeDXjJPOoo+/q74dJyQyEdkVCd9Wdxk= Content-Type: text/plain; charset="utf-8" Content-ID: <4D87444C6770634390A0D7D696E571B3@namprd12.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b0c5075-7f33-49bc-c248-08d71064fc4d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2019 18:30:21.3212 (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: DM6PR12MB2633 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gNy8yNC8xOSAxOjExIFBNLCBLaXJpbGwgQS4gU2h1dGVtb3Ygd3JvdGU6DQo+IE9uIFdlZCwg SnVsIDI0LCAyMDE5IGF0IDA1OjM0OjI2UE0gKzAwMDAsIExlbmRhY2t5LCBUaG9tYXMgd3JvdGU6 DQo+PiBPbiA3LzI0LzE5IDEyOjA2IFBNLCBSb2JpbiBNdXJwaHkgd3JvdG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