* [PATCH] drm/vmwgfx: Fix guests running with TDX/SEV
@ 2025-06-18 19:29 Zack Rusin
2025-06-19 5:52 ` Kirill A. Shutemov
0 siblings, 1 reply; 2+ messages in thread
From: Zack Rusin @ 2025-06-18 19:29 UTC (permalink / raw)
To: dri-devel
Cc: Broadcom internal kernel review list, ian.forbes, martin.krastev,
maaz.mombasawala, Marko Kiiskila, Zack Rusin, Kirill A. Shutemov,
Ingo Molnar, Andrew Morton, Dave Hansen, Linus Torvalds,
Peter Zijlstra, linux-mm, linux-kernel
From: Marko Kiiskila <marko.kiiskila@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.kiiskila@broadcom.com>
Signed-off-by: Zack 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
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vmwgfx: Fix guests running with TDX/SEV
2025-06-18 19:29 [PATCH] drm/vmwgfx: Fix guests running with TDX/SEV Zack Rusin
@ 2025-06-19 5:52 ` Kirill A. Shutemov
0 siblings, 0 replies; 2+ messages in thread
From: Kirill A. Shutemov @ 2025-06-19 5:52 UTC (permalink / raw)
To: Zack Rusin
Cc: dri-devel, Broadcom internal kernel review list, ian.forbes,
martin.krastev, maaz.mombasawala, Marko Kiiskila, Ingo Molnar,
Andrew Morton, Dave Hansen, Linus Torvalds, Peter Zijlstra,
linux-mm, linux-kernel
On Wed, Jun 18, 2025 at 03:29:26PM -0400, Zack Rusin wrote:
> From: Marko Kiiskila <marko.kiiskila@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.kiiskila@broadcom.com>
> Signed-off-by: Zack 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: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kiryl Shutsemau / Kirill A. Shutemov
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-19 5:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 19:29 [PATCH] drm/vmwgfx: Fix guests running with TDX/SEV Zack Rusin
2025-06-19 5:52 ` Kirill A. Shutemov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).