]> xenbits.xensource.com Git - xen.git/commitdiff
xen: Rename CONFIG_DOMAIN_PAGE to CONFIG_ARCH_MAP_DOMAIN_PAGE and...
authorJulien Grall <jgrall@amazon.com>
Fri, 29 Jul 2022 21:53:10 +0000 (22:53 +0100)
committerJulien Grall <julien@xen.org>
Fri, 29 Jul 2022 22:03:22 +0000 (23:03 +0100)
move it to Kconfig.

The define CONFIG_DOMAIN_PAGE indicates whether the architecture provide
helpers to map/unmap a domain page. Rename it to CONFIG_ARCH_MAP_DOMAIN_PAGE
so it is clearer that support for domain page is not something that
can be disabled in Xen.

Take the opportunity to move CONFIG_MAP_DOMAIN_PAGE to Kconfig as this
will soon be necessary to use it in the Makefile.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com> #arm part
xen/arch/arm/Kconfig
xen/arch/arm/include/asm/config.h
xen/arch/arm/mm.c
xen/arch/x86/Kconfig
xen/arch/x86/include/asm/config.h
xen/common/Kconfig
xen/include/xen/domain_page.h

index be9eff014120afac561070d7c376becd142c22d6..33e004d702bf887f1b2cbaa8f2b5038665c8c458 100644 (file)
@@ -1,6 +1,7 @@
 config ARM_32
        def_bool y
        depends on "$(ARCH)" = "arm32"
+       select ARCH_MAP_DOMAIN_PAGE
 
 config ARM_64
        def_bool y
index 66db618b34e798ef34be7a1931372151a7f9c909..2fafb9f2283ca96b139789e9628ceef952f8f310 100644 (file)
 
 #ifdef CONFIG_ARM_32
 
-#define CONFIG_DOMAIN_PAGE 1
 #define CONFIG_SEPARATE_XENHEAP 1
 
 #define FRAMETABLE_VIRT_START  _AT(vaddr_t,0x02000000)
index a36f047f5045cd2e4be8c22c1cd2855700f705f7..1423bdd70014d4b40317165ddf31e1f4ad8335d1 100644 (file)
@@ -194,7 +194,7 @@ static void __init __maybe_unused build_assertions(void)
 #endif
     BUILD_BUG_ON(first_table_offset(XEN_VIRT_START));
     BUILD_BUG_ON(second_linear_offset(XEN_VIRT_START) >= XEN_PT_LPAE_ENTRIES);
-#ifdef CONFIG_DOMAIN_PAGE
+#ifdef CONFIG_ARCH_MAP_DOMAIN_PAGE
     BUILD_BUG_ON(DOMHEAP_VIRT_START & ~FIRST_MASK);
 #endif
     /*
@@ -371,7 +371,7 @@ void clear_fixmap(unsigned int map)
     BUG_ON(res != 0);
 }
 
-#ifdef CONFIG_DOMAIN_PAGE
+#ifdef CONFIG_ARCH_MAP_DOMAIN_PAGE
 /*
  * Prepare the area that will be used to map domheap pages. They are
  * mapped in 2MB chunks, so we need to allocate the page-tables up to
index 6bed72b791414045e6ef461b53a1c610d23a4eb6..6a7825f4ba3c98e0496415123fde79ee62f771fa 100644 (file)
@@ -8,6 +8,7 @@ config X86
        select ACPI_LEGACY_TABLES_LOOKUP
        select ACPI_NUMA
        select ALTERNATIVE_CALL
+       select ARCH_MAP_DOMAIN_PAGE
        select ARCH_SUPPORTS_INT128
        select CORE_PARKING
        select HAS_ALTERNATIVE
index 07bcd158314b94c1f49be9c42dd9a46dfb4f3c97..fbc4bb3416bda5749f4349250fa71bc235f8143f 100644 (file)
@@ -22,7 +22,6 @@
 #define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS 1
 #define CONFIG_DISCONTIGMEM 1
 #define CONFIG_NUMA_EMU 1
-#define CONFIG_DOMAIN_PAGE 1
 
 #define CONFIG_PAGEALLOC_MAX_ORDER (2 * PAGETABLE_ORDER)
 #define CONFIG_DOMU_MAX_ORDER      PAGETABLE_ORDER
index 41a67891bcc85bf77f7cffcd9c9370bbd7f48dd0..f1ea3199c8ebdc1e9d0968b9de007f4df44bac79 100644 (file)
@@ -25,6 +25,9 @@ config GRANT_TABLE
 config ALTERNATIVE_CALL
        bool
 
+config ARCH_MAP_DOMAIN_PAGE
+       bool
+
 config HAS_ALTERNATIVE
        bool
 
index a182d33b670180870aba3ae37bfcc94d1638d9ce..149b217b9619be6d191db212eea532b0f0c76fa4 100644 (file)
@@ -17,7 +17,7 @@
 void clear_domain_page(mfn_t mfn);
 void copy_domain_page(mfn_t dst, const mfn_t src);
 
-#ifdef CONFIG_DOMAIN_PAGE
+#ifdef CONFIG_ARCH_MAP_DOMAIN_PAGE
 
 /*
  * Map a given page frame, returning the mapped virtual address. The page is
@@ -51,7 +51,7 @@ static inline void *__map_domain_page_global(const struct page_info *pg)
     return map_domain_page_global(page_to_mfn(pg));
 }
 
-#else /* !CONFIG_DOMAIN_PAGE */
+#else /* !CONFIG_ARCH_MAP_DOMAIN_PAGE */
 
 #define map_domain_page(mfn)                __mfn_to_virt(mfn_x(mfn))
 #define __map_domain_page(pg)               page_to_virt(pg)
@@ -70,7 +70,7 @@ static inline void *__map_domain_page_global(const struct page_info *pg)
 
 static inline void unmap_domain_page_global(const void *va) {};
 
-#endif /* !CONFIG_DOMAIN_PAGE */
+#endif /* !CONFIG_ARCH_MAP_DOMAIN_PAGE */
 
 #define UNMAP_DOMAIN_PAGE(p) do {   \
     unmap_domain_page(p);           \