Re: [PATCH v4 08/14] mm: introduce io_remap_pfn_range_[prepare, complete]()

Lorenzo Stoakes
2025-09-18T09:12:51Z

Hi Andrew,

Could you also apply the below, so we propagate the fact that we don't need
io_remap_pfn_range_prot()?

Cheers, Lorenzo

----8<----
From cc311eeb5b155601e3223797000f13e07b28bc30 Mon Sep 17 00:00:00 2001
From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Date: Thu, 18 Sep 2025 07:43:21 +0100
Subject: [PATCH] fixup io_remap_pfn_range_[prepare, complete]

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
---
mm/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/internal.h b/mm/internal.h
index 085e34f84bae..38607b2821d9 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1670,7 +1670,7 @@ static inline int io_remap_pfn_range_complete(struct vm_area_struct *vma,
pgprot_t orig_prot)
{
const unsigned long pfn = io_remap_pfn_range_pfn(orig_pfn, size);
- const pgprot_t prot = io_remap_pfn_range_prot(orig_prot);
+ const pgprot_t prot = pgprot_decrypted(orig_prot);

return remap_pfn_range_complete(vma, addr, pfn, size, prot);
}
--
2.51.0