[PATCH 0/2] hw/loongarch/virt: Small enhancement about big endian host

2025-06-03 Thread Bibo Mao
On big endian host machine such as S390, bios-table-test fails to run. And also linux kernel fails to boot. This patches solves these two issues. Bibo Mao (2): hw/loongarch/virt: Fix big endian support with MCFG table hw/intc/loongarch_pch: Convert to little endian with ID register hw/intc/

[PATCH 1/2] hw/loongarch/virt: Fix big endian support with MCFG table

2025-06-03 Thread Bibo Mao
With API build_mcfg(), it is not necessary with parameter structure AcpiMcfgInfo to convert to little endian since it is directly used with host native endian. Here remove endian conversion before calling function build_mcfg(). With this patch, bios-tables-test passes to run on big endian host mac

[PATCH 2/2] hw/intc/loongarch_pch: Convert to little endian with ID register

2025-06-03 Thread Bibo Mao
With PCH ID register, it is defined as union type as follows: union LoongArchPIC_ID { struct { uint8_t _reserved_0[3]; uint8_t id; uint8_t version; uint8_t _reserved_1; uint8_t irq_num; uint8_t _reserved_2; } QEMU_PACKED desc; uint64_t dat

[PATCH v3 2/4] vfio/iommufd: Add properties and handlers to TYPE_HOST_IOMMU_DEVICE_IOMMUFD

2025-06-03 Thread Zhenzhong Duan
Enhance HostIOMMUDeviceIOMMUFD object with 3 new members, specific to the iommufd BE + 2 new class functions. IOMMUFD BE includes IOMMUFD handle, devid and hwpt_id. IOMMUFD handle and devid are used to allocate/free ioas and hwpt. hwpt_id is used to re-attach IOMMUFD backed device to its default V

[PATCH v3 4/4] vfio/iommufd: Save vendor specific device info

2025-06-03 Thread Zhenzhong Duan
Some device information returned by ioctl(IOMMU_GET_HW_INFO) are vendor specific. Save them as raw data in a union supporting different vendors, then vendor IOMMU can query the raw data with its fixed format for capability directly. Because IOMMU_GET_HW_INFO is only supported in linux, so declare

[PATCH v3 1/4] backends/iommufd: Add a helper to invalidate user-managed HWPT

2025-06-03 Thread Zhenzhong Duan
This helper passes cache invalidation request from guest to invalidate stage-1 page table cache in host hardware. Signed-off-by: Nicolin Chen Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Reviewed-by: Eric Auger --- include/system/iommufd.h | 4 backends/iommufd.c |

[PATCH v3 3/4] vfio/iommufd: Implement [at|de]tach_hwpt handlers

2025-06-03 Thread Zhenzhong Duan
Implement [at|de]tach_hwpt handlers in VFIO subsystem. vIOMMU utilizes them to attach to or detach from hwpt on host side. Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Reviewed-by: Eric Auger --- hw/vfio/iommufd.c | 22 ++ 1 file change

[PATCH v3 0/4] VFIO and IOMMU prerequisite stuff for IOMMU nesting support

2025-06-03 Thread Zhenzhong Duan
Hi, The first 6 patches of [1] are all VFIO or IOMMUFD related additions. Split them out per Cédric and seek for quick acceptance. I didn't copy changelog from [1] as it's a mix of the whole nesting series. For who want a quick view of the whole nesting series [2]. Test done: - VFIO devices hot

Re: [PATCH v3 3/3] docs: define policy forbidding use of AI code generators

2025-06-03 Thread Markus Armbruster
Kevin Wolf writes: > Am 03.06.2025 um 16:25 hat Markus Armbruster geschrieben: >> +TL;DR: >> + >> + **Current QEMU project policy is to DECLINE any contributions which are >> + believed to include or derive from AI generated code. This includes >> ChatGPT, >> + CoPilot, Llama and similar tool

Re: [PATCH v3 3/3] docs: define policy forbidding use of AI code generators

2025-06-03 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Tue, Jun 3, 2025 at 10:25 AM Markus Armbruster wrote: >> >> From: Daniel P. Berrangé >> >> There has been an explosion of interest in so called AI code >> generators. Thus far though, this is has not been matched by a broadly >> accepted legal interpretation of the

RE: [PATCH v2 1/4] backends/iommufd: Add a helper to invalidate user-managed HWPT

2025-06-03 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Sent: Tuesday, June 3, 2025 8:21 PM >To: Duan, Zhenzhong ; qemu-devel@nongnu.org >Cc: alex.william...@redhat.com; c...@redhat.com; m...@redhat.com; >jasow...@redhat.com; pet...@redhat.com; ddut...@redhat.com; >j...@nvidia.com; nicol...@nvidi

Re: [PATCH 06/14] rust: qemu-api: add bindings to Error

2025-06-03 Thread Markus Armbruster
Paolo Bonzini writes: > On 6/3/25 12:32, Markus Armbruster wrote: >>> Then Rust's propagate has the same behavior as C (Of course, here Rust >>> is actually using C's error_propagate, so the two are equivalent.) >> >> *If* we want propagate semantics. I'm not sure we do. > > Yes, we do. This f

RE: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure

2025-06-03 Thread Duan, Zhenzhong
>-Original Message- >From: Steven Sistare >Subject: Re: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure > >On 6/3/2025 6:40 AM, Duan, Zhenzhong wrote: >>> -Original Message- >>> From: Steve Sistare >>> Subject: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure

RE: [PATCH v2 4/4] vfio/iommufd: Save vendor specific device info

2025-06-03 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: Re: [PATCH v2 4/4] vfio/iommufd: Save vendor specific device info > >Hi Zhenzhong, > >On 5/30/25 11:35 AM, Zhenzhong Duan wrote: >> Some device information returned by ioctl(IOMMU_GET_HW_INFO) are vendor >> specific. Save them as ra

Re: [PATCH v5 0/4] Building PPTT with root node and identical implementation flag

2025-06-03 Thread Bibo Mao
On 2025/6/3 下午11:40, Alireza Sanaee via wrote: On Sun, 1 Jun 2025 08:32:52 -0400 "Michael S. Tsirkin" wrote: On Fri, May 23, 2025 at 11:26:50AM +0100, Alireza Sanaee wrote: OS like Linux is using PPTT processor node's identical implementation flag [1] to infer whether the whole system or a

Re: [PATCH v2] virtio-net: Add queues for RSS during migration

2025-06-03 Thread Lei Yang
Tested this series of patches with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Tue, Jun 3, 2025 at 11:01 AM Jason Wang wrote: > > On Fri, May 30, 2025 at 1:19 PM Akihiko Odaki > wrote: > > > > virtio_net_pre_load_queues() inspects vdev->guest_features to tell if

[PATCH v2 03/12] hw/riscv/virt: Use setprop_sized_cells for memory

2025-06-03 Thread Joel Stanley
Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Signed-off-by: Joel Stanley --- hw/riscv/virt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/risc

[PATCH v2 12/12] hw/riscv/virt: Use setprop_sized_cells for pcie

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 10/12] hw/riscv/virt: Use setprop_sized_cells for rtc

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 07/12] hw/riscv/virt: Use setprop_sized_cells for virtio

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 06/12] hw/riscv/virt: Use setprop_sized_cells for plic

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 05/12] hw/riscv/virt: Use setprop_sized_cells for aclint

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 02/12] hw/riscv/virt: Use setprop_sized_cells for clint

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 08/12] hw/riscv/virt: Use setprop_sized_cells for reset

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 04/12] hw/riscv/virt: Use setprop_sized_cells for aplic

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 00/12] hw/riscv/virt: device tree reg cleanups

2025-06-03 Thread Joel Stanley
v2: - Rebased on master now that Daniel's changes are merged - Fixed doubled up patch 1 - r-b tags from Alistair and Daniel added This is a set of cleanups for the riscv virt machine device tree generation. Using dumpdtb the old and new device trees are identical for -M virt and -M virt,aia=ap

[PATCH v2 09/12] hw/riscv/virt: Use setprop_sized_cells for uart

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 11/12] hw/riscv/virt: Use setprop_sized_cells for iommu

2025-06-03 Thread Joel Stanley
The current device tree property uses two cells for the address (and for the size), but assumes the they are less than 32 bits by hard coding the high cell to zero. Use qemu_fdt_setprop_sized_cells to do the job of splitting the upper and lower 32 bits across cells. Reviewed-by: Daniel Henrique B

[PATCH v2 01/12] hw/riscv/virt: Fix clint base address type

2025-06-03 Thread Joel Stanley
The address is a hardware address, so use hwaddr for consistency with the rest of the machine. Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Signed-off-by: Joel Stanley --- hw/riscv/virt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/riscv/v

Re: [PATCH 0/8] hw/i386/pc: Remove deprecated 2.10, 2.11 and 2.12 PC machines

2025-06-03 Thread Xiaoyao Li
On 5/2/2025 6:35 AM, Philippe Mathieu-Daudé wrote: The versioned 'pc' and 'q35' machines up to 2.12 been marked as deprecated two releases ago, and are older than 6 years, so according to our support policy we can remove them. This series includes the 2.10 to 2.12 machines removal. For this se

Re: [PATCH 2/2] hw/nvme: revert CMIC behavior

2025-06-03 Thread alan . adamson
On 6/3/25 5:59 AM, Klaus Jensen wrote: From: Klaus Jensen Commit cd59f50ab017 ("hw/nvme: always initialize a subsystem") causes the controller to always set the CMIC.MCTRS ("Multiple Controllers") bit. While spec-compliant, this is a deviation from the previous behavior where this was only se

[PULL 01/16] rust: bindings: allow ptr_offset_with_cast

2025-06-03 Thread Paolo Bonzini
This is produced by recent versions of bindgen: warning: use of `offset` with a `usize` casted to an `isize` --> /builds/bonzini/qemu/rust/target/debug/build/qemu_api-35cb647f4db404b8/out/bindings.inc.rs:39:21 | 39 | let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).of

[PULL 14/16] rust: add "bits", a custom bitflags implementation

2025-06-03 Thread Paolo Bonzini
One common thing that device emulation does is manipulate bitmasks, for example to check whether two bitmaps have common bits. One example in the pl011 crate is the checks for pending interrupts, where an interrupt cause corresponds to at least one interrupt source from a fixed set. Unfortunately

[PULL 11/16] meson: use config_base_arch for target libraries

2025-06-03 Thread Paolo Bonzini
From: Pierrick Bouvier Fixed commit introduced common dependencies for target libraries. Alas, it wrongly reused the 'target' variable, which was previously set from another loop. Thus, some dependencies were missing depending on order of target list, as found here [1]. The fix is to use the co

[PULL 03/16] rust: use "objects" for Rust executables as well

2025-06-03 Thread Paolo Bonzini
libqemuutil is not meant be linked as a whole; if modules are enabled, doing so results in undefined symbols (corresponding to QMP commands) in rust/qemu-api/rust-qemu-api-integration. Support for "objects" in Rust executables is available in Meson 1.8.0; use it to switching to the same dependenci

[PULL 05/16] rust: add qemu-api doctests to "meson test"

2025-06-03 Thread Paolo Bonzini
Doctests are weird. They are essentially integration tests, but they're "ran" by executing rustdoc --test, which takes a compiler-ish command line. This is supported by Meson 1.8.0. Because they run the linker and need all the .o files, run them in the build jobs rather than the test jobs. Sign

[PULL 09/16] target/i386: Add a new CPU feature word for CPUID.7.1.ECX

2025-06-03 Thread Paolo Bonzini
From: "Xin Li (Intel)" The immediate form of MSR access instructions will use this new CPU feature word. Signed-off-by: Xin Li (Intel) Link: https://lore.kernel.org/r/20250103084827.1820007-3-...@zytor.com Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 1 + target/i386/cpu.c | 23 +

[PULL 15/16] rust: pl011: use the bits macro

2025-06-03 Thread Paolo Bonzini
This avoids the repeated ".0" when using the Interrupt struct. Signed-off-by: Paolo Bonzini --- rust/Cargo.lock | 1 + rust/hw/char/pl011/Cargo.toml | 1 + rust/hw/char/pl011/meson.build | 1 + rust/hw/char/pl011/src/device.rs| 51 ++-

[PULL 10/16] target/i386: Add the immediate form MSR access instruction support

2025-06-03 Thread Paolo Bonzini
From: "Xin Li (Intel)" The immediate form of MSR access instructions are primarily motivated by performance, not code size: by having the MSR number in an immediate, it is available *much* earlier in the pipeline, which allows the hardware much more leeway about how a particular MSR is handled.

[PULL 16/16] rust: qemu-api-macros: add from_bits and into_bits to #[derive(TryInto)]

2025-06-03 Thread Paolo Bonzini
These const functions make it possible to use enums easily together with the bitfield-struct crate. Signed-off-by: Paolo Bonzini --- rust/qemu-api-macros/src/lib.rs | 48 ++--- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/rust/qemu-api-macros/src/li

[PULL 04/16] build, dockerfiles: add support for detecting rustdoc

2025-06-03 Thread Paolo Bonzini
rustdoc is effectively a custom version of rustc, and it is necessary to specify it in order to run doctests from Meson. Add the relevant configure option and environment variables. Signed-off-by: Paolo Bonzini --- configure | 8 meson.build

[PULL 12/16] i386/tdx: Fix build on 32-bit host

2025-06-03 Thread Paolo Bonzini
From: Cédric Le Goater Use PRI formats where required and fix pointer cast. Cc: Xiaoyao Li Signed-off-by: Cédric Le Goater Link: https://lore.kernel.org/r/20250602173101.1052983-2-...@redhat.com Signed-off-by: Paolo Bonzini --- target/i386/kvm/tdx.c | 26 +- 1 file ch

[PULL 08/16] target/i386: Remove FRED dependency on WRMSRNS

2025-06-03 Thread Paolo Bonzini
From: "Xin Li (Intel)" WRMSRNS doesn't become a required feature for FERD, and Linux has removed the dependency, as such remove it from Qemu. Cc: qemu-sta...@nongnu.org Signed-off-by: Xin Li (Intel) Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20250103084827.1820007-2-...@zytor.com

[PULL 00/16] rust, i386 changes for 2025-06-03

2025-06-03 Thread Paolo Bonzini
The following changes since commit 6322b753f798337835e205b6d805356bea582c86: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2025-06-02 14:52:45 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream f

[PULL 13/16] i386/tdvf: Fix build on 32-bit host

2025-06-03 Thread Paolo Bonzini
From: Cédric Le Goater Use PRI formats where required. Cc: Isaku Yamahata Signed-off-by: Cédric Le Goater Link: https://lore.kernel.org/r/20250602173101.1052983-3-...@redhat.com Signed-off-by: Paolo Bonzini --- hw/i386/tdvf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PULL 07/16] rust: use native Meson support for clippy and rustdoc

2025-06-03 Thread Paolo Bonzini
Meson has support for invoking clippy and rustdoc on all crates (1.7.0 for clippy, 1.8.0 for rustdoc). Use it instead of the homegrown version; this requires disabling the multiple_crate_versions lint (the only one that was enabled from the "cargo" group)---which was not particularly useful anyway

[PULL 06/16] rust: cell: remove support for running doctests with "cargo test --doc"

2025-06-03 Thread Paolo Bonzini
This is not needed anymore now that tests link with libqemuutil. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/cell.rs | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/rust/qemu-api/src/cell.rs b/rust/qemu-api/src/cell.rs index 05ce09f6cb6..27063b0

[PATCH v3] meson: fix Windows build

2025-06-03 Thread oltolm
The build failed when run on Windows. I replaced calls to Unix programs like ´cat´, ´sed´ and ´true´ with calls to ´python´. I wrapped calls to ´os.path.relpath´ in try-except because it can fail when the two paths are on different drives. I made sure to convert the Windows paths to Unix paths to p

Re: [PATCH v2] meson: fix Windows build

2025-06-03 Thread Oleg Tolmatcev
Am Di., 3. Juni 2025 um 19:56 Uhr schrieb Stefan Hajnoczi : > > On Tue, Jun 3, 2025 at 1:00 PM Oleg Tolmatcev > wrote: > > > > Am Mo., 2. Juni 2025 um 20:45 Uhr schrieb Stefan Hajnoczi > > : > > > > > > > +try: > > > > +event_filename = os.path.relpath(event.filename) > > > > +ex

Re: [RFC PATCH v11 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-06-03 Thread Cédric Le Goater
On 6/3/25 20:01, Rorie Reyes wrote: On 6/3/25 10:21 AM, Cédric Le Goater wrote: On 6/3/25 14:58, Rorie Reyes wrote: Hey Cedric, You mentioned the following in my v9 patches "In that case, let's keep it simple (no mutex) and add a assert(bql_locked()) statement where we think the bql should b

[PATCH] tests/functional: Add a test for the Arduino UNO machine

2025-06-03 Thread Thomas Huth
From: Thomas Huth Check whether we can run a kernel that prints something to the serial console. Signed-off-by: Thomas Huth --- MAINTAINERS | 3 ++- tests/functional/meson.build | 1 + tests/functional/test_avr_uno.py | 32 3 files ch

Re: [PATCH 05/13] acpi: Send the GPE event of sleep for x86

2025-06-03 Thread Annie Li
Hi Igor, On 6/3/2025 8:34 AM, Igor Mammedov wrote: On Wed, 28 May 2025 12:39:52 -0400 Annie Li wrote: The GPE event is triggered to notify x86 guest to sleep itself. The function acpi_send_sleep_event will also trigger GED events on HW-reduced systems where ACPI GED sleep event is supported.

Re: [PATCH 00/13] Support ACPI Control Method Sleep button

2025-06-03 Thread Annie Li
Hi Igor, On 6/3/2025 8:18 AM, Igor Mammedov wrote: On Wed, 28 May 2025 12:35:45 -0400 Annie Li wrote: The ACPI sleep button can be implemented as a fixed hardware button or Control Method Sleep button. The patch of implementing a fixed hardware sleep button was posted here 1). More discussio

Re: [PATCH 03/13] acpi: Support Control Method sleep button for x86

2025-06-03 Thread Annie Li
Hi Igor, On 6/3/2025 8:52 AM, Igor Mammedov wrote: On Wed, 28 May 2025 12:39:17 -0400 Annie Li wrote: Add Control Method Sleep button and its GPE event handler for x86 platform. The GPE event handler notifies OSPM when the Sleep button event is triggered. Signed-off-by: Annie Li --- hw/i3

Re: [PATCH 01/13] acpi: Implement control method sleep button

2025-06-03 Thread Annie Li
Hello Igor, On 6/3/2025 8:31 AM, Igor Mammedov wrote: On Wed, 28 May 2025 12:38:34 -0400 Annie Li wrote: The fixed hardware sleep button isn't appropriate for hardware reduced platform. This patch implements the control method sleep button in a separate source file so that the button can be ad

Re: [PATCH 12/13] microvm: enable suspend

2025-06-03 Thread Annie Li
Hi Igor, On 6/3/2025 9:03 AM, Igor Mammedov wrote: On Wed, 28 May 2025 12:42:03 -0400 Annie Li wrote: The function qemu_wakeup_suspend_enabled combines the suspend and wakeup together. However, the microvm doesn't support wakeup yet. Suspend is enabled here, but wakeup doesn't actually work f

Re: [PULL 0/1] Tracing patches

2025-06-03 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes. signature.asc Description: PGP signature

Re: [RFC 08/11] aio-posix: gracefully handle io_uring_queue_init() failure

2025-06-03 Thread Stefan Hajnoczi
On Tue, Jun 03, 2025 at 08:05:58AM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Wed, May 28, 2025 at 05:12:14PM -0500, Eric Blake wrote: > >> On Wed, May 28, 2025 at 03:09:13PM -0400, Stefan Hajnoczi wrote: > >> > io_uring may not be available at runtime due to system polici

Re: [PULL 00/13] QAPI patches patches for 2025-06-03

2025-06-03 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] tests/functional: Speed up the avr_mega2560 test

2025-06-03 Thread Thomas Huth
From: Thomas Huth We can simply check for the expected pattern on the console, no need to wait for two seconds here to search for the pattern in the log at the end. While we're at it, also remove the obsolete "timeout" variable from this test. Signed-off-by: Thomas Huth --- tests/functional/t

Re: [PATCH v3 3/3] docs: define policy forbidding use of AI code generators

2025-06-03 Thread Stefan Hajnoczi
On Tue, Jun 3, 2025 at 10:25 AM Markus Armbruster wrote: > > From: Daniel P. Berrangé > > There has been an explosion of interest in so called AI code > generators. Thus far though, this is has not been matched by a broadly > accepted legal interpretation of the licensing implications for code >

Re: [PATCH] target/riscv/kvm: implement SBI debug console (DBCN) calls

2025-06-03 Thread Daniel Henrique Barboza
On 6/3/25 10:19 AM, Philippe Mathieu-Daudé wrote: Hi Daniel, (now merged as commit a6b53378f537) On 25/4/24 17:50, Daniel Henrique Barboza wrote: SBI defines a Debug Console extension "DBCN" that will, in time, replace the legacy console putchar and getchar SBI extensions. The appeal of th

Re: [RFC PATCH v11 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-06-03 Thread Rorie Reyes
On 6/3/25 10:21 AM, Cédric Le Goater wrote: On 6/3/25 14:58, Rorie Reyes wrote: Hey Cedric, You mentioned the following in my v9 patches "In that case, let's keep it simple (no mutex) and add a assert(bql_locked()) statement where we think the bql should be protecting access to shared reso

Re: [PATCH v2] meson: fix Windows build

2025-06-03 Thread Stefan Hajnoczi
On Tue, Jun 3, 2025 at 1:00 PM Oleg Tolmatcev wrote: > > Am Mo., 2. Juni 2025 um 20:45 Uhr schrieb Stefan Hajnoczi > : > > > > > +try: > > > +event_filename = os.path.relpath(event.filename) > > > +except ValueError: > > > +event_filename = event.filename > > > +event_

Re: [PATCH v2 3/4] vfio/iommufd: Implement [at|de]tach_hwpt handlers

2025-06-03 Thread Eric Auger
On 5/30/25 11:35 AM, Zhenzhong Duan wrote: > Implement [at|de]tach_hwpt handlers in VFIO subsystem. vIOMMU > utilizes them to attach to or detach from hwpt on host side. > > Signed-off-by: Yi Liu > Signed-off-by: Zhenzhong Duan > Reviewed-by: Cédric Le Goater Reviewed-by: Eric Auger Eric >

Re: [PATCH v2] meson: fix Windows build

2025-06-03 Thread Oleg Tolmatcev
Am Mo., 2. Juni 2025 um 20:45 Uhr schrieb Stefan Hajnoczi : > > > +try: > > +event_filename = os.path.relpath(event.filename) > > +except ValueError: > > +event_filename = event.filename > > +event_filename = PurePath(event_filename).as_posix() > > Please do this in one

Re: [PATCH v3 1/3] docs: introduce dedicated page about code provenance / sign-off

2025-06-03 Thread Alex Bennée
Markus Armbruster writes: > From: Daniel P. Berrangé > > Currently we have a short paragraph saying that patches must include > a Signed-off-by line, and merely link to the kernel documentation. > The linked kernel docs have a lot of content beyond the part about > sign-off an thus are misleadin

Re: [PATCH 13/13] migration/postcopy: blocktime allows track / report non-vCPU faults

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > When used to report page fault latencies, the blocktime feature can be > almost useless when KVM async page fault is enabled, because in most cases > such remote fault will kickoff async page faults, then it's not trackable > from blocktime layer. > > After all these recent rew

Re: [PATCH 12/13] migration/postcopy: Optimize blocktime fault tracking with hashtable

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > Currently, the postcopy blocktime feature maintains vCPU fault information > using an array (vcpu_addr[]). It has two issues. > > Issue 1: Performance Concern > > > The old algorithm was almost OK and fast on inserts, except that the lookup > is sl

Re: [PATCH 11/13] migration/postcopy: Cleanup the total blocktime accounting

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > The variable vcpu_total_blocktime isn't easy to follow. In reality, it > wants to capture the case where all vCPUs are stopped, and now there will > be some vCPUs starts running. > > The name now starts to conflict with vcpu_blocktime_total[], meanwhile it's > actually not nec

Re: [PATCH 06/13] migration/postcopy: Bring blocktime layer to us level

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > With 64-bit fields, it is trivial. The caution is when exposing any values > in QMP, it was still declared with milliseconds (ms). Hence it's needed to > do the convertion when exporting the values to existing QMP queries. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Ro

Re: [PATCH 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > Blocktime so far only cares about the time one vcpu (or the whole system) > got blocked. It would be also be helpful if it can also report the latency > of page requests, which could be very sensitive during postcopy. > > Blocktime itself is sometimes not very important, espec

Re: [PATCH 10/13] migration/postcopy: Cache the tid->vcpu mapping for blocktime

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > Looking up the vCPU index for each fault can be expensive when there're > hundreds of vCPUs. Provide a cache for tid->vcpu instead with a hash > table, then lookup from there. > > When at it, add another counter to record how many non-vCPU faults it gets. > For example, the ma

Re: [PATCH] i386/kvm: Prefault memory on page state change

2025-06-03 Thread Xiaoyao Li
On 6/3/2025 11:00 PM, Paolo Bonzini wrote: I'm applying Tom's patch to get it out of his queue, but will delay sending a pull request until the Linux-side fix is accepted. BTW, for the patch itself. Reviewed-by: Xiaoyao Li Tested-by: Xiaoyao Li

Re: [PATCH 09/13] migration/postcopy: Initialize blocktime context only until listen

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > Before this patch, the blocktime context can be created very early, because > postcopy_ram_supported_by_host() <- migrate_caps_check() can happen during > migration object init. > > The trick here is the blocktime context needs system vCPU information, > which seems to be possi

Re: [PATCH 05/13] migration/postcopy: Drop PostcopyBlocktimeContext.start_time

2025-06-03 Thread Fabiano Rosas
Fabiano Rosas writes: > Peter Xu writes: > >> Now with 64bits, the offseting using start_time is not needed anymore, >> because the array can always remember the whole timestamp. >> >> Then drop the unused parameter in get_low_time_offset() altogether. >> >> Signed-off-by: Peter Xu >> --- >> m

Re: [PATCH 05/13] migration/postcopy: Drop PostcopyBlocktimeContext.start_time

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > Now with 64bits, the offseting using start_time is not needed anymore, > because the array can always remember the whole timestamp. > > Then drop the unused parameter in get_low_time_offset() altogether. > > Signed-off-by: Peter Xu > --- > migration/postcopy-ram.c | 10 --

Re: [PATCH 07/13] migration/postcopy: Add blocktime fault counts per-vcpu

2025-06-03 Thread Fabiano Rosas
Peter Xu writes: > Add a field to count how many remote faults one vCPU has taken. So far > it's still not used, but will be soon. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid field

2025-06-03 Thread Xiaoyao Li
On 6/3/2025 11:02 PM, Igor Mammedov wrote: On Wed, 28 May 2025 13:23:49 +0800 Zhao Liu wrote: On Wed, May 28, 2025 at 10:09:56AM +0800, Xiaoyao Li wrote: Date: Wed, 28 May 2025 10:09:56 +0800 From: Xiaoyao Li Subject: Re: [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid field

Re: [RFC PATCH 24/25] target/i386/mshv: Implement mshv_vcpu_run()

2025-06-03 Thread Magnus Kulke
On Tue, May 20, 2025 at 10:52:39PM +, Wei Liu wrote: > On Tue, May 20, 2025 at 01:30:17PM +0200, Magnus Kulke wrote: > > +case HVMSG_GPA_INTERCEPT: > > I'm not sure why you want to handle UNMAPPED_GPA and GPA_INTERCEPT > separately. In Cloud Hypervisor there is one code path for both. > >

Re: [PATCH v5 0/4] Building PPTT with root node and identical implementation flag

2025-06-03 Thread Alireza Sanaee via
On Sun, 1 Jun 2025 08:32:52 -0400 "Michael S. Tsirkin" wrote: > On Fri, May 23, 2025 at 11:26:50AM +0100, Alireza Sanaee wrote: > > OS like Linux is using PPTT processor node's identical > > implementation flag [1] to infer whether the whole system or a > > certain CPU cluster is homogeneous or n

Re: [PATCH 06/14] rust: qemu-api: add bindings to Error

2025-06-03 Thread Paolo Bonzini
On 6/2/25 15:18, Markus Armbruster wrote: Paolo Bonzini writes: Provide an implementation of std::error::Error that bridges the Rust anyhow::Error and std::panic::Location types with QEMU's Error*. It also has several utility methods, analogous to error_propagate(), that convert a Result into

Re: [PATCH v3 3/3] docs: define policy forbidding use of AI code generators

2025-06-03 Thread Kevin Wolf
Am 03.06.2025 um 16:25 hat Markus Armbruster geschrieben: > +TL;DR: > + > + **Current QEMU project policy is to DECLINE any contributions which are > + believed to include or derive from AI generated code. This includes > ChatGPT, > + CoPilot, Llama and similar tools** [...] > +Examples of to

Re: [PATCH] i386/kvm: Prefault memory on page state change

2025-06-03 Thread Xiaoyao Li
On 6/3/2025 11:00 PM, Paolo Bonzini wrote: On 6/3/25 13:47, Xiaoyao Li wrote: On 6/3/2025 3:41 PM, Xiaoyao Li wrote: On 3/29/2025 4:30 AM, Tom Lendacky wrote: A page state change is typically followed by an access of the page(s) and results in another VMEXIT in order to map the page into the

Re: [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array

2025-06-03 Thread Igor Mammedov
On Thu, 1 May 2025 23:04:43 +0200 Philippe Mathieu-Daudé wrote: > The hw_compat_2_8[] array was only used by the pc-q35-2.8 and > pc-i440fx-2.8 machines, which got removed. Remove it. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov > --- > include/hw/boards.h | 3 ---

Re: [PATCH V4 09/43] vfio/container: register container for cpr

2025-06-03 Thread Cédric Le Goater
On 6/3/25 16:17, Steven Sistare wrote: On 6/3/2025 10:09 AM, Steven Sistare wrote: On 6/3/2025 7:57 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V4 09/43] vfio/container: register container for cpr Register a legacy container for cpr-transfer, repl

Re: [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field

2025-06-03 Thread Igor Mammedov
On Thu, 1 May 2025 23:04:42 +0200 Philippe Mathieu-Daudé wrote: > The KVMClockState::mach_use_reliable_get_clock boolean was only > used by the pc-q35-2.8 and pc-i440fx-2.8 machines, which got removed. > Remove it, along with the 'x-mach-use-reliable-get-clock' property. > > Signed-off-by: Phil

Re: [PATCH v3 0/3] docs: define policy forbidding use of "AI" / LLM code generators

2025-06-03 Thread Kevin Wolf
Am 03.06.2025 um 16:25 hat Markus Armbruster geschrieben: > More than a year ago, Daniel posted patches to put an AI policy in > writing. Reception was mostly positive. A v2 to address feedback > followed with some delay. But no pull request. > > I asked Daniel why, and he told me he was concer

Re: [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition

2025-06-03 Thread Igor Mammedov
On Thu, 1 May 2025 23:04:41 +0200 Philippe Mathieu-Daudé wrote: > The ICH9_LPC_SMI_F_BROADCAST_BIT feature bit was only set > in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' > property. We removed all machines using that array, lets remove > that property and all the code around it.

Re: [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array

2025-06-03 Thread Igor Mammedov
On Thu, 1 May 2025 23:04:40 +0200 Philippe Mathieu-Daudé wrote: > The pc_compat_2_8[] array was only used by the pc-q35-2.8 > and pc-i440fx-2.8 machines, which got removed. Remove it. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov > --- > include/hw/i386/pc.h | 3 ---

Re: [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines

2025-06-03 Thread Igor Mammedov
On Thu, 1 May 2025 23:04:39 +0200 Philippe Mathieu-Daudé wrote: > These machines has been supported for a period of more than 6 years. > According to our versioned machine support policy (see commit > ce80c4fa6ff "docs: document special exception for machine type > deprecation & removal") they c

RE: [PATCH v3 00/10] kvm/arm: Introduce a customizable aarch64 KVM host model

2025-06-03 Thread Cornelia Huck
On Tue, May 27 2025, Cornelia Huck wrote: > On Mon, May 26 2025, Cornelia Huck wrote: > >> On Fri, May 23 2025, Shameerali Kolothum Thodi >> wrote: >> >>> Hi, >>> -Original Message- From: Cornelia Huck Sent: Monday, April 14, 2025 5:39 PM To: eric.auger@gmail.c

Re: [PATCH 06/14] rust: qemu-api: add bindings to Error

2025-06-03 Thread Paolo Bonzini
On 6/3/25 12:32, Markus Armbruster wrote: Then Rust's propagate has the same behavior as C (Of course, here Rust is actually using C's error_propagate, so the two are equivalent.) *If* we want propagate semantics. I'm not sure we do. Yes, we do. This function is used at the Rust-to-C bounda

Re: [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid field

2025-06-03 Thread Igor Mammedov
On Wed, 28 May 2025 13:23:49 +0800 Zhao Liu wrote: > On Wed, May 28, 2025 at 10:09:56AM +0800, Xiaoyao Li wrote: > > Date: Wed, 28 May 2025 10:09:56 +0800 > > From: Xiaoyao Li > > Subject: Re: [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid > > field > > > > On 5/12/2025 4:39 PM,

Re: [PATCH] i386/kvm: Prefault memory on page state change

2025-06-03 Thread Paolo Bonzini
On 6/3/25 13:47, Xiaoyao Li wrote: On 6/3/2025 3:41 PM, Xiaoyao Li wrote: On 3/29/2025 4:30 AM, Tom Lendacky wrote: A page state change is typically followed by an access of the page(s) and results in another VMEXIT in order to map the page into the nested page table. Depending on the size of

Re: [PATCH v4 00/48] block: do not drain while holding the graph lock

2025-06-03 Thread Kevin Wolf
Am 30.05.2025 um 17:10 hat Fiona Ebner geschrieben: > Previous discussions: > v3: [0] > v2: [1] > v1: [2] > > Changes in v4: > * Document requirement to drain all block nodes for affected > functions. > * Also cover the generated bdrv_co_unref_child(). > * Remove now superfluous drain_bs variabl

Re: [PATCH 1/2] i386/tdx: Fix build on 32-bit host

2025-06-03 Thread Paolo Bonzini
On 6/3/25 13:26, Philippe Mathieu-Daudé wrote: On 3/6/25 05:04, Xiaoyao Li wrote: On 6/3/2025 1:31 AM, Cédric Le Goater wrote: Use PRI formats where required and fix pointer cast. Maybe we can make 32-bit build exclusive with CONFIG_TDX? since TDX is not supported on 32-bit host. Yes pleas

Re: [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid field

2025-06-03 Thread Igor Mammedov
On Mon, 12 May 2025 10:39:33 +0200 Philippe Mathieu-Daudé wrote: > The X86CPU::check_cpuid boolean was only set in the > pc_compat_2_4[] array, via the 'check=off' property. > We removed all machines using that array, lets remove > that CPU property and simplify x86_cpu_realizefn(). > > Signed-o

Re: [PATCH 0/2] i386/tdx: Fix build on 32-bit host

2025-06-03 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v4 03/19] hw/i386/pc: Remove pc_compat_2_4[] array

2025-06-03 Thread Igor Mammedov
On Mon, 12 May 2025 10:39:32 +0200 Philippe Mathieu-Daudé wrote: > The pc_compat_2_4[] array was only used by the pc-q35-2.4 > and pc-i440fx-2.4 machines, which got removed. Remove it. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Daniel P. Berrangé > Reviewed-by: Zhao Liu Reviewe

  1   2   3   >