]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/i386/xen/: move xen-mapcache.c to hw/xen/
authorVikram Garhwal <vikram.garhwal@amd.com>
Thu, 15 Jun 2023 00:03:29 +0000 (17:03 -0700)
committerStefano Stabellini <stefano.stabellini@amd.com>
Thu, 15 Jun 2023 23:45:58 +0000 (16:45 -0700)
xen-mapcache.c contains common functions which can be used for enabling Xen on
aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to make it
accessible for both aarch64 and x86.

Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Paul Durrant <paul@xen.org>
hw/i386/meson.build
hw/i386/xen/meson.build
hw/i386/xen/trace-events
hw/xen/meson.build
hw/xen/trace-events
hw/xen/xen-mapcache.c [moved from hw/i386/xen/xen-mapcache.c with 100% similarity]

index 213e2e82b3d7d66130867adce60d4349b447d045..cfdbfdcbcb2d2674e7d249f73d12b83407ae2b6d 100644 (file)
@@ -33,5 +33,6 @@ subdir('kvm')
 subdir('xen')
 
 i386_ss.add_all(xenpv_ss)
+i386_ss.add_all(xen_ss)
 
 hw_arch += {'i386': i386_ss}
index 2e64a34e16f8661ab7630a198a4fecec66275098..3dc4c4f106ea48b2d63929e09ba2fbf8d0529c22 100644 (file)
@@ -1,6 +1,5 @@
 i386_ss.add(when: 'CONFIG_XEN', if_true: files(
   'xen-hvm.c',
-  'xen-mapcache.c',
   'xen_apic.c',
   'xen_pvdevice.c',
 ))
index 5d6be610908a63ed850ab353c85a9c62fec734c7..a0c89d91c4ec6c56f02e617615d669dc0b8c9e10 100644 (file)
@@ -21,8 +21,3 @@ xen_map_resource_ioreq(uint32_t id, void *addr) "id: %u addr: %p"
 cpu_ioreq_config_read(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
 cpu_ioreq_config_write(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
 
-# xen-mapcache.c
-xen_map_cache(uint64_t phys_addr) "want 0x%"PRIx64
-xen_remap_bucket(uint64_t index) "index 0x%"PRIx64
-xen_map_cache_return(void* ptr) "%p"
-
index 19c6aabc7cdfb39aec6613e19b67c1d6ee822978..202752e5572dc734c6942d3a8d33591e84ee7193 100644 (file)
@@ -26,3 +26,7 @@ else
 endif
 
 specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)
+
+xen_ss = ss.source_set()
+
+xen_ss.add(when: 'CONFIG_XEN', if_true: files('xen-mapcache.c'))
index 55c9e1df680b891f652b77acacbbf2c6685a9c93..f977c7c8c63fdf5482d164c8c11427e8a3996769 100644 (file)
@@ -41,3 +41,8 @@ xs_node_vprintf(char *path, char *value) "%s %s"
 xs_node_vscanf(char *path, char *value) "%s %s"
 xs_node_watch(char *path) "%s"
 xs_node_unwatch(char *path) "%s"
+
+# xen-mapcache.c
+xen_map_cache(uint64_t phys_addr) "want 0x%"PRIx64
+xen_remap_bucket(uint64_t index) "index 0x%"PRIx64
+xen_map_cache_return(void* ptr) "%p"