All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Paul Durrant" <paul@xen.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	xen-devel@lists.xenproject.org,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH v3 3/7] accel/xen: Incorporate xen-mapcache.c
Date: Mon,  1 Feb 2021 12:29:01 +0100	[thread overview]
Message-ID: <20210201112905.545144-4-f4bug@amsat.org> (raw)
In-Reply-To: <20210201112905.545144-1-f4bug@amsat.org>

xen-mapcache.c contains accelerator related routines,
not particular to the X86 HVM machine. Move this file
to accel/xen/ (adapting the buildsys machinery).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 meson.build                           |  3 +++
 accel/xen/trace.h                     |  1 +
 {hw/i386 => accel}/xen/xen-mapcache.c |  0
 hw/i386/xen/xen-hvm.c                 |  1 -
 accel/xen/meson.build                 |  5 ++++-
 accel/xen/trace-events                | 10 ++++++++++
 hw/i386/xen/meson.build               |  1 -
 hw/i386/xen/trace-events              |  6 ------
 8 files changed, 18 insertions(+), 9 deletions(-)
 create mode 100644 accel/xen/trace.h
 rename {hw/i386 => accel}/xen/xen-mapcache.c (100%)
 create mode 100644 accel/xen/trace-events

diff --git a/meson.build b/meson.build
index 97a577a7743..f2e778f22cd 100644
--- a/meson.build
+++ b/meson.build
@@ -1706,6 +1706,9 @@
   'crypto',
   'monitor',
 ]
+if 'CONFIG_XEN' in accelerators
+  trace_events_subdirs += [ 'accel/xen' ]
+endif
 if have_user
   trace_events_subdirs += [ 'linux-user' ]
 endif
diff --git a/accel/xen/trace.h b/accel/xen/trace.h
new file mode 100644
index 00000000000..f6be599b187
--- /dev/null
+++ b/accel/xen/trace.h
@@ -0,0 +1 @@
+#include "trace/trace-accel_xen.h"
diff --git a/hw/i386/xen/xen-mapcache.c b/accel/xen/xen-mapcache.c
similarity index 100%
rename from hw/i386/xen/xen-mapcache.c
rename to accel/xen/xen-mapcache.c
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 68821d90f52..7156ab13329 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -31,7 +31,6 @@
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/xen.h"
-#include "sysemu/xen-mapcache.h"
 #include "trace.h"
 #include "exec/address-spaces.h"
 
diff --git a/accel/xen/meson.build b/accel/xen/meson.build
index 002bdb03c62..45671e4bdbf 100644
--- a/accel/xen/meson.build
+++ b/accel/xen/meson.build
@@ -1 +1,4 @@
-specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c'))
+specific_ss.add(when: 'CONFIG_XEN', if_true: files(
+  'xen-all.c',
+  'xen-mapcache.c',
+))
diff --git a/accel/xen/trace-events b/accel/xen/trace-events
new file mode 100644
index 00000000000..30bf4f42283
--- /dev/null
+++ b/accel/xen/trace-events
@@ -0,0 +1,10 @@
+# See docs/devel/tracing.txt for syntax documentation.
+
+# xen-hvm.c
+xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: 0x%lx, size 0x%lx"
+
+# 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/meson.build b/hw/i386/xen/meson.build
index be84130300c..2fcc46e6ca1 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_platform.c',
   'xen_pvdevice.c',
diff --git a/hw/i386/xen/trace-events b/hw/i386/xen/trace-events
index ca3a4948baa..f1b36d164d9 100644
--- a/hw/i386/xen/trace-events
+++ b/hw/i386/xen/trace-events
@@ -20,9 +20,3 @@ cpu_ioreq_move(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint6
 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"
-
-- 
2.26.2



WARNING: multiple messages have this Message-ID (diff)
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Paul Durrant" <paul@xen.org>,
	xen-devel@lists.xenproject.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v3 3/7] accel/xen: Incorporate xen-mapcache.c
Date: Mon,  1 Feb 2021 12:29:01 +0100	[thread overview]
Message-ID: <20210201112905.545144-4-f4bug@amsat.org> (raw)
In-Reply-To: <20210201112905.545144-1-f4bug@amsat.org>

xen-mapcache.c contains accelerator related routines,
not particular to the X86 HVM machine. Move this file
to accel/xen/ (adapting the buildsys machinery).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 meson.build                           |  3 +++
 accel/xen/trace.h                     |  1 +
 {hw/i386 => accel}/xen/xen-mapcache.c |  0
 hw/i386/xen/xen-hvm.c                 |  1 -
 accel/xen/meson.build                 |  5 ++++-
 accel/xen/trace-events                | 10 ++++++++++
 hw/i386/xen/meson.build               |  1 -
 hw/i386/xen/trace-events              |  6 ------
 8 files changed, 18 insertions(+), 9 deletions(-)
 create mode 100644 accel/xen/trace.h
 rename {hw/i386 => accel}/xen/xen-mapcache.c (100%)
 create mode 100644 accel/xen/trace-events

diff --git a/meson.build b/meson.build
index 97a577a7743..f2e778f22cd 100644
--- a/meson.build
+++ b/meson.build
@@ -1706,6 +1706,9 @@
   'crypto',
   'monitor',
 ]
+if 'CONFIG_XEN' in accelerators
+  trace_events_subdirs += [ 'accel/xen' ]
+endif
 if have_user
   trace_events_subdirs += [ 'linux-user' ]
 endif
diff --git a/accel/xen/trace.h b/accel/xen/trace.h
new file mode 100644
index 00000000000..f6be599b187
--- /dev/null
+++ b/accel/xen/trace.h
@@ -0,0 +1 @@
+#include "trace/trace-accel_xen.h"
diff --git a/hw/i386/xen/xen-mapcache.c b/accel/xen/xen-mapcache.c
similarity index 100%
rename from hw/i386/xen/xen-mapcache.c
rename to accel/xen/xen-mapcache.c
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 68821d90f52..7156ab13329 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -31,7 +31,6 @@
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/xen.h"
-#include "sysemu/xen-mapcache.h"
 #include "trace.h"
 #include "exec/address-spaces.h"
 
diff --git a/accel/xen/meson.build b/accel/xen/meson.build
index 002bdb03c62..45671e4bdbf 100644
--- a/accel/xen/meson.build
+++ b/accel/xen/meson.build
@@ -1 +1,4 @@
-specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c'))
+specific_ss.add(when: 'CONFIG_XEN', if_true: files(
+  'xen-all.c',
+  'xen-mapcache.c',
+))
diff --git a/accel/xen/trace-events b/accel/xen/trace-events
new file mode 100644
index 00000000000..30bf4f42283
--- /dev/null
+++ b/accel/xen/trace-events
@@ -0,0 +1,10 @@
+# See docs/devel/tracing.txt for syntax documentation.
+
+# xen-hvm.c
+xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: 0x%lx, size 0x%lx"
+
+# 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/meson.build b/hw/i386/xen/meson.build
index be84130300c..2fcc46e6ca1 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_platform.c',
   'xen_pvdevice.c',
diff --git a/hw/i386/xen/trace-events b/hw/i386/xen/trace-events
index ca3a4948baa..f1b36d164d9 100644
--- a/hw/i386/xen/trace-events
+++ b/hw/i386/xen/trace-events
@@ -20,9 +20,3 @@ cpu_ioreq_move(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint6
 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"
-
-- 
2.26.2



  parent reply	other threads:[~2021-02-01 11:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 11:28 [PATCH v3 0/7] hw/xen: Introduce XEN_FV/XEN_PV Kconfig Philippe Mathieu-Daudé
2021-02-01 11:28 ` Philippe Mathieu-Daudé
2021-02-01 11:28 ` [PATCH v3 1/7] meson: Do not build Xen x86_64-softmmu on Aarch64 Philippe Mathieu-Daudé
2021-02-01 11:28   ` Philippe Mathieu-Daudé
2021-02-01 11:29 ` [PATCH v3 2/7] hw/xen: Relax dependency on FSDEV_9P Philippe Mathieu-Daudé
2021-02-01 11:29   ` Philippe Mathieu-Daudé
2021-02-01 11:29 ` Philippe Mathieu-Daudé [this message]
2021-02-01 11:29   ` [PATCH v3 3/7] accel/xen: Incorporate xen-mapcache.c Philippe Mathieu-Daudé
2021-02-01 13:08   ` Philippe Mathieu-Daudé
2021-02-01 13:08     ` Philippe Mathieu-Daudé
2021-02-01 11:29 ` [PATCH v3 4/7] hw/i386/xen: Introduce XEN_FV Kconfig Philippe Mathieu-Daudé
2021-02-01 11:29   ` Philippe Mathieu-Daudé
2021-02-01 11:29 ` [PATCH v3 5/7] hw/xen: Make xen_shutdown_fatal_error() available out of X86 HVM Philippe Mathieu-Daudé
2021-02-01 11:29   ` Philippe Mathieu-Daudé
2021-02-01 13:09   ` Philippe Mathieu-Daudé
2021-02-01 13:09     ` Philippe Mathieu-Daudé
2021-02-01 11:29 ` [PATCH v3 6/7] hw/xen: Make qmp_xen_set_global_dirty_log() " Philippe Mathieu-Daudé
2021-02-01 11:29   ` Philippe Mathieu-Daudé
2021-02-01 11:29 ` [PATCH v3 7/7] NOTFORMERGE hw/xen/Kconfig: Introduce XEN_PV config Philippe Mathieu-Daudé
2021-02-01 11:29   ` Philippe Mathieu-Daudé

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=20210201112905.545144-4-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alex.bennee@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=ehabkost@redhat.com \
    --cc=mst@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.