Skip to content

Commit 7dfede7

Browse files
Marko Kiiskilazackr
authored andcommitted
drm/vmwgfx: Fix guests running with TDX/SEV
Commit 81256a5 ("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: 81256a5 ("x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default") Signed-off-by: Marko Kiiskila <[email protected]> Signed-off-by: Zack Rusin <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Kirill A. Shutemov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e8537ca commit 7dfede7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ static int vmw_setup_pci_resources(struct vmw_private *dev,
749749
dev->fifo_mem = devm_memremap(dev->drm.dev,
750750
fifo_start,
751751
fifo_size,
752-
MEMREMAP_WB);
752+
MEMREMAP_WB | MEMREMAP_DEC);
753753

754754
if (IS_ERR(dev->fifo_mem)) {
755755
drm_err(&dev->drm,

0 commit comments

Comments
 (0)