From patchwork Fri Jun 16 18:55:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793331 Return-Path: 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 671E660325 for ; Fri, 16 Jun 2017 18:58:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58DBA2866B for ; Fri, 16 Jun 2017 18:58:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 490622865B; Fri, 16 Jun 2017 18:58:00 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9A5EA2865B for ; Fri, 16 Jun 2017 18:57:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwPE-0004Uv-1D; Fri, 16 Jun 2017 18:55:40 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwPC-0004Tr-Kr for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:55:38 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id 53/BD-02006-9A924495; Fri, 16 Jun 2017 18:55:37 +0000 X-Brightmail-Tracker: H4sIAAA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-6.tower-206.messagelabs.com!1497639331!103601642!1 X-Originating-IP: [104.47.37.57] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26711 invoked from network); 16 Jun 2017 18:55:33 -0000 Received: from mail-cys01nam02on0057.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) (104.47.37.57) by server-6.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:55:33 -0000 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=owe/TQwj1iQuMov/DugnT79Bf3RJdwJzockYybN40UY=; b=QGYVxhZFh20kwA93nFDI8ew8PrICN5WHmzvrbP3/FrhSThh2rTJuCzlYZTt5teZA9/8NRtJq1FVL2HCew2Ez1bB53o2LUhPr452mJNNx0GuAwWAmLtjpn1xY9Co2DYuLCW25R1EQl9cmHc0IJLpW+XTjPy5GBbKFcGvuu9Xtw2Q= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by BN6PR12MB1137.namprd12.prod.outlook.com (10.168.226.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Fri, 16 Jun 2017 18:55:26 +0000 From: Tom Lendacky To: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org Date: Fri, 16 Jun 2017 13:55:23 -0500 Message-ID: <20170616185523.18967.34256.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN1PR19CA0026.namprd19.prod.outlook.com (10.163.220.36) To BN6PR12MB1137.namprd12.prod.outlook.com (10.168.226.139) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d53879e-0a50-46e4-c1ed-08d4b4e94105 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:BN6PR12MB1137; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1137; 3:GVLqCKINJQxIyMGG0U7jf9lzGup2Bw3OKWpqPgasnigbjY382GUEltc3oT0ziBpCKpQYhXa4CC6AtGS2dFvtYUhheyBhW84HIGOhxvvHjySWlRYzCETTK4+mb3mD6crKeiByEzyRz+sSaZmIMzMF4EUpfxmerRiyJ60E8+785KIxjZvLCp8/ohrCNTjJ+jXQxZTex91NLeXXZ2RxAFkhTzxScNw7CV4aZO2xG/VvjGMmd/sSKAR2nvt21YCd2EVv/fADB17ZQDxvJ5zclVlUMnNm6znBrg81LXLiHK3H7nHCrrMNs0hcCgsR74MU6kEV7JneODrmgRGWbc5sS48/y6HSJHuioYl8i8VJCs5gYg8=; 25:e6AddbyRIqw7YzeLODmafDeWbckVxT3dpArBgxtV6G7FZ/UGaVPmnA91f81sNLFuzudCMzIbB2E28Zucc/si5nKZQ25iK7VWWXqySaFGGULrXs2hgmafNEHdoqJhj4t5WjkUsSgahH5j2mny3ltmM9wRx+57mXNjVaVEi0VHLrDJ+QJESWjn2scUH0mO1YYBsxigeBtLNTy1khcWHEuClaIJZS1NSEz5ULy8yZRlrhAAOc+4rX44EKEfrTyOZe753SwPLftksbg8mT8Md63C4xmNk1mW7BSbBzaP4KV/p4iEdQP5ZFp8SJbWHD71sShcSTOq87dKSwi5kSaOZnMhUIpnaQALGHHe2dALVgZd+IgKcL6EbLh0vcIvtflowe0QsND/rnU5jERdfvh3kIQzjurb4aQJgJLig5v+SxCd3chwkAsOP98bDWidpy72GJcYRTlaobOTnsYMA2MyYmFdlccZW3rKrKhYoTJ043HdTxY= X-MS-TrafficTypeDiagnostic: BN6PR12MB1137: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1137; 31:o+GwmJE4chIimscSRq2WGu+IZdWFs/gElnuFahrFNWs/JJymnQGr7dEKrYWCXu6aAb1BorGWIQMgSUhJldqi7ldEAkWlKexjwjqu4aOEAmNHudHKVgW1lWjTtMGO9o/nG9tb2xguOTkdx2P5cA30YGWHUz4IfhSlRhSVyYXHqAtLb6sxg8d6BEF5jiKb69iB4Wpa1/BgKw2vAlqoQRoBCsR5rg7fj0ClHnR07fbr+FI=; 20:psCrsycB+YXOrxQLEJXCPQgwZNiyzolGchAhneW/+3ZBLqsAiH95s7ineimSIA0Bj47vIBy4gRrWvks+x7MheYDLU1fxSb6/iI9rEOKjD53ViVRWYo13i9TJqrMTcD7Ob/BkeopoxAMQJmE0MZRAa5DxKAeL0I4h4FYZqlKTNDE625hd08gXK4zpzeS3EyfdCDt9HBaY5TaL46riki6MU2YOm9QgN9Ikf4hEV8i/RZauRhjCGTaJg//EZ5p3jJj9hTmvO1rl1gq+GoVcSWfG2H44jO+9Sz8jxyr4zyNYI972SWh1Tf/D0etT+sMU0aE9jjDBAysqq51gwbPn+6gL0mLKSK5m8C3c4ABFkZdAL3RXidu7/EjvsqjDQ2IWlA/+Pk4DwLZNdpJzAZ5PC9YkTxR3iPQXMPvhLKfccYLnlHudLVhK0tW4gdzSGTVks9m0enpsz7Kq+aojCEHO96wRG793dAgZiZB6oS+5sWOWRjWwIpmBqF7yuX/qx56lJ3ZP X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1137; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1137; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM3OzQ6R0d6WkxtZThvTDFaSkV2cVJmU2JBZXQ1dmpt?= =?utf-8?B?QWNnVFdwRWtEVm5zWmpyU0dzZitRTUU3ZnlxWEE5MVNWb2g4eFNUOGErbW05?= =?utf-8?B?MTNrTDlIeVYvdW1iczNMb1B6eVZQUEM5UVVOU3pSUC83cVlZZlFieVBYMU1o?= =?utf-8?B?OE5zT2hzRzMwZjdQLzQrYW1oY2RNclhOKzB2UnJzTTFSeTJINC9nUEprUEhO?= =?utf-8?B?bjVWU1ZhRXNZN3FEd1doNFVLR25ZVUUxQXNtNUFyRUFIVUFnU3MzTWxmWk1j?= =?utf-8?B?UE9HSFpUNjVWeExtazZsSWM1WG9XdFFhVXBhZmlUTjdiQUxLRjNHVWo2ZTlV?= =?utf-8?B?Q2ZhbXJzQThXOURaUFJxUjczWUFNbUo0RlA1ODRjS3VRVVVNVWk1aHlzdkgz?= =?utf-8?B?cnlVR3dhdXN2VENGY1ptUVNiNU1uLzdENFgwbklPKzdZelNBT2lkbEFNMVlY?= =?utf-8?B?eXp5bzllVHpsdUt2MndyM2cxdGFQL3phRnBzbnlxaWlSeVZicDdUKy9CSlFz?= =?utf-8?B?Yy9SV3p2WktabnczdHpobHpVTjFsMFMrbWJXN0pQTXFMZlJnTFlYUTAyblJp?= =?utf-8?B?OUFNQzJoNU1kT0s3d0dBQlVMcDlP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0Jhem5EMzMzWUluZTV3dmpEODhZcDJTU0pGb25PU0ZF?= =?utf-8?B?WDFONHFrSXl1SENWWWUzVzNtOXMxYTlpd1ZuR1FWc05zOW80NEJnWEhrYkxO?= =?utf-8?Q?JRULaBcFBqJjrWF3Lqj?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39400400002)(39450400003)(39840400002)(39860400002)(39850400002)(189998001)(8676002)(81166006)(4001350100001)(53936002)(6666003)(55016002)(54906002)(9686003)(2906002)(54356999)(50986999)(76176999)(86362001)(103116003)(25786009)(53416004)(83506001)(33646002)(305945005)(4326008)(5660300001)(66066001)(42186005)(47776003)(110136004)(23676002)(38730400002)(7736002)(6116002)(478600001)(3846002)(2950100002)(50466002)(230700001)(72206003)(7416002)(1076002)(7406005)(6506006)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1137; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM3OzIzOmExaUZxSVJCSWZqRlpIQkNaMUVRMEQ2a2Nm?= =?utf-8?B?c2h2NkZqSVZTZnh3d0s2cFQvZXc4dzREWlFTTXBpTkIzTHJrbVdTQnd1MVFs?= =?utf-8?B?b1J2QzQ4L0h5Qi9yQVFOY2lXb1dqeHhEU2FMbWVVOWM0UzZDbTlNUCtlL1ht?= =?utf-8?B?eDRNaU5hbFExTUZ3RzAxeTFhS01QaVRDcFh4SnllbjJpSHRnTm4vY3dqNlpq?= =?utf-8?B?Q1BNY2toZE1BaW0xTUtMem1tK2VBTkF4SlRnaUcrQVhpOFNQK0M5RzdUTTFH?= =?utf-8?B?ZjBPNzlTYzJxbTFOcCtqVkE1TzA3ZlpOb3NNZ3M1M2VUZ0xNMWlBYWQxaVgx?= =?utf-8?B?WmtQME5OdDVPOVpjT0IwNFFnZ0wweEhK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B44cgM40/AQDOIISMgVC2H/ea+RvDZiAVjclmYxJFPoj4sRFHaY9YxlZ4OdjM6OzIcmjecntGYCn1g4WwhegohTrfLuxzKUzXvn20bPepJg8HC776l/gjySxy9Qu6ynCRMMQUEXXWMu/F7TB0D9sMW91jmKTZOmOT46/we2XO/rnUjOHX+QO674O2G+9yPPzaXszZsJgPmvzFsFTr7MjUjInisekVJkMjCwj89FD7FtclDMGA9dhICioxoUbumvFU2Tcpcg7O8PNa79YbVvoXW5ojoz19Y8Su/BVhDJvOxPzlVOqVGbG/jnbihroiPCwzMx2WmbIOSx+x0FZ3yWwg+Glfix/Oq/V82lBYMuoynpHTmV1yjLGFDDfRVEbjHI1dHraPMbmI5Dibwfm3AspgQM18NOVAuDH0ytgcG8BXwWqFN+VSQtUU6XYTkfEqVHLDS5FNe5YIzHPkgR8W4t8eHtVrDHHo8qtrDwpPAqRKqN3ah5+M+GYYKWbMlr+Qo= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1137; 20:xoddhyTWrKDUmhsLd6l5K9q4yNKYVdaxYSsVd0kdYwpbdjDECZHGxtjMEFvEfJ7IgfvyGut50e1cF1EnLdAd7NYHcISU+EkvqetqQnhRRtCtj2MYeogQpSE2PnE5yQt83cJOAMwu0qYemA9Ox7L2nkuOdcRArV6zKqEBsod53IFE1/G7WI1k3PbWHoGsl2086HBDfELSSgJxf6E5zA1WQmH+zdjhfBbZkkqnANzUmyyIGdh6hKUVikxqnTUPPsfR X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:55:26.1187 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1137 Cc: Brijesh Singh , Toshimitsu Kani , "Michael S. Tsirkin" , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Boris Ostrovsky , Jonathan Corbet , Joerg Roedel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Larry Woodman , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , Paolo Bonzini Subject: [Xen-devel] [PATCH v7 29/36] x86, drm, fbdev: Do not specify encrypted memory for video mappings X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Since video memory needs to be accessed decrypted, be sure that the memory encryption mask is not set for the video ranges. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/vga.h | 14 +++++++++++++- arch/x86/mm/pageattr.c | 2 ++ drivers/gpu/drm/drm_gem.c | 2 ++ drivers/gpu/drm/drm_vm.c | 4 ++++ drivers/gpu/drm/ttm/ttm_bo_vm.c | 7 +++++-- drivers/gpu/drm/udl/udl_fb.c | 4 ++++ drivers/video/fbdev/core/fbmem.c | 12 ++++++++++++ 7 files changed, 42 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/vga.h b/arch/x86/include/asm/vga.h index c4b9dc2..9f42bee 100644 --- a/arch/x86/include/asm/vga.h +++ b/arch/x86/include/asm/vga.h @@ -7,12 +7,24 @@ #ifndef _ASM_X86_VGA_H #define _ASM_X86_VGA_H +#include + /* * On the PC, we can just recalculate addresses and then * access the videoram directly without any black magic. + * To support memory encryption however, we need to access + * the videoram as decrypted memory. */ -#define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x) +#define VGA_MAP_MEM(x, s) \ +({ \ + unsigned long start = (unsigned long)phys_to_virt(x); \ + \ + if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT)) \ + set_memory_decrypted(start, (s) >> PAGE_SHIFT); \ + \ + start; \ +}) #define vga_readb(x) (*(x)) #define vga_writeb(x, y) (*(y) = (x)) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index d9e09fb..13fc5db 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -1825,11 +1825,13 @@ int set_memory_encrypted(unsigned long addr, int numpages) { return __set_memory_enc_dec(addr, numpages, true); } +EXPORT_SYMBOL_GPL(set_memory_encrypted); int set_memory_decrypted(unsigned long addr, int numpages) { return __set_memory_enc_dec(addr, numpages, false); } +EXPORT_SYMBOL_GPL(set_memory_decrypted); int set_pages_uc(struct page *page, int numpages) { diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index b1e28c9..019f48c 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -928,6 +929,7 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, vma->vm_ops = dev->driver->gem_vm_ops; vma->vm_private_data = obj; vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); /* Take a ref for this mapping of the object, so that the fault * handler can dereference the mmap offset's pointer to the object. diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 1170b32..ed4bcbf 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -40,6 +40,7 @@ #include #include #endif +#include #include #include "drm_internal.h" #include "drm_legacy.h" @@ -58,6 +59,9 @@ static pgprot_t drm_io_prot(struct drm_local_map *map, { pgprot_t tmp = vm_get_page_prot(vma->vm_flags); + /* We don't want graphics memory to be mapped encrypted */ + tmp = pgprot_decrypted(tmp); + #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING)) tmp = pgprot_noncached(tmp); diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 9f53df9..622dab6 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -39,6 +39,7 @@ #include #include #include +#include #define TTM_BO_VM_NUM_PREFAULT 16 @@ -230,9 +231,11 @@ static int ttm_bo_vm_fault(struct vm_fault *vmf) * first page. */ for (i = 0; i < TTM_BO_VM_NUM_PREFAULT; ++i) { - if (bo->mem.bus.is_iomem) + if (bo->mem.bus.is_iomem) { + /* Iomem should not be marked encrypted */ + cvma.vm_page_prot = pgprot_decrypted(cvma.vm_page_prot); pfn = bdev->driver->io_mem_pfn(bo, page_offset); - else { + } else { page = ttm->pages[page_offset]; if (unlikely(!page && i == 0)) { retval = VM_FAULT_OOM; diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c index 4a65003..92e1690 100644 --- a/drivers/gpu/drm/udl/udl_fb.c +++ b/drivers/gpu/drm/udl/udl_fb.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -169,6 +170,9 @@ static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) pr_notice("mmap() framebuffer addr:%lu size:%lu\n", pos, size); + /* We don't want the framebuffer to be mapped encrypted */ + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); + while (size > 0) { page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 069fe79..b5e7c33 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -1405,6 +1406,12 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, mutex_lock(&info->mm_lock); if (fb->fb_mmap) { int res; + + /* + * The framebuffer needs to be accessed decrypted, be sure + * SME protection is removed ahead of the call + */ + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); res = fb->fb_mmap(info, vma); mutex_unlock(&info->mm_lock); return res; @@ -1430,6 +1437,11 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, mutex_unlock(&info->mm_lock); vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); + /* + * The framebuffer needs to be accessed decrypted, be sure + * SME protection is removed + */ + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); fb_pgprotect(file, vma, start); return vm_iomap_memory(vma, start, len);