[Stable-9.1.2 67/72] target/i386: fix hang when using slow path for ptw_setl

2024-11-18 Thread Michael Tokarev
From: Pierrick Bouvier When instrumenting memory accesses for plugin, we force memory accesses to use the slow path for mmu [1]. This create a situation where we end up calling ptw_setl_slow. This was fixed recently in [2] but the issue still could appear out of plugins use case. Since this func

Re: [QEMU PATCH v10] xen/passthrough: use gsi to map pirq when dom0 is PVH

2024-11-18 Thread Chen, Jiqian
Hi MST and Marcel, On 2024/11/19 00:05, Anthony PERARD wrote: > On Wed, Nov 06, 2024 at 02:14:18PM +0800, Jiqian Chen wrote: >> In PVH dom0, when passthrough a device to domU, QEMU code >> xen_pt_realize->xc_physdev_map_pirq wants to use gsi, but in current codes >> the gsi number is got from file

[Stable-9.1.2 65/72] linux-user/arm: Select vdso for be8 and be32 modes

2024-11-18 Thread Michael Tokarev
From: Richard Henderson In be8 mode, instructions are little-endian. In be32 mode, instructions are big-endian. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2333 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit 95c9e2209cc09453cfd49e913

[Stable-9.1.2 68/72] vfio/container: Fix container object destruction

2024-11-18 Thread Michael Tokarev
From: Cédric Le Goater When commit 96b7af4388b3 intoduced a .instance_finalize() handler, it did not take into account that the container was not necessarily inserted into the container list of the address space. Hence, if the container object is destroyed, by calling object_unref() for example,

[Stable-9.1.2 58/72] target/i386: Fix legacy page table walk

2024-11-18 Thread Michael Tokarev
From: Alexander Graf Commit b56617bbcb4 ("target/i386: Walk NPT in guest real mode") added logic to run the page table walker even in real mode if we are in NPT mode. That function then determined whether real mode or paging is active based on whether the pg_mode variable was 0. Unfortunately p

[Stable-9.1.2 70/72] Revert "hw/audio/hda: fix memory leak on audio setup"

2024-11-18 Thread Michael Tokarev
From: Paolo Bonzini This reverts commit 6d03242a7e47815ed56687ecd13f683d8da3f2fe, which causes SPICE audio to break. While arguably this is a SPICE bug, it is possible to fix the leak in a less heavy-handed way. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2639 Cc: qemu-sta...@nongnu

[Stable-9.1.2 66/72] tcg: Allow top bit of SIMD_DATA_BITS to be set in simd_desc()

2024-11-18 Thread Michael Tokarev
From: Peter Maydell In simd_desc() we create a SIMD descriptor from various pieces including an arbitrary data value from the caller. We try to sanitize these to make sure everything will fit: the 'data' value needs to fit in the SIMD_DATA_BITS (== 22) sized field. However we do that sanitizing

[Stable-9.1.2 60/72] linux-user: Fix setreuid and setregid to use direct syscalls

2024-11-18 Thread Michael Tokarev
From: Helge Deller The commit fd6f7798ac30 ("linux-user: Use direct syscalls for setuid(), etc") added direct syscall wrappers for setuid(), setgid(), etc since the system calls have different semantics than the libc functions. Add and use the corresponding wrappers for setreuid and setregid whi

[Stable-9.1.2 59/72] hw/i386/pc: Don't try to init PCI NICs if there is no PCI bus

2024-11-18 Thread Michael Tokarev
From: Peter Maydell The 'isapc' machine type has no PCI bus, but pc_nic_init() still calls pci_init_nic_devices() passing it a NULL bus pointer. This causes the clang sanitizer to complain: $ ./build/clang/qemu-system-i386 -M isapc ../../hw/pci/pci.c:1866:39: runtime error: member access within

[Stable-9.1.2 69/72] hw/misc/mos6522: Fix bad class definition of the MOS6522 device

2024-11-18 Thread Michael Tokarev
From: Thomas Huth When compiling QEMU with --enable-cfi, the "q800" m68k machine currently crashes very early, when the q800_machine_init() function tries to wire the interrupts of the "via1" device. This happens because TYPE_MOS6522_Q800_VIA1 is supposed to be a proper SysBus device, but its par

[Stable-9.1.2 71/72] hw/audio/hda: fix memory leak on audio setup

2024-11-18 Thread Michael Tokarev
From: Paolo Bonzini When SET_STREAM_FORMAT is called, the st->buft timer is overwritten, thus causing a memory leak. This was originally fixed in commit 816139ae6a5 ("hw/audio/hda: fix memory leak on audio setup", 2024-11-14) but that caused the audio to break in SPICE. Fortunately, a simpler f

[Stable-9.1.2 64/72] linux-user/arm: Reduce vdso alignment to 4k

2024-11-18 Thread Michael Tokarev
From: Richard Henderson Reduce vdso alignment to minimum page size. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit f7150b2151398c9274686d06c2c1e24618aa4cd6) Signed-off-by: Michael Tokarev diff --git a/linux-user/arm/Makefile.vdso b/linux-user/

[Stable-9.1.2 63/72] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR

2024-11-18 Thread Michael Tokarev
From: Ilya Leoshkevich Running qemu-i386 on a system running with SELinux in enforcing mode (more precisely: s390x trixie container on Fedora 40) fails with: qemu-i386: tests/tcg/i386-linux-user/sigreturn-sigmask: Unable to find a guest_base to satisfy all guest address mapping requirements

[Stable-9.1.2 62/72] accel/tcg: Fix user-only probe_access_internal plugin check

2024-11-18 Thread Michael Tokarev
From: Richard Henderson The acc_flag check for write should have been against PAGE_WRITE_ORG, not PAGE_WRITE. But it is better to combine two acc_flag checks to a single check against access_type. This matches the system code in cputlb.c. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com

[Stable-9.1.2 72/72] usb-hub: Fix handling port power control messages

2024-11-18 Thread Michael Tokarev
From: Guenter Roeck The ClearPortFeature control message fails for PORT_POWER because there is no break; at the end of the case statement, causing it to fall through to the failure handler. Add the missing break; to solve the problem. Fixes: 1cc403eb21 ("usb-hub: emulate per port power switching

[PATCH v3 16/24] migration/multifd: Send final SYNC only after device state is complete

2024-11-18 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" Currently, ram_save_complete() sends a final SYNC multifd packet near this function end, after sending all of the remaining RAM data. On the receive side, this SYNC packet will cause multifd channel threads to block, waiting for the final sem_sync posting in multifd_r

[Stable-9.1.2 61/72] target/arm: Drop user-only special case in sve_stN_r

2024-11-18 Thread Michael Tokarev
From: Richard Henderson This path is reachable with plugins enabled, and provoked with run-plugin-catch-syscalls-with-libinline.so. Cc: qemu-sta...@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-ID: <20241112141232.321354-1-richard.hender...@linaro.org> (cherry

[Stable-9.1.2 v2 00/72] Patch Round-up for stable 9.1.2, freeze on 2024-11-18

2024-11-18 Thread Michael Tokarev
The following patches are queued for QEMU stable v9.1.2: https://gitlab.com/qemu-project/qemu/-/commits/staging-9.1 Patch freeze is 2024-11-18 (today), and the release is planned for 2024-11-20: https://wiki.qemu.org/Planning/9.1 Please respond here or CC qemu-sta...@nongnu.org on any addit

RE: nested-smmuv3 topic for QEMU/libvirt, Nov 2024

2024-11-18 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Sent: Tuesday, November 19, 2024 2:00 AM >Subject: Re: nested-smmuv3 topic for QEMU/libvirt, Nov 2024 > >Hi Nicolin, > >On 11/7/24 21:31, Nicolin Chen wrote: >> Hi Eric, >> >> On Thu, Nov 07, 2024 at 12:11:05PM +0100, Eric Auger wrote: >>> O

[PATCH] arm: Remove tacoma-bmc machine

2024-11-18 Thread Cédric Le Goater
Removal was scheduled for 10.0. Use the rainier-bmc machine or the ast2600-evb as a replacement. Signed-off-by: Cédric Le Goater --- docs/about/deprecated.rst | 8 docs/about/removed-features.rst | 10 ++ docs/system/arm/aspeed.rst | 1 - hw/arm/aspeed.c

Re: [PATCH] docs: aspeed: Reorganize the "Boot options" section

2024-11-18 Thread Andrew Jeffery
On Mon, 2024-11-18 at 10:06 +0100, Cédric Le Goater wrote: > Add subsubsections for possible boot methods and introduce a new > section on eMMC boot support for the ast2600-evb and rainier-emmc > machines, boot partitions assumptions and limitations. > > Signed-off-by: Cédric Le Goater Nice! Re

Re: [PATCH for-10.0 2/7] hw/riscv/riscv-iommu: parametrize CAP.IGS

2024-11-18 Thread Alistair Francis
On Wed, Nov 6, 2024 at 11:36 PM Daniel Henrique Barboza wrote: > > Interrupt Generation Support (IGS) is a capability that is tied to the > interrupt deliver mechanism, not with the core IOMMU emulation. We > should allow device implementations to set IGS as they wish. > > A new helper is added to

Re: [PATCH 12/14] pnv/xive: Support ESB Escalation

2024-11-18 Thread Nicholas Piggin
On Wed Oct 16, 2024 at 7:13 AM AEST, Michael Kowal wrote: > From: Glenn Miles > > END notification processing has an escalation path. The escalation is > not always an END escalation but can be an ESB escalation. > > Also added a check for 'resume' processing which log a message stating it > need

Re: [PATCH] target/i386: Fix !CONFIG_SYNDBG build

2024-11-18 Thread Michael Tokarev
18.11.2024 15:39, Philippe Mathieu-Daudé wrote: On 14/11/24 13:01, Vitaly Kuznetsov wrote: Commit bbf3810f2c4f ("target/i386: Fix conditional CONFIG_SYNDBG enablement") broke !CONFIG_SYNDBG builds as hyperv_syndbg_query_options() is missing there. The idea probably was that as "hv-syndbg" is now

[Stable-7.2.15 38/39] hw/audio/hda: fix memory leak on audio setup

2024-11-18 Thread Michael Tokarev
From: Paolo Bonzini When SET_STREAM_FORMAT is called, the st->buft timer is overwritten, thus causing a memory leak. This was originally fixed in commit 816139ae6a5 ("hw/audio/hda: fix memory leak on audio setup", 2024-11-14) but that caused the audio to break in SPICE. Fortunately, a simpler f

RE: [PATCH v5 18/20] intel_iommu: Introduce a property x-flts for scalable modern mode

2024-11-18 Thread Duan, Zhenzhong
Hi Clement, >-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v5 18/20] intel_iommu: Introduce a property x-flts for >scalable modern mode > >Hi zhenzhong, >Just one comment but you can add Reviewed-by: Clément Mathieu-- >Drif > > >On 11/11/2024 09:34, Zhenzhong Duan w

Re: [PATCH 13/14] pnv/xive: Fix problem with treating NVGC as a NVP

2024-11-18 Thread Nicholas Piggin
On Wed Oct 16, 2024 at 7:13 AM AEST, Michael Kowal wrote: > From: Glenn Miles > > When booting with PHYP, the blk/index for a NVGC was being > mistakenly treated as the blk/index for a NVP. Renamed > nvp_blk/nvp_idx throughout the code to nvx_blk/nvx_idx to prevent > confusion in the future and n

Re: [PATCH v5 2/9] target/riscv: Add Ssdbltrp CSRs handling

2024-11-18 Thread Alistair Francis
On Thu, Nov 14, 2024 at 7:16 PM Clément Léger wrote: > > Add ext_ssdbltrp in RISCVCPUConfig and implement MSTATUS.SDT, > {H|M}ENVCFG.DTE and modify the availability of MTVAL2 based on the > presence of the Ssdbltrp ISA extension. > > Signed-off-by: Clément Léger Reviewed-by: Alistair Francis A

Re: [PATCH v5 18/20] intel_iommu: Introduce a property x-flts for scalable modern mode

2024-11-18 Thread CLEMENT MATHIEU--DRIF
Hi zhenzhong, Just one comment but you can add Reviewed-by: Clément Mathieu--Drif On 11/11/2024 09:34, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > Intel VT-d 3.0 in

[PULL 3/4] hw/display: factor out the scanout blob to fb conversion

2024-11-18 Thread Alex Bennée
There are two identical sequences of a code doing the same thing that raise warnings with Coverity. Before fixing those issues lets factor out the common code into a helper function we can share. Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Alex Bennée Message-Id: <202

[PULL 4/4] hw/display: check frame buffer can hold blob

2024-11-18 Thread Alex Bennée
Coverity reports (CID 1564769, 1564770) that we potentially overflow by doing some 32x32 multiplies for something that ends up in a 64 bit value. Fix this by first using stride for all lines and casting input to uint64_t to ensure a 64 bit multiply is used. Reviewed-by: Dmitry Osipenko Tested-by:

Re: [PATCH] target/loongarch: fix alignment error in tci.

2024-11-18 Thread Philippe Mathieu-Daudé
On 18/11/24 14:32, guoguangyao wrote: Add alignment and check for fpr in CPUArchState, fix alignment error in tcg interpreter when executing LASX. Signed-off-by: guoguangyao --- target/loongarch/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Dau

Re: [PATCH 0/3] hw/intc/loongarch_extioi: Fix undefined behaviour with bit array APIs

2024-11-18 Thread Philippe Mathieu-Daudé
On 8/11/24 14:55, Peter Maydell wrote: Peter Maydell (3): bitops.h: Define bit operations on 'uint32_t' arrays hw/intc/arm_gicv3: Use bitops.h uint32_t bit array functions hw/intc/loongarch_extioi: Use set_bit32() and clear_bit32() for s->isr Series: Reviewed-by: Philippe Mathieu-Daud

[Stable-9.0.4 58/71] target/i386: Fix legacy page table walk

2024-11-18 Thread Michael Tokarev
From: Alexander Graf Commit b56617bbcb4 ("target/i386: Walk NPT in guest real mode") added logic to run the page table walker even in real mode if we are in NPT mode. That function then determined whether real mode or paging is active based on whether the pg_mode variable was 0. Unfortunately p

[Stable-8.2.8 56/61] tcg: Allow top bit of SIMD_DATA_BITS to be set in simd_desc()

2024-11-18 Thread Michael Tokarev
From: Peter Maydell In simd_desc() we create a SIMD descriptor from various pieces including an arbitrary data value from the caller. We try to sanitize these to make sure everything will fit: the 'data' value needs to fit in the SIMD_DATA_BITS (== 22) sized field. However we do that sanitizing

[PULL for 9.2 0/4] updates (virtio-gpu, gdbstub testing, MAINTAINERS)

2024-11-18 Thread Alex Bennée
The following changes since commit 0fbc798e4f51d6d2bc05f4965b0eae74ba204471: Merge tag 'pull-vfio-20241118' of https://github.com/legoater/qemu into staging (2024-11-18 10:04:04 +) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-9.2-

Re: [PATCH] target/i386: Fix !CONFIG_SYNDBG build

2024-11-18 Thread Philippe Mathieu-Daudé
On 18/11/24 12:40, Michael Tokarev wrote: 18.11.2024 15:39, Philippe Mathieu-Daudé wrote: On 14/11/24 13:01, Vitaly Kuznetsov wrote: Commit bbf3810f2c4f ("target/i386: Fix conditional CONFIG_SYNDBG enablement") broke !CONFIG_SYNDBG builds as hyperv_syndbg_query_options() is missing there. The

Re: [PATCH] docs/nitro-enclave: Fix terminal commands formatting

2024-11-18 Thread Dorjoy Chowdhury
Ping. Regards, Dorjoy

Re: [PATCH] device/virtio-nsm: Support string data for extendPCR

2024-11-18 Thread Dorjoy Chowdhury
Ping. This is a small one that needs review. Regards, Dorjoy

[PULL 09/15] hw/sd/sdhci: Fix coding style

2024-11-18 Thread Philippe Mathieu-Daudé
From: Jamin Lin Fix coding style issues from checkpatch.pl Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Message-ID: <20241114094839.4128404-2-jamin_...@aspeedtech.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 64 +--

Re: [RFC PATCH 03/14] s390x/cpumodel: add msa12 changes

2024-11-18 Thread Christian Borntraeger
Am 12.11.24 um 16:54 schrieb Hendrik Brueckner: MSA12 changes the KIMD/KLMD instruction format for SHA3/SHAKE. Signed-off-by: Hendrik Brueckner Reviewed-by: Christian Borntraeger --- target/s390x/cpu_features_def.h.inc | 1 + target/s390x/gen-features.c | 8 2 files ch

tests/functional is eating disk space

2024-11-18 Thread Peter Maydell
I just ran out of disk space on my dev machine, because: $ du -h build/clang/tests/functional/ [...] 11G build/clang/tests/functional/ The new functional tests seem to be eating disk space. Even the build tree I have that's just arm targets is 7.1GB. Could you have a look at what's happenin

[PATCH v3 02/11] target/riscv: Decouple AIA processing from xiselect and xireg

2024-11-18 Thread Atish Patra
From: Kaiwen Xue Since xiselect and xireg also will be of use in sxcsrind, AIA should have its own separated interface when those CSRs are accessed. Signed-off-by: Kaiwen Xue Reviewed-by: Alistair Francis Signed-off-by: Atish Patra --- target/riscv/csr.c | 165 +++

[Stable-8.2.8 59/61] hw/misc/mos6522: Fix bad class definition of the MOS6522 device

2024-11-18 Thread Michael Tokarev
From: Thomas Huth When compiling QEMU with --enable-cfi, the "q800" m68k machine currently crashes very early, when the q800_machine_init() function tries to wire the interrupts of the "via1" device. This happens because TYPE_MOS6522_Q800_VIA1 is supposed to be a proper SysBus device, but its par

[PULL 2/4] MAINTAINERS: CC rust/ patches to qemu-rust list

2024-11-18 Thread Alex Bennée
From: Manos Pitsidianakis As of Nov 2024 [1], we have a new topical mailing list for Rust related patches. Add a new MAINTAINERS entry to touch all files under rust/ subdirectory and additionally add it to previous rust related entries. [1] https://lore.kernel.org/qemu-devel/cafeaca-zquygttg-vh

[PULL 1/4] tests/tcg: Stop using exit() in the gdbstub testcases

2024-11-18 Thread Alex Bennée
From: Ilya Leoshkevich GDB 15 does not like exit() anymore: (gdb) python exit(0) Python Exception : 0 Error occurred in Python: 0 Use the GDB's own exit command, like it's already done in a couple places, everywhere. This is the same fix as commit 93a3048dcf45 ("tests: Gently exit f

[PATCH v3 06/24] migration: Add qemu_loadvm_load_state_buffer() and its handler

2024-11-18 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" qemu_loadvm_load_state_buffer() and its load_state_buffer SaveVMHandler allow providing device state buffer to explicitly specified device via its idstr and instance id. Reviewed-by: Fabiano Rosas Signed-off-by: Maciej S. Szmigiero --- include/migration/register.h

[PATCH v3 19/24] vfio/migration: Add x-migration-multifd-transfer VFIO property

2024-11-18 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This property allows configuring at runtime whether to transfer the particular device state via multifd channels when live migrating that device. It defaults to AUTO, which means that VFIO device state transfer via multifd channels is attempted in configurations that

[PATCH v3 00/24] Multifd 🔀 device state transfer support with VFIO consumer

2024-11-18 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This is an updated v3 patch series of the v2 series located here: https://lore.kernel.org/qemu-devel/cover.1724701542.git.maciej.szmigi...@oracle.com/ Changes from v2: * Reworked the non-AIO (generic) thread pool to use Glib's GThreadPool instead of making the current

[Stable-9.0.4 63/71] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR

2024-11-18 Thread Michael Tokarev
From: Ilya Leoshkevich Running qemu-i386 on a system running with SELinux in enforcing mode (more precisely: s390x trixie container on Fedora 40) fails with: qemu-i386: tests/tcg/i386-linux-user/sigreturn-sigmask: Unable to find a guest_base to satisfy all guest address mapping requirements

[Stable-9.0.4 68/71] contrib/plugins: add compat for g_memdup2

2024-11-18 Thread Michael Tokarev
From: Alex Bennée We were premature if bumping this because some of our builds are still on older glibs. Just copy the compat handler for now and we can remove it later. Fixes: ee293103b0 (plugins: update lockstep to use g_memdup2) Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2161 Rev

[Stable-9.0.4 61/71] target/arm: Drop user-only special case in sve_stN_r

2024-11-18 Thread Michael Tokarev
From: Richard Henderson This path is reachable with plugins enabled, and provoked with run-plugin-catch-syscalls-with-libinline.so. Cc: qemu-sta...@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-ID: <20241112141232.321354-1-richard.hender...@linaro.org> (cherry

[Stable-9.0.4 67/71] target/i386: fix hang when using slow path for ptw_setl

2024-11-18 Thread Michael Tokarev
From: Pierrick Bouvier When instrumenting memory accesses for plugin, we force memory accesses to use the slow path for mmu [1]. This create a situation where we end up calling ptw_setl_slow. This was fixed recently in [2] but the issue still could appear out of plugins use case. Since this func

[Stable-9.0.4 62/71] accel/tcg: Fix user-only probe_access_internal plugin check

2024-11-18 Thread Michael Tokarev
From: Richard Henderson The acc_flag check for write should have been against PAGE_WRITE_ORG, not PAGE_WRITE. But it is better to combine two acc_flag checks to a single check against access_type. This matches the system code in cputlb.c. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com

[Stable-9.0.4 59/71] hw/i386/pc: Don't try to init PCI NICs if there is no PCI bus

2024-11-18 Thread Michael Tokarev
From: Peter Maydell The 'isapc' machine type has no PCI bus, but pc_nic_init() still calls pci_init_nic_devices() passing it a NULL bus pointer. This causes the clang sanitizer to complain: $ ./build/clang/qemu-system-i386 -M isapc ../../hw/pci/pci.c:1866:39: runtime error: member access within

[Stable-9.0.4 64/71] linux-user/arm: Reduce vdso alignment to 4k

2024-11-18 Thread Michael Tokarev
From: Richard Henderson Reduce vdso alignment to minimum page size. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit f7150b2151398c9274686d06c2c1e24618aa4cd6) Signed-off-by: Michael Tokarev diff --git a/linux-user/arm/Makefile.vdso b/linux-user/

Re: [PATCH] rust/pl011: Fix range checks for device ID accesses

2024-11-18 Thread Alex Bennée
Junjie Mao writes: > Alex Bennée writes: > >> Junjie Mao writes: >> >>> The peripheral and PrimeCell identification registers of pl011 are located >>> at >>> offset 0xFE0 - 0xFFC. To check if a read falls to such registers, the C >>> implementation checks if the offset-shifted-by-2 (not the of

[Stable-9.0.4 65/71] linux-user/arm: Select vdso for be8 and be32 modes

2024-11-18 Thread Michael Tokarev
From: Richard Henderson In be8 mode, instructions are little-endian. In be32 mode, instructions are big-endian. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2333 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit 95c9e2209cc09453cfd49e913

[Stable-9.0.4 v2 00/71] Patch Round-up for stable 9.0.4, freeze on 2024-11-18

2024-11-18 Thread Michael Tokarev
The following patches are queued for QEMU stable v9.0.4: https://gitlab.com/qemu-project/qemu/-/commits/staging-9.0 Patch freeze is 2024-11-18 (today), and the release is planned for 2024-11-20: https://wiki.qemu.org/Planning/9.0 Please respond here or CC qemu-sta...@nongnu.org on any addit

[Stable-9.0.4 69/71] hw/misc/mos6522: Fix bad class definition of the MOS6522 device

2024-11-18 Thread Michael Tokarev
From: Thomas Huth When compiling QEMU with --enable-cfi, the "q800" m68k machine currently crashes very early, when the q800_machine_init() function tries to wire the interrupts of the "via1" device. This happens because TYPE_MOS6522_Q800_VIA1 is supposed to be a proper SysBus device, but its par

[Stable-9.0.4 71/71] usb-hub: Fix handling port power control messages

2024-11-18 Thread Michael Tokarev
From: Guenter Roeck The ClearPortFeature control message fails for PORT_POWER because there is no break; at the end of the case statement, causing it to fall through to the failure handler. Add the missing break; to solve the problem. Fixes: 1cc403eb21 ("usb-hub: emulate per port power switching

[Stable-9.0.4 66/71] tcg: Allow top bit of SIMD_DATA_BITS to be set in simd_desc()

2024-11-18 Thread Michael Tokarev
From: Peter Maydell In simd_desc() we create a SIMD descriptor from various pieces including an arbitrary data value from the caller. We try to sanitize these to make sure everything will fit: the 'data' value needs to fit in the SIMD_DATA_BITS (== 22) sized field. However we do that sanitizing

Re: [PATCH] .gitlab-ci.d: Raise timeout on cross-accel build jobs to 60m

2024-11-18 Thread Thomas Huth
On 18/11/2024 16.32, Peter Maydell wrote: The current 30 minute timeout on the cross_accel_build_job template is a bit low: sometimes if the k8s runners are running slow the can hit it, for example this cross-arm64-xen-only job hit the 30 minute timeout while still not quite finished with the com

[Stable-9.0.4 60/71] linux-user: Fix setreuid and setregid to use direct syscalls

2024-11-18 Thread Michael Tokarev
From: Helge Deller The commit fd6f7798ac30 ("linux-user: Use direct syscalls for setuid(), etc") added direct syscall wrappers for setuid(), setgid(), etc since the system calls have different semantics than the libc functions. Add and use the corresponding wrappers for setreuid and setregid whi

Re: [PATCH] eif: Use stateful qcrypto apis

2024-11-18 Thread Dorjoy Chowdhury
Ping. This is also a smaller one that needs to be reviewed. Regards, Dorjoy

[PULL 03/15] hw/i386/elfboot: allocate "header" in heap

2024-11-18 Thread Philippe Mathieu-Daudé
From: Sergio Lopez In x86_load_linux(), we were using a stack-allocated array as data for fw_cfg_add_bytes(). Since the latter just takes a reference to the pointer instead of copying the data, it can happen that the contents have been overridden by the time the guest attempts to access them. In

[PULL 14/15] net: mark struct ip_header as QEMU_PACKED

2024-11-18 Thread Philippe Mathieu-Daudé
From: Peter Maydell The ip_header is not actually guaranteed to be aligned. We attempt to deal with this in some places such as net_checksum_calculate() by using stw_be_p and so on to access the fields, but this is not sufficient to be correct, because even accessing a byte member within an unali

[PULL 11/15] Revert "hw/audio/hda: fix memory leak on audio setup"

2024-11-18 Thread Philippe Mathieu-Daudé
From: Paolo Bonzini This reverts commit 6d03242a7e47815ed56687ecd13f683d8da3f2fe, which causes SPICE audio to break. While arguably this is a SPICE bug, it is possible to fix the leak in a less heavy-handed way. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2639 Cc: qemu-sta...@nongnu

[PULL 13/15] hw/net/virtio-net.c: Don't assume IP length field is aligned

2024-11-18 Thread Philippe Mathieu-Daudé
From: Peter Maydell In virtio-net.c we assume that the IP length field in the packet is aligned, and we copy its address into a uint16_t* in the VirtioNetRscUnit struct which we then dereference later. This isn't a safe assumption; it will also result in compilation failures if we mark the ip_he

Re: [PATCH 1/5] vl: fix qemu_validate_options() indention

2024-11-18 Thread Philippe Mathieu-Daudé
On 11/4/24 10:48, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- system/vl.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] hw/misc/nrf51_rng: Don't use BIT_MASK() when we mean BIT()

2024-11-18 Thread Philippe Mathieu-Daudé
On 8/11/24 13:56, Peter Maydell wrote: The BIT_MASK() macro from bitops.h provides the mask of a bit within a particular word of a multi-word bit array; it is intended to be used with its counterpart BIT_WORD() that gives the index of the word in the array. In nrf51_rng we are using it for cases

Re: [RFC PATCH 4/5] hw/arm/virt-acpi-build: Build IORT with multiple SMMU nodes

2024-11-18 Thread Eric Auger
Hi Shameer, On 11/18/24 12:44, Shameerali Kolothum Thodi wrote: > >> -Original Message- >> From: Eric Auger >> Sent: Monday, November 18, 2024 10:02 AM >> To: Shameerali Kolothum Thodi >> ; qemu-...@nongnu.org; >> qemu-devel@nongnu.org >> Cc: peter.mayd...@linaro.org; j...@nvidia.com; nic

[PULL 2/2] configure: Use -ef to compare paths

2024-11-18 Thread Paolo Bonzini
From: Akihiko Odaki configure checks if it is executed in the source directory by comparing the literal paths, but there may be multiple representations of a directory due to symbolic links. Use the -ef operator to tell if they point to the same directory. Signed-off-by: Akihiko Odaki Link: htt

[PULL 1/2] target/i386: hyperv: add stub for hyperv_syndbg_query_options

2024-11-18 Thread Paolo Bonzini
Building without CONFIG_HYPERV is currently broken due to a missing symbol 'hyperv_syndbg_query_options'. Add it to the stubs that exist for that very reasons. Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- target/i386/kvm/hyperv-stub.c | 5 + 1 file changed, 5 insertions(+)

[PATCH] target/loongarch: fix alignment error in tci.

2024-11-18 Thread guoguangyao
Add alignment and check for fpr in CPUArchState, fix alignment error in tcg interpreter when executing LASX. Signed-off-by: guoguangyao --- target/loongarch/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 86c86c6c9

Re: [PATCH v2] hw: Add "loadparm" property to scsi disk devices for booting on s390x

2024-11-18 Thread Eric Farman
On Mon, 2024-11-18 at 11:02 +0100, Thomas Huth wrote: > On 15/11/2024 15.12, Thomas Huth wrote: > > While adding the new flexible boot order feature on s390x recently, > > we missed to add the "loadparm" property to the scsi-hd and scsi-cd > > devices. This property is required on s390x to pass the

Re: [PATCH 0/5] Make WDOGCONTROL.INTEN the counter enable of the CMSDK APB Watchdog

2024-11-18 Thread Peter Maydell
On Fri, 15 Nov 2024 at 16:03, Roque Arcudia Hernandez wrote: > > The following patchset tries to address an issue where the watchdog > counter was running as soon as the device is out of reset. This > created a few problems with the firmware under test. It was pointed > out that the firmware under

[PULL 0/2] two tiny patches for the next QEMU 9.2 rc

2024-11-18 Thread Paolo Bonzini
The following changes since commit f0cfd067867668870931c9411d96cd518564b7a8: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-11-09 12:34:01 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch c

RE: [RFC PATCH 4/5] hw/arm/virt-acpi-build: Build IORT with multiple SMMU nodes

2024-11-18 Thread Shameerali Kolothum Thodi via
Hi Eric, > -Original Message- > From: Eric Auger > Sent: Monday, November 18, 2024 1:46 PM > To: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; j...@nvidia.com; nicol...@nvidia.com; > ddut...@redhat.com; Linuxarm ; Wangzhou (B) >

Re: [PATCH v2 0/2] virtio-gpu: coverity fixes

2024-11-18 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Mon, Nov 11, 2024 at 11:00:38PM +, Alex Bennée wrote: >> v2, >> >> Fixes after Dimitry's review. > > > You should CC Gerd. Since 2f8cd5a9b6 (MAINTAINERS: drop virtio-gpu maintainership) virtio-gpu is currently orphaned for maintainers. I've been reaching ou

[PATCH v3 1/2] qapi: Move include/qapi/qmp/ to include/qobject/

2024-11-18 Thread Markus Armbruster
From: Daniel P. Berrangé The general expectation is that header files should follow the same file/path naming scheme as the corresponding source file. There are various historical exceptions to this practice in QEMU, with one of the most notable being the include/qapi/qmp/ directory. Most of the

[PATCH v3 2/2] qapi: Move and rename qapi/qmp/dispatch.h to qapi/qmp-registry.h

2024-11-18 Thread Markus Armbruster
From: Daniel P. Berrangé The general expectation is that header files should follow the same file/path naming scheme as the corresponding source file. There are various historical exceptions to this practice in QEMU, with one of the most notable being the include/qapi/qmp/ directory. include/qap

Re: [PULL 0/2] two tiny patches for the next QEMU 9.2 rc

2024-11-18 Thread Peter Maydell
On Mon, 18 Nov 2024 at 13:43, Paolo Bonzini wrote: > > The following changes since commit f0cfd067867668870931c9411d96cd518564b7a8: > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging > (2024-11-09 12:34:01 +) > > are available in the Git repository at: > > https:

Re: [PATCH v4 1/6] hw/loongarch/virt: Add CPU topology support

2024-11-18 Thread Igor Mammedov
On Mon, 18 Nov 2024 17:10:29 +0100 Igor Mammedov wrote: > On Tue, 12 Nov 2024 10:17:33 +0800 > Bibo Mao wrote: > > > Add topological relationships for Loongarch VCPU and initialize > > topology member variables. Also physical cpu id calculation > > method comes from its topo information. hmm,

Re: [PATCH v1 1/2] ui/sdl2: Don't disable scanout when display is refreshed

2024-11-18 Thread Dmitry Osipenko
On 10/7/24 21:15, Akihiko Odaki wrote: > On 2024/10/07 8:43, Dmitry Osipenko wrote: >> Display refreshment is invoked by a timer and it erroneously disables >> the active scanout if it happens to be invoked after scanout has been >> enabled. This offending scanout-disable race condition with a time

Re: [PATCH-for-9.2] hw/avr/arduino: Check for CPU types in machine_run_board_init()

2024-11-18 Thread Philippe Mathieu-Daudé
On 18/11/24 13:07, Peter Maydell wrote: On Mon, 18 Nov 2024 at 13:02, Philippe Mathieu-Daudé wrote: Leverage the common code introduced in commit c9cf636d48 ("machine: Add a valid_cpu_types property") to check for the single valid CPU type. This allows reporting an error for invalid CPUs:

Re: [PULL 3/3] vfio/container: Fix container object destruction

2024-11-18 Thread Cédric Le Goater
Michael, On 11/18/24 09:37, Cédric Le Goater wrote: When commit 96b7af4388b3 intoduced a .instance_finalize() handler, it did not take into account that the container was not necessarily inserted into the container list of the address space. Hence, if the container object is destroyed, by callin

[PATCH v3 0/2] include: move include/qapi/qmp/ to include/qobject/

2024-11-18 Thread Markus Armbruster
To repeat the 1st patch commit message... The general expectation is that header files should follow the same file/path naming scheme as the corresponding source file. There are various historical exceptions to this practice in QEMU, with one of the most notable being the include/qapi/qmp/ directo

Re: [PATCH v2] hw: Add "loadparm" property to scsi disk devices for booting on s390x

2024-11-18 Thread Jared Rossi
Loadparm set with boot index works properly and I confirmed the getter/setter are working as well. On 11/18/24 10:29 AM, Jared Rossi wrote: Looks OK to me. Reviewed-by Jared Rossi On 11/15/24 9:12 AM, Thomas Huth wrote: While adding the new flexible boot order feature on s390x recently, we

Re: [PATCH v3] rust/pl011: Fix DeviceID reads

2024-11-18 Thread Manos Pitsidianakis
On Mon, 18 Nov 2024 13:40, Alex Bennée wrote: >Manos Pitsidianakis writes: > >> DeviceId, which maps the peripheral and PCell registers of a PL011 >> device, was not treating each register value as a 32 bit value. >> >> Change DeviceId enum to return register values via constified getter >> funct

[PULL 0/3] vfio queue

2024-11-18 Thread Cédric Le Goater
The following changes since commit abb1565d3d863cf210f18f70c4a42b0f39b8ccdb: Merge tag 'pull-tcg-20241116' of https://gitlab.com/rth7680/qemu into staging (2024-11-16 18:16:46 +) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-vfio-2024111

Re: [PATCH v4 3/6] hw/loongarch/virt: Add generic function to init interrupt pin of CPU

2024-11-18 Thread Igor Mammedov
On Tue, 12 Nov 2024 10:17:35 +0800 Bibo Mao wrote: > Here generic function virt_init_cpu_irq() is added to init interrupt > pin of CPU object, IPI and extioi interrupt controllers are connected > to interrupt pin of CPU object. > > The generic function can be used to both cold-plug and hot-plug

Re: [RESEND PATCH 10/10] usb-hub: Fix handling port power control messages

2024-11-18 Thread Philippe Mathieu-Daudé
On 12/11/24 17:01, Guenter Roeck wrote: The ClearPortFeature control message fails for PORT_POWER because there is no break; at the end of the case statement, causing it to fall through to the failure handler. Add the missing break; to solve the problem. Signed-off-by: Guenter Roeck --- Change

Re: [PATCH] vpc: Read images exported from Azure correctly

2024-11-18 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > It was found that 'qemu-nbd' is not able to work with some disk images > exported from Azure. Looking at the 512b footer (which contains VPC > metadata): > > 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix| > 0010 ff ff ff ff ff ff ff

Re: [PULL 0/3] vfio queue

2024-11-18 Thread Peter Maydell
ilable in the Git repository at: > > https://github.com/legoater/qemu/ tags/pull-vfio-20241118 > > for you to fetch changes up to ebbf7c60bbd1ceedf9faf962e428ceda2388c248: > > vfio/container: Fix container object destruction (2024-11-18 08:40:06 +0100) > >

[PULL 2/3] vfio/igd: fix calculation of graphics stolen memory

2024-11-18 Thread Cédric Le Goater
From: Corvin Köhne When copying the calculation of the stolen memory size for Intels integrated graphics device of gen 9 and later from the Linux kernel [1], we missed subtracting 0xf0 from the graphics mode select value for values above 0xf0. This leads to QEMU reporting a very large size of the

[PULL 3/3] vfio/container: Fix container object destruction

2024-11-18 Thread Cédric Le Goater
When commit 96b7af4388b3 intoduced a .instance_finalize() handler, it did not take into account that the container was not necessarily inserted into the container list of the address space. Hence, if the container object is destroyed, by calling object_unref() for example, before vfio_address_space

Re: [RFC PATCH 01/14] s390x/cpumodel: add msa10 subfunctions

2024-11-18 Thread Christian Borntraeger
Am 12.11.24 um 16:54 schrieb Hendrik Brueckner: MSA10 introduces new AES XTS subfunctions. Signed-off-by: Hendrik Brueckner Reviewed-by: Christian Borntraeger --- target/s390x/cpu_features.c | 2 ++ target/s390x/cpu_features_def.h.inc | 6 ++ target/s390x/cpu_models.c

Re: [RESEND PATCH 10/10] usb-hub: Fix handling port power control messages

2024-11-18 Thread Guenter Roeck
On 11/18/24 08:37, Michael Tokarev wrote: 12.11.2024 20:01, Guenter Roeck wrote: The ClearPortFeature control message fails for PORT_POWER because there is no break; at the end of the case statement, causing it to fall through to the failure handler. Add the missing break; to solve the problem.

Re: [RESEND PATCH 10/10] usb-hub: Fix handling port power control messages

2024-11-18 Thread Michael Tokarev
12.11.2024 20:01, Guenter Roeck wrote: The ClearPortFeature control message fails for PORT_POWER because there is no break; at the end of the case statement, causing it to fall through to the failure handler. Add the missing break; to solve the problem. Signed-off-by: Guenter Roeck --- Change f

  1   2   3   >