From patchwork Tue Jun 27 15:12:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812481 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 52B8E603D7 for ; Tue, 27 Jun 2017 15:15:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45018286BC for ; Tue, 27 Jun 2017 15:15:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38684286CF; Tue, 27 Jun 2017 15:15:15 +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 5AC27286BC for ; Tue, 27 Jun 2017 15:15:14 +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 1dPsAq-0002ZN-PX; Tue, 27 Jun 2017 15:13:04 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPsAp-0002YE-Ju for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:13:03 +0000 Received: from [85.158.137.68] by server-14.bemta-3.messagelabs.com id 5F/9A-10689-EF572595; Tue, 27 Jun 2017 15:13:02 +0000 X-Brightmail-Tracker: H4sIAA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g-Ref: server-3.tower-31.messagelabs.com!1498576380!107615414!1 X-Originating-IP: [104.47.41.51] 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 31895 invoked from network); 27 Jun 2017 15:13:01 -0000 Received: from mail-dm3nam03on0051.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) (104.47.41.51) by server-3.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:13:01 -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=vs5c6ZMHR5/LCWahr9JT6vr0bgbJxrrA44MSg0ahnIMIxOe9mIz0/VAZaaiglw/c01ktjbNDQoEPYXtDsy7L1zYuO0H9zlll78Ju/YCme588eus+fLqAEubI+gKpncmRQrQxfrbTxscTecfSt9kuJGl6Xyh7DnDDqZ6bQ+UXaSE= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) 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:12:56 +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:12:53 -0500 Message-ID: <20170627151253.17428.76893.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627150718.17428.81813.stgit@tlendack-t1.amdoffice.net> References: <20170627150718.17428.81813.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: CO2PR07CA0059.namprd07.prod.outlook.com (10.174.192.27) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1e154bdb-a22c-499c-acf1-08d4bd6eff6b 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:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 3:O8za2XcuaoGqZMdFCPukqVsh1J5UpqWJ3JCnWcMw0u0Hng25ZhyZcNzLbGed89TYRhISLdg4KW1kkMgnlDhkZr7VHFZomAP0TFBcIxE1QhQ/fsW47sZoZXDMZNCicGi+W0vRYBAwxtUD7uZaNYR/DK++T0P6DiJ5BXQPlQSIcqm1j9tA4esd1f9yoAkTerfPPOm6bwPI2xj/0OVSFTDUvAgv5jpHY/5qAjp5lvdzVOSNwImKGKejCsYzv8/Rq9ZRI5VIgEu0EH2xKmcodezfPnmmNBm3YDz5jManyE30qqbi6MQjQhEhMao8zBftE00w5jaWFb0wb6meit7p+TYZfbIhr4c8BR6eIPxIABUnk85LzhWQtYvzjK3tnEmej4hkXdO4tY75F11ubs1lVAeiaHbsgLhk0YE9X1zPtbWyZzkjLhpdRq7bf/a3FjstR6wAeeWaKfGyNiqXmy/E4nzeTrrnIVz1aFWG/YjlufLlsWFVc7W2/mR2OU1yM/Ly4/WXxwpjW3uLFBo3SHlFgsKs9g8MrYDc3UX0QPm4zjzfU2nIDlNTyDiYscoEK6spZgRpu3rysMyb47XuKrAnnbzwojTFMcbri+khPpkRdjde1i/8FCiC2yHO8O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U3Ars71uwnCiF8AOM5v3nfEuU0/HHxW8zRUteQV6BJD2LyArgPyB0GTLDe2R14shZRceob+hh5Uq+Er4GB6oOAaOq0iqFs9fDzIS9aX7ig+ByU6JS40BfwIBz/M32Lm23Mi3QKs+CPjWYIDfwsieleGyRgsKXCBWV3Z4L5zCWjM1euIEOBDFWMbjBYTYAif9lSZ+qpSce7KKkhFFIlOVvI67+1B5TVzV/BzoY/Gj3 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)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1141; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzQ6ZWVkUjhMcnozMzFNVm5ZYUUzbDdhNjNqZ1li?= =?utf-8?B?NTExYkZPUXJvRnpQbklYWVphanRiNjJma2x3SXl4YTlaMlJOeXRvcHArWjJr?= =?utf-8?B?TjBQV0NCRTYxNnV4QjNldGFGSzNQRk5uNGtnd2o2ZFBuTHdRZVJ2U21NUW5D?= =?utf-8?B?Q1ozNWRsQ1JTRHB2M2JFTnFPUUoxNVY5M2c2UStlVVE0a250WE85YW5IdGJz?= =?utf-8?B?Q0dneXdXM3BQdG50QW1uQXk1d1pvdFVhM2t6UzFrZTlUZCtKRmJVTndvdUJJ?= =?utf-8?B?WERDdFI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or?= =?utf-8?B?V1NWaUpTOW0yb2R1OEMybG9wNEpJSld4Uyt6ejRYYW56a29KMFhpQ2hLT3BK?= =?utf-8?B?OC92VzZXVkdHdkxheWttSDRSYVFEK3VGU3hnSDVMTlRxV2pvdGd5TEkzOG1h?= =?utf-8?B?MXVhaUVOcEtMZUZEWFVuV3VPcFg4NjJwNDAyWUw4RkZZelNmWUNlQ0FhSUhB?= =?utf-8?B?SHlHYnRoL1M2djIxT09HMktIQ2JmcVh0NDJqSm5Ed2E4NHNCZGdiem1CUzRl?= =?utf-8?B?OUc1U0FKdVpHUkdZa1BjSjBRT2F5aHF0NWNhU1FuVDREYTNXUEo5L0JONERC?= =?utf-8?B?R0hOR0NZSWppVy9CSjdwb1U2MGNlMFdwZVVJbVFsWXliQlB2cUlWQlpmQnds?= =?utf-8?B?VG5mOHVacTd6SUVtY1pOZnFvSk13Vlo3Z2k0aG9zRURQS20xS0NEN0o5d0sr?= =?utf-8?B?aEc5NzJrVWNpeG9aZWtsdzBnRmdGdnhPS0xYRkE3M01PdlB5ek9DYkNZMjlq?= =?utf-8?Q?xcdx4YD/t3SwS3tk0neKQYFw5l9lrZHP3gE8C7?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39400400002)(39450400003)(39410400002)(39850400002)(39860400002)(103116003)(53416004)(97746001)(47776003)(42186005)(66066001)(50466002)(72206003)(81166006)(33646002)(7736002)(86362001)(7416002)(7406005)(6506006)(5660300001)(305945005)(23676002)(8676002)(53936002)(9686003)(55016002)(2950100002)(6116002)(54906002)(6666003)(110136004)(38730400002)(76176999)(2906002)(54356999)(83506001)(3846002)(50986999)(4326008)(1076002)(25786009)(189998001)(230700001)(4001350100001)(478600001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1141; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =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rB44HzThkvyS3L/CxCbESUKLHEaljmKZRW1a9vXdPaBxltP88b029AZTOUdlvXbMTI7vepc9qRx2K3ii7fFK6JxLiKxw4naYrkeXwMGQhwwe3ZmtdanD3xoBDR2bDd3JXeiFXloEs8LFBkkREHg6exgZs3i+5ZMBB3NLtDVUdGfJMSaD1vux6fjgPqS+oot+K4MmaCtA8oLbEzTAtBkR0OK7N6TyeXchMS9vn0mK0XWzq1ugfWh5KPG12OWch2 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:12:56.7568 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 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 RESEND 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);