Re: [PATCH] hw/display/xenfb: Replace unreachable code by abort()

2025-07-29 Thread Philippe Mathieu-Daudé
On 29/7/25 14:16, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 29/7/25 13:12, Markus Armbruster wrote: xenfb_mouse_event() has a switch statement whose controlling expression move->axis is an enum InputAxis. The enum values are INPUT_AXIS_X and INPUT_AXIS_Y, encoded as 0 an

[PULL 6/9] hw/xen/passthrough: add missing error-report include

2025-07-29 Thread Philippe Mathieu-Daudé
ackend log disabled. Fixes: cfcacbab38e4 (xen/passthrough: use gsi to map pirq when dom0 is PVH) Signed-off-by: Adam Williamson Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20250717220207.171040-1-awill...@redhat.com> [PMD: Improved commit description,

Re: [PATCH] hw/display/xenfb: Replace unreachable code by abort()

2025-07-29 Thread Philippe Mathieu-Daudé
On 29/7/25 13:12, Markus Armbruster wrote: xenfb_mouse_event() has a switch statement whose controlling expression move->axis is an enum InputAxis. The enum values are INPUT_AXIS_X and INPUT_AXIS_Y, encoded as 0 and 1. The switch has a case for both axes. In addition, it has an unreachable def

Re: [PATCH] xen/passthrough: add missing error-report include

2025-07-28 Thread Philippe Mathieu-Daudé
On 18/7/25 00:02, Adam Williamson wrote: In cfcacba an `error_report` was added to this file, but the corresponding include of `qemu/error-report.h` was missed. This only becomes apparent when building against Xen 4.20+. Signed-off-by: Adam Williamson --- hw/xen/xen_pt.c | 1 + 1 file change

Re: [PATCH] xen/passthrough: add missing error-report include

2025-07-17 Thread Philippe Mathieu-Daudé
On 18/7/25 08:05, Philippe Mathieu-Daudé wrote: On 18/7/25 07:11, Markus Armbruster wrote: Adam Williamson writes: In cfcacba an `error_report` was added to this file, but the    In commit cfcacbab38e ("xen/passthrough: use gsi to map pirq when    dom0 is PVH") an `error_r

Re: [PATCH] xen/passthrough: add missing error-report include

2025-07-17 Thread Philippe Mathieu-Daudé
de effect of including "trace.h" a include/ file due to trace event being called in inlined function. Bad pattern indeed. Back to this patch: Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2] hw/arm/xen-pvh: Remove unnecessary 'hw/xen/arch_hvm.h' header

2025-07-15 Thread Philippe Mathieu-Daudé
On 15/7/25 09:15, Philippe Mathieu-Daudé wrote: "hw/xen/arch_hvm.h" only declares the arch_handle_ioreq() and arch_xen_set_memory() prototypes, which are not used by xen-pvh.c. Remove the unnecessary header inclusion. Cc: Xiaoyao Li Signed-off-by: Philippe Mathieu-Daudé --

Re: [PATCH] hw/xen/arch_hvm: Unify x86 and ARM variants

2025-07-15 Thread Philippe Mathieu-Daudé
On 13/5/25 19:17, Philippe Mathieu-Daudé wrote: As each target declares the same prototypes, we can use a single header, removing the TARGET_XXX uses. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/xen_arch_hvm.h | 9 - include/hw/i386/xen_arch_hvm.h | 11

[PATCH v2] hw/arm/xen-pvh: Remove unnecessary 'hw/xen/arch_hvm.h' header

2025-07-15 Thread Philippe Mathieu-Daudé
"hw/xen/arch_hvm.h" only declares the arch_handle_ioreq() and arch_xen_set_memory() prototypes, which are not used by xen-pvh.c. Remove the unnecessary header inclusion. Cc: Xiaoyao Li Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20250513171737.74386-1-phi...@linaro.org>

Re: [PATCH] hw/xen/arch_hvm: Unify x86 and ARM variants

2025-07-15 Thread Philippe Mathieu-Daudé
On 14/5/25 07:11, Xiaoyao Li wrote: On 5/14/2025 1:17 AM, Philippe Mathieu-Daudé wrote: As each target declares the same prototypes, we can use a single header, removing the TARGET_XXX uses. Signed-off-by: Philippe Mathieu-Daudé ... diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c index

Re: [PATCH v6 28/39] accel: Expose and register generic_handle_interrupt()

2025-07-04 Thread Philippe Mathieu-Daudé
On 4/7/25 08:38, Xiaoyao Li wrote: On 7/4/2025 1:32 AM, Philippe Mathieu-Daudé wrote: In order to dispatch over AccelOpsClass::handle_interrupt(), we need it always defined, It seems I can only understand it until I see the code to really require it to be mandatory. See https

[PATCH v6 38/39] accel: Extract AccelClass definition to 'accel/accel-ops.h'

2025-07-03 Thread Philippe Mathieu-Daudé
Only accelerator implementations (and the common accelator code) need to know about AccelClass internals. Move the definition out but forward declare AccelState and AccelClass. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- include/accel/accel-ops.h | 50

[PATCH v6 37/39] accel: Rename 'system/accel-ops.h' -> 'accel/accel-cpu-ops.h'

2025-07-03 Thread Philippe Mathieu-Daudé
$(git grep -l system/accel-ops.h) Signed-off-by: Philippe Mathieu-Daudé --- include/{system/accel-ops.h => accel/accel-cpu-ops.h} | 8 accel/accel-common.c | 2 +- accel/accel-system.c | 2 +- ac

[PATCH v6 35/39] accel: Remove unused MachineState argument of AccelClass::setup_post()

2025-07-03 Thread Philippe Mathieu-Daudé
This method only accesses xen_domid/xen_domid_restrict, which are both related to the 'accelerator', not the machine. Besides, xen_domid aims to be in Xen AccelState and xen_domid_restrict a xen_domid_restrict QOM property. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard

[PATCH v6 30/39] accel: Propagate AccelState to AccelClass::init_machine()

2025-07-03 Thread Philippe Mathieu-Daudé
In order to avoid init_machine() to call current_accel(), pass AccelState along. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- include/qemu/accel.h| 2 +- accel/accel-system.c| 2 +- accel/hvf/hvf-all.c | 2 +- accel

[PATCH v6 26/39] accel/dummy: Extract 'dummy-cpus.h' header from 'system/cpus.h'

2025-07-03 Thread Philippe Mathieu-Daudé
'dummy' helpers are specific to accelerator implementations, no need to expose them via "system/cpus.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- MAINTAINERS | 1 + accel/dummy-cpus.h| 14 ++ include/system/cpus

[PATCH v6 28/39] accel: Expose and register generic_handle_interrupt()

2025-07-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Zhao Liu Reviewed-by: Richard Henderson --- include/system/accel-ops.h| 3 +++ accel/hvf/hvf-accel-ops.c | 1 + accel/kvm/kvm-accel-ops.c | 1 + accel/qtest/qtest.c | 1

[PATCH v5 64/69] accel: Always register AccelOpsClass::get_virtual_clock() handler

2025-07-03 Thread Philippe Mathieu-Daudé
In order to dispatch over AccelOpsClass::get_virtual_clock(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::get_virtual_clock() mandatory. Register the default cpu_get_clock() for each accelerator. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by

[PATCH v5 63/69] accel: Always register AccelOpsClass::get_elapsed_ticks() handler

2025-07-03 Thread Philippe Mathieu-Daudé
In order to dispatch over AccelOpsClass::get_elapsed_ticks(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::get_elapsed_ticks() mandatory. Register the default cpu_get_ticks() for each accelerator. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by

[PATCH v5 62/69] accel: Always register AccelOpsClass::kick_vcpu_thread() handler

2025-07-03 Thread Philippe Mathieu-Daudé
In order to dispatch over AccelOpsClass::kick_vcpu_thread(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::kick_vcpu_thread() mandatory. Register the default cpus_kick_thread() for each accelerator. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by

[PATCH v5 61/69] accel: Expose and register generic_handle_interrupt()

2025-07-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Zhao Liu --- include/system/accel-ops.h| 3 +++ accel/hvf/hvf-accel-ops.c | 1 + accel/kvm/kvm-accel-ops.c | 1 + accel/qtest/qtest.c | 1 + accel/xen/xen-all.c

[PATCH v5 53/69] accel/dummy: Convert to AccelOpsClass::cpu_thread_routine

2025-07-03 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Fabiano Rosas --- accel/dummy-cpus.h | 2 +- accel/dummy-cpus.c | 14 +- accel

[PATCH v5 48/69] accel/dummy: Extract 'dummy-cpus.h' header from 'system/cpus.h'

2025-07-03 Thread Philippe Mathieu-Daudé
'dummy' helpers are specific to accelerator implementations, no need to expose them via "system/cpus.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/dummy-cpus.h| 14 ++ include/system/cpus.h | 5 - accel/dummy-cpu

[PATCH v5 16/69] accel: Remove unused MachineState argument of AccelClass::setup_post()

2025-07-03 Thread Philippe Mathieu-Daudé
This method only accesses xen_domid/xen_domid_restrict, which are both related to the 'accelerator', not the machine. Besides, xen_domid aims to be in Xen AccelState and xen_domid_restrict a xen_domid_restrict QOM property. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard

[PATCH v5 10/69] accel: Propagate AccelState to AccelClass::init_machine()

2025-07-03 Thread Philippe Mathieu-Daudé
In order to avoid init_machine() to call current_accel(), pass AccelState along. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- include/qemu/accel.h| 2 +- accel/accel-system.c| 2 +- accel/hvf/hvf-accel-ops.c | 2 +- accel

Re: [PATCH v4 57/65] accel: Always register AccelOpsClass::kick_vcpu_thread() handler

2025-07-03 Thread Philippe Mathieu-Daudé
On 2/7/25 23:26, Pierrick Bouvier wrote: On 7/2/25 11:53 AM, Philippe Mathieu-Daudé wrote: In order to dispatch over AccelOpsClass::kick_vcpu_thread(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::kick_vcpu_thread() mandatory. Register the default

[PATCH v4 59/65] accel: Always register AccelOpsClass::get_virtual_clock() handler

2025-07-02 Thread Philippe Mathieu-Daudé
In order to dispatch over AccelOpsClass::get_virtual_clock(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::get_virtual_clock() mandatory. Register the default cpus_kick_thread() for each accelerator. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v4 15/65] accel: Remove unused MachineState argument of AccelClass::setup_post()

2025-07-02 Thread Philippe Mathieu-Daudé
This method only accesses xen_domid/xen_domid_restrict, which are both related to the 'accelerator', not the machine. Besides, xen_domid aims to be in Xen AccelState and xen_domid_restrict a xen_domid_restrict QOM property. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard

[PATCH v4 43/65] accel/dummy: Extract 'dummy-cpus.h' header from 'system/cpus.h'

2025-07-02 Thread Philippe Mathieu-Daudé
'dummy' helpers are specific to accelerator implementations, no need to expose them via "system/cpus.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/dummy-cpus.h| 14 ++ include/system/cpus.h | 5 - accel/dummy-cpu

[PATCH v4 57/65] accel: Always register AccelOpsClass::kick_vcpu_thread() handler

2025-07-02 Thread Philippe Mathieu-Daudé
In order to dispatch over AccelOpsClass::kick_vcpu_thread(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::kick_vcpu_thread() mandatory. Register the default cpus_kick_thread() for each accelerator. Signed-off-by: Philippe Mathieu-Daudé --- include

[PATCH v4 56/65] accel: Expose and register generic_handle_interrupt()

2025-07-02 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/system/accel-ops.h| 3 +++ accel/hvf/hvf-accel-ops.c | 1 + accel/kvm/kvm-accel-ops.c | 1 + accel/qtest/qtest.c | 1 + accel/xen/xen-all.c | 1 + system/cpus.c | 9

[PATCH v4 58/65] accel: Always register AccelOpsClass::get_elapsed_ticks() handler

2025-07-02 Thread Philippe Mathieu-Daudé
In order to dispatch over AccelOpsClass::get_elapsed_ticks(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::get_elapsed_ticks() mandatory. Register the default cpus_kick_thread() for each accelerator. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v4 48/65] accel/dummy: Convert to AccelOpsClass::cpu_thread_routine

2025-07-02 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/dummy-cpus.h | 2 +- accel/dummy-cpus.c | 14 +- accel/qtest/qtest.c | 3

[PATCH v4 09/65] accel: Propagate AccelState to AccelClass::init_machine()

2025-07-02 Thread Philippe Mathieu-Daudé
In order to avoid init_machine() to call current_accel(), pass AccelState along. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- include/qemu/accel.h| 2 +- accel/accel-system.c| 2 +- accel/hvf/hvf-accel-ops.c | 2 +- accel

Re: [PATCH v3 15/68] accel: Remove unused MachineState argument of AccelClass::setup_post()

2025-07-02 Thread Philippe Mathieu-Daudé
On 1/7/25 16:39, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 2 +- accel/accel-system.c | 2 +- accel/xen/xen-all.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/accel.h b/include/qemu/accel.h index

Re: [PATCH v2 23/26] tests/functional: Restrict nexted Aarch64 Xen test to TCG

2025-06-23 Thread Philippe Mathieu-Daudé
On 23/6/25 13:59, Philippe Mathieu-Daudé wrote: On 23/6/25 10:11, Thomas Huth wrote: On 20/06/2025 15.07, Philippe Mathieu-Daudé wrote: On macOS this test fails:    qemu-system-aarch64: mach-virt: HVF does not support providing Virtualization extensions to the guest CPU Signed-off-by

Re: [PATCH v2 23/26] tests/functional: Restrict nexted Aarch64 Xen test to TCG

2025-06-23 Thread Philippe Mathieu-Daudé
On 23/6/25 10:11, Thomas Huth wrote: On 20/06/2025 15.07, Philippe Mathieu-Daudé wrote: On macOS this test fails:    qemu-system-aarch64: mach-virt: HVF does not support providing Virtualization extensions to the guest CPU Signed-off-by: Philippe Mathieu-Daudé ---   tests/functional

Re: [PATCH] hw/xen: Fix trace_xs_node_read() params

2025-05-26 Thread Philippe Mathieu-Daudé
va_end(ap); value = qemu_xen_xs_read(h, tid, path, len); -trace_xs_node_read(path, value); if (!value) { error_setg_errno(errp, errno, "failed to read from '%s'", path); +return NULL; } - -g_free(path); +trace_xs_node_read(path, value);

[PATCH] hw/xen/arch_hvm: Unify x86 and ARM variants

2025-05-13 Thread Philippe Mathieu-Daudé
As each target declares the same prototypes, we can use a single header, removing the TARGET_XXX uses. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/xen_arch_hvm.h | 9 - include/hw/i386/xen_arch_hvm.h | 11 --- include/hw/xen/arch_hvm.h | 14 ++ hw

Re: [PATCH v1 1/1] xen: mapcache: Split mapcache_grants by ro and rw

2025-04-25 Thread Philippe Mathieu-Daudé
he_grants by ro and rw access. Grants will now have separate ways in the cache depending on writeability. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v5 05/17] exec/memory.h: make devend_memop "target defines" agnostic

2025-03-17 Thread Philippe Mathieu-Daudé
On 14/3/25 18:31, Pierrick Bouvier wrote: Will allow to make system/memory.c common later. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/i

Re: [PATCH v5 11/17] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-17 Thread Philippe Mathieu-Daudé
On 17/3/25 17:22, Philippe Mathieu-Daudé wrote: On 17/3/25 17:07, Pierrick Bouvier wrote: On 3/17/25 08:50, Philippe Mathieu-Daudé wrote: On 14/3/25 18:31, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier ---    include/exec/ram_addr.h | 8 ++--    1

Re: [PATCH v5 11/17] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-17 Thread Philippe Mathieu-Daudé
On 17/3/25 17:07, Pierrick Bouvier wrote: On 3/17/25 08:50, Philippe Mathieu-Daudé wrote: On 14/3/25 18:31, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier ---    include/exec/ram_addr.h | 8 ++--    1 file changed, 6 insertions(+), 2 deletions

Re: [PATCH v5 15/17] include/exec/memory: move devend functions to memory-internal.h

2025-03-17 Thread Philippe Mathieu-Daudé
| 18 -- 2 files changed, 19 insertions(+), 18 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v5 11/17] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-17 Thread Philippe Mathieu-Daudé
On 14/3/25 18:31, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index f5d574261a3..92e8708af76 10

Re: [PATCH v5 00/17] make system memory API available for common code

2025-03-17 Thread Philippe Mathieu-Daudé
Hi, On 14/3/25 19:39, Pierrick Bouvier wrote: On 3/14/25 11:34, Anthony PERARD wrote: On Fri, Mar 14, 2025 at 10:33:08AM -0700, Pierrick Bouvier wrote: Hi, one patch is missing review: [PATCH v5 12/17] hw/xen: add stubs for various functions. My "Acked-by" wasn't enough? Feel free try chang

Re: [PATCH v2 14/16] include/exec/memory: extract devend_big_endian from devend_memop

2025-03-15 Thread Philippe Mathieu-Daudé
On 11/3/25 05:08, Pierrick Bouvier wrote: we'll use it in system/memory.c. Having part of the commit description separated in its subject is a bit annoying. But then I'm probably using 20-years too old tools in my patch workflow. Only used in system/{memory,physmem}.c, worth move to a local sy

Re: [PATCH v2 11/16] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-11 Thread Philippe Mathieu-Daudé
On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier I didn't follow this direction because Richard had a preference on removing unnecessary inlined functions: https://lore.kernel.org/qemu-devel/9151205a-13d3-401e-b403-f9195cdb1...@linaro.or

Re: [PATCH v2 08/16] exec/memory-internal: remove dependency on cpu.h

2025-03-11 Thread Philippe Mathieu-Daudé
On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Missing the "why" justification we couldn't do that before. --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/in

Re: [PATCH v2 07/16] exec/exec-all: remove dependency on cpu.h

2025-03-11 Thread Philippe Mathieu-Daudé
On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Missing the "why" justification we couldn't do that before. --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-

Re: [PATCH 0/8] xen: Build fixes and dust removal

2025-03-03 Thread Philippe Mathieu-Daudé
On 18/2/25 17:26, Philippe Mathieu-Daudé wrote: accel/Kconfig: Link XenPVH with GPEX PCIe bridge hw/arm: Do not expose the virt machine on Xen-only binary hw/arm/xen-pvh: Do not allow specifying any CPU type hw/xen/xen-pvh: Reduce included headers hw/xen/xen-hvm: Reduce included

[PATCH 4/8] hw/xen/xen-pvh: Reduce included headers

2025-02-18 Thread Philippe Mathieu-Daudé
MemoryRegion *mr) | ^~~~ Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-pvh-common.h | 8 hw/i386/xen/xen-pvh.c | 1 + hw/xen/xen-pvh-common.c | 6 ++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/hw/xen/xen-pvh-commo

[PATCH 7/8] hw/xen/xen-legacy-backend: Remove unused 'net/net.h' header

2025-02-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-legacy-backend.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/xen/xen-legacy-backend.h b/include/hw/xen/xen-legacy-backend.h index e198b120c5d..2d0cbfecade 100644 --- a/include/hw/xen/xen-legacy-backend.h +++ b

[PATCH 2/8] hw/arm: Do not expose the virt machine on Xen-only binary

2025-02-18 Thread Philippe Mathieu-Daudé
Mathieu-Daudé --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 256013ca808..e5f4b1d84d3 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -2,6 +2,7 @@ config ARM_VIRT bool default y depends on ARM +depends on TCG

[PATCH 8/8] meson: Remove support for Xen on 32-bit ARM hosts

2025-02-18 Thread Philippe Mathieu-Daudé
84eda110792 ("gitlab-ci: Add Xen cross-build jobs"). Since 32-bit host aren't tested, simply remove the support there. [*] https://lore.kernel.org/qemu-devel/alpine.DEB.2.22.394.2502031438170.11632@ubuntu-linux-20-04-desktop/ Signed-off-by: Philippe Mathieu-Daudé --- While apparently

[PATCH 6/8] hw/xen/xen-bus: Reduce included headers

2025-02-18 Thread Philippe Mathieu-Daudé
Have "hw/xen/xen-bus" include the bare minimal set of headers. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-bus.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h index 2adb2af8391..bdbf1ed6fd0 10

[PATCH 5/8] hw/xen/xen-hvm: Reduce included headers

2025-02-18 Thread Philippe Mathieu-Daudé
type name ‘X86CPU’ 487 | X86CPU *cpu; | ^~ hw/i386/xen/xen-hvm.c:492:15: error: ‘R_EAX’ undeclared (first use in this function) 492 | env->regs[R_EAX] = req->data; | ^ | REG_RAX Signed-off-by: Philippe Mathieu-Da

[PATCH 3/8] hw/arm/xen-pvh: Do not allow specifying any CPU type

2025-02-18 Thread Philippe Mathieu-Daudé
No CPU can be selected by the PHV machine. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/xen-pvh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c index d1509bd235d..2557d520307 100644 --- a/hw/arm/xen-pvh.c +++ b/hw/arm/xen-pvh.c @@ -53,6 +53,7

[PATCH 0/8] xen: Build fixes and dust removal

2025-02-18 Thread Philippe Mathieu-Daudé
config cleanups. Regards, Phil. Philippe Mathieu-Daudé (8): accel/Kconfig: Link XenPVH with GPEX PCIe bridge hw/arm: Do not expose the virt machine on Xen-only binary hw/arm/xen-pvh: Do not allow specifying any CPU type hw/xen/xen-pvh: Reduce included headers hw/xen/xen-hvm: Reduce includ

[PATCH 1/8] accel/Kconfig: Link XenPVH with GPEX PCIe bridge

2025-02-18 Thread Philippe Mathieu-Daudé
_write_common' Fixes: f22e598a72c ("hw/xen: pvh-common: Add support for creating PCIe/GPEX") Signed-off-by: Philippe Mathieu-Daudé --- accel/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/Kconfig b/accel/Kconfig index 794e0d18d21..4263cab7227 100644 --- a/acce

Re: [PULL 3/9] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-18 Thread Philippe Mathieu-Daudé
On 18/2/25 16:25, Philippe Mathieu-Daudé wrote: +Vikram On 18/2/25 15:10, Andrew Cooper wrote: On 18/02/2025 11:20 am, Philippe Mathieu-Daudé wrote: Hi, Adding Xen community. On 8/2/25 21:57, Richard Henderson wrote: Require a 64-bit host binary to spawn a 64-bit guest. Reviewed-by

Re: [PULL 3/9] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-18 Thread Philippe Mathieu-Daudé
+Vikram On 18/2/25 15:10, Andrew Cooper wrote: On 18/02/2025 11:20 am, Philippe Mathieu-Daudé wrote: Hi, Adding Xen community. On 8/2/25 21:57, Richard Henderson wrote: Require a 64-bit host binary to spawn a 64-bit guest. Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL 3/9] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-18 Thread Philippe Mathieu-Daudé
On 18/2/25 14:19, Philippe Mathieu-Daudé wrote: On 18/2/25 12:20, Philippe Mathieu-Daudé wrote: Hi, Adding Xen community. On 8/2/25 21:57, Richard Henderson wrote: Require a 64-bit host binary to spawn a 64-bit guest. Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off

Re: [PULL 3/9] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-18 Thread Philippe Mathieu-Daudé
On 18/2/25 12:20, Philippe Mathieu-Daudé wrote: Hi, Adding Xen community. On 8/2/25 21:57, Richard Henderson wrote: Require a 64-bit host binary to spawn a 64-bit guest. Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---   meson.build | 9

Re: [PULL v1 10/12] hw/xen: pvh-common: Add support for creating PCIe/GPEX

2025-02-18 Thread Philippe Mathieu-Daudé
Hi Edgar, On 4/9/24 18:15, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Add support for optionally creating a PCIe/GPEX controller. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini --- hw/xen/xen-pvh-common.c | 76 + include/h

Re: [PULL 3/9] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-18 Thread Philippe Mathieu-Daudé
Hi, Adding Xen community. On 8/2/25 21:57, Richard Henderson wrote: Require a 64-bit host binary to spawn a 64-bit guest. Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- meson.build | 9 +++-- 1 file changed, 7 insertions(+), 2

Re: [PATCH 16/20] cpus: Restrict cpu_common_post_load() code to TCG

2025-02-17 Thread Philippe Mathieu-Daudé
On 26/1/25 22:16, Richard Henderson wrote: On 1/23/25 15:44, Philippe Mathieu-Daudé wrote: CPU_INTERRUPT_EXIT was removed in commit 3098dba01c7 ("Use a dedicated function to request exit from execution loop"), tlb_flush() and tb_flush() are related to TCG accelerator. Signed-off-by

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-02-10 Thread Philippe Mathieu-Daudé
On 25/1/25 19:13, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (9): hw/sysbus: Use sizeof(BusState) in main_system_bus_create() hw/sysbus: Declare QOM types using DEFINE_TYPES() macro hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE hw/vfio: Have VFIO_PLATFORM devices

Re: [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-05 Thread Philippe Mathieu-Daudé
On 5/2/25 00:12, Bernhard Beschow wrote: Am 4. Februar 2025 21:25:46 UTC schrieb "Philippe Mathieu-Daudé" : Hi Bernhard, On 27/1/25 10:46, Bernhard Beschow wrote: Am 25. Januar 2025 18:13:43 UTC schrieb "Philippe Mathieu-Daudé" : Because the legacy Xen backend devic

Re: [PATCH v3 05/12] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-05 Thread Philippe Mathieu-Daudé
i386 emulator provides xenpv machine type for multiple architectures xen_targets = ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu'] else Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-04 Thread Philippe Mathieu-Daudé
Hi Bernhard, On 27/1/25 10:46, Bernhard Beschow wrote: Am 25. Januar 2025 18:13:43 UTC schrieb "Philippe Mathieu-Daudé" : Because the legacy Xen backend devices can optionally be plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Remove th

Re: [PATCH] hw/*/xen*: Prefer QOM cast for XenLegacyDevice

2025-02-04 Thread Philippe Mathieu-Daudé
| 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 00/14] meson: Deprecate 32-bit host support

2025-02-04 Thread Philippe Mathieu-Daudé
Hi Jan, On 4/2/25 10:11, Jan Beulich wrote: On 04.02.2025 09:19, Juergen Gross wrote: On 03.02.25 23:43, Stefano Stabellini wrote: +Xen maintainers On Mon, 3 Feb 2025, Richard Henderson wrote: On 2/3/25 04:54, Paolo Bonzini wrote: On 2/3/25 04:18, Richard Henderson wrote: v1: 202501280042

[PATCH v2 1/2] tests/qtest: Extract qtest_qom_has_concrete_type() helper

2025-01-30 Thread Philippe Mathieu-Daudé
Extract qtest_qom_has_concrete_type() out of qtest_has_device() in order to re-use it in the following commit. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- tests/qtest/libqtest.c | 89 -- 1 file changed, 51 insertions(+), 38

[PATCH v2 2/2] tests/qtest: Make qtest_has_accel() generic

2025-01-30 Thread Philippe Mathieu-Daudé
efinitions poisoned in "exec/poison.h". Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqtest.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 7e9366ad6d5

[PATCH v2 0/2] tests/qtest: Make qtest_has_accel() generic

2025-01-30 Thread Philippe Mathieu-Daudé
(Series fully reviewed) Since v1: - Use g_strconcat (Akihiko) In preparation of running QTests using HVF on Darwin, make qtest_has_accel() generic. Note, this also allow running other accelerators such Xen, WHPX, ... Philippe Mathieu-Daudé (2): tests/qtest: Extract

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-28 Thread Philippe Mathieu-Daudé
On 28/1/25 13:57, BALATON Zoltan wrote: On Tue, 28 Jan 2025, Peter Maydell wrote: On Tue, 28 Jan 2025 at 10:42, Gerd Hoffmann wrote: On Sat, Jan 25, 2025 at 07:13:34PM +0100, Philippe Mathieu-Daudé wrote: Some SysBus devices can optionally be dynamically plugged onto the sysbus-platform-bus

[PATCH 1/2] tests/qtest: Extract qtest_qom_has_concrete_type() helper

2025-01-28 Thread Philippe Mathieu-Daudé
Extract qtest_qom_has_concrete_type() out of qtest_has_device() in order to re-use it in the following commit. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqtest.c | 89 -- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/tests

[PATCH 0/2] tests/qtest: Make qtest_has_accel() generic

2025-01-28 Thread Philippe Mathieu-Daudé
In preparation of running QTests using HVF on Darwin, make qtest_has_accel() generic. Note, this also allow running other accelerators such Xen, WHPX, ... Philippe Mathieu-Daudé (2): tests/qtest: Extract qtest_qom_has_concrete_type() helper tests/qtest: Make qtest_has_accel() generic tests

[PATCH 2/2] tests/qtest: Make qtest_has_accel() generic

2025-01-28 Thread Philippe Mathieu-Daudé
efinitions poisoned in "exec/poison.h". Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqtest.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 7e9366ad6d5..3071dedeff6 100644 --- a/te

[RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
(QDev instead of Sysbus...), so accesses of XenLegacyDevice fields were overwritting sysbus ones. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen_pvdev.h | 3 ++- hw/xen/xen-legacy-backend.c | 7 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/hw/xen/xen_pvde

[PATCH 8/9] hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Because the TPM TIS sysbus device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_tis_sysbus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/tpm

[PATCH 7/9] hw/net: Have eTSEC device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Because the network eTSEC device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/fsl_etsec/etsec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/net/fsl_etsec

[PATCH 5/9] hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Because the RAM FB device can be optionally plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/ramfb-standalone.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/display/ramfb

[PATCH 6/9] hw/i386: Have X86_IOMMU devices inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Do not explain why _X86_IOMMU devices are user_creatable, have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to explicit they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/amd_iommu.c | 2 -- hw/i386/intel_iommu.c | 2 -- hw/i386/x86

[PATCH 3/9] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
: Philippe Mathieu-Daudé --- include/hw/sysbus.h | 2 ++ hw/core/sysbus.c| 14 ++ 2 files changed, 16 insertions(+) diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index c9b1e0e90e3..81bbda10d37 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -

[PATCH 4/9] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
Do not explain why VFIO_PLATFORM devices are user_creatable, have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to explicit they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/amd-xgbe.c | 2 -- hw/vfio/calxeda-xgmac.c | 2 -- hw/vfio

[PATCH 1/9] hw/sysbus: Use sizeof(BusState) in main_system_bus_create()

2025-01-25 Thread Philippe Mathieu-Daudé
Rather than using the obscure system_bus_info.instance_size, directly use sizeof(BusState). Signed-off-by: Philippe Mathieu-Daudé --- hw/core/sysbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 9355849ff0a..f713bbfe04f

[PATCH 2/9] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro

2025-01-25 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/sysbus.c | 39 +-- 1

[PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-25 Thread Philippe Mathieu-Daudé
'user_creatable' flag to %true but makes the codebase a bit clearer (IMHO, at least now we can grep for DYNAMIC_SYS_BUS_DEVICE). Philippe Mathieu-Daudé (9): hw/sysbus: Use sizeof(BusState) in main_system_bus_create() hw/sysbus: Declare QOM types using DEFINE_TYPES() macro hw/sysbus:

[PATCH 04/20] cpus: Cache CPUClass early in instance_init() handler

2025-01-23 Thread Philippe Mathieu-Daudé
Cache CPUClass as early as possible, when the instance is initialized. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- cpu-target.c | 3 --- hw/core/cpu-common.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu-target.c b/cpu-target.c

[PATCH 08/20] accel/tcg: Restrict tlb_init() / destroy() to TCG

2025-01-23 Thread Philippe Mathieu-Daudé
Move CPU TLB related methods to accel/tcg/ scope, in "internal-common.h". Suggested-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 11 +++ include/exec/exec-all.h | 16 acce

[PATCH 15/20] cpus: Fix style in cpu-target.c

2025-01-23 Thread Philippe Mathieu-Daudé
Fix style on code we are going to modify. Signed-off-by: Philippe Mathieu-Daudé --- cpu-target.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 6d8b7825746..a2999e7c3c0 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -47,12 +47,15

[PATCH 17/20] cpus: Have cpu_class_init_props() per user / system emulation

2025-01-23 Thread Philippe Mathieu-Daudé
Rather than maintaining a mix of system / user code for CPU class properties, move system properties to cpu-system.c and user ones to the new cpu-user.c unit. Signed-off-by: Philippe Mathieu-Daudé --- cpu-target.c | 58 hw/core/cpu-system.c

[PATCH 14/20] accel/tcg: Move cpu_memory_rw_debug() user implementation to user-exec.c

2025-01-23 Thread Philippe Mathieu-Daudé
cpu_memory_rw_debug() system implementation is defined in system/physmem.c. Move the user one to accel/tcg/user-exec.c to simplify cpu-target.c maintenance. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/user-exec.c | 92 + cpu-target.c | 102

[PATCH 16/20] cpus: Restrict cpu_common_post_load() code to TCG

2025-01-23 Thread Philippe Mathieu-Daudé
CPU_INTERRUPT_EXIT was removed in commit 3098dba01c7 ("Use a dedicated function to request exit from execution loop"), tlb_flush() and tb_flush() are related to TCG accelerator. Signed-off-by: Philippe Mathieu-Daudé --- cpu-target.c | 33 +++-- 1 file c

Re: [PATCH 02/20] user: Extract common MMAP API to 'user/mmap.h'

2025-01-23 Thread Philippe Mathieu-Daudé
On 24/1/25 00:43, Philippe Mathieu-Daudé wrote: Keep common MMAP-related declarations in a single place. Note, this disable ThreadSafetyAnalysis on Linux for: - mmap_fork_start() - mmap_fork_end(). Signed-off-by: Philippe Mathieu-Daudé I forgot to include: Reviewed-by: Warner Losh

[PATCH 11/20] accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h'

2025-01-23 Thread Philippe Mathieu-Daudé
get "cpu.h". Mechanical change doing: $ git mv include/hw/core/accel-cpu.h \ include/accel/accel-cpu-target.h $ sed -i -e 's,hw/core/accel-cpu.h,accel/accel-cpu-target.h,' \ $(git grep -l hw/core/accel-cpu.h) and renaming header guard 'AC

[PATCH 12/20] accel/accel-cpu-target.h: Include missing 'cpu.h' header

2025-01-23 Thread Philippe Mathieu-Daudé
544 | ((class_type *)object_class_dynamic_cast_assert(OBJECT_CLASS(class), (name), \ | ^ Signed-off-by: Philippe Mathieu-Daudé --- include/accel/accel-cpu-target.h | 3 +++ 1 file changed, 3 insertions(+) diff --g

[PATCH 19/20] cpus: Register VMState per user / system emulation

2025-01-23 Thread Philippe Mathieu-Daudé
Simplify cpu-target.c by extracting mixed vmstate code into the cpu_vmstate_register() / cpu_vmstate_unregister() helpers, implemented in cpu-user.c and cpu-system.c. Signed-off-by: Philippe Mathieu-Daudé --- XXX: tlb_flush() temporary declared manually. Only 2 more CONFIG_USER_ONLY to go

  1   2   3   4   5   6   7   8   9   10   >