* [PATCH 0/5] accel: Try to build without target-specific knowledge
@ 2026-02-25 5:12 Philippe Mathieu-Daudé
2026-02-25 5:12 ` [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header Philippe Mathieu-Daudé
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-25 5:12 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel,
Philippe Mathieu-Daudé
Code in accel/ aims to be target-agnostic. Not all accelerators
are ready for that, but start by enforcing a few easy ones.
Philippe Mathieu-Daudé (5):
accel/kvm: Include missing 'exec/cpu-common.h' header
accel/mshv: Forward-declare mshv_root_hvcall structure
accel/mshv: Build without target-specific knowledge
accel/hvf: Build without target-specific knowledge
accel/xen: Build without target-specific knowledge
include/system/mshv_int.h | 5 ++---
accel/kvm/kvm-accel-ops.c | 1 +
accel/mshv/mshv-all.c | 2 +-
accel/hvf/meson.build | 5 +----
accel/mshv/meson.build | 5 +----
accel/xen/meson.build | 2 +-
6 files changed, 7 insertions(+), 13 deletions(-)
--
2.52.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header
2026-02-25 5:12 [PATCH 0/5] accel: Try to build without target-specific knowledge Philippe Mathieu-Daudé
@ 2026-02-25 5:12 ` Philippe Mathieu-Daudé
2026-02-25 19:40 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 2/5] accel/mshv: Forward-declare mshv_root_hvcall structure Philippe Mathieu-Daudé
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-25 5:12 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel,
Philippe Mathieu-Daudé
kvm-accel-ops.c uses EXCP_DEBUG, itself defined in
"exec/cpu-common.h". Include it explicitly, otherwise
we get when modifying unrelated headers:
../accel/kvm/kvm-accel-ops.c: In function ‘kvm_vcpu_thread_fn’:
../accel/kvm/kvm-accel-ops.c:54:22: error: ‘EXCP_DEBUG’ undeclared (first use in this function)
54 | if (r == EXCP_DEBUG) {
| ^~~~~~~~~~
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/kvm/kvm-accel-ops.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c
index 8ed6945c2f7..6d9140e549f 100644
--- a/accel/kvm/kvm-accel-ops.c
+++ b/accel/kvm/kvm-accel-ops.c
@@ -16,6 +16,7 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
+#include "exec/cpu-common.h"
#include "accel/accel-cpu-ops.h"
#include "system/kvm.h"
#include "system/kvm_int.h"
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/5] accel/mshv: Forward-declare mshv_root_hvcall structure
2026-02-25 5:12 [PATCH 0/5] accel: Try to build without target-specific knowledge Philippe Mathieu-Daudé
2026-02-25 5:12 ` [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header Philippe Mathieu-Daudé
@ 2026-02-25 5:13 ` Philippe Mathieu-Daudé
2026-02-25 19:40 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 3/5] accel/mshv: Build without target-specific knowledge Philippe Mathieu-Daudé
` (3 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-25 5:13 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel,
Philippe Mathieu-Daudé, Magnus Kulke, Wei Liu
Forward-declare the target-specific mshv_root_hvcall structure
in order to keep 'system/mshv_int.h' target-agnostic.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/system/mshv_int.h | 5 ++---
accel/mshv/mshv-all.c | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/system/mshv_int.h b/include/system/mshv_int.h
index ad4d001c3cd..35386c422fa 100644
--- a/include/system/mshv_int.h
+++ b/include/system/mshv_int.h
@@ -96,9 +96,8 @@ void mshv_arch_amend_proc_features(
union hv_partition_synthetic_processor_features *features);
int mshv_arch_post_init_vm(int vm_fd);
-#if defined COMPILING_PER_TARGET && defined CONFIG_MSHV_IS_POSSIBLE
-int mshv_hvcall(int fd, const struct mshv_root_hvcall *args);
-#endif
+typedef struct mshv_root_hvcall mshv_root_hvcall;
+int mshv_hvcall(int fd, const mshv_root_hvcall *args);
/* memory */
typedef struct MshvMemoryRegion {
diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
index ddc4c18cba4..d4cc7f53715 100644
--- a/accel/mshv/mshv-all.c
+++ b/accel/mshv/mshv-all.c
@@ -381,7 +381,7 @@ static void register_mshv_memory_listener(MshvState *s, MshvMemoryListener *mml,
}
}
-int mshv_hvcall(int fd, const struct mshv_root_hvcall *args)
+int mshv_hvcall(int fd, const mshv_root_hvcall *args)
{
int ret = 0;
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/5] accel/mshv: Build without target-specific knowledge
2026-02-25 5:12 [PATCH 0/5] accel: Try to build without target-specific knowledge Philippe Mathieu-Daudé
2026-02-25 5:12 ` [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header Philippe Mathieu-Daudé
2026-02-25 5:13 ` [PATCH 2/5] accel/mshv: Forward-declare mshv_root_hvcall structure Philippe Mathieu-Daudé
@ 2026-02-25 5:13 ` Philippe Mathieu-Daudé
2026-02-25 19:40 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 4/5] accel/hvf: " Philippe Mathieu-Daudé
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-25 5:13 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel,
Philippe Mathieu-Daudé, Magnus Kulke, Wei Liu
Code in accel/ aims to be target-agnostic. Enforce that
by moving the MSHV file units to system_ss[], which is
target-agnostic.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/mshv/meson.build | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/accel/mshv/meson.build b/accel/mshv/meson.build
index d3a2b325811..c1b1787c5e6 100644
--- a/accel/mshv/meson.build
+++ b/accel/mshv/meson.build
@@ -1,9 +1,6 @@
-mshv_ss = ss.source_set()
-mshv_ss.add(if_true: files(
+system_ss.add(when: 'CONFIG_MSHV', if_true: files(
'irq.c',
'mem.c',
'msr.c',
'mshv-all.c'
))
-
-specific_ss.add_all(when: 'CONFIG_MSHV', if_true: mshv_ss)
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/5] accel/hvf: Build without target-specific knowledge
2026-02-25 5:12 [PATCH 0/5] accel: Try to build without target-specific knowledge Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2026-02-25 5:13 ` [PATCH 3/5] accel/mshv: Build without target-specific knowledge Philippe Mathieu-Daudé
@ 2026-02-25 5:13 ` Philippe Mathieu-Daudé
2026-02-25 16:34 ` Philippe Mathieu-Daudé
2026-02-25 19:41 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 5/5] accel/xen: " Philippe Mathieu-Daudé
2026-03-09 17:54 ` [PATCH 0/5] accel: Try to build " Philippe Mathieu-Daudé
5 siblings, 2 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-25 5:13 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel,
Philippe Mathieu-Daudé, Cameron Esfahani, Roman Bolshakov,
Phil Dennis-Jordan
Code in accel/ aims to be target-agnostic. Enforce that
by moving the MSHV file units to system_ss[], which is
target-agnostic.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/hvf/meson.build | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/accel/hvf/meson.build b/accel/hvf/meson.build
index fc52cb78433..6e2dcc4a5f0 100644
--- a/accel/hvf/meson.build
+++ b/accel/hvf/meson.build
@@ -1,7 +1,4 @@
-hvf_ss = ss.source_set()
-hvf_ss.add(files(
+system_ss.add(when: 'CONFIG_HVF', if_true: files(
'hvf-all.c',
'hvf-accel-ops.c',
))
-
-specific_ss.add_all(when: 'CONFIG_HVF', if_true: hvf_ss)
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/5] accel/xen: Build without target-specific knowledge
2026-02-25 5:12 [PATCH 0/5] accel: Try to build without target-specific knowledge Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2026-02-25 5:13 ` [PATCH 4/5] accel/hvf: " Philippe Mathieu-Daudé
@ 2026-02-25 5:13 ` Philippe Mathieu-Daudé
2026-02-25 14:15 ` Anthony PERARD
2026-02-25 19:42 ` Pierrick Bouvier
2026-03-09 17:54 ` [PATCH 0/5] accel: Try to build " Philippe Mathieu-Daudé
5 siblings, 2 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-25 5:13 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel,
Philippe Mathieu-Daudé, Stefano Stabellini, Anthony PERARD,
Paul Durrant, Edgar E. Iglesias
Code in accel/ aims to be target-agnostic. Enforce that
by moving the MSHV file units to system_ss[], which is
target-agnostic.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/xen/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/xen/meson.build b/accel/xen/meson.build
index 002bdb03c62..455ad5d6be4 100644
--- a/accel/xen/meson.build
+++ b/accel/xen/meson.build
@@ -1 +1 @@
-specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c'))
+system_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c'))
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 5/5] accel/xen: Build without target-specific knowledge
2026-02-25 5:13 ` [PATCH 5/5] accel/xen: " Philippe Mathieu-Daudé
@ 2026-02-25 14:15 ` Anthony PERARD
2026-02-25 19:42 ` Pierrick Bouvier
1 sibling, 0 replies; 14+ messages in thread
From: Anthony PERARD @ 2026-02-25 14:15 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel,
Stefano Stabellini, Anthony PERARD, Paul Durrant,
Edgar E. Iglesias
On Wed, Feb 25, 2026 at 06:13:03AM +0100, Philippe Mathieu-Daudé wrote:
> Code in accel/ aims to be target-agnostic. Enforce that
> by moving the MSHV file units to system_ss[], which is
You mean Xen ^ here ?
> target-agnostic.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
In anycase, it seems to works fine for me:
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] accel/hvf: Build without target-specific knowledge
2026-02-25 5:13 ` [PATCH 4/5] accel/hvf: " Philippe Mathieu-Daudé
@ 2026-02-25 16:34 ` Philippe Mathieu-Daudé
2026-02-25 19:41 ` Pierrick Bouvier
1 sibling, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-25 16:34 UTC (permalink / raw)
To: qemu-devel
Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel, Cameron Esfahani,
Roman Bolshakov, Phil Dennis-Jordan
On 25/2/26 06:13, Philippe Mathieu-Daudé wrote:
> Code in accel/ aims to be target-agnostic. Enforce that
> by moving the MSHV file units to system_ss[], which is
s/MSHV/HVF/
> target-agnostic.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/hvf/meson.build | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/accel/hvf/meson.build b/accel/hvf/meson.build
> index fc52cb78433..6e2dcc4a5f0 100644
> --- a/accel/hvf/meson.build
> +++ b/accel/hvf/meson.build
> @@ -1,7 +1,4 @@
> -hvf_ss = ss.source_set()
> -hvf_ss.add(files(
> +system_ss.add(when: 'CONFIG_HVF', if_true: files(
> 'hvf-all.c',
> 'hvf-accel-ops.c',
> ))
> -
> -specific_ss.add_all(when: 'CONFIG_HVF', if_true: hvf_ss)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header
2026-02-25 5:12 ` [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header Philippe Mathieu-Daudé
@ 2026-02-25 19:40 ` Pierrick Bouvier
0 siblings, 0 replies; 14+ messages in thread
From: Pierrick Bouvier @ 2026-02-25 19:40 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: kvm, Paolo Bonzini, xen-devel
On 2/24/26 9:12 PM, Philippe Mathieu-Daudé wrote:
> kvm-accel-ops.c uses EXCP_DEBUG, itself defined in
> "exec/cpu-common.h". Include it explicitly, otherwise
> we get when modifying unrelated headers:
>
> ../accel/kvm/kvm-accel-ops.c: In function ‘kvm_vcpu_thread_fn’:
> ../accel/kvm/kvm-accel-ops.c:54:22: error: ‘EXCP_DEBUG’ undeclared (first use in this function)
> 54 | if (r == EXCP_DEBUG) {
> | ^~~~~~~~~~
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/kvm/kvm-accel-ops.c | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/5] accel/mshv: Forward-declare mshv_root_hvcall structure
2026-02-25 5:13 ` [PATCH 2/5] accel/mshv: Forward-declare mshv_root_hvcall structure Philippe Mathieu-Daudé
@ 2026-02-25 19:40 ` Pierrick Bouvier
0 siblings, 0 replies; 14+ messages in thread
From: Pierrick Bouvier @ 2026-02-25 19:40 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: kvm, Paolo Bonzini, xen-devel, Magnus Kulke, Wei Liu
On 2/24/26 9:13 PM, Philippe Mathieu-Daudé wrote:
> Forward-declare the target-specific mshv_root_hvcall structure
> in order to keep 'system/mshv_int.h' target-agnostic.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/system/mshv_int.h | 5 ++---
> accel/mshv/mshv-all.c | 2 +-
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5] accel/mshv: Build without target-specific knowledge
2026-02-25 5:13 ` [PATCH 3/5] accel/mshv: Build without target-specific knowledge Philippe Mathieu-Daudé
@ 2026-02-25 19:40 ` Pierrick Bouvier
0 siblings, 0 replies; 14+ messages in thread
From: Pierrick Bouvier @ 2026-02-25 19:40 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: kvm, Paolo Bonzini, xen-devel, Magnus Kulke, Wei Liu
On 2/24/26 9:13 PM, Philippe Mathieu-Daudé wrote:
> Code in accel/ aims to be target-agnostic. Enforce that
> by moving the MSHV file units to system_ss[], which is
> target-agnostic.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/mshv/meson.build | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5] accel/hvf: Build without target-specific knowledge
2026-02-25 5:13 ` [PATCH 4/5] accel/hvf: " Philippe Mathieu-Daudé
2026-02-25 16:34 ` Philippe Mathieu-Daudé
@ 2026-02-25 19:41 ` Pierrick Bouvier
1 sibling, 0 replies; 14+ messages in thread
From: Pierrick Bouvier @ 2026-02-25 19:41 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: kvm, Paolo Bonzini, xen-devel, Cameron Esfahani, Roman Bolshakov,
Phil Dennis-Jordan
On 2/24/26 9:13 PM, Philippe Mathieu-Daudé wrote:
> Code in accel/ aims to be target-agnostic. Enforce that
> by moving the MSHV file units to system_ss[], which is
> target-agnostic.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/hvf/meson.build | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 5/5] accel/xen: Build without target-specific knowledge
2026-02-25 5:13 ` [PATCH 5/5] accel/xen: " Philippe Mathieu-Daudé
2026-02-25 14:15 ` Anthony PERARD
@ 2026-02-25 19:42 ` Pierrick Bouvier
1 sibling, 0 replies; 14+ messages in thread
From: Pierrick Bouvier @ 2026-02-25 19:42 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: kvm, Paolo Bonzini, xen-devel, Stefano Stabellini, Anthony PERARD,
Paul Durrant, Edgar E. Iglesias
On 2/24/26 9:13 PM, Philippe Mathieu-Daudé wrote:
> Code in accel/ aims to be target-agnostic. Enforce that
> by moving the MSHV file units to system_ss[], which is
> target-agnostic.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/xen/meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/5] accel: Try to build without target-specific knowledge
2026-02-25 5:12 [PATCH 0/5] accel: Try to build without target-specific knowledge Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2026-02-25 5:13 ` [PATCH 5/5] accel/xen: " Philippe Mathieu-Daudé
@ 2026-03-09 17:54 ` Philippe Mathieu-Daudé
5 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-09 17:54 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm, Pierrick Bouvier, Paolo Bonzini, xen-devel
On 25/2/26 06:12, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (5):
> accel/kvm: Include missing 'exec/cpu-common.h' header
> accel/mshv: Forward-declare mshv_root_hvcall structure
> accel/mshv: Build without target-specific knowledge
> accel/hvf: Build without target-specific knowledge
> accel/xen: Build without target-specific knowledge
Series queued, thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-03-09 17:54 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 5:12 [PATCH 0/5] accel: Try to build without target-specific knowledge Philippe Mathieu-Daudé
2026-02-25 5:12 ` [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header Philippe Mathieu-Daudé
2026-02-25 19:40 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 2/5] accel/mshv: Forward-declare mshv_root_hvcall structure Philippe Mathieu-Daudé
2026-02-25 19:40 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 3/5] accel/mshv: Build without target-specific knowledge Philippe Mathieu-Daudé
2026-02-25 19:40 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 4/5] accel/hvf: " Philippe Mathieu-Daudé
2026-02-25 16:34 ` Philippe Mathieu-Daudé
2026-02-25 19:41 ` Pierrick Bouvier
2026-02-25 5:13 ` [PATCH 5/5] accel/xen: " Philippe Mathieu-Daudé
2026-02-25 14:15 ` Anthony PERARD
2026-02-25 19:42 ` Pierrick Bouvier
2026-03-09 17:54 ` [PATCH 0/5] accel: Try to build " Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox