Commit 7dfede7d authored by Marko Kiiskila's avatar Marko Kiiskila Committed by Zack Rusin
Browse files

drm/vmwgfx: Fix guests running with TDX/SEV



Commit 81256a50 ("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: 81256a50 ("x86/mm: Make memremap(MEMREMAP_WB) map memory as encrypted by default")
Signed-off-by: default avatarMarko Kiiskila <marko.kiiskila@broadcom.com>
Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20250618192926.1092450-1-zack.rusin@broadcom.com
parent e8537cad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,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,