Skip to content

Commit

Permalink
hw/i386/xen/: move xen-mapcache.c to hw/xen/
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vikram Garhwal authored and sstabellini committed Jun 8, 2023
1 parent 5f9dd6a commit 52e4108
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions hw/i386/meson.build
Expand Up @@ -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}
1 change: 0 additions & 1 deletion hw/i386/xen/meson.build
@@ -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',
))
Expand Down
5 changes: 0 additions & 5 deletions hw/i386/xen/trace-events
Expand Up @@ -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"

4 changes: 4 additions & 0 deletions hw/xen/meson.build
Expand Up @@ -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'))
5 changes: 5 additions & 0 deletions hw/xen/trace-events
Expand Up @@ -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"
File renamed without changes.

0 comments on commit 52e4108

Please sign in to comment.