Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-11 Thread Philippe Mathieu-Daudé
On 11/2/25 22:43, Kevin Wolf wrote: This adds a separate block driver for the bochs image format called 'bochs-rs' so that for the moment both the C implementation and the Rust implementation can be present in the same build. The intention is to remove the C implementation eventually and rename t

Re: [PATCH 07/11] block: Add bdrv_open_blockdev_ref_file()

2025-02-11 Thread Philippe Mathieu-Daudé
On 11/2/25 22:43, Kevin Wolf wrote: This is the equivalent of bdrv_open_file_child() to be used in cases where the caller is QAPI based and has a BlockdevRef rather than a filename and an options QDict. Signed-off-by: Kevin Wolf --- include/block/block-global-state.h | 4 block.c

Re: [PATCH 02/11] meson: Add rust_block_ss and link tools with it

2025-02-11 Thread Philippe Mathieu-Daudé
On 11/2/25 22:43, Kevin Wolf wrote: Signed-off-by: Kevin Wolf --- meson.build| 36 storage-daemon/meson.build | 2 +- 2 files changed, 33 insertions(+), 5 deletions(-) if have_rust and target_type == 'system' -target_rust = ru

Re: [PATCH V3] target/loongarch: fix vcpu reset command word issue

2025-02-11 Thread Philippe Mathieu-Daudé
On 12/2/25 02:56, Xianglai Li wrote: When the KVM_REG_LOONGARCH_VCPU_RESET command word is sent to the kernel through the kvm_set_one_reg interface, the parameter source needs to be a legal address, otherwise the kernel will return an error and the command word will fail to be sent. Signed-off-b

Re: [PATCH 10/11] include/exec: Change vaddr to uintptr_t

2025-02-11 Thread Philippe Mathieu-Daudé
On 5/2/25 05:03, Richard Henderson wrote: Since we no longer support 64-bit guests on 32-bit hosts, we can use a 32-bit type on a 32-bit host. Signed-off-by: Richard Henderson --- include/exec/vaddr.h | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) Reviewed-by: Phili

Re: [PATCH 09/11] accel/tcg: Fix tlb_set_page_with_attrs, tlb_set_page

2025-02-11 Thread Philippe Mathieu-Daudé
On 5/2/25 05:03, Richard Henderson wrote: The declarations use vaddr for size. Which seems dubious, since TARGET_PAGE_SIZE is int IIUC. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/acc

Re: [PATCH 08/11] plugins: Fix qemu_plugin_read_memory_vaddr parameters

2025-02-11 Thread Philippe Mathieu-Daudé
On 5/2/25 05:03, Richard Henderson wrote: The declaration uses uint64_t for addr. Fixes: 595cd9ce2ec ("plugins: add plugin API to read guest memory") Signed-off-by: Richard Henderson --- plugins/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.c b/plu

Re: [PATCH 07/11] tcg: Replace addr{lo, hi}_reg with addr_reg in TCGLabelQemuLdst

2025-02-11 Thread Philippe Mathieu-Daudé
On 5/2/25 05:03, Richard Henderson wrote: There is now always only one guest address register. Signed-off-by: Richard Henderson --- tcg/tcg.c| 18 +- tcg/aarch64/tcg-target.c.inc | 4 ++-- tcg/arm/tcg-target.c.inc | 4 ++-- tcg/i386/tcg

[ANNOUNCE] QEMU 7.2.16 Stable released

2025-02-11 Thread Michael Tokarev
Hi everyone, The QEMU v7.2.16 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source https://download.qemu.org/qemu-7.2.16.tar.xz https://download.qemu.org/qemu-7.2.16.tar.xz.sig (signature) v7.2.16 is now tagged in t

[ANNOUNCE] QEMU 9.1.3 Stable released

2025-02-11 Thread Michael Tokarev
Hi everyone, The QEMU v9.1.3 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source https://download.qemu.org/qemu-9.1.3.tar.xz https://download.qemu.org/qemu-9.1.3.tar.xz.sig (signature) v9.1.3 is now tagged in the o

[ANNOUNCE] QEMU 9.2.1 Stable released

2025-02-11 Thread Michael Tokarev
Hi everyone, The QEMU v9.2.1 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source https://download.qemu.org/qemu-9.2.1.tar.xz https://download.qemu.org/qemu-9.2.1.tar.xz.sig (signature) v9.2.1 is now tagged in the o

[ANNOUNCE] QEMU 8.2.9 Stable released

2025-02-11 Thread Michael Tokarev
Hi everyone, The QEMU v8.2.9 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source https://download.qemu.org/qemu-8.2.9.tar.xz https://download.qemu.org/qemu-8.2.9.tar.xz.sig (signature) v8.2.9 is now tagged in the o

[PATCH v3 2/2] hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI-PCI device

2025-02-11 Thread Suravee Suthikulpanit
Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Signed-off-by: Suravee Suthikulpanit --- hw/i386/amd_iommu.c | 58 - 1 file changed, 52 insertions(

[PATCH v3 0/2] hw/i386/amd_iommu: Add migration support

2025-02-11 Thread Suravee Suthikulpanit
Currently, amd-iommu device does not support migration. This series addresses an issue due hidden AMDVI-PCI device enumeration. Then introduces migratable VMStateDescription, which saves necessary parameters for the device. Changes from v2: (https://lore.kernel.org/all/20250206051856.323651-1-sura

[PATCH v3 1/2] hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow full control over the PCI device creation

2025-02-11 Thread Suravee Suthikulpanit
Current amd-iommu model internally creates an AMDVI-PCI device. Here is a snippet from info qtree: bus: main-system-bus type System dev: amd-iommu, id "" xtsup = false pci-id = "" intremap = "on" device-iotlb = false pt = true ... dev: q35-pcihost, i

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Eldon Stegall
On Wed, Feb 12, 2025 at 02:39:16AM +0100, Thomas Huth wrote: > On 12/02/2025 01.41, Thomas Huth wrote: > > On 11/02/2025 20.03, Philippe Mathieu-Daudé wrote: > >> On 11/2/25 19:53, Philippe Mathieu-Daudé wrote: > >>> On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: > On 11/2/25 19:26, Stefan Ha

[PATCH 2/3] tests/qtest/ufs-test: Prepare for MCQ test

2025-02-11 Thread Jeuk Kim
In legacy doorbell mode, the command descriptor slot matched the UTRD slot. To maintain consistency in MCQ mode, command descriptor slot allocation and deallocation now use a bitmap-based approach. Signed-off-by: Jeuk Kim --- tests/qtest/ufs-test.c | 562 +

[PATCH 3/3] tests/qtest/ufs-test: Add test code for MCQ functionality

2025-02-11 Thread Jeuk Kim
This patch tests whether MCQ initialization and basic read-write operations work correctly when the MCQ parameter of hw/ufs is enabled. Signed-off-by: Jeuk Kim --- tests/qtest/ufs-test.c | 171 ++--- 1 file changed, 142 insertions(+), 29 deletions(-) diff --g

[PATCH 1/3] tests/qtest/ufs-test: Cleanup unused code

2025-02-11 Thread Jeuk Kim
Removed dead code related to the unimplemented task management request. Signed-off-by: Jeuk Kim --- tests/qtest/ufs-test.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/qtest/ufs-test.c b/tests/qtest/ufs-test.c index 1f860b41c0..ce8b398c6b 100644 --- a/tes

[PATCH 0/3] tests/qtest/ufs-test: Add MCQ tests

2025-02-11 Thread Jeuk Kim
This series adds test support for UFS Multi-Circular Queue (MCQ) mode in QEMU. It includes MCQ initialization tests, a bitmap-based slot allocation method, and cleanup of unused code. Jeuk Kim (3): tests/qtest/ufs-test: Cleanup unused code tests/qtest/ufs-test: Prepare for MCQ test tests

[PATCH 3/6] tcg/loongarch64: Use 'z' constraint

2025-02-11 Thread Richard Henderson
Replace target-specific 'Z' with generic 'z'. Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 15 ++--- tcg/loongarch64/tcg-target-con-str.h | 1 - tcg/loongarch64/tcg-target.c.inc | 32 3 files changed, 21 insertions(+), 27 d

[PATCH 5/6] tcg/riscv: Use 'z' constraint

2025-02-11 Thread Richard Henderson
Replace target-specific 'Z' with generic 'z'. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 10 +- tcg/riscv/tcg-target-con-str.h | 1 - tcg/riscv/tcg-target.c.inc | 12 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tcg/riscv/t

[PATCH 6/6] tcg/sparc64: Use 'z' constraint

2025-02-11 Thread Richard Henderson
Replace target-specific 'Z' with generic 'z'. Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target-con-set.h | 12 ++-- tcg/sparc64/tcg-target-con-str.h | 1 - tcg/sparc64/tcg-target.c.inc | 12 ++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/tcg

[PATCH 4/6] tcg/mips: Use 'z' constraint

2025-02-11 Thread Richard Henderson
Replace target-specific 'Z' with generic 'z'. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target-con-set.h | 26 ++--- tcg/mips/tcg-target-con-str.h | 1 - tcg/mips/tcg-target.c.inc | 44 ++- 3 files changed, 31 insertions(+), 40 deletio

[PATCH 0/6] tcg: Introduce constraint for zero register

2025-02-11 Thread Richard Henderson
Based-on: 20250205040341.2056361-1-richard.hender...@linaro.org ("[PATCH 00/11] tcg: Cleanups after disallowing 64-on-32") Introduce a new general-purpose constraint which maps 0 to TCG_REG_ZERO, if defined. This differs from existing constant constraints in that const_arg[*] is recorded as false

[PATCH 1/6] tcg: Introduce the 'z' constraint for a hardware zero register

2025-02-11 Thread Richard Henderson
For loongarch, mips, riscv and sparc, a zero register is available all the time. For aarch64, register index 31 depends on context: sometimes it is the stack pointer, and sometimes it is the zero register. Introduce a new general-purpose constraint which maps 0 to TCG_REG_ZERO, if defined. This

[PATCH 2/6] tcg/aarch64: Use 'z' constraint

2025-02-11 Thread Richard Henderson
Note that 'Z' is still used for addsub2. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target-con-set.h | 12 - tcg/aarch64/tcg-target.c.inc | 46 ++-- 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/tcg/aarch64/tcg-target-con-set.h

[PULL 5/6] hw/loongarch/virt: Remove unused ipistate

2025-02-11 Thread Bibo Mao
Field ipistate in LoongArch CPU object is not used any more, remove it here. Signed-off-by: Bibo Mao Reviewed-by: Bibo Mao --- hw/loongarch/virt.c| 5 - target/loongarch/cpu.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index db4821722

[PULL 1/6] hw/loongarch/virt: Rename filename acpi-build with virt-acpi-build

2025-02-11 Thread Bibo Mao
File acpi-build.c is relative with virt machine type, rename it with virt-acpi-build.c Signed-off-by: Bibo Mao Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/loongarch/meson.build | 2 +- hw/loongarch/{acpi-build.c => virt-acpi-build.c} | 0

[PULL 4/6] hw/loongarch/virt: Set iocsr address space when CPU is created

2025-02-11 Thread Bibo Mao
There is only one iocsr address space for the whole virt-machine board. When CPU is created, the one of percpu points to that of the board. Here set iocsr address space when CPU is created rather than IPI creation stage. Signed-off-by: Bibo Mao Reviewed-by: Bibo Mao --- hw/loongarch/virt.c | 2

[PULL 0/6] loongarch-to-apply queue

2025-02-11 Thread Bibo Mao
The following changes since commit ffaf7f0376f8040ce9068d71ae9ae8722505c42e: Merge tag 'pull-10.0-testing-and-gdstub-updates-100225-1' of https://gitlab.com/stsquad/qemu into staging (2025-02-10 13:26:17 -0500) are available in the Git repository at: https://gitlab.com/bibo-mao/qemu.git tag

[PULL 3/6] hw/loongarch/virt: Add separate file for fdt building

2025-02-11 Thread Bibo Mao
Similiar with virt-acpi-build.c, file virt-fdt-build.c is added here. And move functions relative with fdt table building to the file. It is only code movement and there is no function change. Signed-off-by: Bibo Mao Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw

[PULL 2/6] hw/loongarch/virt: Rename function prefix name

2025-02-11 Thread Bibo Mao
Replace function prefix name loongarch_xxx with virt_xxx in file virt-acpi-build.c Signed-off-by: Bibo Mao Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/loongarch/virt-acpi-build.c | 6 +++--- hw/loongarch/virt.c| 2 +- include/hw/loongarch/virt.h

[PULL 6/6] hw/loongarch/virt: CPU irq line connection improvement

2025-02-11 Thread Bibo Mao
Interrupt controller extioi and ipi connect to CPU with irq line method. With command -smp x, -device la464-loongarch-cpu, smp.cpus is not accurate for all possible CPU objects, possible_cpu_arch_ids() is used. Signed-off-by: Bibo Mao Reviewed-by: Bibo Mao --- hw/loongarch/virt.c | 60 +

Re: [PATCH v2] hw/i386/amd_iommu: Allow migration

2025-02-11 Thread Suthikulpanit, Suravee
Daniel, On 2/6/2025 4:01 PM, Daniel P. Berrangé wrote: On Thu, Feb 06, 2025 at 05:18:56AM +, Suravee Suthikulpanit wrote: Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Signed-off-by:

Re: [PATCH v6 00/10] Support virtio-gpu DRM native context

2025-02-11 Thread Dmitry Osipenko
On 2/6/25 01:13, Dmitry Osipenko wrote: > On 2/5/25 23:08, Dmitry Osipenko wrote: >>> Thanks for showing me the video. I will take a look and check what would go >>> wrong here. I kinda understand corruption may happen >>> in some scenario but I don't know what could cause the upside down image.

[PATCH V3] target/loongarch: fix vcpu reset command word issue

2025-02-11 Thread Xianglai Li
When the KVM_REG_LOONGARCH_VCPU_RESET command word is sent to the kernel through the kvm_set_one_reg interface, the parameter source needs to be a legal address, otherwise the kernel will return an error and the command word will fail to be sent. Signed-off-by: Xianglai Li --- Cc: Bibo Mao Cc: P

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Thomas Huth
On 12/02/2025 01.41, Thomas Huth wrote: On 11/02/2025 20.03, Philippe Mathieu-Daudé wrote: On 11/2/25 19:53, Philippe Mathieu-Daudé wrote: On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: On 11/2/25 19:26, Stefan Hajnoczi wrote: On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote:

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Thomas Huth
On 11/02/2025 20.03, Philippe Mathieu-Daudé wrote: On 11/2/25 19:53, Philippe Mathieu-Daudé wrote: On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: On 11/2/25 19:26, Stefan Hajnoczi wrote: On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote: The following changes since commit 54e91

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Thomas Huth
On 11/02/2025 19.53, Philippe Mathieu-Daudé wrote: On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: On 11/2/25 19:26, Stefan Hajnoczi wrote: On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote: The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886:    Merge t

Incorrect warnings for riscv64-linuxuser

2025-02-11 Thread Richard Henderson
f9653d4eb2c target/riscv: Add Smrnmi cpu extension 2d8e8259287 target/riscv: Add Smdbltrp ISA extension enable switch These patches are supposed to be emitting a warning about disabling an extension that requires a new OpenSBI image. But they are also emitting the warning for user-only. Whi

Re: [PATCH v2 04/18] hw/arm: Add i.MX 8M Plus EVK board

2025-02-11 Thread Bernhard Beschow
Am 11. Februar 2025 10:06:19 UTC schrieb Peter Maydell : >On Mon, 10 Feb 2025 at 22:44, Bernhard Beschow wrote: >> >> >> >> Am 10. Februar 2025 17:30:01 UTC schrieb Peter Maydell >> : >> >On Tue, 4 Feb 2025 at 09:21, Bernhard Beschow wrote: >> >> >> >> As a first step, implement the bare min

[PULL 11/14] hmp: use cpu_get_phys_page_debug() in hmp_gva2gpa()

2025-02-11 Thread Peter Xu
From: David Hildenbrand We don't need the MemTxAttrs, so let's simply use the simpler function variant. Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20250210084648.33798-7-da...@redhat.com Signed-off-by: Peter Xu -

[PULL 09/14] physmem: disallow direct access to RAM DEVICE in address_space_write_rom()

2025-02-11 Thread Peter Xu
From: David Hildenbrand As documented in commit 4a2e242bbb306 ("memory: Don't use memcpy for ram_device regions"), we disallow direct access to RAM DEVICE regions. This change implies that address_space_write_rom() and cpu_memory_rw_debug() won't be able to write to RAM DEVICE regions. It will a

[PULL 06/14] physmem: factor out memory_region_is_ram_device() check in memory_access_is_direct()

2025-02-11 Thread Peter Xu
From: David Hildenbrand As documented in commit 4a2e242bbb306 ("memory: Don't use memcpy for ram_device regions"), we disallow direct access to RAM DEVICE regions. Let's make this clearer to prepare for further changes. Note that romd regions will never be RAM DEVICE at the same time. Reviewed-

[PULL 13/14] system/physmem: handle hugetlb correctly in qemu_ram_remap()

2025-02-11 Thread Peter Xu
From: William Roche The list of hwpoison pages used to remap the memory on reset is based on the backend real page size. To correctly handle hugetlb, we must mmap(MAP_FIXED) a complete hugetlb page; hugetlb pages cannot be partially mapped. Signed-off-by: William Roche Co-developed-by: David Hi

[PULL 03/14] system/vl: extract overcommit option parsing into a helper

2025-02-11 Thread Peter Xu
From: Daniil Tatianin This will be extended in the future commits, let's move it out of line right away so that it's easier to read. Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter Xu Signed-off-by: Daniil Tatianin Link: https://lore.kernel.org/r/20250123131944.391886-3-d-tatia.

[PULL 12/14] physmem: teach cpu_memory_rw_debug() to write to more memory regions

2025-02-11 Thread Peter Xu
From: David Hildenbrand Right now, we only allow for writing to memory regions that allow direct access using memcpy etc; all other writes are simply ignored. This implies that debugging guests will not work as expected when writing to MMIO device regions. Let's extend cpu_memory_rw_debug() to w

[PULL 07/14] physmem: factor out RAM/ROMD check in memory_access_is_direct()

2025-02-11 Thread Peter Xu
From: David Hildenbrand Let's factor more of the generic "is this directly accessible" check, independent of the "write" condition out. Note that the "!mr->rom_device" check in the write case essentially disallows the memory_region_is_romd() condition again. Further note that RAM DEVICE regions

[PULL 10/14] memory: pass MemTxAttrs to memory_access_is_direct()

2025-02-11 Thread Peter Xu
From: David Hildenbrand We want to pass another flag that will be stored in MemTxAttrs. So pass MemTxAttrs directly. Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20250210084648.33798-6-da...@redhat.com Signed-off-by

[PULL 05/14] overcommit: introduce mem-lock=on-fault

2025-02-11 Thread Peter Xu
From: Daniil Tatianin Locking the memory without MCL_ONFAULT instantly prefaults any mmaped anonymous memory with a write-fault, which introduces a lot of extra overhead in terms of memory usage when all you want to do is to prevent kcompactd from migrating and compacting QEMU pages. Add an optio

[PULL 04/14] system: introduce a new MlockState enum

2025-02-11 Thread Peter Xu
From: Daniil Tatianin Replace the boolean value enable_mlock with an enum and add a helper to decide whether we should be calling os_mlock. This is a stepping stone towards introducing a new mlock mode, which will be the third possible state of this enum. Reviewed-by: Vladimir Sementsov-Ogievsk

[PULL 14/14] system/physmem: poisoned memory discard on reboot

2025-02-11 Thread Peter Xu
From: William Roche Repair poisoned memory location(s), calling ram_block_discard_range(): punching a hole in the backend file when necessary and regenerating a usable memory. If the kernel doesn't support the madvise calls used by this function and we are dealing with anonymous memory, fall back

[PULL 01/14] system/physmem: take into account fd_offset for file fallocate

2025-02-11 Thread Peter Xu
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 Revie

[PULL 02/14] os: add an ability to lock memory on_fault

2025-02-11 Thread Peter Xu
From: Daniil Tatianin This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter Xu Signed-off-by: Daniil Tatianin Link: https://lore.kernel.org/r/20250123131944.391886-2-d-ta

[PULL 08/14] physmem: factor out direct access check into memory_region_supports_direct_access()

2025-02-11 Thread Peter Xu
From: David Hildenbrand Let's factor the complete "directly accessible" check independent of the "write" condition out so we can reuse it next. We can now split up the checks RAM and ROMD check, so we really only check for RAM DEVICE in case of RAM -- ROM DEVICE is neither RAM not RAM DEVICE. R

[PULL 00/14] Mem next patches

2025-02-11 Thread Peter Xu
The following changes since commit ffaf7f0376f8040ce9068d71ae9ae8722505c42e: Merge tag 'pull-10.0-testing-and-gdstub-updates-100225-1' of https://gitlab.com/stsquad/qemu into staging (2025-02-10 13:26:17 -0500) are available in the Git repository at: https://gitlab.com/peterx/qemu.git tags/

Re: [PATCH v3 0/7] physmem: teach cpu_memory_rw_debug() to write to more memory regions

2025-02-11 Thread Peter Xu
On Mon, Feb 10, 2025 at 09:46:41AM +0100, David Hildenbrand wrote: > This is a follow-up to [1], implementing it by avoiding the use of > address_space_write_rom() in cpu_memory_rw_debug() completely, and > teaching address_space_write() about debug access instead, the can also > write to ROM. > >

Re: [PATCH v8 0/3] Poisoned memory recovery on reboot

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 09:27:04PM +, “William Roche wrote: > From: William Roche > > Here is a very simplified version of my fix only dealing with the > recovery of huge pages on VM reset. > --- > This set of patches fixes an existing bug with hardware memory errors > impacting hugetlbfs me

Re: [PATCH v7 3/6] accel/kvm: Report the loss of a large memory page

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 10:22:38PM +0100, William Roche wrote: > On 2/10/25 17:48, Peter Xu wrote: > > On Fri, Feb 07, 2025 at 07:02:22PM +0100, William Roche wrote: > > > [...] > > > So the main reason is a KVM "weakness" with kvm_send_hwpoison_signal(), > > > and > > > the second reason is to ha

[PATCH 02/11] meson: Add rust_block_ss and link tools with it

2025-02-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- meson.build| 36 storage-daemon/meson.build | 2 +- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 1f26801b69..30aae6b3c3 100644 --- a/meson.build +++ b/meson.build

[PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-11 Thread Kevin Wolf
This adds a separate block driver for the bochs image format called 'bochs-rs' so that for the moment both the C implementation and the Rust implementation can be present in the same build. The intention is to remove the C implementation eventually and rename this one into 'bochs'. This can only ha

Re: [PATCH v3 2/2] KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field

2025-02-11 Thread Sean Christopherson
On Mon, Feb 10, 2025, Tom Lendacky wrote: > On 2/7/25 17:34, Kim Phillips wrote: > > @@ -289,6 +291,7 @@ static_assert((X2AVIC_MAX_PHYSICAL_ID & > > AVIC_PHYSICAL_MAX_INDEX_MASK) == X2AVIC_ > > #define SVM_SEV_FEAT_RESTRICTED_INJECTION BIT(3) > > #define SVM_SEV_FEAT_ALTERNATE_INJECTION

[PATCH 09/11] rust/block: Add read support for block drivers

2025-02-11 Thread Kevin Wolf
This adds a map() function to the BlockDriver trait and makes use of it to implement reading from an image. Signed-off-by: Kevin Wolf --- rust/block/src/driver.rs | 100 +++ 1 file changed, 100 insertions(+) diff --git a/rust/block/src/driver.rs b/rust/block/

[PATCH 07/11] block: Add bdrv_open_blockdev_ref_file()

2025-02-11 Thread Kevin Wolf
This is the equivalent of bdrv_open_file_child() to be used in cases where the caller is QAPI based and has a BlockdevRef rather than a filename and an options QDict. Signed-off-by: Kevin Wolf --- include/block/block-global-state.h | 4 block.c| 30 +

[PATCH 05/11] rust/block: Add empty crate

2025-02-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- rust/Cargo.lock| 7 +++ rust/Cargo.toml| 1 + rust/block/Cargo.toml | 15 +++ rust/block/README.md | 3 +++ rust/block/meson.build | 19 +++ rust/block/src/lib.rs | 1 + rust/meson.build | 1 + 7 files ch

[PATCH 11/11] rust/block: Add format probing

2025-02-11 Thread Kevin Wolf
This adds format probing both to the BlockDriver trait and the bochs-rs block driver. With this, bochs-rs achieves feature parity with its C counterpart. Its probe function returns a higher priority so that it is preferred when both drivers are available. Signed-off-by: Kevin Wolf --- rust/block

[PATCH 04/11] rust/qemu-api: Add wrappers to run futures in QEMU

2025-02-11 Thread Kevin Wolf
This adds helper functions that allow running Rust futures to completion using QEMU's event loops. Signed-off-by: Kevin Wolf --- include/qemu/coroutine-rust.h | 24 +++ rust/wrapper.h| 1 + util/qemu-co-rust-async.c | 55 rust/qemu-api/meson.

[PATCH 08/11] rust/block: Add driver module

2025-02-11 Thread Kevin Wolf
This adds a barebones module for a block driver interface. Because there is no native QAPI support for Rust yet, opening images takes a few unsafe functions to call into C visitor functions. This should be cleaned up later. Signed-off-by: Kevin Wolf --- rust/block/src/driver.rs | 190 +++

[PATCH 03/11] rust: Add some block layer bindings

2025-02-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- rust/wrapper.h| 4 meson.build | 1 + rust/qemu-api/src/zeroable.rs | 5 +++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rust/wrapper.h b/rust/wrapper.h index 41be87adcf..c3e1e6f9cf 100644 --- a/rust/wrapper

[PATCH 06/11] rust/block: Add I/O buffer traits

2025-02-11 Thread Kevin Wolf
Types that implement IoBuffer can be used with safe I/O functions. Signed-off-by: Kevin Wolf --- rust/block/src/iobuffer.rs | 94 ++ rust/block/src/lib.rs | 2 + 2 files changed, 96 insertions(+) create mode 100644 rust/block/src/iobuffer.rs diff --git

[PATCH 01/11] rust: Build separate qemu_api_tools and qemu_api_system

2025-02-11 Thread Kevin Wolf
The existing qemu_api library can't be linked into tools because it contains a few bindings for things that only exist in the system emulator. This adds a new "system" feature to the qemu_api crate that enables the system emulator parts in it, and build the crate twice: qemu_api_tools is the core

[PATCH 00/11] rust/block: Add minimal block driver bindings

2025-02-11 Thread Kevin Wolf
This series adds minimal bindings for writing block drivers in Rust and converts the bochs block driver as an example. Some parts (such as the open functions) are still essentially C written in Rust syntax, while other parts already try to provide somewhat idiomatic abstractions. The main purpose

Re: [PATCH v2 8/9] tests/qtest/migration: Add a cancel test

2025-02-11 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Feb 11, 2025 at 12:01:35PM -0300, Fabiano Rosas wrote: >> The qmp_migrate_cancel() command is poorly tested and code inspection >> reveals that there might be concurrency issues with its usage. Add a >> test that runs a migration and calls qmp_migrate_cancel() at specif

Re: [PATCH v2 8/9] tests/qtest/migration: Add a cancel test

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 06:23:20PM -0300, Fabiano Rosas wrote: > It gets super boilerplatey: Let's go with what we have. Thanks, -- Peter Xu

[PATCH v8 0/3] Poisoned memory recovery on reboot

2025-02-11 Thread “William Roche
From: William Roche Here is a very simplified version of my fix only dealing with the recovery of huge pages on VM reset. --- This set of patches fixes an existing bug with hardware memory errors impacting hugetlbfs memory backed VMs and its recovery on VM reset. When using hugetlbfs large pages

[PATCH v8 1/3] system/physmem: handle hugetlb correctly in qemu_ram_remap()

2025-02-11 Thread “William Roche
From: William Roche The list of hwpoison pages used to remap the memory on reset is based on the backend real page size. To correctly handle hugetlb, we must mmap(MAP_FIXED) a complete hugetlb page; hugetlb pages cannot be partially mapped. Signed-off-by: William Roche Co-developed-by: David Hi

[PATCH v8 3/3] target/arm/kvm: Report memory errors injection

2025-02-11 Thread “William Roche
From: William Roche Generate an x86 similar error injection message on ras enabled ARM platforms. ARM qemu only deals with action required memory errors signaled with SIGBUS/BUS_MCEERR_AR, and will report a message on every memory error relayed to the VM. A message like: Guest Memory Error at QEM

[PATCH v8 2/3] system/physmem: poisoned memory discard on reboot

2025-02-11 Thread “William Roche
From: William Roche Repair poisoned memory location(s), calling ram_block_discard_range(): punching a hole in the backend file when necessary and regenerating a usable memory. If the kernel doesn't support the madvise calls used by this function and we are dealing with anonymous memory, fall back

Re: [PATCH v7 3/6] accel/kvm: Report the loss of a large memory page

2025-02-11 Thread William Roche
On 2/10/25 17:48, Peter Xu wrote: On Fri, Feb 07, 2025 at 07:02:22PM +0100, William Roche wrote: [...] So the main reason is a KVM "weakness" with kvm_send_hwpoison_signal(), and the second reason is to have richer error messages. This seems true, and I also remember something when I looked at

[PULL 2/2] nbd/server: Allow users to adjust handshake limit in QMP

2025-02-11 Thread Eric Blake
Although defaulting the handshake limit to 10 seconds was a nice QoI change to weed out intentionally slow clients, it can interfere with integration testing done with manual NBD_OPT commands over 'nbdsh --opt-mode'. Expose a QMP knob 'handshake-max-secs' to allow the user to alter the timeout awa

[PULL 1/2] qemu-nbd: Allow users to adjust handshake limit

2025-02-11 Thread Eric Blake
Although defaulting the handshake limit to 10 seconds was a nice QoI change to weed out intentionally slow clients, it can interfere with integration testing done with manual NBD_OPT commands over 'nbdsh --opt-mode'. Expose a command line option to allow the user to alter the timeout away from the

[PULL 0/2] NBD patches through 2025-02-11

2025-02-11 Thread Eric Blake
The following changes since commit ffaf7f0376f8040ce9068d71ae9ae8722505c42e: Merge tag 'pull-10.0-testing-and-gdstub-updates-100225-1' of https://gitlab.com/stsquad/qemu into staging (2025-02-10 13:26:17 -0500) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/p

Re: [PATCH v2 6/9] migration: Don't set FAILED state when cancelling

2025-02-11 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Feb 11, 2025 at 03:04:37PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Tue, Feb 11, 2025 at 12:01:33PM -0300, Fabiano Rosas wrote: >> >> It's possible that the migration is cancelled during >> >> migration_switchover_start(). In that case, don't set the

Re: [PATCH v2 9/9] migration: Update migrate_cancel documentation

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:36PM -0300, Fabiano Rosas wrote: > Update the migrate_cancel command documentation with a few words about > postcopy and the expected state of the machine after migration. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 8/9] tests/qtest/migration: Add a cancel test

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:35PM -0300, Fabiano Rosas wrote: > The qmp_migrate_cancel() command is poorly tested and code inspection > reveals that there might be concurrency issues with its usage. Add a > test that runs a migration and calls qmp_migrate_cancel() at specific > moments. > > In or

Re: [PATCH v2 7/9] tests/qtest/migration: Introduce migration_test_add_suffix

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:34PM -0300, Fabiano Rosas wrote: > Introduce a new migration_test_add_suffix to allow programmatic > creation of tests based on a suffix. Pass the test name into the test > so it can know which variant to run. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu

Re: [PATCH v2 6/9] migration: Don't set FAILED state when cancelling

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 03:04:37PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Tue, Feb 11, 2025 at 12:01:33PM -0300, Fabiano Rosas wrote: > >> It's possible that the migration is cancelled during > >> migration_switchover_start(). In that case, don't set the migration > >> state FAIL

[PATCH 0/1] [RISCV/RVV] Generate strided vector loads/stores with tcg nodes.

2025-02-11 Thread Paolo Savini
The value of the stride of the strided vector loads and stores is known only at execution time and this value determines the location of each vector element to load/store. It is then not possible to improve the performance of the emulation of such instructions by attempting to load/store multiple e

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Philippe Mathieu-Daudé
On 11/2/25 19:53, Philippe Mathieu-Daudé wrote: On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: On 11/2/25 19:26, Stefan Hajnoczi wrote: On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote: The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886:    Merge tag

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Stefan Hajnoczi
On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote: > > The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886: > > Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/armbru into > staging (2025-02-10 10:47:31 -0500) > > are available in the Git reposi

Re: [RFC] target/i386: sev: Add cmdline option to enable the Allowed SEV Features feature

2025-02-11 Thread Kim Phillips
On 2/10/25 3:24 AM, Daniel P. Berrangé wrote: On Fri, Feb 07, 2025 at 05:33:27PM -0600, Kim Phillips wrote: The Allowed SEV Features feature allows the host kernel to control which SEV features it does not want the guest to enable [1]. This has to be explicitly opted-in by the user because it h

[PATCH 1/1] [RISC-V/RVV] Generate strided vector loads/stores with tcg nodes.

2025-02-11 Thread Paolo Savini
This commit improves the performance of QEMU when emulating strided vector loads and stores by substituting the call for the helper function with the generation of equivalend TCG operations. Signed-off-by: Paolo Savini --- target/riscv/insn_trans/trans_rvv.c.inc | 294 1

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Philippe Mathieu-Daudé
On 11/2/25 19:48, Philippe Mathieu-Daudé wrote: On 11/2/25 19:26, Stefan Hajnoczi wrote: On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote: The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886:    Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/q

Re: [PULL 00/32] Misc HW patches for 2025-02-10

2025-02-11 Thread Philippe Mathieu-Daudé
On 11/2/25 19:26, Stefan Hajnoczi wrote: On Mon, Feb 10, 2025 at 3:43 PM Philippe Mathieu-Daudé wrote: The following changes since commit 54e91d1523b412b4cff7cb36c898fa9dc133e886: Merge tag 'pull-qapi-2025-02-10-v2' of https://repo.or.cz/qemu/armbru into staging (2025-02-10 10:47:31 -0500

Re: [PATCH v2 6/9] migration: Don't set FAILED state when cancelling

2025-02-11 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Feb 11, 2025 at 12:01:33PM -0300, Fabiano Rosas wrote: >> It's possible that the migration is cancelled during >> migration_switchover_start(). In that case, don't set the migration >> state FAILED in migration_completion(). >> >> Fixes: 3dde8fdbad ("migration: Merge p

Re: [PATCH v2 6/9] migration: Don't set FAILED state when cancelling

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:33PM -0300, Fabiano Rosas wrote: > It's possible that the migration is cancelled during > migration_switchover_start(). In that case, don't set the migration > state FAILED in migration_completion(). > > Fixes: 3dde8fdbad ("migration: Merge precopy/postcopy on switcho

Re: [PATCH v2 2/9] migration: Unify migration_cancel and migrate_fd_cancel

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:29PM -0300, Fabiano Rosas wrote: > There's no need for two separate functions and this _fd_ is a historic > artifact that makes little sense nowadays. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 5/9] migration: Reject qmp_migrate_cancel after postcopy

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:32PM -0300, Fabiano Rosas wrote: > After postcopy has started, it's not possible to recover the source > machine in case a migration error occurs because the destination has > already been changing the state of the machine. For that same reason, > it doesn't make sense

[PATCH] vdpa: Allow vDPA to work on big-endian machine

2025-02-11 Thread Konstantin Shkolnyy
Add .set_vnet_le() function that always returns success, assuming that vDPA h/w always implements LE data format. Otherwise, QEMU disables vDPA and outputs the message: "backend does not support LE vnet headers; falling back on userspace virtio" Signed-off-by: Konstantin Shkolnyy --- net/vhost-v

  1   2   3   >