From patchwork Tue Jun 27 15:01:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812267 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 598CA603F2 for ; Tue, 27 Jun 2017 15:03:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27E6F28401 for ; Tue, 27 Jun 2017 15:03:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C4EE28464; Tue, 27 Jun 2017 15:03:51 +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 D64AC28111 for ; Tue, 27 Jun 2017 15:03:49 +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 1dPrzi-00069z-36; Tue, 27 Jun 2017 15:01:34 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPrzg-000694-NB for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:01:32 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id F8/F6-01732-C4372595; Tue, 27 Jun 2017 15:01:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAA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com!1498575689!69065774!1 X-Originating-IP: [104.47.37.77] 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 1458 invoked from network); 27 Jun 2017 15:01:30 -0000 Received: from mail-cys01nam02on0077.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) (104.47.37.77) by server-6.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:01:30 -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=MYn4VYdn4B3xr7Q8aAFm1lrugfBT9OVkytPStuH0i1UeVSWd8qs7Zd+xuyYlfn5fX6GW04UIZBtiFJwtaywySPYsH3e84hhXkzWzl/yyJUPfk7R4hXAwpyoXkgG62/abW/vpwzAojLwDJOA0Q7UOTZgIWmHJhoRChc2RguUqdzI= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1152.namprd12.prod.outlook.com (10.169.204.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 15:01:23 +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: Tue, 27 Jun 2017 10:01:20 -0500 Message-ID: <20170627150120.15908.89995.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> References: <20170627145607.15908.26571.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: DM5PR19CA0021.namprd19.prod.outlook.com (10.175.226.159) To MWHPR12MB1152.namprd12.prod.outlook.com (10.169.204.16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 13f5159d-7966-4a5e-c636-08d4bd6d61d8 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); SRVR:MWHPR12MB1152; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1152; 3:n6bf+whAcZ7iuYjE1hiAbvj0wyjTlkVtbkCH22jp63BkgWc7YUibCB+e/6iboCnlrWCBW2lLN9gEWif/Ue10/7EsOGYwOv3GhovnPMs1BCOGTHqgDFW0wQX6/ayo/ZPX/H/82VGrbfYlyoF1WQAHvPNI8o9a1/sldj5uzQMFdqgQHtQAnc2B/tdBG7HLgZSm+rjI12cjEQn7k0VPUzPGW13sTscxtGkHICkLPM/C2hxjolVnO91wHEdVR07lLHdMzXNjpzustljr8wvKpTT1d3juObiZ+R6o8up8wQAaj/uPlYStZqrS0PHoCv/MMucqcFh/CTQvcA754BifRSbLc4ZcSgPAld49nnCXSU3IjJlfaa45pMmEQV9DpyfUuaUd7g9+ipZqvpEhomUSUaWr4Qvrogsgbngp4ZwHx+XQkao/oNxlvKeB8ka9VEEp9UrjCEUVLzr07w96nkRoC+DbrqQNS68O/vpTIP2whAPDMf3qC5QhGDblCugGoByH2Ue+AmrGw54xb35Nu0kYD+HNxHdtVbL6mcfZNFGwY9qVh8BU6+KbZOVPQxd4d4mbbnhAo+eh9SsXyA7tLPGE5tU25GUL2RW0OL6d76QyasT5W6yZ1kYslQaFrgk54oSX+bxjodyuBed8q9qihz/PR8R1x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BCyYiTBKYIkw8ZIwKQmBD0+WWBNP65DbDkEbcX1EqKWbboZNMFStVp1Dj0qZBtN6yhSoKQ7MSvvZcaTzdJeNCe6j3cTHdwM5HF63Hr+v8PtZN/IJKCXOpn746H8+8bV+jEpiez/qSi5IlZfPM/dh51i8EfqLqLwRo+506R/XWR0QUjtpDY0s0w8USCnCCigoRIF9WoupzXzd7mNplLCSW X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1152; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1152; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUyOzQ6dGU5S0dKanpDZFl5bkg4VGNhdThyVjNNWmVL?= =?utf-8?B?dkZNS09nNUQ2ZW11aHMxUDNBaUJ3OFFKZVFxSnBwa1RhUlR1dW9mVE1hZkh0?= =?utf-8?B?WThsOFdpcjVNUGdpVExiNGY0RFRtYnpiV3hsZjFmNWV1NXZ1cHFyME9LbDRF?= =?utf-8?B?aUZTZGlHQlNpWGlVTHZadmg3NzhFZGpFbW0xTlJycVVIR2tBZjFwNnZWcVJ5?= =?utf-8?B?Rk1YbVNoc1NpaTNlQkxMdlR2eE9SWEpVWTZaLzF2TGxiUG5tSWtsU1dvSUQ2?= =?utf-8?B?YldVRWlPS3BzRzluUDltK2liV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RKaGlld3JWQWgzVWhieWs0VlY2Sy9rS1FraTlBSEIzWEZHUjE4eVQx?= =?utf-8?B?K0drcldjZUF0Sk9IMmxXQStTdDJmNjhzV254dGhmU2pCeUhpQkxTS3hTMy9B?= =?utf-8?B?WHFjMVdvMUl0ZzU5VmhGUVprVkVsMStCZk1RQWxlY0orWEd4ZU1weDdVY01V?= =?utf-8?B?QldIOWhRZUxYd2lNSFRFR3J0NnZqMEEya3h2blA5RjJma0EzR1Fzb0JOTi9z?= =?utf-8?B?ZXpLWmZCdjY2Ti9RQndVSDRqaG5mVWp3R2tWMVhvcmVMVVU3eDEySm5jU3N4?= =?utf-8?B?U1pIdzRIVXB0NUI0bEc2ZnA1OXc1T2FrSEVBVE83MGlOMHRxcWhranpQb29Y?= =?utf-8?B?eXB6S1N5aXJzc3pVSVlEV3d5em96eC81Mi91UURkNG9CMHlZL2pxYndSUk9p?= =?utf-8?B?RGtnVW8xOTNId25zck5sZGRmUWdwTHlJaGtLVE0wSDVzMTlyc1A0ZXNXclk1?= =?utf-8?Q?1JTy8RqV4bL1g+Bc3kH8ruFVPXdAK2eQXuq006?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39860400002)(39840400002)(39850400002)(39400400002)(39410400002)(39450400003)(23676002)(47776003)(7416002)(76176999)(50986999)(4001350100001)(54356999)(5660300001)(42186005)(478600001)(189998001)(2950100002)(4326008)(103116003)(25786009)(7406005)(72206003)(66066001)(53416004)(97746001)(33646002)(86362001)(305945005)(8676002)(53936002)(9686003)(54906002)(2906002)(110136004)(50466002)(6506006)(6116002)(3846002)(1076002)(7736002)(55016002)(83506001)(38730400002)(230700001)(81166006)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1152; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUyO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HoUto7cOcJV51V4ThcilntvpN577w15d1uAuC18NPPB4Q1Vm+s1s5Trwv4q5qdIBsLMzl1vwbsTsbXou7tBeWEAXHd8TzowZjHXpZbpxYFmgnz2JuMoYCvimEY6uEDSv5YnU9xGuQcFlGNtPTZEsRYVL4paSrNKFlWLooyirzSC5XKjqYDQMbWFXestTmQRIGKOeB+sh9SxGVhiZV1Qr0jcxhAerKA5+SpSid74B5UdB/e X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:01:23.5826 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1152 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 v8 29/38] 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);