From: Marko Kiiskila <marko.kiisk...@broadcom.com>

Commit 81256a50aa0f ("x86/mm: Make memremap(MEMREMAP_WB) map memory as
encrypted by default") changed the default behavior of
memremap(MEMREMAP_WB) and started mapping memory as encrypted.
The driver requires the fifo memory to be decrypted to communicate with
the host but was relaying on the old default behavior of
memremap(MEMREMAP_WB) and thus broke.

Fix it by explicitly specifying the desired behavior and passing
MEMREMAP_DEC to memremap.

Fixes: 81256a50aa0f ("x86/mm: Make memremap(MEMREMAP_WB) map memory as 
encrypted by default")
Signed-off-by: Marko Kiiskila <marko.kiisk...@broadcom.com>
Signed-off-by: Zack Rusin <zack.ru...@broadcom.com>
Cc: Kirill A. Shutemov <kirill.shute...@linux.intel.com>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Dave Hansen <dave.han...@linux.intel.com>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: linux...@kvack.org
Cc: linux-ker...@vger.kernel.org
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index bc0342c58b4b..8ff958d119be 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -750,7 +750,7 @@ static int vmw_setup_pci_resources(struct vmw_private *dev,
                dev->fifo_mem = devm_memremap(dev->drm.dev,
                                              fifo_start,
                                              fifo_size,
-                                             MEMREMAP_WB);
+                                             MEMREMAP_WB | MEMREMAP_DEC);
 
                if (IS_ERR(dev->fifo_mem)) {
                        drm_err(&dev->drm,
-- 
2.48.1

Reply via email to