[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



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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.