[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 15/52] xen: make VMAP only support in MMU system
- To: Penny Zheng <penny.zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- From: Julien Grall <julien@xxxxxxx>
- Date: Wed, 28 Jun 2023 08:59:59 +0100
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 28 Jun 2023 08:00:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi,
On 28/06/2023 06:38, Penny Zheng wrote:
On 2023/6/26 14:00, Jan Beulich wrote:
On 26.06.2023 05:34, Penny Zheng wrote:
--- a/xen/common/vmap.c
+++ b/xen/common/vmap.c
@@ -331,4 +331,11 @@ void vfree(void *va)
while ( (pg = page_list_remove_head(&pg_list)) != NULL )
free_domheap_page(pg);
}
+
+void iounmap(void __iomem *va)
+{
+ unsigned long addr = (unsigned long)(void __force *)va;
+
+ vunmap((void *)(addr & PAGE_MASK));
+}
Why does this move here?
ioremap/iounmap is using vmap, at least in ARM. So for this more
generic interface, I was intending to implement it on MPU system.
In commit "[PATCH v3 19/52] xen/arm: switch to use ioremap_xxx in common
file", I'm trying to replace all direct vmap interface with ioremap_xxx
in common files.
While the implementation of ioremap() is based on vmap(), the intended
usage is not the same. ioremap() is for MMIO regions while vmap() is for
RAM.
So I don't think this is correct to replace vmap() with ioremap().
Cheers,
--
Julien Grall
|