Re: [PATCH v9 09/10] target/riscv: Clear vstart_qe_zero flag

2024-03-09 Thread Richard Henderson
On 3/9/24 10:43, Daniel Henrique Barboza wrote: From: Ivan Klokov The vstart_qe_zero flag is set at the beginning of the translation Here and subject, s/qe/ne/. r~

Re: [PATCH v9 06/10] trans_rvv.c.inc: set vstart = 0 in int scalar move insns

2024-03-09 Thread Richard Henderson
On 3/9/24 10:43, Daniel Henrique Barboza wrote: trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart = 0 after execution. This is usually done by a helper in vector_helper.c but these functions don't use helpers. We'll set vstart after any potential 'over'

Re: [PATCH v9 05/10] target/riscv: use vext_set_tail_elems_1s() in vcrypto insns

2024-03-09 Thread Richard Henderson
On 3/9/24 10:43, Daniel Henrique Barboza wrote: Vcrypto insns should also use the same helper the regular vector insns uses to update the tail elements. Move vext_set_tail_elems_1s() to vector_internals.c and make it public. Use it in vcrypto_helper.c to set tail elements instead of

Re: [PATCH v9 04/10] target/riscv/vector_helper.c: update tail with vext_set_tail_elems_1s()

2024-03-09 Thread Richard Henderson
On 3/9/24 10:43, Daniel Henrique Barboza wrote: Change all code that updates tail elems to use vext_set_tail_elems_1s() instead of vext_set_elems_1s(). Setting 'env->vstart=0' needs to be the very last thing a helper does because env->vstart is being checked by vext_set_tail_elems_1s(). I did

Re: [PATCH v9 03/10] target/riscv/vector_helper.c: do vstart=0 after updating tail

2024-03-09 Thread Richard Henderson
On 3/9/24 10:43, Daniel Henrique Barboza wrote: vext_vv_rm_1() and vext_vv_rm_2() are setting vstart = 0 before their respective callers (vext_vv_rm_2 and vext_vx_rm_2) update the tail elements. This is benign now, but we'll convert the tail updates to use vext_set_tail_elems_1s(), and this

Re: [PATCH v9 02/10] target/riscv: handle vstart >= vl in vext_set_tail_elems_1s()

2024-03-09 Thread Richard Henderson
On 3/9/24 10:43, Daniel Henrique Barboza wrote: We're going to make changes that will required each helper to be responsible for the 'vstart' management, i.e. we will relieve the 'vstart < vl' assumption that helpers have today. To do that we'll need to deal with how we're updating tail

[PATCH] usb-audio: Fix invalid values in AudioControl descriptors

2024-03-09 Thread Joonas Kankaala
This fixes the invalid bInterfaceProtocol value 0x04 in the USB audio AudioControl descriptors. It should be zero. While Linux and Windows forgive this error, macOS 14 Sonoma does not. The usb-audio device does not appear in macOS sound settings even though the device is recognized and shows up in

[PATCH v9 09/10] target/riscv: Clear vstart_qe_zero flag

2024-03-09 Thread Daniel Henrique Barboza
From: Ivan Klokov The vstart_qe_zero flag is set at the beginning of the translation phase from the env->vstart variable. During the execution phase all functions will set env->vstart = 0 after a successful execution, but the vstart_eq_zero flag remains the same as at the start of the block.

[PATCH v9 10/10] target/riscv/vector_helper.c: optimize loops in ldst helpers

2024-03-09 Thread Daniel Henrique Barboza
Change the for loops in ldst helpers to do a single increment in the counter, and assign it env->vstart, to avoid re-reading from vstart every time. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson ---

[PATCH v9 05/10] target/riscv: use vext_set_tail_elems_1s() in vcrypto insns

2024-03-09 Thread Daniel Henrique Barboza
Vcrypto insns should also use the same helper the regular vector insns uses to update the tail elements. Move vext_set_tail_elems_1s() to vector_internals.c and make it public. Use it in vcrypto_helper.c to set tail elements instead of vext_set_elems_1s(). Helpers must set env->vstart = 0 after

[PATCH v9 08/10] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls

2024-03-09 Thread Daniel Henrique Barboza
trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson

[PATCH v9 07/10] target/riscv: remove 'over' brconds from vector trans

2024-03-09 Thread Daniel Henrique Barboza
Most of the vector translations has this following pattern at the start: TCGLabel *over = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_GEU, cpu_vstart, cpu_vl, over); And then right at the end: gen_set_label(over); return true; This means that if vstart >= vl we'll not set

[PATCH v9 04/10] target/riscv/vector_helper.c: update tail with vext_set_tail_elems_1s()

2024-03-09 Thread Daniel Henrique Barboza
Change all code that updates tail elems to use vext_set_tail_elems_1s() instead of vext_set_elems_1s(). Setting 'env->vstart=0' needs to be the very last thing a helper does because env->vstart is being checked by vext_set_tail_elems_1s(). A side effect of this change is that a lot of 'vta'

[PATCH v9 02/10] target/riscv: handle vstart >= vl in vext_set_tail_elems_1s()

2024-03-09 Thread Daniel Henrique Barboza
We're going to make changes that will required each helper to be responsible for the 'vstart' management, i.e. we will relieve the 'vstart < vl' assumption that helpers have today. To do that we'll need to deal with how we're updating tail elements first. We can't update them if vstart >= vl, but

[PATCH v9 01/10] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()

2024-03-09 Thread Daniel Henrique Barboza
The helper isn't setting env->vstart = 0 after its execution, as it is expected from every vector instruction that completes successfully. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/vector_helper.c | 1 + 1 file

[PATCH v9 06/10] trans_rvv.c.inc: set vstart = 0 in int scalar move insns

2024-03-09 Thread Daniel Henrique Barboza
trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart = 0 after execution. This is usually done by a helper in vector_helper.c but these functions don't use helpers. We'll set vstart after any potential 'over' brconds, and that will also mandate a mark_vs_dirty()

[PATCH v9 03/10] target/riscv/vector_helper.c: do vstart=0 after updating tail

2024-03-09 Thread Daniel Henrique Barboza
vext_vv_rm_1() and vext_vv_rm_2() are setting vstart = 0 before their respective callers (vext_vv_rm_2 and vext_vx_rm_2) update the tail elements. This is benign now, but we'll convert the tail updates to use vext_set_tail_elems_1s(), and this function is sensitive to vstart changes. Do vstart =

[PATCH v9 00/10] riscv: set vstart_eq_zero on mark_vs_dirty

2024-03-09 Thread Daniel Henrique Barboza
Hi, This new version has changes suggested by Richard in patches 2 and 6. Other patches are unchanged. Series based on alistair/riscv-to-apply.next. Patches missing review: 2, 3, 4, 5, 6. Changes from v8: - patch 2: - do an early exit if vstart >= vl in vext_ldst_stride(), vext_ldst_us()

Re: [PATCH v8 00/10] riscv: set vstart_eq_zero on mark_vs_dirty

2024-03-09 Thread Daniel Henrique Barboza
On 3/9/24 17:14, Richard Henderson wrote: On 3/8/24 11:53, Daniel Henrique Barboza wrote: - patch 7 (patch 3 from v7): do not remove brconds from scalar move    insns    trans_vmv_s_x() and trans_vfmv_s_f() does not have a helper that will    handle vstart >= vl for them, so they need their

Re: [PATCH v2] docs/conf.py: Remove usage of distutils

2024-03-09 Thread Peter Maydell
On Sat, 9 Mar 2024 at 18:29, Philippe Mathieu-Daudé wrote: > > On 9/3/24 18:27, Peter Maydell wrote: > > On Tue, 5 Mar 2024 at 10:39, Thomas Huth wrote: > >> Ok, while I was writing my mail, I was looking at https://brew.sh/ and > >> didn't see a link to a bug tracker there ... but now I

Re: [PATCH v8 00/10] riscv: set vstart_eq_zero on mark_vs_dirty

2024-03-09 Thread Richard Henderson
On 3/8/24 11:53, Daniel Henrique Barboza wrote: - patch 7 (patch 3 from v7): do not remove brconds from scalar move insns trans_vmv_s_x() and trans_vfmv_s_f() does not have a helper that will handle vstart >= vl for them, so they need their brcond. - patches 4 and 5 from v7: dropped.

Re: [PULL v2 0/9] Misc fixes and coverity CI for 2024-03-08

2024-03-09 Thread Peter Maydell
On Fri, 8 Mar 2024 at 18:13, Paolo Bonzini wrote: > > The following changes since commit 8f6330a807f2642dc2a3cdf33347aa28a4c00a87: > > Merge tag 'pull-maintainer-updates-060324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-06 16:56:20 +) > > are available in the Git

Re: [PULL 0/3] Hyper-V Dynamic Memory and VMBus misc small patches

2024-03-09 Thread Peter Maydell
On Fri, 8 Mar 2024 at 17:03, Maciej S. Szmigiero wrote: > > From: "Maciej S. Szmigiero" > > The following changes since commit 8f6330a807f2642dc2a3cdf33347aa28a4c00a87: > > Merge tag 'pull-maintainer-updates-060324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-06 16:56:20

[PULL 13/43] hw/xen/hvm: Propagate page_mask to a pair of functions

2024-03-09 Thread Philippe Mathieu-Daudé
We are going to replace TARGET_PAGE_MASK by a runtime variable. In order to reduce code duplication, propagate TARGET_PAGE_MASK to get_physmapping() and xen_phys_offset_to_gaddr(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Message-Id:

[PULL 24/43] qdev: Add a granule_mode property

2024-03-09 Thread Philippe Mathieu-Daudé
From: Eric Auger Introduce a new enum type property allowing to set an IOMMU granule. Values are 4k, 8k, 16k, 64k and host. This latter indicates the vIOMMU granule will match the host page size. A subsequent patch will add such a property to the virtio-iommu device. Signed-off-by: Eric Auger

[PULL 42/43] tests/unit/test-smp-parse: Test "parameter=0" SMP configurations

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The support for "parameter=0" SMP configurations is removed, and QEMU returns error for those cases. So add the related test cases to ensure parameters can't accept 0. Signed-off-by: Zhao Liu Reviewed-by: Thomas Huth Message-ID:

[PULL 19/43] hw/i386/pc: Remove pc_compat_1_4..1.7[] left over declarations

2024-03-09 Thread Philippe Mathieu-Daudé
These definitions were removed in commit ea985d235b ("pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240301185936.95175-2-phi...@linaro.org> --- include/hw/i386/pc.h | 12 1 file changed, 12

[PULL 22/43] hw/i386/pc: Have pc_init_isa() pass a NULL pci_type argument

2024-03-09 Thread Philippe Mathieu-Daudé
The "isapc" machine only provides an ISA bus, not a PCI one, and doesn't instanciate any i440FX south bridge. Its machine class defines PCMachineClass::pci_enabled = false, and pc_init1() only uses the pci_type argument when pci_enabled is true. Since for this machine the argument is not used,

[PULL 38/43] tests/unit/test-smp-parse: Test "drawers" parameter in -smp

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Although drawer was introduced to -smp along with book by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song

[PULL 36/43] tests/unit/test-smp-parse: Make test cases aware of the book/drawer

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Currently, -smp supports 2 more new levels: book and drawer. It is necessary to consider the effects of book and drawer in the test cases to ensure that the calculations are correct. This is also the preparation to add new book and drawer test cases. Signed-off-by: Zhao Liu

[PULL 27/43] hw/intc/grlib_irqmp: abort realize when ncpus value is out of range

2024-03-09 Thread Philippe Mathieu-Daudé
From: Clément Chigot Even if the error is set, the build is not aborted when the ncpus value is wrong, the return is missing. Signed-off-by: Clément Chigot Reviewed-by: Peter Maydell Fixes: 6bf1478543 ("hw/intc/grlib_irqmp: add ncpus property") Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 41/43] tests/unit/test-smp-parse: Test smp_props.has_clusters

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The smp_props.has_clusters in MachineClass is not a user configured field, and it indicates if user specifies "clusters" in -smp. After -smp parsing, other module could aware if the cluster level is configured by user. This is used when the machine has only 1 cluster since

[PULL 32/43] hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu In machine_parse_smp_config(), the number of total CPUs is calculated by: drawers * books * sockets * dies * clusters * cores * threads To avoid missing the future new topology level, use a local variable to cache the calculation result so that total CPUs are only calculated

[PULL 33/43] tests/unit/test-smp-parse: Drop the unsupported "dies=1" case

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Unsupported "parameter=1" SMP configurations is marked as deprecated, so drop the related test case. Signed-off-by: Zhao Liu Reviewed-by: Thomas Huth Message-ID: <20240308160148.3130837-5-zhao1@linux.intel.com> Signed-off-by: Philippe Mathieu-Daudé ---

[PULL 39/43] tests/unit/test-smp-parse: Test "drawers" and "books" combination case

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Since s390 machine supports both "drawers" and "books" in -smp, add the "drawers" and "books" combination test case to match the actual topology usage scenario. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth Message-ID:

[PULL 30/43] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The "parameter=0" SMP configurations have been marked as deprecated since v6.2. For these cases, -smp currently returns the warning and adjusts the zeroed parameters to 1 by default. Remove the above compatibility logic in v9.0, and return error directly if any -smp parameter is

[PULL 31/43] hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Currently, it was allowed for users to specify the unsupported topology parameter as "1". For example, x86 PC machine doesn't support drawer/book/cluster topology levels, but user could specify "-smp drawers=1,books=1,clusters=1". This is meaningless and confusing, so that the

[PULL 25/43] hmp: Add option to info qtree to omit details

2024-03-09 Thread Philippe Mathieu-Daudé
From: BALATON Zoltan The output of info qtree monitor command is very long. Add an option to print a brief overview omitting all the details. Signed-off-by: BALATON Zoltan Reviewed-by: Dr. David Alan Gilbert Message-ID: <20240307183812.0105d4e6...@zero.eik.bme.hu> Signed-off-by: Philippe

[PULL 43/43] hw/m68k/mcf5208: add support for reset

2024-03-09 Thread Philippe Mathieu-Daudé
From: Angelo Dureghello Add reset support for mcf5208. Signed-off-by: Angelo Dureghello Reviewed-by: Thomas Huth Message-ID: <20240309093459.984565-1-ang...@kernel-space.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/m68k/mcf5208.c | 44 ++-- 1

[PULL 34/43] tests/unit/test-smp-parse: Use CPU number macros in invalid topology case

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Use MAX_CPUS/MIN_CPUS macros in invalid topology case. This gives us the flexibility to change the maximum and minimum CPU limits. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth Message-ID: <20240308160148.3130837-6-zhao1@linux.intel.com>

[PULL 17/43] hw/remote/remote-obj: hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or *

[PULL 21/43] hw/i386/pc: Remove 'host_type' argument from pc_init1()

2024-03-09 Thread Philippe Mathieu-Daudé
All callers use host_type=TYPE_I440FX_PCI_HOST_BRIDGE. Directly use this definition within pc_init1(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240301185936.95175-4-phi...@linaro.org> --- hw/i386/pc_piix.c | 14 +- 1 file changed, 5

[PULL 37/43] tests/unit/test-smp-parse: Test "books" parameter in -smp

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Although book was introduced to -smp along with drawer by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song

[PULL 40/43] tests/unit/test-smp-parse: Test the full 7-levels topology hierarchy

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu Currently, -smp supports up to 7-levels topology hierarchy: -drawers/books/sockets/dies/clusters/cores/threads. Though no machine supports all these 7 levels yet, these 7 levels have the strict containment relationship and together form the generic CPU topology representation

[PULL 28/43] docs/interop/firmware.json: Align examples

2024-03-09 Thread Philippe Mathieu-Daudé
From: Thomas Weißschuh Adjust indentation for commit d23055b8db8 (qapi: Require descriptions and tagged sections to be indented). Signed-off-by: Thomas Weißschuh Reviewed-by: Markus Armbruster Message-ID: <20240307-qapi-firmware-json-v2-1-3b29eabb9...@linutronix.de> [PMD: Reword description

[PULL 15/43] hw/char/xen_console: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or *

[PULL 10/43] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'

2024-03-09 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-off-by: Philippe Mathieu-Daudé

[PULL 11/43] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS

2024-03-09 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é Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-19-phi...@linaro.org> --- hw/i386/xen/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[PULL 29/43] docs/interop/firmware.json: Fix doc for FirmwareFlashMode

2024-03-09 Thread Philippe Mathieu-Daudé
From: Thomas Weißschuh The doc title did not match the actual definition. Fixes: 2720ceda05 ("docs: expand firmware descriptor to allow flash without NVRAM") Signed-off-by: Thomas Weißschuh Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 23/43] hw/intc/apic: fix memory leak

2024-03-09 Thread Philippe Mathieu-Daudé
From: Paolo Bonzini deliver_bitmask is allocated on the heap in apic_deliver(), but there are many paths in the function that return before the corresponding g_free() is reached. Fix this by switching to g_autofree and, while at it, also switch to g_new. Do the same in apic_deliver_irq() as

[PULL 35/43] tests/unit/test-smp-parse: Bump max_cpus to 4096

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu The q35 machine is trying to support up to 4096 vCPUs [1], so it's necessary to bump max_cpus in test-smp-parse to 4096 to cover the topological needs of future machines. [1]: https://lore.kernel.org/qemu-devel/20240228143351.3967-1-anisi...@redhat.com/ Signed-off-by: Zhao Liu

[PULL 26/43] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine

2024-03-09 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland MacOS X uses multiple techniques for calibrating timers depending upon the detected hardware. One of these calibration routines compares the change in the timebase against the KeyLargo timer and uses this to recalculate the clock frequency, timebase frequency and bus

[PULL 16/43] hw/net/xen_nic: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or *

[PULL 18/43] target/i386/sev: Fix missing ERRP_GUARD() for error_prepend()

2024-03-09 Thread Philippe Mathieu-Daudé
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or *

[PULL 03/43] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2024-03-09 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 Message-Id:

[PULL 07/43] hw/xen: Rename 'ram_memory' global variable as 'xen_memory'

2024-03-09 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é Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-11-phi...@linaro.org> --- include/hw/xen/xen-hvm-common.h | 2 +-

[PULL 06/43] hw/xen: Remove unnecessary xen_hvm_inject_msi() stub

2024-03-09 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é Reviewed-by: David Woodhouse Message-Id: <20231114143816.71079-8-phi...@linaro.org> --- stubs/xen-hw-stub.c | 4 1 file changed, 4 deletions(-)

[PULL 14/43] hw/xen/hvm: Get target page size at runtime

2024-03-09 Thread Philippe Mathieu-Daudé
In order to build this file once for all targets, replace: TARGET_PAGE_BITS -> qemu_target_page_bits() TARGET_PAGE_SIZE -> qemu_target_page_size() TARGET_PAGE_MASK -> -qemu_target_page_size() Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Message-Id:

[PULL 09/43] hw/xen/xen_pt: Add missing license

2024-03-09 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é Reviewed-by: David Woodhouse Message-Id:

[PULL 01/43] hw/i386: Rename kvmvapic.c -> vapic.c

2024-03-09 Thread Philippe Mathieu-Daudé
vAPIC isn't KVM specific, so having its name prefixed 'kvm' is misleading. Rename it simply 'vapic'. Rename the single function prefixed 'kvm'. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230905145159.7898-1-phi...@linaro.org> --- hw/i386/{kvmvapic.c => vapic.c} | 5 ++---

[PULL 08/43] hw/xen: Use target-agnostic qemu_target_page_bits()

2024-03-09 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 Message-Id: <20231114143816.71079-15-phi...@linaro.org> ---

[PULL 04/43] system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'

2024-03-09 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é Reviewed-by: David Woodhouse Reviewed-by: David Hildenbrand Message-Id:

[PULL 20/43] hw/i386/pc: Use generated NotifyVmexitOption_str()

2024-03-09 Thread Philippe Mathieu-Daudé
NotifyVmexitOption_str() is QAPI-generated in "qapi/qapi-types-run-state.h", which "sysemu/runstate.h" already includes. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240301185936.95175-3-phi...@linaro.org> --- hw/i386/pc_piix.c | 4 +--- 1 file changed, 1

[PULL 05/43] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2024-03-09 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. No functional change intended. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Message-Id:

[PULL 12/43] hw/xen/hvm: Inline TARGET_PAGE_ALIGN() macro

2024-03-09 Thread Philippe Mathieu-Daudé
Use TARGET_PAGE_SIZE to calculate TARGET_PAGE_ALIGN. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Message-Id: <20231114163123.74888-2-phi...@linaro.org> --- hw/i386/xen/xen-hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/xen/xen-hvm.c

[PULL 02/43] sysemu/xen: Forbid using Xen headers in user emulation

2024-03-09 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 Message-Id: <20231114143816.71079-3-phi...@linaro.org> --- include/sysemu/xen.h | 8 1

[PULL 00/43] Misc HW patches for 2024-03-09

2024-03-09 Thread Philippe Mathieu-Daudé
The following changes since commit 84644ac1b0f80d41b8a2f66547b83b2ad4a98576: Merge tag 'darwin-20240305' of https://github.com/philmd/qemu into staging (2024-03-08 18:19:25 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-20240309 for you

Re: [PATCH v8 06/10] trans_rvv.c.inc: set vstart = 0 in int scalar move insns

2024-03-09 Thread Richard Henderson
On 3/8/24 11:53, Daniel Henrique Barboza wrote: trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart = 0 after execution. This is usually done by a helper in vector_helper.c but these functions don't use helpers. We'll set vstart after any potential 'over'

Re: [PATCH 1/2] hw/pci-host/pam: Free PAMMemoryRegion from Intel-specific bit handling

2024-03-09 Thread Bernhard Beschow
Am 9. März 2024 16:29:23 UTC schrieb "Philippe Mathieu-Daudé" : >Hi Bernhard, > >On 9/3/24 14:40, Bernhard Beschow wrote: >> The PAM bit extraction is currently spread across pam.c and the northbridge >> device models, making the extraction logic harder to comprehend. Also note >> how >>

Re: [PATCH v2] target/arm: Fix 32-bit SMOPA

2024-03-09 Thread Michael Tokarev
05.03.2024 19:39, Richard Henderson wrote: While the 8-bit input elements are sequential in the input vector, the 32-bit output elements are not sequential in the output matrix. Do not attempt to compute 2 32-bit outputs at the same time. Cc: qemu-sta...@nongnu.org Fixes: 23a5e3859f5

Re: [PATCH v8 02/10] target/riscv: handle vstart >= vl in vext_set_tail_elems_1s()

2024-03-09 Thread Richard Henderson
On 3/8/24 11:53, Daniel Henrique Barboza wrote: +static void vext_set_tail_elems_1s(CPURISCVState *env, void *vd, + uint32_t desc, uint32_t esz, + uint32_t max_elems) { uint32_t vta = vext_vta(desc); +uint32_t nf =

Re: [PATCH v2] docs/conf.py: Remove usage of distutils

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 18:27, Peter Maydell wrote: On Tue, 5 Mar 2024 at 10:39, Thomas Huth wrote: On 04/03/2024 19.04, Daniel P. Berrangé wrote: On Mon, Mar 04, 2024 at 06:11:58PM +0100, Thomas Huth wrote: On 04/03/2024 17.56, Peter Maydell wrote: On Mon, 4 Mar 2024 at 13:04, Thomas Huth wrote: The

Re: [PATCH] target/riscv: raise an exception when CSRRS/CSRRC writes a read-only CSR

2024-03-09 Thread Richard Henderson
On 3/7/24 22:40, Yu-Ming Chang via wrote: Both CSRRS and CSRRC always read the addressed CSR and cause any read side effects regardless of rs1 and rd fields. Note that if rs1 specifies a register holding a zero value other than x0, the instruction will still attempt to write the unmodified value

Re: [PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond for test comparisons

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 18:51, Richard Henderson wrote: When converting test vs UINT32_MAX to compare vs 0, we need to adjust the condition to match. Cc: qemu-sta...@nongnu.org Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX") Signed-off-by: Richard Henderson ---

Re: [PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp for test comparisons

2024-03-09 Thread Philippe Mathieu-Daudé
On 9/3/24 18:51, Richard Henderson wrote: Pass the type to tcg_out_logicali; remove the assert, duplicated at the start of tcg_out_logicali. Cc: qemu-sta...@nongnu.org Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") Oops, thanks. Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine

2024-03-09 Thread Philippe Mathieu-Daudé
On 4/3/24 08:35, Mark Cave-Ayland wrote: MacOS X uses multiple techniques for calibrating timers depending upon the detected hardware. One of these calibration routines compares the change in the timebase against the KeyLargo timer and uses this to recalculate the clock frequency, timebase

[PATCH 1/2] tcg/aarch64: Fix tcg_out_cmp for test comparisons

2024-03-09 Thread Richard Henderson
Pass the type to tcg_out_logicali; remove the assert, duplicated at the start of tcg_out_logicali. Cc: qemu-sta...@nongnu.org Fixes: 339adf2f38e ("tcg/aarch64: Support TCG_COND_TST{EQ,NE}") Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 3 +-- 1 file changed, 1

[PATCH 0/2] tcg/aarch64: Fixes for test comparisons

2024-03-09 Thread Richard Henderson
Oopsies exposed by Paolo's target/i386 changes. r~ Richard Henderson (2): tcg/aarch64: Fix tcg_out_cmp for test comparisons tcg/aarch64: Fix tcg_out_brcond for test comparisons tcg/aarch64/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1

[PATCH 2/2] tcg/aarch64: Fix tcg_out_brcond for test comparisons

2024-03-09 Thread Richard Henderson
When converting test vs UINT32_MAX to compare vs 0, we need to adjust the condition to match. Cc: qemu-sta...@nongnu.org Fixes: 34aff3c2e06 ("tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX") Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 1 + 1 file changed, 1

Re: [PATCH] usb: add support for sending MSIs from EHCI PCI devices

2024-03-09 Thread BALATON Zoltan
On Sat, 9 Mar 2024, Isaac Woods wrote: Signed-off-by: Isaac Woods --- hw/usb/hcd-ehci-pci.c| 27 +++ hw/usb/hcd-ehci-sysbus.c | 7 +++ hw/usb/hcd-ehci.c| 2 +- hw/usb/hcd-ehci.h| 2 ++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2] docs/conf.py: Remove usage of distutils

2024-03-09 Thread Peter Maydell
On Tue, 5 Mar 2024 at 10:39, Thomas Huth wrote: > > On 04/03/2024 19.04, Daniel P. Berrangé wrote: > > On Mon, Mar 04, 2024 at 06:11:58PM +0100, Thomas Huth wrote: > >> On 04/03/2024 17.56, Peter Maydell wrote: > >>> On Mon, 4 Mar 2024 at 13:04, Thomas Huth wrote: > > The macOS jobs in

Re: [PATCH 1/2] hw/pci-host/pam: Free PAMMemoryRegion from Intel-specific bit handling

2024-03-09 Thread Philippe Mathieu-Daudé
Hi Bernhard, On 9/3/24 14:40, Bernhard Beschow wrote: The PAM bit extraction is currently spread across pam.c and the northbridge device models, making the extraction logic harder to comprehend. Also note how pam_update() deals with PAM_REGIONS_COUNT, even though it handles exactly one region.

[PULL 00/11] Trivial patches for 2024-03-09

2024-03-09 Thread Michael Tokarev
The following changes since commit 84644ac1b0f80d41b8a2f66547b83b2ad4a98576: Merge tag 'darwin-20240305' of https://github.com/philmd/qemu into staging (2024-03-08 18:19:25 +) are available in the Git repository at: https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches for you

[PULL 11/11] docs/acpi/bits: add some clarity and details while also improving formating

2024-03-09 Thread Michael Tokarev
From: Ani Sinha Update bios-bits docs to add more details on why a pre-OS environment for testing bioses is useful. Add author's FOSDEM talk link. Also improve the formating of the document while at it. Signed-off-by: Ani Sinha Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev ---

[PULL 09/11] hw/pci-bridge/cxl_upstream: Fix problem with g_steal_pointer()

2024-03-09 Thread Michael Tokarev
From: Thomas Huth When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher, glib adds type safety checks to the g_steal_pointer() macro. This triggers errors in the build_cdat_table() function which uses the g_steal_pointer() for type-casting from one pointer type to the other (which

[PULL 03/11] hw/scsi/lsi53c895a: Fix typo in comment

2024-03-09 Thread Michael Tokarev
From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- hw/scsi/lsi53c895a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index d607a5f9fb..f8598a17f5 100644 ---

[PULL 07/11] qerror: QERR_DEVICE_IN_USE is no longer used, drop

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h

[PULL 10/11] hw/mem/cxl_type3: Fix problem with g_steal_pointer()

2024-03-09 Thread Michael Tokarev
From: Thomas Huth When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher, glib adds type safety checks to the g_steal_pointer() macro. This triggers errors in the ct3_build_cdat_entries_for_mr() function which uses the g_steal_pointer() for type-casting from one pointer type to the

[PULL 05/11] char: Slightly better error reporting when chardev is in use

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster Both $ qemu-system-x86_64 -chardev null,id=chr0,mux=on -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 and $ qemu-system-x86_64 -chardev null,id=chr0 -mon chardev=chr0 -mon chardev=chr0 fail with

[PULL 01/11] replay: Improve error messages about configuration conflicts

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster Improve Record/replay feature is not supported for '-rtc base=localtime' Record/replay feature is not supported for 'smp' Record/replay feature is not supported for '-snapshot' to Record/replay is not supported with -rtc base=localtime Record/replay is

[PULL 04/11] make-release: switch to .xz format by default

2024-03-09 Thread Michael Tokarev
For a long time, we provide two compression formats in the download area, .bz2 and .xz. There's absolutely no reason to provide two in parallel, .xz compresses better, and all the links we use points to .xz. Downstream distributions mostly use .xz too. For the release maintenance providing two

[PULL 02/11] hw/vfio/pci.c: Make some structure static

2024-03-09 Thread Michael Tokarev
From: Frediano Ziglio Not used outside C module. Signed-off-by: Frediano Ziglio Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by Tokarev Signed-off-by: Michael Tokarev --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 06/11] blockdev: Fix block_resize error reporting for op blockers

2024-03-09 Thread Michael Tokarev
From: Markus Armbruster When block_resize() runs into an op blocker, it creates an error like this: error_setg(errp, "Device '%s' is in use", device); Trouble is @device can be null. My system formats null as "(null)", but other systems might crash. Reproducer: 1. Create two block

[PULL 08/11] hw/cxl/cxl-cdat: Fix type of buf in ct3_load_cdat()

2024-03-09 Thread Michael Tokarev
From: Thomas Huth When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher (which we'll certainly do in the not too distant future), glib adds type safety checks to the g_steal_pointer() macro. This trigger an error in the ct3_load_cdat() function: The local char *buf variable is

[PATCH] usb: add support for sending MSIs from EHCI PCI devices

2024-03-09 Thread Isaac Woods
Signed-off-by: Isaac Woods --- hw/usb/hcd-ehci-pci.c| 27 +++ hw/usb/hcd-ehci-sysbus.c | 7 +++ hw/usb/hcd-ehci.c| 2 +- hw/usb/hcd-ehci.h| 2 ++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-ehci-pci.c

[PATCH] usb: add support for sending MSIs from EHCI PCI devices

2024-03-09 Thread Isaac Woods
This is a small patch that aims to add support for sending message-signalled interrupts from EHCI controllers on PCI busses. This was desirable for guests (in my case a hobbyist OS) that do not have support for legacy PCI interrupt routing but still want to / have to interface with EHCI

Re: [PATCH 0/2] Revert "hw/i386/pc: Confine system flash handling to pc_sysfw"

2024-03-09 Thread Alex Williamson
On Mon, 26 Feb 2024 22:59:07 +0100 Bernhard Beschow wrote: > As reported by Volker [1], commit 6f6ad2b24582 "hw/i386/pc: Confine system > flash handling to pc_sysfw" causes a regression when specifying the property > `-M pflash0` in the PCI PC machines: > qemu-system-x86_64: Property

Re: [PULL 00/14] target-arm queue

2024-03-09 Thread Peter Maydell
On Fri, 8 Mar 2024 at 15:50, Peter Maydell wrote: > > The following changes since commit 8f6330a807f2642dc2a3cdf33347aa28a4c00a87: > > Merge tag 'pull-maintainer-updates-060324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-06 16:56:20 +) > > are available in the Git

Re: [PULL 00/12] Cocoa patches for 2024-03-05

2024-03-09 Thread Peter Maydell
On Tue, 5 Mar 2024 at 11:06, Philippe Mathieu-Daudé wrote: > > The following changes since commit 52e7db443bd8d233acc3977bd150bdadb62db86c: > > Merge tag 'hppa-latest-pull-request' of > https://github.com/hdeller/qemu-hppa into staging (2024-03-04 16:01:33 +) > > are available in the Git

Re: [PATCH v3] hw/m68k/mcf5208: add support for reset

2024-03-09 Thread Thomas Huth
Am Sat, 9 Mar 2024 10:34:59 +0100 schrieb Angelo Dureghello : > Add reset support for mcf5208. > > Signed-off-by: Angelo Dureghello > --- > hw/m68k/mcf5208.c | 44 ++-- > 1 file changed, 42 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth

  1   2   >