[PULL v2 28/97] rust: bindings: allow any number of params

2025-07-14 Thread Michael S. Tsirkin
We are going to be adding more parameters, and this makes rust unhappy: Functions with lots of parameters are considered bad style and reduce readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a new type. Specifically: error: this function has to

Re: [PATCH v2] target/mips: Only update MVPControl.EVP bit if executed by master VPE

2025-07-14 Thread Philippe Mathieu-Daudé
Ping? On 27/4/21 15:33, Philippe Mathieu-Daudé wrote: According to the 'MIPS MT Application-Specific Extension' manual: If the VPE executing the instruction is not a Master VPE, with the MVP bit of the VPEConf0 register set, the EVP bit is unchanged by the instruction. Modify the DVPE/

Re: [PULL 00/97] virtio,pci,pc: features, fixes, tests

2025-07-14 Thread Michael S. Tsirkin
On Mon, Jul 14, 2025 at 07:06:18PM -0400, Michael S. Tsirkin wrote: > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -0400) > > are available in the Git reposi

Re: [PATCH v2] rust: bindings: allow any number of params

2025-07-14 Thread Paolo Bonzini
Il mar 15 lug 2025, 08:20 Michael S. Tsirkin ha scritto: > We are going to be adding more parameters, and this makes > rust unhappy: > Functions with lots of parameters are considered bad style and reduce > readability (“what does the 5th parameter mean?”). Consider grouping > some pa

Re: [PULL 00/17] MIPS & Co. patches for 2025-07-15

2025-07-14 Thread Philippe Mathieu-Daudé
On 15/7/25 08:19, Philippe Mathieu-Daudé wrote: The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://github.c

Re: [PATCH v5 02/19] hw/i386/pc_piix.c: remove include for loader.h

2025-07-14 Thread Philippe Mathieu-Daudé
On 11/7/25 11:57, Mark Cave-Ayland wrote: This header is not required since the loader functionality is handled separately by pc_memory_init() in pc.c. Signed-off-by: Mark Cave-Ayland --- hw/i386/pc_piix.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH RFC v2 01/13] net: bundle all offloads in a single struct

2025-07-14 Thread Akihiko Odaki
On 2025/07/11 22:02, Paolo Abeni wrote: The set_offload() argument list is already pretty long and we are going to introduce soon a bunch of additional offloads. Replace the offload arguments with a single struct and update all the relevant call-sites. No functional changes intended. Signed-of

Re: [PULL v2 00/13] Ui patches

2025-07-14 Thread Marc-André Lureau
Hi On Tue, Jul 15, 2025 at 10:36 AM wrote: > > From: Marc-André Lureau > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -0400) > > are available in the Git

[PULL v2 00/29] QAPI patches patches for 2025-07-14

2025-07-14 Thread Markus Armbruster
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2025-07-14-v2 for

[PULL v2 07/13] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy There are cases where we do not want the memory layout of a texture to be tiled as the component processing the texture would not know how to de-tile either via software or hardware. Therefore, ensuring that the memory backing the texture has a linear layout is absolutely ne

[PULL v2 10/13] hw/display: Allow injection of virtio-gpu EDID name

2025-07-14 Thread marcandre . lureau
From: Andrew Keesler Thanks to 72d277a7, 1ed2cb32, and others, EDID (Extended Display Identification Data) is propagated by QEMU such that a virtual display presents legitimate metadata (e.g., name, serial number, preferred resolutions, etc.) to its connected guest. This change adds the ability

[PULL v2 13/13] tpm: "qemu -tpmdev help" should return success

2025-07-14 Thread marcandre . lureau
From: Marc-André Lureau Like other "-foo help" CLI, the qemu process should return 0 for "-tpmdev help". While touching this, switch to is_help_option() utility function as suggested by Peter Maydell. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Da

[PULL v2 05/13] ui/spice: Add an option for users to provide a preferred video codec

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy Giving users an option to choose a particular codec will enable them to make an appropriate decision based on their hardware and use-case. Note that, the Spice server would use this codec with Gstreamer encoder and only when gl=on is specified. If no codec is provided, then

[PULL v2 12/13] ui/gtk: Add scale option

2025-07-14 Thread marcandre . lureau
From: Weifeng Liu Allow user to set a preferred scale (defaulting to 1) of the virtual display. Along with zoom-to-fix=false, this would be helpful for users running QEMU on hi-dpi host desktop to achieve pixel to pixel display -- e.g., if the scale factor of a user's host desktop is set to 200%,

[PULL v2 11/13] ui/gtk: Add keep-aspect-ratio option

2025-07-14 Thread marcandre . lureau
From: Weifeng Liu When aspect ratio of host window and that of guest display are not aligned, we can either zoom the guest content to fill the whole host window or add padding to respect aspect ratio of the guest. Add an option keep-aspect-ratio to allow users to select their preferred behavior i

[PULL v2 08/13] ui/spice: Create a new texture with linear layout when gl=on is specified

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy Since most encoders/decoders (invoked by Spice) may not work properly with tiled memory associated with a texture, we need to create another texture that has linear memory layout and use that instead. Note that, there does not seem to be a direct way to indicate to the GL i

[PULL v2 09/13] ui/spice: Blit the scanout texture if its memory layout is not linear

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy In cases where the scanout buffer is provided as a texture (e.g. Virgl) we need to check to see if it has a linear memory layout or not. If it doesn't have a linear layout, then blitting it onto the texture associated with the display surface (which already has a linear layo

[PULL v2 04/13] ui/spice: Enable gl=on option for non-local or remote clients

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy Newer versions of Spice server should be able to accept dmabuf fds from Qemu for clients that are connected via the network. In other words, when this option is enabled, Qemu would share a dmabuf fd with Spice which would encode and send the data associated with the fd to a

[PULL v2 06/13] ui/spice: Add an option to submit gl_draw requests at fixed rate

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy In the specific case where the display layer (virtio-gpu) is using dmabuf, and if remote clients are enabled (-spice gl=on,port=), it makes sense to limit the maximum (streaming) rate (refresh rate) to a fixed value using the GUI refresh timer. Otherwise, the updates or

Re: [PATCH] gtk: Skip drawing if console surface is NULL

2025-07-14 Thread Akihiko Odaki
On 2025/07/14 23:17, Weifeng Liu wrote: In gtk draw/render callbacks, add an early NULL check for the console surface and skip drawing if it's NULL. Otherwise, attempting to fetch its width and height crash. This change fixes Coverity CID 1610328. In practice, this case wouldn't happen at all be

[PULL v2 03/13] ui/egl-helpers: Error check the fds in egl_dmabuf_export_texture()

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy While trying to export and obtain fds associated with a texture, it is possible that the fds returned after eglExportDMABUFImageMESA() call have error values. Therefore, we need to evaluate the value of all fds and return false if any of them are negative. Cc: Gerd Hoffmann

[PULL v2 02/13] ui/vnc: Introduce the VncWorker type

2025-07-14 Thread marcandre . lureau
From: Akihiko Odaki The worker thread copies data in VncState to avoid race, but some data are too big to copy. Such data are held with pointers to avoid the overhead to copy, but it requires tedious memory management and makes them vulnerable to race. Introduce the VncWorker type to contain all

[PULL v2 01/13] ui/vnc: Do not copy z_stream

2025-07-14 Thread marcandre . lureau
From: Akihiko Odaki vnc_worker_thread_loop() copies z_stream stored in its local VncState to the persistent VncState, and the copied one is freed with deflateEnd() later. However, deflateEnd() refuses to operate with a copied z_stream and returns Z_STREAM_ERROR, leaking the allocated memory. Avo

RE: [PATCH V1] vfio: fix sub-page bar after cpr

2025-07-14 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V1] vfio: fix sub-page bar after cpr > >Regions for sub-page BARs are normally mapped here, in response to the >guest writing to PCI config space: > > vfio_pci_write_config() >pci_default_write_config() > pci_update_map

[PULL v2 00/13] Ui patches

2025-07-14 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.g

Re: [PULL 00/32] QAPI patches patches for 2025-07-14

2025-07-14 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Mon, Jul 14, 2025 at 11:14 AM Markus Armbruster wrote: >> >> The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: >> >> Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into >> staging (2025-07-13 01:46:04 -0400) >> >> are a

[PATCH v2] rust: bindings: allow any number of params

2025-07-14 Thread Michael S. Tsirkin
We are going to be adding more parameters, and this makes rust unhappy: Functions with lots of parameters are considered bad style and reduce readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a new type. Specifically: error: this function has to

[PULL 13/17] esp.h: remove separate ESPState typedef

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This is not needed as it is now handled by the OBJECT_DECLARE_SIMPLE_TYPE() macro. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20250711204636.542964-4-mark.cave-ayl...@ilande.co.uk> Signed-off-by: P

Re: [PATCH] vfio, migration: save device parent pci config

2025-07-14 Thread Cédric Le Goater
On 7/14/25 04:37, Huaitong Han wrote: Hi, mst, clg Any comments? Since this seems to be a GIC issue on the aarch64 virt platform, you should cc: the virt-arm people for more insights. Also, the vfio-user devices have been merged very recently, ~1w ago, and, AFAICT, migration is not supported

[PULL 10/17] hw/microblaze: Add missing FDT dependency

2025-07-14 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow These boards ship with a bundled DTB, and dtc will be required for generating these from device tree sources. Prepare for that by adding an FDT dependency. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20250708204806.1898-2-shen...@gmai

[PULL 02/17] target/mips: Extract gen_base_index_addr() helper

2025-07-14 Thread Philippe Mathieu-Daudé
Factor out gen_base_index_addr() which is used twice but we'll use it more. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <2024222936.59869-2-phi...@linaro.org> --- target/mips/tcg/translate.h | 1 + target/mips/tcg/translate.c | 27 +-

[PULL 12/17] esp.c: improve comment in esp_transfer_data()

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Whilst working on the previous patch, the existing comment was not enough to document when the TI command codepath was being used. Update and improve the comment accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-

Re: [PULL 28/97] rust: bindings: allow any number of params

2025-07-14 Thread Michael S. Tsirkin
On Tue, Jul 15, 2025 at 02:30:40AM +0300, Manos Pitsidianakis wrote: > On Tue, Jul 15, 2025 at 2:07 AM Michael S. Tsirkin wrote: > > > > We are going to be adding more parameters, and this makes > > rust unhappy: > > Functions with lots of parameters are considered bad style and reduce > >

[PULL 00/17] MIPS & Co. patches for 2025-07-15

2025-07-14 Thread Philippe Mathieu-Daudé
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://github.com/philmd/qemu.git tags/mips-20250715 for you to fe

[PULL 08/17] hw/mips: Restrict ITU to TCG

2025-07-14 Thread Philippe Mathieu-Daudé
MIPS Inter-Thread Communication Unit is implemented using TCG. Check for TCG both in Kconfig and CPS source. Fixes: 2321d971b6f ("hw/mips: Add dependency MIPS_CPS -> MIPS_ITU") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250702164953.18579-1-phi...@linaro.

Re: [PATCH v2] rust: bindings: allow any number of params

2025-07-14 Thread Philippe Mathieu-Daudé
On 15/7/25 08:15, Michael S. Tsirkin wrote: We are going to be adding more parameters, and this makes rust unhappy: Functions with lots of parameters are considered bad style and reduce readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a new

[PULL 06/17] tests/tcg/mips: Add tests for MIPS CRC32[c] instructions

2025-07-14 Thread Philippe Mathieu-Daudé
From: Aleksandar Rakic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Aleksandar Rakic Reviewed-by: Aleksandar Rikalo Message-ID: <20250214173702.2308488-3-aleksandar.ra...@htecgroup.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/tcg/mips/include/wrappers

[PULL 07/17] roms: re-remove execute bit from hppa-firmware*

2025-07-14 Thread Philippe Mathieu-Daudé
From: Cole Robinson This was fixed in c9d77526bddba0803a1fa982fb59ec98057150f9 for 9.2.0 but regressed in db34be329162cf6b06192703065e6c1010dbe3c5 in 10.0.0 When the bit is present, rpmbuild complains about missing ELF build-id Signed-off-by: Cole Robinson Reviewed-by: Daniel P. Berrangé Acke

[PULL 11/17] esp.c: only raise IRQ in esp_transfer_data() for CMD_SEL, CMD_SELATN and CMD_TI commands

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Clarify the logic in esp_transfer_data() to ensure that the deferred interrupt code can only be triggered for CMD_SEL, CMD_SELATN and CMD_TI commands. This should already be the case, but make it explicit to ensure the logic isn't triggered unexpectedly. Signed-off-by:

[PULL 15/17] esp.c: only call dma_memory_write function if transfer length is non-zero

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible for the calculated transfer length to be zero. Only call the dma_memory_write function where the transfer length is non-zero to avoid invoking the DMA engine for a zero length tr

[PULL 17/17] esp.c: only allow ESP commands permitted in the current asc_mode

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland If an ESP command is issued in an incorrect mode then an illegal command interrupt should be generated. Add a new esp_cmd_is_valid() function to indicate whether the ESP command is valid for the current mode, and if not then raise the illegal command interrupt. This fixes

[PULL 14/17] esp.c: only call dma_memory_read function if transfer length is non-zero

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible for the calculated transfer length to be zero. Only call the dma_memory_read function where the transfer length is non-zero to avoid invoking the DMA engine for a zero length tra

[PULL 09/17] hw/intc/loongarch_extioi: Remove unnecessary 'qemu/typedefs.h' include

2025-07-14 Thread Philippe Mathieu-Daudé
"qemu/typedefs.h" is already included by "qemu/osdep.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Song Gao Message-Id: <20250708085859.7885-2-phi...@linaro.org> --- hw/intc/loongarch_extioi_kvm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/intc/loongarch_extioi_kvm.c b/hw/in

[PULL 16/17] esp.c: add asc_mode property to indicate the current ESP mode

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Add a new asc_mode property to ESPState which indicates the current mode of the ESP and update the ESP state machine accordingly. Bump the vmstate version and include migration logic to ensure that asc_mode is set to initiator mode such that any commands in progress will a

[PULL 05/17] target/mips: Have gen_[d]lsa() callers add 1 to shift amount argument

2025-07-14 Thread Philippe Mathieu-Daudé
Having the callee add 1 to shift amount is misleading (see the NM_LSA case in decode_nanomips_32_48_opc() where we have to manually substract 1). Rather have the callers pass a modified $sa. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Mes

[PULL 04/17] target/mips: Convert Octeon LX instructions to decodetree

2025-07-14 Thread Philippe Mathieu-Daudé
Use Octeon decodetree to call gen_lx() for the LX instructions. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Message-Id: <2024222936.59869-4-phi...@linaro.org> --- target/mips/tcg/octeon.decode | 8 target/mips/tcg/octeon_

[PULL 03/17] target/mips: Extract generic gen_lx() helper

2025-07-14 Thread Philippe Mathieu-Daudé
Extract gen_lx() from gen_mips_lx(); inline the Octeon check in decode_opc_special3_legacy(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <2024222936.59869-3-phi...@linaro.org> --- target/mips/tcg/translate.h | 1 + target/mips/tcg/translate.c | 55

[PATCH] docs: Fix Aspeed title

2025-07-14 Thread Cédric Le Goater
commit ad8e0e8a0088 removed the "==" underlining the file title which broke documentation rendering. Add it back. Fixes: ad8e0e8a0088 ("docs: add support for gb200-bmc") Cc: Ed Tanous Reported-by: Peter Maydell Signed-off-by: Cédric Le Goater --- docs/system/arm/aspeed.rst | 1 + 1 file ch

[PULL 01/17] target/mips: Add support for emulation of CRC32 instructions

2025-07-14 Thread Philippe Mathieu-Daudé
From: Yongbok Kim Add emulation of MIPS' CRC32 (Cyclic Redundancy Check) instructions. Reuse zlib crc32() and Linux crc32c(). Corresponding disassembly has been added in commit 99029be1c28 ("target/mips: Add implementation of GINVT instruction"). Signed-off-by: Yongbok Kim Signed-off-by: Aleks

Re: [PULL 09/11] docs: add support for gb200-bmc

2025-07-14 Thread Cédric Le Goater
On 7/11/25 14:01, Peter Maydell wrote: On Fri, 4 Jul 2025 at 09:39, Cédric Le Goater wrote: From: Ed Tanous This patch updates the docs for support of gb200-bmc. Signed-off-by: Ed Tanous Reviewed-by: Cédric Le Goater Link: https://lore.kernel.org/qemu-devel/20250703144249.3348879-3-etan.

Re: [PATCH v2] intel_iommu: Allow both Status Write and Interrupt Flag in QI wait

2025-07-14 Thread CLEMENT MATHIEU--DRIF
On 14/07/2025 11:22 pm, Konstantin Belousov 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. > > > On Mon, Jul 14, 2025 at 05:41:22PM +0100, David Woodhouse wrote: >> On 14 July 2025 15:28:

Re: [PATCH v3] vfio/pci: Introduce x-pci-class-code option

2025-07-14 Thread Cédric Le Goater
On 7/8/25 16:52, Tomita Moeko wrote: Introduce x-pci-class-code option to allow users to override PCI class code of a device, similar to the existing x-pci-vendor-id option. Only the lower 24 bits of this option are used, though a uint32 is used here for determining whether the value is valid and

Re: [PATCH v3 0/7] esp.c: only allow ESP commands permitted in the current mode

2025-07-14 Thread Philippe Mathieu-Daudé
On 11/7/25 22:46, Mark Cave-Ayland wrote: This series contains a few minor tidy-ups along with an implementation of the logic to only allow ESP commands permitted in the current mode. The motivation is to fix GitLab issue #2464 which causes Windows NT MIPS to bluescreen on boot. Series queued,

Re: [PATCH v2 0/3] DTB build housekeeping

2025-07-14 Thread Philippe Mathieu-Daudé
On 8/7/25 22:48, Bernhard Beschow wrote: This series removes the bundled device tree blobs from the repository which are redundant to the bundled device tree sources. To make this work, the device tree compiler 'dtc' is now required whenever libfdt is used. Furthermore, dtc can now be built from

Re: [PATCH] hw/mips: Restrict ITU to TCG

2025-07-14 Thread Philippe Mathieu-Daudé
On 2/7/25 18:49, Philippe Mathieu-Daudé wrote: MIPS Inter-Thread Communication Unit is implemented using TCG. Check for TCG both in Kconfig and CPS source. Fixes: 2321d971b6f ("hw/mips: Add dependency MIPS_CPS -> MIPS_ITU") Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/cps.c | 4 ++--

Re: [PATCH] roms: re-remove execute bit from hppa-firmware*

2025-07-14 Thread Philippe Mathieu-Daudé
On 18/5/25 19:54, Cole Robinson wrote: This was fixed in c9d77526bddba0803a1fa982fb59ec98057150f9 for 9.2.0 but regressed in db34be329162cf6b06192703065e6c1010dbe3c5 in 10.0.0 When the bit is present, rpmbuild complains about missing ELF build-id Signed-off-by: Cole Robinson --- pc-bios/hppa

Re: [PATCH v3 00/16] target/mips: Convert nanoMIPS LSA opcode to decodetree

2025-07-14 Thread Philippe Mathieu-Daudé
On 26/11/24 14:59, Philippe Mathieu-Daudé wrote: Since v2: - Fix translator_ld() calls - Add support for 48-bit nanoMIPS opcodes - Convert Load Immediate opcode --- Prepare buildsys to decode micro/nanoMIPS opcodes using the decodetree script. Simplify gen_lsa/dsa() and convert micro/nanoMIPS LS

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

2025-07-14 Thread Philippe Mathieu-Daudé
On 27/6/25 02:04, Aleksandar Rakic wrote: From: Aleksandar Rakic Add emulation of MIPS' CRC32 (Cyclic Redundancy Check) instructions. Reuse zlib crc32() and Linux crc32c(). Enable CRC for mips64r6. Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Aleksandar Rakic

[PATCH v2 4/4] hw/vfio-user: fix use of uninitialized variable

2025-07-14 Thread John Levon
Coverity reported: CID 1611805: Uninitialized variables in vfio_user_dma_map(). This can occur in the happy path when ->async_ops was not set; as this doesn't typically happen, it wasn't caught during testing. Align both map and unmap implementations to initialize ret the same way to res

Re: [PATCH v2 0/4] vfio-user fixes

2025-07-14 Thread Cédric Le Goater
On 7/15/25 07:56, Cédric Le Goater wrote: On 7/15/25 07:52, John Levon wrote: Some small Coverity and related fixes for the recently merged vfio-user series. thanks john Mark, Would you please re-add your R-b ? No need. b4 picked them up. Thanks, C. Reviewed-by: Cédric Le Goater a

Re: [PATCH v2 0/4] vfio-user fixes

2025-07-14 Thread Cédric Le Goater
On 7/15/25 07:52, John Levon wrote: Some small Coverity and related fixes for the recently merged vfio-user series. thanks john Mark, Would you please re-add your R-b ? Reviewed-by: Cédric Le Goater and applied to vfio-next. Thanks, C. John Levon (4): hw/vfio-user: add Cédric Le Go

[PATCH v2 3/4] hw/vfio-user: wait for proxy close correctly

2025-07-14 Thread John Levon
Coverity reported: CID 1611806: Concurrent data access violations (BAD_CHECK_OF_WAIT_COND) A wait is performed without a loop. If there is a spurious wakeup, the condition may not be satisfied. Fix this by checking ->state for VFIO_PROXY_CLOSED in a loop. Resolves: Coverity CID 1611806 Fixes: 0

[PATCH v2 2/4] hw/vfio: fix region fd initialization

2025-07-14 Thread John Levon
We were not initializing the region fd array to -1, so we would accidentally try to close(0) on cleanup for any region that is not referenced. Fixes: 95cdb024 ("vfio: add region info cache") Signed-off-by: John Levon --- hw/vfio/device.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[PATCH v2 1/4] hw/vfio-user: add Cédric Le Goater as a maintainer

2025-07-14 Thread John Levon
Signed-off-by: John Levon --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e88ed2c0a9..30e9b71e6e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4287,6 +4287,7 @@ F: tests/functional/test_multiprocess.py VFIO-USER: M: John Levon M: Thanos Mak

[PATCH v2 0/4] vfio-user fixes

2025-07-14 Thread John Levon
Some small Coverity and related fixes for the recently merged vfio-user series. thanks john John Levon (4): hw/vfio-user: add Cédric Le Goater as a maintainer hw/vfio: fix region fd initialization hw/vfio-user: wait for proxy close correctly hw/vfio-user: fix use of uninitialized variable

Re: [PATCH] hw/vfio: fix region fd initialization

2025-07-14 Thread Cédric Le Goater
On 7/10/25 17:48, John Levon wrote: We were not initializing the region fd array to -1, so we would accidentally try to close(0) on cleanup for any region that is not referenced. Fixes: 95cdb024 ("vfio: add region info cache") Signed-off-by: John Levon Reviewed-by: Cédric Le Goater Thanks,

Re: [PATCH] hw/vfio-user: fix use of uninitialized variable

2025-07-14 Thread Cédric Le Goater
On 7/8/25 17:49, John Levon wrote: Coverity reported: CID 1611805: Uninitialized variables in vfio_user_dma_map(). This can occur in the happy path when ->async_ops was not set; as this doesn't typically happen, it wasn't caught during testing. Align both map and unmap implementations

Re: [PATCH] hw/vfio-user: wait for proxy close correctly

2025-07-14 Thread Cédric Le Goater
On 7/11/25 13:38, Mark Cave-Ayland wrote: On 10/07/2025 16:47, John Levon wrote: (added Cedric) ah. Thanks Mark. This reminds me that we should have maintainers/reviewers that can send PRs for the vfio-user component. John, Could you please send a patch adding me and Mark may be ? Cover

Re: [PATCH v2 2/3] hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include

2025-07-14 Thread Cédric Le Goater
On 7/8/25 10:58, Philippe Mathieu-Daudé wrote: "qemu/typedefs.h" is already included by "qemu/osdep.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/vfio-migration-internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/vfio/vfio-migration-internal.h b/hw/vfio/vfio-migration-i

[PULL V2 09/16] net: Add save_acked_features callback to vhost_net

2025-07-14 Thread Jason Wang
From: Laurent Vivier This commit introduces a save_acked_features function pointer to vhost_net and converts the vhost_net function into a generic dispatcher. The vhost-user backend provides the callback, making its function static. With this change, no other module has a direct dependency on th

[PULL V2 11/16] net: Add is_vhost_user flag to vhost_net struct

2025-07-14 Thread Jason Wang
From: Laurent Vivier Introduce a boolean is_vhost_user field to the vhost_net structure. This flag is initialized during vhost_net_init based on whether the backend is vhost-user. This refactoring simplifies checks for vhost-user specific behavior, replacing direct comparisons of 'net->nc->info-

[PULL V2 06/16] net: Add get_vhost_net callback to NetClientInfo

2025-07-14 Thread Jason Wang
From: Laurent Vivier The get_vhost_net() function previously contained a large switch statement to find the VHostNetState pointer based on the net client's type. This created a tight coupling, requiring the generic vhost layer to be aware of every specific backend that supported vhost, such as ta

[PULL V2 10/16] net: Allow network backends to advertise max TX queue size

2025-07-14 Thread Jason Wang
From: Laurent Vivier This commit refactors how the maximum transmit queue size for virtio-net devices is determined, making the mechanism more generic and extensible. Previously, virtio_net_max_tx_queue_size() contained hardcoded checks for specific network backend types (vhost-user and vhost-vd

[PULL V2 14/16] net/af-xdp: Remove XDP program cleanup logic

2025-07-14 Thread Jason Wang
From: Daniel Borkmann There are two issues with the XDP program removal in af_xdp_cleanup(): 1) Starting from libxdp 1.3.0 [0] the XDP program gets automatically detached when we call xsk_socket__delete() for the last successfully configured queue. libxdp internally keeps track of that. Fo

[PULL V2 15/16] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-07-14 Thread Jason Wang
From: Daniel Borkmann While testing, it turned out that upon error in the queue creation loop, we never trigger the af_xdp_cleanup() handler. This is because we pass errp instead of a local err pointer into the various AF_XDP setup functions instead of a scheme like: bool fn(..., Error **err

[PULL V2 03/16] net: Refactor stream logic for reuse in '-net passt'

2025-07-14 Thread Jason Wang
From: Laurent Vivier To prepare for the implementation of '-net passt', this patch moves the generic stream handling functions from net/stream.c into new net/stream_data.c and net/stream_data.h files. This refactoring introduces a NetStreamData struct that encapsulates the generic fields and log

[PULL V2 04/16] net: Define net_client_set_link()

2025-07-14 Thread Jason Wang
From: Laurent Vivier The code to set the link status is currently located in qmp_set_link(). This function identifies the device by name, searches for the corresponding NetClientState, and then updates the link status. In some parts of the code, such as vhost-user.c, the NetClientState are alrea

[PULL V2 08/16] net: Add get_acked_features callback to VhostNetOptions

2025-07-14 Thread Jason Wang
From: Laurent Vivier This patch continues the effort to decouple the generic vhost layer from specific network backend implementations. Previously, the vhost_net initialization code contained a hardcoded check for the vhost-user client type to retrieve its acked features by calling vhost_user_ge

[PULL V2 05/16] vhost_net: Rename vhost_set_vring_enable() for clarity

2025-07-14 Thread Jason Wang
From: Laurent Vivier This is a cosmetic change with no functional impact. The function vhost_set_vring_enable() is specific to vhost_net and is used outside of vhost_net.c (specifically, in hw/net/virtio-net.c). To prevent confusion with other similarly named vhost functions, such as the one fou

[PULL V2 16/16] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-07-14 Thread Jason Wang
From: Daniel Borkmann Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \ -netdev af-xdp,ifname=enp2s0f0np0,id=net0,mode=native,queues=

[PULL V2 13/16] net/passt: Implement vhost-user backend support

2025-07-14 Thread Jason Wang
From: Laurent Vivier This commit adds support for the vhost-user interface to the passt network backend, enabling high-performance, accelerated networking for guests using passt. The passt backend can now operate in a vhost-user mode, where it communicates with the guest's virtio-net device over

[PULL V2 12/16] net: Add passt network backend

2025-07-14 Thread Jason Wang
From: Laurent Vivier This commit introduces support for passt as a new network backend. passt is an unprivileged, user-mode networking solution that provides connectivity for virtual machines by launching an external helper process. The implementation reuses the generic stream data handling logi

[PULL V2 00/16] Net patches

2025-07-14 Thread Jason Wang
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://github.com/jasowang/qemu.git net-pull-request for you to fe

[PULL V2 07/16] net: Consolidate vhost feature bits into vhost_net structure

2025-07-14 Thread Jason Wang
From: Laurent Vivier Previously, the vhost_net_get_feature_bits() function in hw/net/vhost_net.c used a large switch statement to determine the appropriate feature bits based on the NetClientDriver type. This created unnecessary coupling between the generic vhost layer and specific network backe

[PULL V2 01/16] net: fix buffer overflow in af_xdp_umem_create()

2025-07-14 Thread Jason Wang
From: Anastasia Belova s->pool has n_descs elements so maximum i should be n_descs - 1. Fix the upper bound. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: cb039ef3d9 ("net: add initial support for AF_XDP network backend") Cc: qemu-sta...@nongnu.org Reviewed-by: Ilya M

[PULL V2 02/16] virtio-net: Add queues for RSS during migration

2025-07-14 Thread Jason Wang
From: Akihiko Odaki virtio_net_pre_load_queues() inspects vdev->guest_features to tell if VIRTIO_NET_F_RSS or VIRTIO_NET_F_MQ is enabled to infer the required number of queues. This works for VIRTIO_NET_F_MQ but it doesn't for VIRTIO_NET_F_RSS because only the lowest 32 bits of vdev->guest_featur

Re: [PULL 00/32] QAPI patches patches for 2025-07-14

2025-07-14 Thread Stefan Hajnoczi
On Mon, Jul 14, 2025 at 11:14 AM Markus Armbruster wrote: > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -0400) > > are available in the Git repository at:

Re: [PULL 00/13] Ui patches

2025-07-14 Thread Stefan Hajnoczi
On Mon, Jul 14, 2025 at 10:02 AM Marc-André Lureau wrote: > > On Mon, Jul 14, 2025 at 3:45 PM wrote: > > > > From: Marc-André Lureau > > > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu int

Re: [PULL 00/13] Net patches

2025-07-14 Thread Jason Wang
On Mon, Jul 14, 2025 at 1:34 PM Jason Wang wrote: > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -0400) > > are available in the Git repository at: > > ht

[POC PATCH 3/5] memory/guest_memfd: Enable in-place conversion when available

2025-07-14 Thread Xiaoyao Li
From: Yan Zhao (This is just the POC code to use in-place conversion gmem.) Try to use in-place conversion gmem when it is supported. When in-place conversion is enabled, there is no need to discard memory since it still needs to be used as the memory of opposite attribute after conversion. Fo

[POC PATCH 5/5] [HACK] memory: Don't enable in-place conversion for internal MemoryRegion with gmem

2025-07-14 Thread Xiaoyao Li
Currently, the TDVF cannot work with gmem in-place conversion because current implementation of KVM_TDX_INIT_MEM_REGION in KVM requires gmem of TDVF to be valid for both shared and private at the same time. To workaround it, explicitly not enable in-place conversion for internal MemoryRegion with

[POC PATCH 0/5] QEMU: Enable in-place conversion and hugetlb gmem

2025-07-14 Thread Xiaoyao Li
Hi all, This is the POC to enable in-place conversion and hugetlb support of gmem (guest memfd) in QEMU. It can work with 1G gmem support series[1] and TDX hugepage support series[2] to run TDX guest with hugepage. I don't have SNP environment and don't know how it goes with SNP. It is just the P

[POC PATCH 2/5] headers: Fetch gmem updates

2025-07-14 Thread Xiaoyao Li
Signed-off-by: Xiaoyao Li --- linux-headers/linux/guestmem.h | 29 + linux-headers/linux/kvm.h | 18 ++ 2 files changed, 47 insertions(+) create mode 100644 linux-headers/linux/guestmem.h diff --git a/linux-headers/linux/guestmem.h b/linux-header

[POC PATCH 4/5] memory/guest_memfd: Enable hugetlb support

2025-07-14 Thread Xiaoyao Li
(This is just the POC code to use gmem with hugetlb.) Try with hugetlb first when hugetlb is supported by gmem. If hugetlb cannot afford the requested memory size and returns -ENOMEM, fallback to create gmem withtout hugetlb. The hugetlb size is hardcoded as GUESTMEM_HUGETLB_FLAG_2MB. I'm not sur

[POC PATCH 1/5] update-linux-headers: Add guestmem.h

2025-07-14 Thread Xiaoyao Li
Signed-off-by: Xiaoyao Li --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index b43b8ef75a63..3f6169a121a8 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-li

Re: [PATCH v5 02/11] hw/loongarch: add virt feature avecintc support

2025-07-14 Thread gaosong
在 2025/7/15 上午9:02, Bibo Mao 写道: On 2025/7/11 下午4:59, Song Gao wrote: Avecintc feature is added in LoongArchVirtMachinState, and it is used to check whether virt machine supports the advanced interrupt controller and by default set avecintc with ON_OFF_AUTO_ON. LoongArchVirtMachineState adds m

Re: [PATCH v8 0/4] target/arm: Add FEAT_MEC to max cpu

2025-07-14 Thread Pierrick Bouvier
On 7/14/25 4:31 PM, Gustavo Romero wrote: Hi folks, Richard, thanks for v8. Pierrick, thanks for testing it. :) On 7/14/25 14:09, Pierrick Bouvier wrote: On 7/14/25 8:58 AM, Richard Henderson wrote: Changes for v8:    - Re-order SCTLR2 and TCR2 so that they are independent of MEC.    - Enab

Re: [PATCH] net/vdpa: fix potential fd leak in net_init_vhost_vdpa()

2025-07-14 Thread Jason Wang
On Mon, Jul 14, 2025 at 6:12 PM Stefano Garzarella wrote: > > From: Stefano Garzarella > > Coverity reported a file descriptor leak (CID 1490785) that happens if > `vhost_vdpa_get_max_queue_pairs()` returns 0, since in that case > net_host_vdpa_init(), which should take ownership of the fd, is ne

Re: [PATCH v5 02/11] hw/loongarch: add virt feature avecintc support

2025-07-14 Thread Bibo Mao
On 2025/7/11 下午4:59, Song Gao wrote: Avecintc feature is added in LoongArchVirtMachinState, and it is used to check whether virt machine supports the advanced interrupt controller and by default set avecintc with ON_OFF_AUTO_ON. LoongArchVirtMachineState adds misc_feature and misc_status for m

[PULL 19/97] amd_iommu: Update bitmasks representing DTE reserved fields

2025-07-14 Thread Michael S. Tsirkin
From: Alejandro Jimenez The DTE validation method verifies that all bits in reserved DTE fields are unset. Update them according to the latest definition available in AMD I/O Virtualization Technology (IOMMU) Specification - Section 2.2.2.1 Device Table Entry Format. Remove the magic numbers and

  1   2   3   4   5   6   7   >