Re: [PATCH 6/6] Rename "QEMU global mutex" to "BQL" in comments and docs

2023-11-30 Thread Philippe Mathieu-Daudé
hat are involved in this block job. - * Always modified and read under QEMU global mutex (GLOBAL_STATE_CODE). + * Always modified and read under BQL (GLOBAL_STATE_CODE). Ditto. */ GSList *nodes; } BlockJob; Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 5/6] Replace "iothread lock" with "BQL" in comments

2023-11-30 Thread Philippe Mathieu-Daudé
char idstr[256]; /* RCU-enabled, writes protected by the ramlist lock */ QLIST_ENTRY(RAMBlock) next; -/* Called with iothread lock taken. */ +/* Called with BQL taken. */ "with the BQL" (other uses) Otherwise, Reviewed-by: Philippe Mathieu-Daudé static

Re: [PATCH 4/6] system/cpus: rename qemu_global_mutex to qemu_bql

2023-11-30 Thread Philippe Mathieu-Daudé
emufile_src_sem; QemuSemaphore rate_limit_sem; QemuSemaphore rp_pong_acks; QemuSemaphore rp_sem; QemuSemaphore sem; QemuSemaphore sem_sync; QemuSemaphore sem_thread; QemuSemaphore wait_unplug_sem; So: Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 3/6] qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql()

2023-11-30 Thread Philippe Mathieu-Daudé
ons(+), 13 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v6 3/7] qemu: add support for iOS host

2023-11-28 Thread Philippe Mathieu-Daudé
(Cc'ing Ariadne, libucontext maintainer) On 21/1/21 19:53, Peter Maydell wrote: On Tue, 5 Jan 2021 at 02:25, Joelle van Dyne wrote: This introduces support for building for iOS hosts. When the correct Xcode toolchain is used, iOS host will be detected automatically. * block: disable features

Re: [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device...

2023-11-22 Thread Philippe Mathieu-Daudé
Hi Volodymyr, On 21/11/23 23:10, Volodymyr Babchuk wrote: was created by QEMU Please do not split lines between subject and content. Rewrite the full line. Preferably restrict the subject to 72 chars. Otherwise your patch isn't displayed correctly in git tools. Thanks, Phil. Xen PV devices

[PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params

2023-11-20 Thread Philippe Mathieu-Daudé
aio_context_set_aio_params() doesn't use its undocumented Error** argument. Remove it to simplify. Note this removes a use of "unchecked Error**" in iothread_set_aio_context_params(). Signed-off-by: Philippe Mathieu-Daudé --- include/block/aio.h | 3 +-- iothread.c |

Re: [PATCH v3 3/4] ide/via: don't attempt to set default BAR addresses

2023-11-16 Thread Philippe Mathieu-Daudé
c | 5 - 1 file changed, 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 1/4] ide/ioport: move ide_portio_list[] and ide_portio_list2[] definitions to IDE core

2023-11-16 Thread Philippe Mathieu-Daudé
Cave-Ayland --- hw/ide/core.c | 12 hw/ide/ioport.c | 12 include/hw/ide/internal.h | 3 +++ 3 files changed, 15 insertions(+), 12 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 16:19, David Woodhouse wrote: On 14 November 2023 10:13:14 GMT-05:00, "Philippe Mathieu-Daudé" wrote: On 14/11/23 16:08, David Woodhouse wrote: On 14 November 2023 10:00:09 GMT-05:00, "Philippe Mathieu-Daudé" wrote: On 14/11/23 15:50, David Woodhouse wr

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 16:08, David Woodhouse wrote: On 14 November 2023 10:00:09 GMT-05:00, "Philippe Mathieu-Daudé" wrote: On 14/11/23 15:50, David Woodhouse wrote: On 14 November 2023 09:37:57 GMT-05:00, "Philippe Mathieu-Daudé" wrote: Add a tag to run all Xen-specific tes

Re: [PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 16:13, David Woodhouse wrote: On 14 November 2023 09:38:02 GMT-05:00, "Philippe Mathieu-Daudé" wrote: Similarly to the restriction in hw/pci/msix.c (see commit e1e4bf2252 "msix: fix msix_vector_masked"), restrict the xen_is_pirq_msi() call in msi_is_masked() to

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 15:50, David Woodhouse wrote: On 14 November 2023 09:37:57 GMT-05:00, "Philippe Mathieu-Daudé" wrote: Add a tag to run all Xen-specific tests using: $ make check-avocado AVOCADO_TAGS='guest:xen' Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/

[PATCH-for-9.0 v2 15/19] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources

2023-11-14 Thread Philippe Mathieu-Daudé
We rarely need to include "cpu.h" in headers. Including it 'taint' headers to be target-specific. Here only the i386/arm implementations requires "cpu.h", so include it there and remove from the "hw/xen/xen-hvm-common.h" *common* header. Signed-off-by: Phil

[PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2023-11-14 Thread Philippe Mathieu-Daudé
Previous commits re-organized the target-specific bits from Xen files. We can now build the common files once instead of per-target. Only 4 files call libxen API (thus its CPPFLAGS): - xen-hvm-common.c, - xen_pt.c, xen_pt_graphics.c, xen_pt_msi.c Signed-off-by: Philippe Mathieu-Daudé

[RFC PATCH-for-9.0 v2 13/19] hw/xen: Remove use of 'target_ulong' in handle_ioreq()

2023-11-14 Thread Philippe Mathieu-Daudé
27;. - Fallback is only used in x86 for VMWARE_PORT. Masking the upper bits of 'data' to keep 'req->size' low bits is irrelevant of the target word size. Remove the word size check and always extract the relevant bits. Signed-off-by: Philippe Mathieu-Daudé --- hw/xen/

[PATCH-for-9.0 v2 17/19] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'

2023-11-14 Thread Philippe Mathieu-Daudé
"hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-

[PATCH-for-9.0 v2 14/19] hw/xen: Use target-agnostic qemu_target_page_bits()

2023-11-14 Thread Philippe Mathieu-Daudé
Instead of the target-specific TARGET_PAGE_BITS definition, use qemu_target_page_bits() which is target agnostic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse --- hw/xen/xen-hvm-common.c | 6 -- 1 file changed, 4 insertions(+), 2

[RFC PATCH-for-9.0 v2 09/19] hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragma

2023-11-14 Thread Philippe Mathieu-Daudé
Except imported source files, QEMU code base uses the QEMU_ALIGNED() macro to align its structures. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/xen_blkif.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/block/xen_blkif.h b/hw/block/xen_blkif.h index

[PATCH-for-9.0 v2 11/19] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix

2023-11-14 Thread Philippe Mathieu-Daudé
Use a common 'xen_arch_' prefix for architecture-specific functions. Rename xen_arch_set_memory() and xen_arch_handle_ioreq(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/hw/arm/xen_arch_hvm.h | 4 ++-- inclu

[PATCH-for-9.0 v2 18/19] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS

2023-11-14 Thread Philippe Mathieu-Daudé
xen-hvm.c calls xc_set_hvm_param() from , so better compile it with Xen CPPFLAGS. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/xen/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build index 3dc4c4f106

[PATCH-for-9.0 v2 04/19] system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'

2023-11-14 Thread Philippe Mathieu-Daudé
physmem.c doesn't use any declaration from "hw/xen/xen.h", it only requires "sysemu/xen.h" and "system/xen-mapcache.h". Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH-for-9.0 v2 16/19] hw/xen/xen_pt: Add missing license

2023-11-14 Thread Philippe Mathieu-Daudé
Commit eaab4d60d3 ("Introduce Xen PCI Passthrough, qdevice") introduced both xen_pt.[ch], but only added the license to xen_pt.c. Use the same license for xen_pt.h. Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé --- hw/xen/xen_pt.h | 10 ++ 1 file c

[PATCH-for-9.0 v2 12/19] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h'

2023-11-14 Thread Philippe Mathieu-Daudé
We don't need a target-specific header for common target-specific prototypes. Declare xen_arch_handle_ioreq() and xen_arch_set_memory() in "hw/xen/xen-hvm-common.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson ---

[PATCH-for-9.0 v2 10/19] hw/xen: Rename 'ram_memory' global variable as 'xen_memory'

2023-11-14 Thread Philippe Mathieu-Daudé
To avoid a potential global variable shadow in hw/i386/pc_piix.c::pc_init1(), rename Xen's "ram_memory" as "xen_memory". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-hvm-common.h | 2 +- hw/arm/xen_arm.c| 6 +++--- hw/i386/xen

[PATCH-for-9.0 v2 08/19] hw/xen: Remove unused Xen stubs

2023-11-14 Thread Philippe Mathieu-Daudé
All these stubs are protected by a 'if (xen_enabled())' check. Signed-off-by: Philippe Mathieu-Daudé --- stubs/xen-hw-stub.c | 24 1 file changed, 24 deletions(-) diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index 6cf0e9a4c1..53c6a6f2a0 100644 --- a

[PATCH-for-9.0 v2 05/19] hw/display: Restrict xen_register_framebuffer() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
Only call xen_register_framebuffer() when Xen is enabled. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 37557c3442..f9cf3d6f77 100644 --- a/hw/display/vga.c +++ b/hw

[PATCH-for-9.0 v2 02/19] sysemu/xen: Forbid using Xen headers in user emulation

2023-11-14 Thread Philippe Mathieu-Daudé
Xen is a system specific accelerator, it makes no sense to include its headers in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse --- include/sysemu/xen.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
Add a tag to run all Xen-specific tests using: $ make check-avocado AVOCADO_TAGS='guest:xen' Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_xen.py | 3 +++ tests/avocado/kvm_xen_guest.py | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/avocado/boo

[PATCH-for-9.0 v2 07/19] hw/xen: Remove unnecessary xen_hvm_inject_msi() stub

2023-11-14 Thread Philippe Mathieu-Daudé
Since commit 04b0de0ee8 ("xen: factor out common functions") xen_hvm_inject_msi() stub is not required. Signed-off-by: Philippe Mathieu-Daudé --- stubs/xen-hw-stub.c | 4 1 file changed, 4 deletions(-) diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index 7d7ffe83a9..

[PATCH-for-9.0 v2 03/19] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
"sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN accelerator. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- include/sysemu/xen-mapcac

[PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
Similarly to the restriction in hw/pci/msix.c (see commit e1e4bf2252 "msix: fix msix_vector_masked"), restrict the xen_is_pirq_msi() call in msi_is_masked() to Xen. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH-for-9.0 v2 00/19] hw/xen: Have most of Xen files become target-agnostic

2023-11-14 Thread Philippe Mathieu-Daudé
n't make sense yet until we can run multiple accelerators concurrently. Tested running on x86_64/aarch64 Linux hosts: $ make check-avocado AVOCADO_TAGS='guest:xen' Regards, Phil. Philippe Mathieu-Daudé (19): tests/avocado: Add 'guest:xen' tag to tests running Xen gues

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
Cc'ing Paolo On 14/11/23 13:25, Philippe Mathieu-Daudé wrote: On 13/11/23 20:52, David Woodhouse wrote: On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: "sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
On 13/11/23 20:52, David Woodhouse wrote: On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: "sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Sig

Re: [PATCH-for-9.0 04/10] hw/xen: Factor xen_arch_align_ioreq_data() out of handle_ioreq()

2023-11-13 Thread Philippe Mathieu-Daudé
On 13/11/23 18:11, David Woodhouse wrote: On Mon, 2023-11-13 at 17:09 +0100, Philippe Mathieu-Daudé wrote: On 13/11/23 16:58, Woodhouse, David wrote: On 13 Nov 2023 10:22, Philippe Mathieu-Daudé wrote:     Per commit f17068c1c7 ("xen-hvm: reorganize xen-hvm and move common     functi

Re: [PATCH-for-9.0 08/10] system/physmem: Only include 'hw/xen/xen.h' when Xen is available

2023-11-13 Thread Philippe Mathieu-Daudé
On 13/11/23 21:03, David Woodhouse wrote: On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: "hw/xen/xen.h" contains declarations for Xen hardware. There is no point including it when Xen is not available. ... if even when Xen *is* available, AFAICT. Can you just

Re: [PATCH-for-9.0 04/10] hw/xen: Factor xen_arch_align_ioreq_data() out of handle_ioreq()

2023-11-13 Thread Philippe Mathieu-Daudé
On 13/11/23 19:16, Richard Henderson wrote: On 11/13/23 07:21, Philippe Mathieu-Daudé wrote: diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index c028c1b541..03f9417e7e 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -426,10 +426,7 @@ static void

Re: [PATCH-for-9.0 04/10] hw/xen: Factor xen_arch_align_ioreq_data() out of handle_ioreq()

2023-11-13 Thread Philippe Mathieu-Daudé
On 13/11/23 16:58, Woodhouse, David wrote: On 13 Nov 2023 10:22, Philippe Mathieu-Daudé wrote: Per commit f17068c1c7 ("xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common"), handle_ioreq() is expected to be target-agnostic. However it uses 'targe

[PATCH-for-9.0 04/10] hw/xen: Factor xen_arch_align_ioreq_data() out of handle_ioreq()

2023-11-13 Thread Philippe Mathieu-Daudé
the target-specific code out of handle_ioreq() as a per-target handler called xen_arch_align_ioreq_data(). Signed-off-by: Philippe Mathieu-Daudé --- Should we have a 'unsigned qemu_target_long_bits();' helper such qemu_target_page_foo() API and target_words_bigendian()? --- include/hw/

[PATCH-for-9.0 06/10] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources

2023-11-13 Thread Philippe Mathieu-Daudé
We rarely need to include "cpu.h" in headers. Including it 'taint' headers to be target-specific. Here only the i386/arm implementations requires "cpu.h", so include it there and remove from the "hw/xen/xen-hvm-common.h" *common* header. Signed-off-by: Phi

[PATCH-for-9.0 03/10] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h'

2023-11-13 Thread Philippe Mathieu-Daudé
We don't need a target-specific header for common target-specific prototypes. Declare xen_arch_handle_ioreq() and xen_arch_set_memory() in "hw/xen/xen-hvm-common.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/xen_arch_hvm.h | 9 - include/hw/i386/xen_a

[PATCH-for-9.0 08/10] system/physmem: Only include 'hw/xen/xen.h' when Xen is available

2023-11-13 Thread Philippe Mathieu-Daudé
"hw/xen/xen.h" contains declarations for Xen hardware. There is no point including it when Xen is not available. When Xen is not available, we have enough with declarations of "sysemu/xen.h". Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 5 - 1 file c

[PATCH-for-9.0 09/10] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'

2023-11-13 Thread Philippe Mathieu-Daudé
"hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-

[PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-13 Thread Philippe Mathieu-Daudé
"sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/xen-mapcache.h | 3 ++- 1 file changed, 2 inser

[PATCH-for-9.0 10/10] hw/xen: Have most of Xen files become target-agnostic

2023-11-13 Thread Philippe Mathieu-Daudé
Previous commits re-organized the target-specific bits from Xen files. We can now build the common files once instead of per-target. Signed-off-by: Philippe Mathieu-Daudé --- accel/xen/meson.build | 2 +- hw/block/dataplane/meson.build | 2 +- hw/xen/meson.build | 13

[PATCH-for-9.0 05/10] hw/xen: Use target-agnostic qemu_target_page_bits()

2023-11-13 Thread Philippe Mathieu-Daudé
Instead of the target-specific TARGET_PAGE_BITS definition, use qemu_target_page_bits() which is target agnostic. Signed-off-by: Philippe Mathieu-Daudé --- hw/xen/xen-hvm-common.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm

[PATCH-for-9.0 01/10] sysemu/xen: Forbid using Xen headers in user emulation

2023-11-13 Thread Philippe Mathieu-Daudé
Xen is a system specific accelerator, it makes no sense to include its headers in user emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/xen.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sysemu/xen.h b/include/sysemu/xen.h index

[PATCH-for-9.0 02/10] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix

2023-11-13 Thread Philippe Mathieu-Daudé
Use a common 'xen_arch_' prefix for architecture-specific functions. Rename xen_arch_set_memory() and xen_arch_handle_ioreq(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/xen_arch_hvm.h | 4 ++-- include/hw/i386/xen_arch_hvm.h | 4 ++-- hw/arm/xen_arm.c |

[PATCH-for-9.0 00/10] hw/xen: Have most of Xen files become target-agnostic

2023-11-13 Thread Philippe Mathieu-Daudé
e yet until we can run multiple accelerators concurrently. Only build-tested. Regards, Phil. Philippe Mathieu-Daudé (10): sysemu/xen: Forbid using Xen headers in user emulation hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix hw/xen: Merge 'hw/xen/arch_hvm.h

Re: [PATCH 1/1] hw/sd: Declare CPU QOM types using DEFINE_TYPES() macro

2023-11-08 Thread Philippe Mathieu-Daudé
On 31/10/23 09:31, Cédric Le Goater wrote: On 10/31/23 09:06, Philippe Mathieu-Daudé wrote: 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. Mechanical

Re: [PATCH v8 7/7] docs/system: add a basic enumeration of vhost-user devices

2023-11-07 Thread Philippe Mathieu-Daudé
- fix patching description --- docs/system/devices/vhost-user-rng.rst | 2 + docs/system/devices/vhost-user.rst | 70 +- 2 files changed, 71 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

[PULL 40/75] target/ppc: Move powerpc_mmu_t definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The powerpc_mmu_t definition is only used by target/ppc/, no need to expose it. Restrict it by moving it to "target/ppc/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-7-phi...@linaro.org

[PULL 37/75] target/ppc: Move ppc_cpu_class_by_name() declaration to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
ppc_cpu_class_by_name() is only called in target/ppc/, no need to expose outside (in particular to hw/). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-4-phi...@linaro.org> --- target/ppc/cpu-qom

[PULL 51/75] hw/cpu: Clean up global variable shadowing

2023-11-07 Thread Philippe Mathieu-Daudé
in the global scope [-Werror,-Wshadow] unsigned cpus= config->has_cpus ? config->cpus : 0; ^ include/hw/core/cpu.h:589:17: note: previous declaration is here extern CPUTailQ cpus; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha

[PULL 73/75] MAINTAINERS: Add more guest-agent related files to the corresponding section

2023-11-07 Thread Philippe Mathieu-Daudé
: <20231107101811.14189-1-th...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2a9354e695..bc69253a25 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3145,10 +3145,11 @@ M: Michael Ro

[PULL 42/75] hw/s390x/css: Have css_do_sic() take S390CPU instead of CPUS390XState

2023-11-07 Thread Philippe Mathieu-Daudé
"hw/s390x/css.h" is a header used by target-agnostic objects (such hw/s390x/virtio-ccw-gpu.c), thus can not use target-specific types, such CPUS390XState. Have css_do_sic() take S390CPU a pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Hut

[PULL 75/75] dump: Add close fd on error return to avoid resource leak

2023-11-07 Thread Philippe Mathieu-Daudé
From: Zongmin Zhou Reported-by: Coverity CID 1523842 (RESOURCE_LEAK) Fixes: e6549197f7 ("dump: Add command interface for kdump-raw formats") Signed-off-by: Zongmin Zhou Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231107024417.585475-1-min

[PULL 68/75] hw/sd: Declare QOM types using DEFINE_TYPES() macro

2023-11-07 Thread Philippe Mathieu-Daudé
}, { :[body2] }, }; DEFINE_TYPES(:[i1a]) ''' rule=''' where :[i1a] == :[i1b], :[i2a] == :[i2b], :[rt1] == :[rt2] ''' and re-indented manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Messa

[PULL 44/75] target/s390x/cpu: Restrict cpu_get_tb_cpu_state() definition to TCG

2023-11-07 Thread Philippe Mathieu-Daudé
cpu_get_tb_cpu_state() is TCG specific. Another accelerator calling it would be a bug, so restrict the definition to TCG, along with "tcg_s390x.h" header inclusion. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20231106114500.5269-4-phi...@linaro.org

[PULL 43/75] hw/s390x/sclp: Have sclp_service_call[_protected]() take S390CPU*

2023-11-07 Thread Philippe Mathieu-Daudé
"hw/s390x/sclp.h" is a header used by target-agnostic objects (such hw/char/sclpconsole[-lm].c), thus can not use target-specific types, such CPUS390XState. Have sclp_service_call[_protected]() take a S390CPU pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé R

[PULL 72/75] MAINTAINERS: Add include/hw/xtensa/mx_pic.h to the XTFPGA machine section

2023-11-07 Thread Philippe Mathieu-Daudé
From: Thomas Huth These machines are the only user of the mx_pic code, so the header (which is currently "unmaintained" according to the MAINTAINERS file) should be added to this section. Signed-off-by: Thomas Huth Acked-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé

[PULL 47/75] target: Move ArchCPUClass definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
ot; header. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231013140116.255-13-phi...@linaro.org> --- target/alpha/cpu-qom.h | 16 --- target/alpha/cpu.h | 13 + target/arm/cpu-q

[PULL 41/75] target/ppc: Move powerpc_input_t definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The powerpc_input_t definition is only used by target/ppc/, no need to expose it. Restrict it by moving it to "target/ppc/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-8-phi.

[PULL 45/75] target/s390x/cpu: Restrict CPUS390XState declaration to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
"target/s390x/cpu-qom.h" has to be target-agnostic. However, it currently declares CPUS390XState, which is target-specific. Move that declaration to "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20231106114500.5269-5-phi...@linaro

[PULL 36/75] target/ppc: Define powerpc_pm_insn_t in 'internal.h'

2023-11-07 Thread Philippe Mathieu-Daudé
PM instructions are only used by TCG helpers. No need to expose to other hardware. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-3-phi...@linaro.org> --- target/ppc/cpu-qom.h | 10 -- targ

[PULL 00/75] Misc HW/UI patches for 2023-11-07

2023-11-07 Thread Philippe Mathieu-Daudé
a Ebner (2): hw/ide: reset: cancel async DMA operation before resetting state tests/qtest: ahci-test: add test exposing reset issue with pending callback Marc-André Lureau (1): vl: constify default_list Philippe Mathieu-Daudé (51): tests/vm/ubuntu.aarch64: Correct comment about TCG speci

[PULL 38/75] target/ppc: Move PowerPCCPUClass definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231013125630.95116-5-phi...@linaro.org> --- include/hw/ppc/ppc.h | 2 +- target/ppc/cpu-qom.h | 56 target/ppc/cpu.h

[PULL 39/75] target/ppc: Move powerpc_excp_t definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The powerpc_excp_t definition is only used by target/ppc/, no need to expose it. Restrict it by moving it to "target/ppc/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-6-phi...@linaro.org

Re: [PULL 00/60] Misc HW/UI patches for 2023-11-06

2023-11-07 Thread Philippe Mathieu-Daudé
On 7/11/23 02:39, Stefan Hajnoczi wrote: On Mon, 6 Nov 2023 at 19:03, Philippe Mathieu-Daudé wrote: The following changes since commit d762bf97931b58839316b68a570eecc6143c9e3e: Merge tag 'pull-target-arm-20231102' of https://git.linaro.org/people/pmaydell/qemu-arm into stagin

[PULL 41/60] hw/loader: Clean up global variable shadowing in rom_add_file()

2023-11-06 Thread Philippe Mathieu-Daudé
option_rom[MAX_OPTION_ROMS]; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha Message-Id: <20231010115048.11856-3-phi...@linaro.org> --- include/hw/loader.h | 2 +- hw/core/loader.c| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i

[PULL 11/60] target/ppc: Remove CPU_RESOLVING_TYPE from 'cpu-qom.h'

2023-11-06 Thread Philippe Mathieu-Daudé
CPU_RESOLVING_TYPE is a per-target definition, and is irrelevant for other targets. Move it to "cpu.h". "target/ppc/cpu-qom.h" is supposed to be target agnostic (include-able by any target). Add such mention in the header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-b

[PULL 57/60] MAINTAINERS: Add include/hw/timer/tmu012.h to the SH4 R2D section

2023-11-06 Thread Philippe Mathieu-Daudé
From: Thomas Huth tmu012.h is the header that belongs to hw/timer/sh_timer.c, so we should list it in the same section as sh_timer.c. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Message-ID: <20231026080011.156325-1-th...@redhat.com> Sign

[PULL 60/60] ui/sdl2: use correct key names in win title on mac

2023-11-06 Thread Philippe Mathieu-Daudé
(CONFIG_DARWIN is defined). Unfortunately, standard Mac keyboards do not include a "Right-Ctrl" key, so in the case that the SDL grab mode is set to HOT_KEY_MOD_RCTRL, the default text is still used. Signed-off-by: Adrian Wowk Acked-by: Marc-André Lureau Tested-by: Philippe Mathieu-Daudé R

[PULL 49/60] hw/i2c: pmbus add support for block receive

2023-11-06 Thread Philippe Mathieu-Daudé
: Hao Wu Acked-by: Corey Minyard Signed-off-by: Titus Rwantare Message-ID: <20231023-staging-pmbus-v3-v4-1-07a8cb7cd...@google.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i2c/pmbus_device.h | 7 +++ hw/i2c/pmbus_device.c | 30 +- 2

[PULL 40/60] hw/cpu: Clean up global variable shadowing

2023-11-06 Thread Philippe Mathieu-Daudé
in the global scope [-Werror,-Wshadow] unsigned cpus= config->has_cpus ? config->cpus : 0; ^ include/hw/core/cpu.h:589:17: note: previous declaration is here extern CPUTailQ cpus; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha

[PULL 12/60] target/riscv: Remove CPU_RESOLVING_TYPE from 'cpu-qom.h'

2023-11-06 Thread Philippe Mathieu-Daudé
CPU_RESOLVING_TYPE is a per-target definition, and is irrelevant for other targets. Move it to "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: LIU Zhiwei Reviewed-by: Richard Henderson Message-Id: <20231013140116.255-6-phi...@linaro.org> --- target/riscv/cpu-qom

[PULL 08/60] target: Unify QOM style

2023-11-06 Thread Philippe Mathieu-Daudé
o separate backing for properties (options driven by the user) and internal state to make navigation easier. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu Message-Id: <20231013140116.255-2-phi...@linaro.org> --- target/alpha/cpu-qom.h | 2

[PULL 09/60] target: Mention 'cpu-qom.h' is target agnostic

2023-11-06 Thread Philippe Mathieu-Daudé
"target/foo/cpu-qom.h" is supposed to be target agnostic (include-able by any target). Add such mention in the header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231013140116.255-3-phi...@linaro.org> --- target/arm/cpu-qom.h| 2

[PULL 31/60] target/mips: Fix TX79 LQ/SQ opcodes

2023-11-06 Thread Philippe Mathieu-Daudé
The base register address offset is *signed*. Cc: qemu-sta...@nongnu.org Fixes: 82a9f9 ("target/mips/tx79: Introduce LQ opcode (Load Quadword)") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230914090447.12557-1-phi...@linaro.org> ---

[PULL 51/60] hw/i2c: pmbus: add fan support

2023-11-06 Thread Philippe Mathieu-Daudé
Rwantare Message-ID: <20231023-staging-pmbus-v3-v4-3-07a8cb7cd...@google.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i2c/pmbus_device.h | 1 + hw/i2c/pmbus_device.c | 176 ++ 2 files changed, 177 insertions(+) diff --git a/include/

[PULL 58/60] MAINTAINERS: Add the CAN documentation file to the CAN section

2023-11-06 Thread Philippe Mathieu-Daudé
From: Thomas Huth Add can.rst to the corresponding section in MAINTAINERS, so that the maintainers get CC:-ed on corresponding patches. Signed-off-by: Thomas Huth Reviewed-by: Vikram Garhwal Reviewed-by: Philippe Mathieu-Daudé Acked-by: Pavel Pisa Message-ID: <20231027060931.242491-1

[PULL 55/60] hw/i2c: pmbus: immediately clear faults on request

2023-11-06 Thread Philippe Mathieu-Daudé
-v4-7-07a8cb7cd...@google.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 3bce39e84e..481e158380 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -

[PULL 35/60] target/ppc: Prohibit target specific KVM prototypes on user emulation

2023-11-06 Thread Philippe Mathieu-Daudé
Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Message-Id: <20231003070427.69621-5-phi...@linaro.org> --- target/ppc/kvm_ppc.h | 4 1 file changed, 4 insertions(+) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 6a4dd9c560..1975fb5ee6 100644 --- a/target/ppc/kvm_ppc.h

[PULL 36/60] target/nios2: Create IRQs *after* accelerator vCPU is realized

2023-11-06 Thread Philippe Mathieu-Daudé
Architecture specific hardware doesn't have a particular dependency on the accelerator vCPU (created with cpu_exec_realizefn), and can be initialized *after* the vCPU is realized. Doing so allows further generic API simplification (in few commits). Signed-off-by: Philippe Mathieu-Daudé Rev

[PULL 33/60] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM

2023-11-06 Thread Philippe Mathieu-Daudé
Inline and guard the single call to kvm_openpic_connect_vcpu() allows to remove kvm-stub.c. Reviewed-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231003070427.69621-3-phi...@linaro.org> --- hw/ppc/e500.c | 4 target/ppc/kvm-stub.c

[PULL 42/60] hw/isa/i82378: Propagate error if PC_SPEAKER device creation failed

2023-11-06 Thread Philippe Mathieu-Daudé
o be taken as example and copy / pasted all over the code base. Reported-by: Bernhard Beschow Suggested-by: Markus Armbruster Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231020171509.87839-5-phi...@linaro.org> --- hw/

[PULL 37/60] target/alpha: Tidy up alpha_cpu_class_by_name()

2023-11-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Gavin Shan Message-Id: <20230908112235.75914-2-phi...@linaro.org> --- target/alpha/cpu.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c

[PULL 18/60] target/riscv: Move TYPE_RISCV_CPU_BASE definition to 'cpu.h'

2023-11-06 Thread Philippe Mathieu-Daudé
"target/riscv/cpu.h". "target/riscv/cpu-qom.h" is now fully target agnostic. Add a comment clarifying that in the header. Reviewed-by: LIU Zhiwei Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231013140116.

[PULL 48/60] tests/qtest: ahci-test: add test exposing reset issue with pending callback

2023-11-06 Thread Philippe Mathieu-Daudé
e disk and verifies that it is still intact after a reset with a pending operation. It also checks that the pending operation actually completes correctly. Signed-off-by: Fiona Ebner Message-ID: <20230906130922.142845-2-f.eb...@proxmox.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/q

[PULL 39/60] exec/cpu: Have cpu_exec_realize() return a boolean

2023-11-06 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230918160257

[PULL 19/60] target/ppc: Use env_archcpu() in helper_book3s_msgsndp()

2023-11-06 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUPPCState*), we can use the fast env_archcpu() macro to get ArchCPU* (here PowerPCCPU*). The QOM cast POWERPC_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza

[PULL 53/60] hw/sensor: add ADM1266 device model

2023-11-06 Thread Philippe Mathieu-Daudé
-off-by: Titus Rwantare [PMD: Cover file in MAINTAINERS] Message-ID: <20231023-staging-pmbus-v3-v4-5-07a8cb7cd...@google.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/sensor/adm1266.c | 254 ++ hw/arm/K

[PULL 46/60] hw/cpu: Update the comments of nr_cores and nr_dies

2023-11-06 Thread Philippe Mathieu-Daudé
From: Zhao Liu In the nr_threads' comment, specify it represents the number of threads in the "core" to avoid confusion. Also add comment for nr_dies in CPUX86State. Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Tested-by: Babu Moger Tested-by: Yongwei Ma Acke

[PULL 54/60] tests/qtest: add tests for ADM1266

2023-11-06 Thread Philippe Mathieu-Daudé
ogle.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS| 1 + tests/qtest/adm1266-test.c | 122 + tests/qtest/meson.build| 1 + 3 files changed, 124 insertions(+) create mode 100644 tests/qtest/adm1266-test.c diff --git a/MA

[PULL 22/60] target/xtensa: Use env_archcpu() in update_c[compare|count]()

2023-11-06 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUXtensaState*), we can use the fast env_archcpu() macro to get ArchCPU* (here XtensaCPU*). The QOM cast XTENSA_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson

[PULL 47/60] hw/ide: reset: cancel async DMA operation before resetting state

2023-11-06 Thread Philippe Mathieu-Daudé
c:1527 > #8 blk_aio_complete (acb=0x7f6460005b10) at ../block/block-backend.c:1524 > #9 blk_aio_write_entry (opaque=0x7f6460005b10) at > ../block/block-backend.c:1594 > #10 0x5595ad258cfb in coroutine_trampoline (i0=, > i1=) at ../util/coroutine-ucontext.c:177 Signed-off-

[PULL 10/60] target/arm: Move internal declarations from 'cpu-qom.h' to 'cpu.h'

2023-11-06 Thread Philippe Mathieu-Daudé
These definitions and declarations are only used by target/arm/, no need to expose them to generic hw/. Reviewed-by: Richard Henderson Message-Id: <20231013140116.255-4-phi...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé Message-Id: --- target/arm/cpu-qom.h

[PULL 50/60] hw/i2c: pmbus: add vout mode bitfields

2023-11-06 Thread Philippe Mathieu-Daudé
the remaining 5 bits to scale the voltage readings. Reviewed-by: Hao Wu Acked-by: Corey Minyard Signed-off-by: Titus Rwantare Message-ID: <20231023-staging-pmbus-v3-v4-2-07a8cb7cd...@google.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i2c/pmbus_device.h | 8 1 file c

[PULL 56/60] hw/i2c: pmbus: reset page register for out of range reads

2023-11-06 Thread Philippe Mathieu-Daudé
simultaneous writes to all pages. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare Message-ID: <20231023-staging-pmbus-v3-v4-8-07a8cb7cd...@google.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 18 +- tests/qtest/max34451-test.

<    4   5   6   7   8   9   10   11   12   13   >