All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: peter.maydell@linaro.org
Cc: sstabellini@kernel.org, qemu-devel@nongnu.org,
	vikram.garhwal@amd.com, richard.henderson@linaro.org,
	Stefano Stabellini <stefano.stabellini@amd.com>,
	Paul Durrant <paul@xen.org>
Subject: [PULL v4 01/10] hw/i386/xen/: move xen-mapcache.c to hw/xen/
Date: Fri,  9 Jun 2023 10:07:42 -0700	[thread overview]
Message-ID: <20230609170751.4059054-1-sstabellini@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2306091007210.3803068@ubuntu-linux-20-04-desktop>

From: Vikram Garhwal <vikram.garhwal@amd.com>

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              | 1 +
 hw/i386/xen/meson.build          | 1 -
 hw/i386/xen/trace-events         | 5 -----
 hw/xen/meson.build               | 4 ++++
 hw/xen/trace-events              | 5 +++++
 hw/{i386 => }/xen/xen-mapcache.c | 0
 6 files changed, 10 insertions(+), 6 deletions(-)
 rename hw/{i386 => }/xen/xen-mapcache.c (100%)

diff --git a/hw/i386/meson.build b/hw/i386/meson.build
index 213e2e82b3..cfdbfdcbcb 100644
--- a/hw/i386/meson.build
+++ b/hw/i386/meson.build
@@ -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}
diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build
index 2e64a34e16..3dc4c4f106 100644
--- a/hw/i386/xen/meson.build
+++ b/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',
 ))
diff --git a/hw/i386/xen/trace-events b/hw/i386/xen/trace-events
index 5d6be61090..a0c89d91c4 100644
--- a/hw/i386/xen/trace-events
+++ b/hw/i386/xen/trace-events
@@ -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"
-
diff --git a/hw/xen/meson.build b/hw/xen/meson.build
index 19c6aabc7c..202752e557 100644
--- a/hw/xen/meson.build
+++ b/hw/xen/meson.build
@@ -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'))
diff --git a/hw/xen/trace-events b/hw/xen/trace-events
index 55c9e1df68..f977c7c8c6 100644
--- a/hw/xen/trace-events
+++ b/hw/xen/trace-events
@@ -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"
diff --git a/hw/i386/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
similarity index 100%
rename from hw/i386/xen/xen-mapcache.c
rename to hw/xen/xen-mapcache.c
-- 
2.25.1



  reply	other threads:[~2023-06-09 17:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 17:07 [PULL v4 0/10] xenpvh4-tag Stefano Stabellini
2023-06-09 17:07 ` Stefano Stabellini [this message]
2023-06-09 17:07 ` [PULL v4 02/10] hw/i386/xen: rearrange xen_hvm_init_pc Stefano Stabellini
2023-06-09 17:07 ` [PULL v4 03/10] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState Stefano Stabellini
2023-06-09 17:07 ` [PULL v4 04/10] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common Stefano Stabellini
2023-06-09 17:07 ` [PULL v4 05/10] include/hw/xen/xen_common: return error from xen_create_ioreq_server Stefano Stabellini
2023-06-09 17:07 ` [PULL v4 06/10] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure Stefano Stabellini
2023-06-09 17:07 ` [PULL v4 07/10] hw/xen/xen-hvm-common: Use g_new and error_report Stefano Stabellini
2023-06-09 17:07 ` [PULL v4 08/10] meson.build: do not set have_xen_pci_passthrough for aarch64 targets Stefano Stabellini
2023-06-09 17:07 ` [PULL v4 09/10] hw/arm: introduce xenpvh machine Stefano Stabellini
2023-06-09 22:59   ` Richard Henderson
2023-06-12  0:10     ` Vikram Garhwal
2023-06-14  4:20       ` Richard Henderson
2023-06-09 17:07 ` [PULL v4 10/10] meson.build: enable xenpv machine build for ARM Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230609170751.4059054-1-sstabellini@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=paul@xen.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefano.stabellini@amd.com \
    --cc=vikram.garhwal@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.