Message ID | d112564053c3f2e86ca634a8d4fa4abc0eb53a6a.1500319216.git.thomas.lendacky@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9DB0F60212 for <patchwork-kvm@patchwork.kernel.org>; Mon, 17 Jul 2017 21:17:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D581227F7F for <patchwork-kvm@patchwork.kernel.org>; Mon, 17 Jul 2017 21:17:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9D1527F89; Mon, 17 Jul 2017 21:17:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2914927F7F for <patchwork-kvm@patchwork.kernel.org>; Mon, 17 Jul 2017 21:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751575AbdGQVMm (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Mon, 17 Jul 2017 17:12:42 -0400 Received: from mail-bn3nam01on0058.outbound.protection.outlook.com ([104.47.33.58]:39086 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752095AbdGQVMd (ORCPT <rfc822;kvm@vger.kernel.org>); Mon, 17 Jul 2017 17:12:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LLzrsy6xo+uq8wxG/LmoBq+a4gbMsyEALdfrj6enUZ4=; b=ogh2mI573DJL3lHuxD7V9MQGmsE4Y1kVkgNx8yYu/uQWotj6XcJ8r0AZYf5CrjyBNA5DLbHhJim/H/AUAKjjtFIR/awOjAc6FkOtOFZqxn1dMqpoDecbGftdH4CFiiXYpHWCSFyVLawJyjjqal/wzxX8LNYhUeTTjWgGrpy2C0w= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=amd.com; Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1151.namprd12.prod.outlook.com (10.169.204.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Mon, 17 Jul 2017 21:12:26 +0000 From: Tom Lendacky <thomas.lendacky@amd.com> To: x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, kasan-dev@googlegroups.com Cc: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>, Arnd Bergmann <arnd@arndb.de>, Jonathan Corbet <corbet@lwn.net>, Matt Fleming <matt@codeblueprint.co.uk>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>, Paolo Bonzini <pbonzini@redhat.com>, Alexander Potapenko <glider@google.com>, Thomas Gleixner <tglx@linutronix.de>, Dmitry Vyukov <dvyukov@google.com>, Rik van Riel <riel@redhat.com>, Larry Woodman <lwoodman@redhat.com>, Dave Young <dyoung@redhat.com>, Toshimitsu Kani <toshi.kani@hpe.com>, "Michael S. Tsirkin" <mst@redhat.com>, Brijesh Singh <brijesh.singh@amd.com> Subject: [PATCH v10 25/38] swiotlb: Add warnings for use of bounce buffers with SME Date: Mon, 17 Jul 2017 16:10:22 -0500 Message-Id: <d112564053c3f2e86ca634a8d4fa4abc0eb53a6a.1500319216.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <cover.1500319216.git.thomas.lendacky@amd.com> References: <cover.1500319216.git.thomas.lendacky@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR03CA0008.namprd03.prod.outlook.com (10.168.230.146) To MWHPR12MB1151.namprd12.prod.outlook.com (10.169.204.15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 70ce8e6f-5f5a-4b77-926a-08d4cd5888a5 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR12MB1151; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1151; 3:VfL0v0exNwPsH0LgUcnS4e9+JC0iwiyjop9XPQaQijcU/YG1ehawpPxfyARbP1VhSF5cjHj3WLezhkM2lHzAR8nnlsRBJ5zi9/B2AjUPmhP7GRt2nWesUmUSJrtGvs2Mgt9x+QQOArKkCTHjd4sgX9UfwuU7ZI65sw5ERwxchWENIajbfIeROg8gfTjYuY1A6cxwTncwaTI2+YiiOXOmCmCaY2VZPuxob0j9vYy79YN+InNXDaFymX/QR2w8y1+IGS5/3SnzDr8uTK4dCc9r+3/MreJ+QtMMpTpuLXh7YNXHHuZnTfoRAFAaeXfmE5sy9uW9PXtiaR4OK8xgknzZKNFooIhHr3iFveJS66eZJOWWVor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change-Diagnostics: 1; MWHPR12MB1151; 20:YOJZu7KXD7hStkQUhfmHF39yP5fuhmghCe/K0YVxDnVvcE1yrAfoorPiDCNNBZGdRWrNcVJNHfHWcOEzoJ4A2Bk6NQxL03p3JiH99wdpec4x/1gSmZgGdhglhUR+UWCe3f5Symh6T62yl/83J7KVD+m1YeSAO+xi4DT9i9Xf+5xRNBSz/R3LOaggd6R9HAzgOVsi6OPgXE8OxF+hWIfcJoXNBMpuIoc8SOoU/A7b78fYFe8/ZY3D0LJLMVUGB8YvFtnQ5/gO7ApHKNDwlbN3h7C+8e/farYswAtbzSE+xMHyvTGgnaoebiIf7LozXdNRc1EbDa6qoNbyB+O4wbtOgde9ZUbW+3s47Tk/Qhzs17fFTZcR5XcOOTYygr6g2lqt+Bez1s7jl3sBBD8J3AAz8l2W2Zgh2Dp5tK0syg0rIBIaMtKDy4vGxPr412+1Ip6ykEdo/Ik2B4MExXKk7nzcuEk+0ubf3GWY9EM3sKk6v4yZfN5I8LaFyqgW8Gs3ib+R X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(767451399110); X-Microsoft-Antispam-PRVS: <MWHPR12MB1151D2AB8CFDBABF246AA101ECA00@MWHPR12MB1151.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1151; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1151; X-Microsoft-Exchange-Diagnost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acuP64yndmIcZ9vpVL?= =?us-ascii?Q?bhLrR7kbfC6bM65IdDh4unSLywlqv7PoEonkccTqjAYt1xBfC6bskFMFUL7W?= =?us-ascii?Q?e3FvOIsECDF0kwSdO8reipc7MHRq2E7k5MZRdVhUMDHR16fpydftkryDL6Ll?= =?us-ascii?Q?a2sdaRR5qWaeoQrtNJIjN1rJoQw6P/VT8BtQZSQGHp/uwnWpV6TGqMmb+ZDV?= =?us-ascii?Q?qtZi0hDU78lNicHJkjNGKQFzuImCFozGFTHhbfEywRrsleDCkGj0/4M5MFuP?= =?us-ascii?Q?ae+HrQTAGA/TKF9j4qiISH1bfvXxtwVM3nI/ul7UOCY2GRWWSqYgrdkYoE+J?= =?us-ascii?Q?wEZd54errH41q1tDavpyjcw3xy9huu32HuZs8lX15+Q1sLJHTL5a9mNlpL1C?= =?us-ascii?Q?5PezVgxS6/fXQbvn8IKXtopjUho/uT1MWTJIr39OL1OcXqRqx78JjZk2hJaF?= =?us-ascii?Q?LixUA2/3mrf+glLN9GII4=3D?= X-Forefront-PRVS: 0371762FE7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39410400002)(39850400002)(39840400002)(39860400002)(39400400002)(39450400003)(25786009)(6506006)(33646002)(54906002)(7416002)(76176999)(478600001)(8676002)(50986999)(6486002)(47776003)(5660300001)(189998001)(42186005)(38730400002)(305945005)(72206003)(53416004)(66066001)(50466002)(48376002)(110136004)(118296001)(2950100002)(81166006)(5003940100001)(3846002)(6666003)(36756003)(53936002)(7350300001)(6512007)(2906002)(7736002)(6116002)(86362001)(4326008)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1151; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1151; 23:nkqoUqImsBiNXr2x4ew5A0vVYAq1Ki+PAivU4Mv6y?= =?us-ascii?Q?YnnOQB9Q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NKYSFYgmezmpOWQd3zJOcC6iFxCSZ7VhdzuJUkTq2odjDs76QJ; 24:oCS64ZKsqcEwNjJNcI3Y82pr43BK7/mk7BtTAAKS5uJazPzx1B1EC+z72p5ud1zguU419XRCowvEz328aRc4M4WVq104rBopQ8yE5pb0XZA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1151; 7:8pT/Bom9/Z9n8zVld/+m8jgn3dXn3I5jihomwzDzaObjw+GbmMb+Baq9T4xgmdypYFDHyDMlVxY2qZr0ezOM5eIOsKF5GED6gm7QMnttKunPozbyyBeFrw96ksPpo/3bepdN5cLc0rhATa+42kxCb/DZHyTkExFqNJweQTfUj2RQf3uaeTW17iqnqMKmIt4hUXqo3QAuVeZSlFAsR5v3NpA1yBjFr6tWSVZ+PG5HeXQAFTxd+8DlYteXS5ha7gT6kvX8cOajJATGKZ/hIsb9fVYlUZUAfsVUgA28rlJT+v7Gj1eBNbmeV6WJS3SM+QqB53svI/S1ev0645qujmG46RnqeidrXCVx6IHbCEsD4S+vNvysU4YDZt8nXSeP0VNw08fF8ySCegsCJkD6tOLDNUUqslY1DtKoiLhjth3+0z4C7kpdfLhZG0JjNgf0m0IWT9cu4bnekIc4YkeGBduLjQ1Bj6zl29QgQ8wKKcOlLYhSKT22N74YFrRvZp98PZO+8socIyR27ofa19p2P0RBX2MZILxe55vqFukMPAsSTt85lGZgBiU3I+SNMfnr0EP07zsgS/FgyLOIn24XrWnP0ksLV3FiOkcMgjQrzBFo8i7oHLX3prPcWg441gX5XFJBRbUa3bhFM0cnW4614cKNtVz0qbdsCfv5hSquARbRkS1JDKyOdTxBkwNswg0Aao2auayO3j9uI6u5pNT+18aubRRlF1TwK9ACQYGn8Aydjbcw/vFnR5eFEFNeFetYi4ZOHGlmzy1t2gJouX+g4gsyRA9lOw2VT2YGBfKiLQtW0OU= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1151; 20:iA2bqYh07j/kx2qa6h7bkPt8T33RaWBEoYiXBUA5vbCz7o+ifvjWp+0tZ+tZOIloziTUKsXNupDF6gCGXBAGKYx/mkaVtFtCs6fTR98PpllZb+T4a3BBVbAw1kBZbH/ZB5NSeatTLCNT0P3LImrcZJMTs4oO0yJXOkmMHrSxFbwU5vjdBhgRTq5aztfdS/DfaygxtOzImitjCKupGEapmje+e1BkQ3kY/lIxUGpnlikzW+mLP5g9J8NTd36lHJj3 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2017 21:12:26.4882 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1151 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 843ab86..fce2369 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -10,6 +10,7 @@ #include <linux/scatterlist.h> #include <linux/kmemcheck.h> #include <linux/bug.h> +#include <linux/mem_encrypt.h> /** * List of possible attributes associated with a DMA mapping. The semantics @@ -548,6 +549,12 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) return 0; } +static inline void dma_check_mask(struct device *dev, u64 mask) +{ + if (sme_active() && (mask < (((u64)sme_get_me_mask() << 1) - 1))) + dev_warn(dev, "SME is active, device will require DMA bounce buffers\n"); +} + static inline int dma_supported(struct device *dev, u64 mask) { const struct dma_map_ops *ops = get_dma_ops(dev); @@ -564,6 +571,9 @@ static inline int dma_set_mask(struct device *dev, u64 mask) { if (!dev->dma_mask || !dma_supported(dev, mask)) return -EIO; + + dma_check_mask(dev, mask); + *dev->dma_mask = mask; return 0; } @@ -583,6 +593,9 @@ static inline int dma_set_coherent_mask(struct device *dev, u64 mask) { if (!dma_supported(dev, mask)) return -EIO; + + dma_check_mask(dev, mask); + dev->coherent_dma_mask = mask; return 0; } diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 04ac91a..8c6c83e 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -507,6 +507,9 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, if (no_iotlb_memory) panic("Can not allocate SWIOTLB buffer earlier and can't now provide you with the DMA bounce buffer"); + if (sme_active()) + pr_warn_once("SME is active and system is using DMA bounce buffers\n"); + mask = dma_get_seg_boundary(hwdev); tbl_dma_addr &= mask;
Add warnings to let the user know when bounce buffers are being used for DMA when SME is active. Since the bounce buffers are not in encrypted memory, these notifications are to allow the user to determine some appropriate action - if necessary. Actions can range from utilizing an IOMMU, replacing the device with another device that can support 64-bit DMA, ignoring the message if the device isn't used much, etc. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> --- include/linux/dma-mapping.h | 13 +++++++++++++ lib/swiotlb.c | 3 +++ 2 files changed, 16 insertions(+)