Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-22 Thread Michael S. Tsirkin
On Wed, Jan 22, 2025 at 02:42:14PM +0100, Stefano Garzarella wrote: > On Tue, Jan 21, 2025 at 11:00:29AM +0100, Laurent Vivier wrote: > > In vhost_user_receive() if vhost_net_notify_migration_done() reports > > an error we display on the console: > > > > Vhost user backend fails to broadcast fake

[PATCH] Fix a data race with goflag in rcutorture test

2025-01-22 Thread Vitalii Mordan
This patch addresses a potential data race involving the global variable goflag in the rcutorture test. The issue is resolved by adding the atomic qualifier to ensure proper synchronization. Fixes: 8fda74a52b ("rcu: add rcutorture") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2750 Sign

Re: CXL emulation on aarch64

2025-01-22 Thread Jonathan Cameron via
On Fri, 17 Jan 2025 09:43:11 + Jonathan Cameron via wrote: > On Fri, 17 Jan 2025 10:13:41 +0900 > Itaru Kitayama wrote: > > > > On Jan 16, 2025, at 19:58, Jonathan Cameron > > > wrote: > > > > > > On Thu, 16 Jan 2025 15:04:53 +0900 > > > Itaru Kitayama wrote: > > > > > >> Hi Jonath

Re: [PATCH 03/10] rust: pl011: extract conversion to RegisterOffset

2025-01-22 Thread Zhao Liu
On Fri, Jan 17, 2025 at 10:26:50AM +0100, Paolo Bonzini wrote: > Date: Fri, 17 Jan 2025 10:26:50 +0100 > From: Paolo Bonzini > Subject: [PATCH 03/10] rust: pl011: extract conversion to RegisterOffset > X-Mailer: git-send-email 2.47.1 > > As an added bonus, this also makes the new function return

Re: [PATCH 2/7] guest_memfd: Introduce an object to manage the guest-memfd with RamDiscardManager

2025-01-22 Thread Peter Xu
On Wed, Jan 22, 2025 at 05:41:31PM +0800, Xu Yilun wrote: > On Wed, Jan 22, 2025 at 03:30:05PM +1100, Alexey Kardashevskiy wrote: > > > > > > On 22/1/25 02:18, Peter Xu wrote: > > > On Tue, Jun 25, 2024 at 12:31:13AM +0800, Xu Yilun wrote: > > > > On Mon, Jan 20, 2025 at 03:46:15PM -0500, Peter X

Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-22 Thread Laurent Vivier
On 22/01/2025 17:20, Stefano Garzarella wrote: On Wed, Jan 22, 2025 at 08:59:22AM -0500, Michael S. Tsirkin wrote: On Wed, Jan 22, 2025 at 02:42:14PM +0100, Stefano Garzarella wrote: On Tue, Jan 21, 2025 at 11:00:29AM +0100, Laurent Vivier wrote: > In vhost_user_receive() if vhost_net_notify_mi

Re: [RFC PATCH] Fix race in live migration failure path

2025-01-22 Thread Peter Xu
Hi, Shivam, On Wed, Jan 22, 2025 at 10:54:17AM +, Shivam Kumar wrote: > There is one place where we set the migration status to FAILED but we don’t > set > s->error, i.e. in save_snapshot workflow, please check qemu_savevm_state but > not sure setting s->error in this case is possible (or req

Re: [PATCH 03/10] rust: pl011: extract conversion to RegisterOffset

2025-01-22 Thread Zhao Liu
> > > -pub fn read(&mut self, offset: hwaddr, _size: c_uint) -> > > > std::ops::ControlFlow { > > > +fn regs_read(&mut self, offset: RegisterOffset) -> ControlFlow > > u32> { > > > use RegisterOffset::*; > > > > Can we move this "use" to the start of the file? > > I don't think

[RFC 1/1 v3] target/riscv: use tcg ops generation to emulate whole reg rvv loads/stores.

2025-01-22 Thread Paolo Savini
This patch replaces the use of a helper function with direct tcg ops generation in order to emulate whole register loads and stores. This is done in order to improve the performance of QEMU. We still use the helper function when vstart is not 0 at the beginning of the emulation of the whole registe

[RFC 0/1 v3] target/riscv: use tcg ops generation to emulate whole reg rvv loads/stores.

2025-01-22 Thread Paolo Savini
Previous versions: - RFC v1: https://lore.kernel.org/all/20241218170840.1090473-1-paolo.sav...@embecosm.com/ - RFC v2: https://lore.kernel.org/all/20241220153834.16302-1-paolo.sav...@embecosm.com/ Thanks Max for the feedback here: https://lore.kernel.org/all/258795e9-4e97-4cd7-949f-24e88d24f..

Re: [PATCH 05/10] rust: pl011: pull interrupt updates out of read/write ops

2025-01-22 Thread Paolo Bonzini
Il mer 22 gen 2025, 17:31 Zhao Liu ha scritto: > > if event == bindings::QEMUChrEvent::CHR_EVENT_BREAK && > !self.loopback_enabled() { > > -self.put_fifo(registers::Data::BREAK.into()); > > +let update = self.put_fifo(registers::Data::BREAK.into()); > > We can omi

Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-22 Thread Stefano Garzarella
On Wed, Jan 22, 2025 at 05:41:15PM +0100, Laurent Vivier wrote: On 22/01/2025 17:20, Stefano Garzarella wrote: On Wed, Jan 22, 2025 at 08:59:22AM -0500, Michael S. Tsirkin wrote: On Wed, Jan 22, 2025 at 02:42:14PM +0100, Stefano Garzarella wrote: On Tue, Jan 21, 2025 at 11:00:29AM +0100, Laure

[PATCH 3/4] vfio/igd: refactor vfio_probe_igd_bar4_quirk() into pci config quirk

2025-01-22 Thread Tomita Moeko
The actual IO BAR4 write quirk in vfio_probe_igd_bar4_quirk() was removed in previous change, leaving the function not matching its name, so move it into the newly introduced vfio_config_quirk_setup(). There is no functional change in this commit. If any failure occurs, the function simply returns

[PATCH 2/4] vfio/pci: add placeholder for device-specific config space quirks

2025-01-22 Thread Tomita Moeko
Some devices, such as IGD, require device-specific quirks to be applied to their pci config spaces. Currently, these quirks are either part of BAR quirk, or being a part of vfio_realize(). Add a placeholder for pci config quirks for moving the quirks to one place later. Signed-off-by: Tomita Moeko

[PATCH 0/4] vfio/igd: remove incorrect IO BAR4 quirk

2025-01-22 Thread Tomita Moeko
Based on experiments and reverse engineering about the mysterious IO BAR4, it appears that the current quirk implementation is incorrect. As discussed in a previous mail thread [1], current implementation believes VBIOS is writing HPA of Data Stolen Memory (DSM) in GTT entries, so it intercepts and

[PATCH 1/4] vfio/igd: remove GTT write quirk in IO BAR 4

2025-01-22 Thread Tomita Moeko
The IO BAR4 of IGD devices contains a pair of 32-bit address/data registers, MMIO_Index (0x0) and MMIO_Data (0x4), which provide access to the MMIO BAR0 (GTTMMADR) from IO space. These registers are probably only used by the VBIOS, and are not documented by intel. The observed layout of MMIO_Index

Re: [PATCH v4 3/3] coreaudio: Initialize the buffer for device change

2025-01-22 Thread Christian Schoenebeck
On Friday, January 17, 2025 7:47:02 AM CET Akihiko Odaki wrote: > Reallocate buffers when the active device change as the required buffer > size may differ. > > Signed-off-by: Akihiko Odaki OTOH it also re-allocates the buffer when the size did not change, but Ok. Acked-by: Christian Schoenebec

Re: [PATCH v3 1/1] system/physmem: take into account fd_offset for file fallocate

2025-01-22 Thread Peter Xu
On Wed, Jan 22, 2025 at 07:40:53PM +, “William Roche wrote: > From: William Roche > > Punching a hole in a file with fallocate needs to take into account the > fd_offset value for a correct file location. > But guest_memfd internal use doesn't currently consider fd_offset. > > Fixes: 4b870dc

Re: [PATCH] crypto: fix bogus error benchmarking pbkdf on fast machines

2025-01-22 Thread Daniel P . Berrangé
On Wed, Jan 22, 2025 at 10:19:41PM +0300, Michael Tokarev wrote: > 08.01.2025 21:43, Daniel P. Berrangé пишет: > > We're seeing periodic reports of errors like: > > > > $ qemu-img create -f luks --object secret,data=123456,id=sec0 \ > >-o key-secret=sec0 luks-info.img 1M > >

[PATCH 1/2] hw/hppa: Support up to 256 GiB RAM on 64-bit machines

2025-01-22 Thread deller
From: Helge Deller Allow up to 256 GB RAM, which is the maximum a rp8440 machine (the very last 64-bit PA-RISC machine) physically supports. Signed-off-by: Helge Deller --- hw/hppa/hppa_hardware.h | 2 ++ hw/hppa/machine.c | 26 +++--- 2 files changed, 21 insertions(

[PATCH 0/2] hppa updates

2025-01-22 Thread deller
From: Helge Deller Two patches: The first fixes booting a Linux kernel which is provided on the command line. The second patch adds support for more than 4GB RAM on 64-bit boxes (requires additional patch for SeaBIOS-hppa which will be pushed before qemu v10). Helge Deller (2): hw/hppa: Suppor

[PATCH 2/2] hw/hppa: Fix booting Linux kernel with initrd

2025-01-22 Thread deller
From: Helge Deller Commit 20f7b890173b ("hw/hppa: Reset vCPUs calling resettable_reset()") broke booting the Linux kernel with initrd which may have been provided on the command line. The problem is, that the mentioned commit zeroes out initial registers which were preset with addresses for the L

Re: [PATCH v2 1/1] system/physmem: take into account fd_offset for file fallocate

2025-01-22 Thread William Roche
On 1/22/25 09:01, David Hildenbrand wrote: On 21.01.25 23:54, “William Roche wrote: From: William Roche [...] --- a/system/physmem.c +++ b/system/physmem.c @@ -3655,6 +3655,7 @@ int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length)   need_madvise = (rb->page_size ==

Re: [PATCH v4 1/3] coreaudio: Commit the result of init in the end

2025-01-22 Thread Christian Schoenebeck
On Friday, January 17, 2025 7:47:00 AM CET Akihiko Odaki wrote: > init_out_device may only commit some part of the result and leave the > state inconsistent when it encounters a fatal error or the device gets > unplugged during the operation, which is expressed by > kAudioHardwareBadObjectError or

[PATCH v3 1/1] system/physmem: take into account fd_offset for file fallocate

2025-01-22 Thread “William Roche
From: William Roche Punching a hole in a file with fallocate needs to take into account the fd_offset value for a correct file location. But guest_memfd internal use doesn't currently consider fd_offset. Fixes: 4b870dc4d0c0 ("hostmem-file: add offset option") Signed-off-by: William Roche ---

[PATCH v3 0/1] fallocate missing fd_offset

2025-01-22 Thread “William Roche
From: William Roche Working on the poisoned memory recovery mechanisms with David Hildenbrand, it appeared that the file hole punching done with the memory discard functions are missing the file offset value fd_offset to correctly modify the right file location. Note that guest_memfd would not c

Re: [PATCH] crypto: fix bogus error benchmarking pbkdf on fast machines

2025-01-22 Thread Michael Tokarev
08.01.2025 21:43, Daniel P. Berrangé пишет: We're seeing periodic reports of errors like: $ qemu-img create -f luks --object secret,data=123456,id=sec0 \ -o key-secret=sec0 luks-info.img 1M Formatting 'luks-info.img', fmt=luks size=1048576 key-secret=sec0 qemu-img: luks-

Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-22 Thread Laurent Vivier
On 22/01/2025 17:51, Stefano Garzarella wrote: On Wed, Jan 22, 2025 at 05:41:15PM +0100, Laurent Vivier wrote: On 22/01/2025 17:20, Stefano Garzarella wrote: On Wed, Jan 22, 2025 at 08:59:22AM -0500, Michael S. Tsirkin wrote: On Wed, Jan 22, 2025 at 02:42:14PM +0100, Stefano Garzarella wrote:

Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-22 Thread Daniel P . Berrangé
On Wed, Jan 22, 2025 at 06:22:06PM +0100, Laurent Vivier wrote: > On 22/01/2025 17:51, Stefano Garzarella wrote: > > On Wed, Jan 22, 2025 at 05:41:15PM +0100, Laurent Vivier wrote: > > > On 22/01/2025 17:20, Stefano Garzarella wrote: > > > > On Wed, Jan 22, 2025 at 08:59:22AM -0500, Michael S. Tsir

Re: [PATCH] hw/boards: Convert MachineClass bitfields to boolean

2025-01-22 Thread Pierrick Bouvier
On 1/22/25 02:32, Philippe Mathieu-Daudé wrote: As Daniel mentioned: "The number of instances of MachineClass is not large enough that we save a useful amount of memory through bitfields." Also, see recent commit ecbf3567e21 ("docs/devel/style: add a section about bitfield, and disallow th

Re: [RFC 1/1 v3] target/riscv: use tcg ops generation to emulate whole reg rvv loads/stores.

2025-01-22 Thread Alex Bennée
Paolo Savini writes: > This patch replaces the use of a helper function with direct tcg ops > generation > in order to emulate whole register loads and stores. This is done in order to > improve the performance of QEMU. Generally having the frontend second guess what the backend will do is not

Re: [PATCH] tests/functional: Fix the aarch64_tcg_plugins test

2025-01-22 Thread Alex Bennée
Thomas Huth writes: > Unfortunately, this test had not been added to meson.build, so we did > not notice a regression: Looking for 'Kernel panic - not syncing: VFS:' > as the indication for the final boot state of the kernel was a bad > idea since 'Kernel panic - not syncing' is the default failu

Re: [PATCH] tests/functional: Fix the aarch64_tcg_plugins test

2025-01-22 Thread Thomas Huth
On 22/01/2025 18.33, Alex Bennée wrote: Thomas Huth writes: Unfortunately, this test had not been added to meson.build, so we did not notice a regression: Looking for 'Kernel panic - not syncing: VFS:' as the indication for the final boot state of the kernel was a bad idea since 'Kernel panic

Re: [PATCH v2 02/10] gdbstub: Clarify no more than @gdb_num_core_regs can be accessed

2025-01-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Both CPUClass::gdb_read_register() and CPUClass::gdb_write_register() > handlers are called from common gdbstub code, and won't be called with > register index over CPUClass::gdb_num_core_regs: > > int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) >

Re: [RFC v3 4/5] virtio: add in_xlat_addr & out_xlat_addr VirtQueueElement members

2025-01-22 Thread Si-Wei Liu
On 1/16/2025 11:02 AM, Eugenio Perez Martin wrote: On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: Adds the in_xlat_addr & out_xlat_addr hwaddr arrays to the VirtQueueElement struct and introduces an optional GPA output parameter to dma_memory_map(). These arrays will store a VirtQueue

[PATCH v2 2/2] MAINTAINERS: Add me as the maintainer for ivshmem-pci

2025-01-22 Thread Gustavo Romero
Add me as the maintainer for the ivshmem-pci device and for the ivshmem server and client tool. Signed-off-by: Gustavo Romero --- MAINTAINERS | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 846b81e3ec..8327ce9c79 100644 --- a/MAINTAINER

[PATCH v2 0/2] Add me as the maintainer for ivshmem-pci

2025-01-22 Thread Gustavo Romero
Add me as the maintainer for the ivshmem-pci.c device, the ivshmem server, and the ivshmem client tool. Also, adjust remaining parts left behind after ivshmem PCI device was renamed from ivshmem.c to ivshmem-pci.c, like header files, Kconfig, docs, and build scripts. Cheers, Gustavo Gustavo Rome

Re: [PATCH v4 1/7] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

2025-01-22 Thread Helge Deller
* Laurent Vivier : > [...] > It would be cleaner to replace all the IFA_XXX by their QEMU_IFA_XXX. Thanks for review, Laurent! Below I've merged patch #1 and #7, as suggested by you. Is this OK? Can you review? Thanks! Helge From: Helge Deller Date: Mon

Re: [PATCH] hw/boards: Convert MachineClass bitfields to boolean

2025-01-22 Thread Philippe Mathieu-Daudé
On 22/1/25 16:27, Thomas Huth wrote: On 22/01/2025 15.33, Peter Maydell wrote: On Wed, 22 Jan 2025 at 12:36, Thomas Huth wrote: On 22/01/2025 11.32, Philippe Mathieu-Daudé wrote: As Daniel mentioned:    "The number of instances of MachineClass is not large enough     that we save a useful a

Re: [PATCH 05/10] rust: vmstate: implement VMState for scalar types

2025-01-22 Thread Paolo Bonzini
On 1/22/25 13:33, Zhao Liu wrote: On Fri, Jan 17, 2025 at 10:00:41AM +0100, Paolo Bonzini wrote: Date: Fri, 17 Jan 2025 10:00:41 +0100 From: Paolo Bonzini Subject: [PATCH 05/10] rust: vmstate: implement VMState for scalar types X-Mailer: git-send-email 2.47.1 Scalar types are those that have t

Re: [PATCH v4 1/7] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

2025-01-22 Thread Laurent Vivier
Le 20/01/2025 à 22:33, del...@kernel.org a écrit : From: Helge Deller Fixes this warning: Unknown host IFA type: 11 IFA_PROTO has been introduced in kernel v5.18, and as such using it unconditionally breaks build on Ubuntu 22.04. Instead convert the IFA_XXX values to QEMU_IDA_XXX values and

Re: [PATCH v4 7/7] linux-user: netlink: Use QEMU_IFA_XXX values instead of IFA_XXX

2025-01-22 Thread Laurent Vivier
Le 20/01/2025 à 22:33, del...@kernel.org a écrit : From: Helge Deller Convert existing places to use QEMU_IFA_XXX values. Signed-off-by: Helge Deller --- linux-user/fd-trans.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux-user/fd-trans.c b/linux

[PATCH 4/4] vfio/igd: do not include GTT stolen size in etc/igd-bdsm-size

2025-01-22 Thread Tomita Moeko
Though GTT Stolen Memory (GSM) is right below Data Stolen Memory (DSM) in host address space, direct access to GSM is prohibited, and it is not mapped to guest address space. Both host and guest accesses GSM indirectly through the second half of MMIO BAR0 (GTTMMADR). Guest firmware only need to re

Re: [PATCH v5 0/8] Support virtio-gpu DRM native context

2025-01-22 Thread Alex Bennée
Dmitry Osipenko writes: > This patchset adds DRM native context support to VirtIO-GPU on Qemu. > > Contarary to Virgl and Venus contexts that mediates high level GFX APIs, > DRM native context [1] mediates lower level kernel driver UAPI, which > reflects in a less CPU overhead and less/simpler co

Re: [PATCH v2 08/10] gdbstub: Prefer cached CpuClass over CPU_GET_CLASS() macro

2025-01-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > CpuState caches its CPUClass since commit 6fbdff87062 > ("cpu: cache CPUClass in CPUState for hot code paths"), > use it. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead

Re: [PATCH v3 1/1] system/physmem: take into account fd_offset for file fallocate

2025-01-22 Thread David Hildenbrand
On 22.01.25 20:40, “William Roche wrote: From: William Roche Punching a hole in a file with fallocate needs to take into account the fd_offset value for a correct file location. But guest_memfd internal use doesn't currently consider fd_offset. Fixes: 4b870dc4d0c0 ("hostmem-file: add offset op

[PATCH v2 1/2] hw/misc/ivshmem-pci: Rename remaining parts for consistency

2025-01-22 Thread Gustavo Romero
For consistency, rename the remaining parts of ivshmem PCI device after it was renamed from ivshmem to ivshmem-pci. Signed-off-by: Gustavo Romero --- contrib/ivshmem-client/ivshmem-client.h | 2 +- contrib/ivshmem-server/ivshmem-server.h | 2 +- docs/system/device-emula

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-22 Thread Jason Wang
On Wed, Jan 22, 2025 at 3:55 PM Eric Auger wrote: > > Hi Jason, > > > On 1/22/25 8:17 AM, Jason Wang wrote: > > On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: > >> > >> Hi Jason, > >> > >> On 1/21/25 4:27 AM, Jason Wang wrote: > >>> On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: > Wh

Re: [PATCH] target/i386: extract common bits of gen_repz/gen_repz_nz

2025-01-22 Thread Richard Henderson
On 1/22/25 01:50, Paolo Bonzini wrote: Now that everything has been cleaned up, look at DF and prefixes in a single function, and call that one from gen_repz and gen_repz_nz. Based-on:<20241215090613.89588-1-pbonz...@redhat.com> Suggested-by: Richard Henderson Signed-off-by: Paolo Bonzini ---

Re: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell

2025-01-22 Thread Zhao Liu
On Fri, Jan 17, 2025 at 10:26:54AM +0100, Paolo Bonzini wrote: > Date: Fri, 17 Jan 2025 10:26:54 +0100 > From: Paolo Bonzini > Subject: [PATCH 07/10] rust: pl011: wrap registers with BqlRefCell > X-Mailer: git-send-email 2.47.1 > > This is a step towards making memory ops use a shared reference t

Re: [PATCH 08/10] rust: pl011: remove duplicate definitions

2025-01-22 Thread Zhao Liu
On Fri, Jan 17, 2025 at 10:26:55AM +0100, Paolo Bonzini wrote: > Date: Fri, 17 Jan 2025 10:26:55 +0100 > From: Paolo Bonzini > Subject: [PATCH 08/10] rust: pl011: remove duplicate definitions > X-Mailer: git-send-email 2.47.1 > > Unify the "Interrupt" enum and the "INT_*" constants with a struct

Re: [PATCH 06/10] rust: pl011: extract PL011Registers

2025-01-22 Thread Zhao Liu
> --- a/rust/hw/char/pl011/src/device_class.rs > +++ b/rust/hw/char/pl011/src/device_class.rs > @@ -6,11 +6,11 @@ > use std::os::raw::{c_int, c_void}; > > use qemu_api::{ > -bindings::*, c_str, vmstate_clock, vmstate_fields, vmstate_of, > vmstate_subsections, > -vmstate_unused, zeroabl

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2025-01-22 Thread Nicolin Chen
Hi Don, On Fri, Jan 10, 2025 at 11:05:24PM -0500, Donald Dutile wrote: > On 1/8/25 11:45 PM, Nicolin Chen wrote: > > On Mon, Dec 16, 2024 at 10:01:29AM +, Shameerali Kolothum Thodi wrote: > > > And patches prior to this commit adds that support: > > > 4ccdbe3: ("cover-letter: Add HW accelerate

Re: [PATCH 09/10] rust: pl011: pull device-specific code out of MemoryRegionOps callbacks

2025-01-22 Thread Zhao Liu
On Fri, Jan 17, 2025 at 10:26:56AM +0100, Paolo Bonzini wrote: > Date: Fri, 17 Jan 2025 10:26:56 +0100 > From: Paolo Bonzini > Subject: [PATCH 09/10] rust: pl011: pull device-specific code out of > MemoryRegionOps callbacks > X-Mailer: git-send-email 2.47.1 > > read() can now return a simple u64

Re: [PATCH 10/10] rust: qdev: make reset take a shared reference

2025-01-22 Thread Zhao Liu
On Fri, Jan 17, 2025 at 10:26:57AM +0100, Paolo Bonzini wrote: > Date: Fri, 17 Jan 2025 10:26:57 +0100 > From: Paolo Bonzini > Subject: [PATCH 10/10] rust: qdev: make reset take a shared reference > X-Mailer: git-send-email 2.47.1 > > Because register reset is within a borrow_mut() call, reset >

[PATCH v5 0/4] coreaudio fixes

2025-01-22 Thread Akihiko Odaki
This series contains two fixes for coreaudio. See each one for details. Signed-off-by: Akihiko Odaki --- Changes in v5: - Added patch "coreaudio: Improve naming", removing verbose names like outputDeviceID and audioDevicePropertyBufferFrameSize altogether. - Link to v4: https://lore.kernel.org

[PATCH v5 1/4] coreaudio: Improve naming

2025-01-22 Thread Akihiko Odaki
coreaudio had names that are not conforming to QEMU codding style. coreaudioVoiceOut also had some members that are prefixed with redundant words like "output" or "audio". Global names included "out" to tell they are specific to output devices, but this rule was not completely enforced. The frame s

[PATCH v5 3/4] audio: Add functions to initialize buffers

2025-01-22 Thread Akihiko Odaki
These functions can be used to re-initialize buffers when hardware parameters change due to device hotplug, for example. Signed-off-by: Akihiko Odaki Reviewed-by: Phil Dennis-Jordan Reviewed-by: Christian Schoenebeck --- audio/audio_int.h | 2 ++ audio/audio.c | 24 ++-

[PATCH v5 2/4] coreaudio: Commit the result of init in the end

2025-01-22 Thread Akihiko Odaki
init_out_device may only commit some part of the result and leave the state inconsistent when it encounters a fatal error or the device gets unplugged during the operation, which is expressed by kAudioHardwareBadObjectError or kAudioHardwareBadDeviceError. Commit the result in the end of the functi

[PATCH v5 4/4] coreaudio: Initialize the buffer for device change

2025-01-22 Thread Akihiko Odaki
Reallocate buffers when the active device change as the required buffer size may differ. Signed-off-by: Akihiko Odaki Reviewed-by: Phil Dennis-Jordan Acked-by: Christian Schoenebeck --- audio/coreaudio.m | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/coreaudio.m b/audio/coreaudio.m

[PULL v2 0/9] s390x and test patches 2025-01-21

2025-01-22 Thread Thomas Huth
Hi Stefan! The following changes since commit d6430c17d7113d3c38480dc34e59d00b0504e2f7: Merge tag 'pull-riscv-to-apply-20250119-1' of https://github.com/alistair23/qemu into staging (2025-01-19 08:55:46 -0500) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/

Re: [PATCH v2 1/1] system/physmem: take into account fd_offset for file fallocate

2025-01-22 Thread David Hildenbrand
On 21.01.25 23:54, “William Roche wrote: From: William Roche Punching a hole in a file with fallocate needs to take into account the fd_offset value for a correct file location. But guest_memfd internal use doesn't currently consider fd_offset. Fixes: 4b870dc4d0c0 ("hostmem-file: add offset op

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-22 Thread Eric Auger
Hi Jason, On 1/22/25 8:17 AM, Jason Wang wrote: > On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: >> >> Hi Jason, >> >> On 1/21/25 4:27 AM, Jason Wang wrote: >>> On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: When a guest exposed with a vhost device and protected by an intel IOM

[PULL v2 1/9] tests/functional: Convert the kvm_xen_guest avocado test

2025-01-22 Thread Thomas Huth
Use the serial console to execute the commands in the guest instead of using ssh since we don't have ssh support in the functional framework yet. Acked-by: David Woodhouse Message-ID: <20250113082516.57894-1-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS

Re: [PATCH] MAINTAINERS: Add me as the maintainer for ivshmem-pci

2025-01-22 Thread Markus Armbruster
Gustavo Romero writes: > Add me as the maintainer for the ivshmem-pci device. > > Signed-off-by: Gustavo Romero > --- > MAINTAINERS | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 846b81e3ec..c3e69ef3e4 100644 > --- a/MAINTAINERS >

Re: [PATCH v3 1/2] hw/riscv/riscv-iommu: Remove redundant struct members

2025-01-22 Thread Jason Chien
Ping Jason Chien 於 2025年1月15日 週三 下午10:17寫道: > Initially, the IOMMU would create a thread, but this thread was removed in > the merged version. The struct members for thread control should have been > removed as well, but they were not removed in commit 0c54acb8243 > ("hw/riscv: add RISC-V IOMMU

[PATCH v10 3/8] system/physmem: Support IOMMU granularity smaller than TARGET_PAGE size

2025-01-22 Thread Ethan Chen via
If the IOMMU granularity is smaller than the TARGET_PAGE size, there may be multiple entries within the same page. To obtain the correct result, pass the original address to the IOMMU. Similar to the RISC-V PMP solution, the TLB_INVALID_MASK will be set when there are multiple entries in the same

[PATCH v10 1/8] hw/core: Add config stream

2025-01-22 Thread Ethan Chen via
Make other device can use /hw/core/stream.c by select this config. Reviewed-by: Alistair Francis Signed-off-by: Ethan Chen --- hw/Kconfig | 1 + hw/core/Kconfig | 3 +++ hw/core/meson.build | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/Kconfig b/hw/Kconfi

[PATCH v10 2/8] memory: Introduce memory region fetch operation

2025-01-22 Thread Ethan Chen via
Allow memory regions to have different behaviors for read and fetch operations. For example, the RISC-V IOPMP could raise an interrupt when the CPU tries to fetch from a non-executable region. If the fetch operation for a memory region is not implemented, the read operation will still be used for

[PATCH v10 4/8] target/riscv: Add support for IOPMP

2025-01-22 Thread Ethan Chen via
Signed-off-by: Ethan Chen Reviewed-by: Alistair Francis --- target/riscv/cpu.c| 3 +++ target/riscv/cpu_cfg.h| 2 ++ target/riscv/cpu_helper.c | 18 +++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 3d4b

Re: [PATCH v3 1/4] Add support for emulation of CRC32 instructions

2025-01-22 Thread Philippe Mathieu-Daudé
On 22/1/25 08:27, Philippe Mathieu-Daudé wrote: On 12/11/24 17:41, Aleksandar Rakic wrote: Add emulation of MIPS' CRC32 (Cyclic Redundancy Check) instructions. Reuse zlib crc32() and Linux crc32c(). Cherry-picked 4cc974938aee1588f852590509004e340c072940 from https://github.com/MIPS/gnutools-qem

[PATCH v10 0/8] Support RISC-V IOPMP

2025-01-22 Thread Ethan Chen via
When IOPMP is enabled, memory access to system memory from devices and the CPU will be checked by the IOPMP. The issue of CPU access to non-CPU address space via IOMMU was previously mentioned by Jim Shu, who provided a patch[1] to fix it. IOPMP also requires this patch. You can use a customized

[RFC v2 5/5] i386/kvm: Support fixed counter in KVM PMU filter

2025-01-22 Thread Zhao Liu
KVM_SET_PMU_EVENT_FILTER of x86 KVM allows user to configure x86 fixed function counters by a bitmap. Add the support of x86-fixed-counter in kvm-pmu-filter object and handle this in i386 kvm codes. Signed-off-by: Zhao Liu --- Changes since RFC v1: * Make "action" as a global (per filter object

[RFC v2 1/5] qapi/qom: Introduce kvm-pmu-filter object

2025-01-22 Thread Zhao Liu
Introduce the kvm-pmu-filter object and support the PMU event with raw format. The raw format, as a native PMU event code representation, can be used for several architectures. Considering that PMU event related fields are commonly used in hexadecimal, define KVMPMURawEventVariant, KVMPMUFilterEv

[PATCH v10 6/8] hw/misc/riscv_iopmp: Add RISC-V IOPMP device

2025-01-22 Thread Ethan Chen via
Support IOPMP specification v0.9.2RC3. The specification url: https://github.com/riscv-non-isa/iopmp-spec/releases/tag/v0.9.2-RC3 The IOPMP checks whether memory access from a device or CPU is valid. This implementation uses an IOMMU to modify the address space accessed by the device. For device

[RFC v2 0/5] accel/kvm: Support KVM PMU filter

2025-01-22 Thread Zhao Liu
Hi folks, Sorry for the long wait, but RFC v2 is here at last. Compared with v1 [1], v2 mianly makes `action` as a global parameter, and all events (and fixed counters) are based on a unified action. Learned from the discussion with Shaoqin in v1, current pmu-filter QOM design could meet the req

[RFC v2 3/5] i386/kvm: Support event with select & umask format in KVM PMU filter

2025-01-22 Thread Zhao Liu
The select&umask is the common way for x86 to identify the PMU event, so support this way as the "x86-default" format in kvm-pmu-filter object. Signed-off-by: Zhao Liu --- Changes since RFC v1: * Bump up the supported QAPI version to 10.0. --- accel/kvm/kvm-pmu.c | 62 +

[PATCH v10 5/8] hw/misc/riscv_iopmp_txn_info: Add struct for transaction infomation

2025-01-22 Thread Ethan Chen via
The entire valid transaction must fit within a single IOPMP entry. However, during IOMMU translation, the transaction size is not available. This structure defines the transaction information required by the IOPMP. Signed-off-by: Ethan Chen --- include/hw/misc/riscv_iopmp_txn_info.h | 38 +++

[PATCH v10 7/8] hw/misc/riscv_iopmp_dispatcher: Device for redirect IOPMP transaction infomation

2025-01-22 Thread Ethan Chen via
This device determines the target IOPMP device for forwarding information based on: * Address: For parallel IOPMP devices * Stage: For cascading IOPMP devices Signed-off-by: Ethan Chen --- hw/misc/meson.build | 1 + hw/misc/riscv_iopmp_dispatcher.c | 136 ++

[RFC v2 2/5] i386/kvm: Support basic KVM PMU filter

2025-01-22 Thread Zhao Liu
Filter PMU events with raw format in i386 code. For i386, raw format indicates that the PMU event code is already encoded according to the KVM ioctl requirements, and can be delivered directly to KVM without additional encoding work. Signed-off-by: Zhao Liu --- Changes since v1: * Stop check wh

[PATCH v10 8/8] hw/riscv/virt: Add IOPMP support

2025-01-22 Thread Ethan Chen via
- Add 'iopmp=on' option to enable IOPMP. It adds iopmp devices virt machine to protect all regions of system memory. Signed-off-by: Ethan Chen --- docs/system/riscv/virt.rst | 7 hw/riscv/Kconfig | 1 + hw/riscv/virt.c| 75 ++ in

<    1   2