Re: [PATCH v5 03/10] memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard()

2025-05-26 Thread Alexey Kardashevskiy
On 20/5/25 20:28, Chenyi Qiang wrote: Update ReplayRamDiscard() function to return the result and unify the ReplayRamPopulate() and ReplayRamDiscard() to ReplayRamDiscardState() at the same time due to their identical definitions. This unification simplifies related structures, such as VirtIOM

Re: [PATCH v5 02/10] memory: Change memory_region_set_ram_discard_manager() to return the result

2025-05-26 Thread Alexey Kardashevskiy
On 20/5/25 20:28, Chenyi Qiang wrote: Modify memory_region_set_ram_discard_manager() to return -EBUSY if a RamDiscardManager is already set in the MemoryRegion. The caller must handle this failure, such as having virtio-mem undo its actions and fail the realize() process. Opportunistically mov

Re: [PATCH 2/5] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-05-26 Thread Eric Auger
Hi Gustavo, On 5/26/25 6:09 PM, Gustavo Romero wrote: > Hi Eric, > > On 5/26/25 12:28, Eric Auger wrote: >> Hi Gustavo, >> >> On 5/26/25 7:31 AM, Gustavo Romero wrote: >>> ACPI PCI hotplug is now turned on by default so we need to change the >>> existing tests to keep it off. However, even setting

Re: [PATCH v8 2/2] tests/functional: add memlock tests

2025-05-26 Thread Alexandr Moshkov
On 5/27/25 11:13, Thomas Huth wrote: On 25/05/2025 09.07, Alexandr Moshkov wrote: Add new tests to check the correctness of the `-overcommit memlock` option (possible values: off, on, on-fault) by using `/proc/{qemu_pid}/status` file to check in VmSize, VmRSS and VmLck values: * if `memlock=o

Re: [PATCH v8 2/2] tests/functional: add memlock tests

2025-05-26 Thread Thomas Huth
On 25/05/2025 09.07, Alexandr Moshkov wrote: Add new tests to check the correctness of the `-overcommit memlock` option (possible values: off, on, on-fault) by using `/proc/{qemu_pid}/status` file to check in VmSize, VmRSS and VmLck values: * if `memlock=off`, then VmLck = 0; * if `memlock=on`,

[PATCH v5 4/5] target/arm: Enable feature ARM_FEATURE_EL2 if EL2 is supported

2025-05-26 Thread Eric Auger
From: Haibo Xu KVM_CAP_ARM_EL2 must be supported by the cpu to enable ARM_FEATURE_EL2. In case the host does support NV, expose the feature. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger Reviewed-by: Richard Henderson --- v2 -> v3: - check pmu->has_el2 on kvm_

[PATCH v5 1/5] linux-headers: Update against kvm/next

2025-05-26 Thread Eric Auger
This is a linux header update against kvm/next (e9f17038d814) especially targeted to get nested virt enablement. Signed-off-by: Eric Auger --- include/standard-headers/linux/virtio_pci.h | 1 + linux-headers/asm-arm64/kvm.h | 9 + linux-headers/linux/kvm.h

[PATCH v5 0/5] ARM Nested Virt Support

2025-05-26 Thread Eric Auger
Now that ARM nested virt has landed in kvm/next, let's turn the series into a PATCH series. The linux header update was made against kvm/next. For gaining virt functionality in KVM accelerated L1, The host needs to be booted with "kvm-arm.mode=nested" option and qemu needs to be invoked with: -mac

[PATCH v5 3/5] target/arm/kvm: Add helper to detect EL2 when using KVM

2025-05-26 Thread Eric Auger
From: Haibo Xu Introduce query support for KVM_CAP_ARM_EL2. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h | 7 +++ target/arm/kvm-stub.c | 5 + target/arm/kvm

[PATCH v5 2/5] hw/arm: Allow setting KVM vGIC maintenance IRQ

2025-05-26 Thread Eric Auger
From: Haibo Xu Allow virt arm machine to set the interrupt ID for the KVM GIC maintenance interrupt. This setting must be done before the KVM_DEV_ARM_VGIC_CTRL_INIT hence the choice to perform the setting in the GICv3 realize instead of proceeding the same way as kvm_arm_pmu_set_irq(). Signed-o

[PATCH v5 5/5] hw/arm/virt: Allow virt extensions with KVM

2025-05-26 Thread Eric Auger
From: Haibo Xu Up to now virt support on guest has been only supported with TCG. Now it becomes feasible to use it with KVM acceleration. Also check only in-kernel GICv3 is used along with KVM EL2. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger Reviewed-by: Rich

[PATCH] Fix comment for virtio-9p

2025-05-26 Thread dancer
From: Junichi Uekawa virtio-9p is not a console protocol, it's a file sharing protocol. Seems like an artifact of old copy-and-paste error. Fixes: 3ca4f5ca7305 ("virtio: add virtio IDs file") Signed-off-by: Junichi Uekawa --- include/uapi/linux/virtio_ids.h | 4 ++-- 1 file changed, 2 insertio

Re: [PATCH] Fix comment for virtio-9p

2025-05-26 Thread Michael Tokarev
27.05.2025 07:11, dan...@debian.org wrote: From: Junichi Uekawa virtio-9p is not a console protocol, it's a file sharing protocol. Seems like an artifact of old copy-and-paste error. -#define VIRTIO_ID_9P 9 /* 9p virtio console */ +#define VIRTIO_ID_9P 9 /

Re: [PATCH v5 04/10] ram-block-attribute: Introduce RamBlockAttribute to manage RAMBlock with guest_memfd

2025-05-26 Thread Alexey Kardashevskiy
On 27/5/25 13:14, Chenyi Qiang wrote: On 5/27/2025 9:20 AM, Alexey Kardashevskiy wrote: On 27/5/25 11:15, Chenyi Qiang wrote: On 5/26/2025 7:16 PM, Alexey Kardashevskiy wrote: On 26/5/25 19:28, Chenyi Qiang wrote: On 5/26/2025 5:01 PM, David Hildenbrand wrote: On 20.05.25 12:28,

Re: [PATCH v5 07/10] RAMBlock: Make guest_memfd require coordinate discard

2025-05-26 Thread Chenyi Qiang
On 5/26/2025 5:08 PM, David Hildenbrand wrote: > On 20.05.25 12:28, Chenyi Qiang wrote: >> As guest_memfd is now managed by RamBlockAttribute with >> RamDiscardManager, only block uncoordinated discard. >> >> Signed-off-by: Chenyi Qiang >> --- >> Changes in v5: >> - Revert to use RamDiscar

Re: [PATCH v5 08/10] memory: Change NotifyRamDiscard() definition to return the result

2025-05-26 Thread Chenyi Qiang
On 5/26/2025 8:44 PM, Cédric Le Goater wrote: > On 5/26/25 12:36, Cédric Le Goater wrote: >> On 5/20/25 12:28, Chenyi Qiang wrote: >>> So that the caller can check the result of NotifyRamDiscard() handler if >>> the operation fails. >>> >>> Signed-off-by: Chenyi Qiang >>> --- >>> Changes in v5:

RE: [PATCH rfcv3 05/21] vfio/iommufd: Save vendor specific device info

2025-05-26 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH rfcv3 05/21] vfio/iommufd: Save vendor specific device info > >Hello Zhenzhong, > >On 5/21/25 13:14, Zhenzhong Duan wrote: >> Some device information returned by ioctl(IOMMU_GET_HW_INFO) are vendor >> specific. Sa

RE: [PATCH v4 0/7] ui/spice: Enable gl=on option for non-local or remote clients

2025-05-26 Thread Kasireddy, Vivek
Hi Marc-André, > Subject: Re: [PATCH v4 0/7] ui/spice: Enable gl=on option for non-local or > remote clients > > Hi > > On Thu, May 15, 2025 at 4:49 AM Vivek Kasireddy > mailto:vivek.kasire...@intel.com> > wrote: > > > To address the limitation that this option is incompatible with >

[PATCH] Fix comment for virtio-9p

2025-05-26 Thread dancer
From: Junichi Uekawa virtio-9p is not a console protocol, it's a file sharing protocol. Seems like an artifact of old copy-and-paste error. Fixes: 3ca4f5ca7305 ("virtio: add virtio IDs file") Signed-off-by: Junichi Uekawa --- include/uapi/linux/virtio_ids.h | 2 +- 1 file changed, 1 insertion(

Re: [PATCH v9 00/55] QEMU TDX support

2025-05-26 Thread Markus Armbruster
Xiaoyao Li writes: > On 5/27/2025 12:12 AM, Paolo Bonzini wrote: >> On 5/8/25 16:59, Xiaoyao Li wrote: >>> This is the v9 series of TDX QEMU enabling. The series is also available >>> at github: >>> https://github.com/intel-staging/qemu-tdx/tree/tdx-qemu-upstream-v9 >>> >>> Note, this series has

Re: [PATCH] trace/simple: seperate hot paths of tracing fucntions

2025-05-26 Thread Tanish Desai
> Can you explain 3 more? Pablo and I have looked into object files for one of default trace point " trace_vhost_commit"(first tracepoint of hw/virtio) before and after making this change and we found that by moves the hot-path check for _simple_trace_vhost_commit into the caller (in the .h file) a

RE: [PATCH v4 4/7] ui/spice: Add an option to submit gl_draw requests at fixed rate

2025-05-26 Thread Kasireddy, Vivek
Hi Marc-André, > Hi > > On Thu, May 15, 2025 at 4:49 AM Vivek Kasireddy > mailto:vivek.kasire...@intel.com> > wrote: > > > 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

RE: [PATCH v4 5/7] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-05-26 Thread Kasireddy, Vivek
Hi Michael, > Subject: Re: [PATCH v4 5/7] ui/console-gl: Add a helper to create a texture > with linear memory layout > > Hi all, > > I just noticed that Dmitry Osipenko had already pointed out a similar issue > earlier-so my message was somewhat redundant. Apologies for the > duplication. Yeah,

Re: [PATCH] hw/intc/loongarch_extioi: Move unrealize function to common code

2025-05-26 Thread gaosong
在 2025/5/23 下午5:51, Bibo Mao 写道: Memory about LoongArchExtIOICommonState::cpu is allocated in common code, it had better be freed in common code also. Signed-off-by: Bibo Mao --- hw/intc/loongarch_extioi.c| 9 - hw/intc/loongarch_extioi_common.c | 9 +

Re: [PATCH 06/12] target/loongarch: Fill in TCGCPUOps.pointer_wrap

2025-05-26 Thread gaosong
在 2025/5/5 上午4:57, Richard Henderson 写道: Check va32 state. Cc: Song Gao Cc: Bibo Mao Signed-off-by: Richard Henderson --- target/loongarch/cpu.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Song Gao Thanks. Song Gao

Re: [PATCH v5 04/10] ram-block-attribute: Introduce RamBlockAttribute to manage RAMBlock with guest_memfd

2025-05-26 Thread Chenyi Qiang
On 5/27/2025 9:20 AM, Alexey Kardashevskiy wrote: > > > On 27/5/25 11:15, Chenyi Qiang wrote: >> >> >> On 5/26/2025 7:16 PM, Alexey Kardashevskiy wrote: >>> >>> >>> On 26/5/25 19:28, Chenyi Qiang wrote: On 5/26/2025 5:01 PM, David Hildenbrand wrote: > On 20.05.25 12:28, Chen

RE: [PATCH rfcv3 00/21] intel_iommu: Enable stage-1 translation for passthrough device

2025-05-26 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH rfcv3 00/21] intel_iommu: Enable stage-1 translation for >passthrough device > >On 5/21/25 13:14, Zhenzhong Duan wrote: >> Hi, >> >> Per Jason Wang's suggestion, iommufd nesting series[1] is split into >> "Enable stage-1 tr

Re: [PATCH v4 00/11] Improve futex usage

2025-05-26 Thread Akihiko Odaki
On 2025/05/27 1:51, Paolo Bonzini wrote: On 5/26/25 07:29, Akihiko Odaki wrote: Changes in v4: - Added patch "qemu-thread: Remove qatomic_read() in qemu_event_set()". Hi Akihiko, I'm not so confident about putting this patch before the other changes; I'm referring basically to this hunk: dif

Re: [PATCH v4 00/11] Improve futex usage

2025-05-26 Thread Akihiko Odaki
On 2025/05/26 23:48, Peter Xu wrote: On Mon, May 26, 2025 at 02:29:10PM +0900, Akihiko Odaki wrote: Akihiko Odaki (11): futex: Check value after qemu_futex_wait() futex: Support Windows qemu-thread: Remove qatomic_read() in qemu_event_set() qemu-thread: Replace __linu

Re: [PATCH v9 00/55] QEMU TDX support

2025-05-26 Thread Xiaoyao Li
On 5/27/2025 12:12 AM, Paolo Bonzini wrote: On 5/8/25 16:59, Xiaoyao Li wrote: This is the v9 series of TDX QEMU enabling. The series is also available at github: https://github.com/intel-staging/qemu-tdx/tree/tdx-qemu-upstream-v9 Note, this series has a dependency on https://lore.kernel.org/qe

Re: [PATCH v5 04/10] ram-block-attribute: Introduce RamBlockAttribute to manage RAMBlock with guest_memfd

2025-05-26 Thread Chenyi Qiang
On 5/26/2025 7:16 PM, Alexey Kardashevskiy wrote: > > > On 26/5/25 19:28, Chenyi Qiang wrote: >> >> >> On 5/26/2025 5:01 PM, David Hildenbrand wrote: >>> On 20.05.25 12:28, Chenyi Qiang wrote: Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted

Re: [PATCH v5 04/10] ram-block-attribute: Introduce RamBlockAttribute to manage RAMBlock with guest_memfd

2025-05-26 Thread Alexey Kardashevskiy
On 27/5/25 11:15, Chenyi Qiang wrote: On 5/26/2025 7:16 PM, Alexey Kardashevskiy wrote: On 26/5/25 19:28, Chenyi Qiang wrote: On 5/26/2025 5:01 PM, David Hildenbrand wrote: On 20.05.25 12:28, Chenyi Qiang wrote: Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated dis

Re: [PATCH 06/12] target/loongarch: Fill in TCGCPUOps.pointer_wrap

2025-05-26 Thread Bibo Mao
On 2025/5/5 上午4:57, Richard Henderson wrote: Check va32 state. Cc: Song Gao Cc: Bibo Mao Signed-off-by: Richard Henderson --- target/loongarch/cpu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index f7535d1be7..abad84c054 10

[PATCH v2] hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine

2025-05-26 Thread Bernhard Beschow
Commit 56b1f50e3c10 ("hw/i386/pc: Wire RTC ISA IRQs in south bridges") attempted to refactor RTC IRQ wiring which was previously done in pc_basic_device_init() but forgot about the isapc machine. Fix this by wiring in the code section dedicated exclusively to the isapc machine. Resolves: https://g

Re: [PATCH 2/5] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-05-26 Thread Gustavo Romero
Hi Eric, On 5/26/25 12:28, Eric Auger wrote: Hi Gustavo, On 5/26/25 7:31 AM, Gustavo Romero wrote: ACPI PCI hotplug is now turned on by default so we need to change the existing tests to keep it off. However, even setting the ACPI PCI hotplug off in the existing tests, there will be changes in

Re: [RFC PATCH 0/2] hw/ide/ahci: Delay a bit before completing reset

2025-05-26 Thread Jiaxun Yang
在2025年5月26日周一 下午7:05,Philippe Mathieu-Daudé写道: > Intented to help SeaBIOS development; untested there > (except with QEMU test suite). > > Jiaxun, is it helpful to you? Hi Philippe, Thanks for the proposal! The spec says: ``` HBA Reset (HR): When set by SW, this bit causes an internal reset

Re: [PATCH 04/12] target/arm: Fill in TCGCPUOps.pointer_wrap

2025-05-26 Thread Philippe Mathieu-Daudé
+Gustavo On 4/5/25 22:57, Richard Henderson wrote: For a-profile, check A32 vs A64 state. For m-profile, use cpu_pointer_wrap_uint32. Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- target/arm/cpu.c | 24 target/arm/tcg/cpu-v7m.c | 1 + 2 file

[PATCH v3 22/24] block/io: remove duplicate GLOBAL_STATE_CODE() in bdrv_do_drained_end()

2025-05-26 Thread Fiona Ebner
Both commit ab61335025 ("block: drain from main loop thread in bdrv_co_yield_to_drain()") and commit d05ab380db ("block: Mark drain related functions GRAPH_RDLOCK") introduced a GLOBAL_STATE_CODE() macro in bdrv_do_drained_end(). The assertion of being in the main thread cannot change here, so keep

Re: [PATCH 06/12] target/loongarch: Fill in TCGCPUOps.pointer_wrap

2025-05-26 Thread Philippe Mathieu-Daudé
On 4/5/25 22:57, Richard Henderson wrote: Check va32 state. Cc: Song Gao Cc: Bibo Mao Signed-off-by: Richard Henderson --- target/loongarch/cpu.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 10/12] target/s390x: Fill in TCGCPUOps.pointer_wrap

2025-05-26 Thread Philippe Mathieu-Daudé
On 5/5/25 18:16, Richard Henderson wrote: On 5/5/25 07:41, Philippe Mathieu-Daudé wrote: On 4/5/25 22:57, Richard Henderson wrote: Use the existing wrap_address function. Cc: qemu-s3...@nongnu.org Signed-off-by: Richard Henderson ---   target/s390x/cpu.c | 9 +   1 file changed, 9 inse

Re: [PATCH 09/12] target/riscv: Fill in TCGCPUOps.pointer_wrap

2025-05-26 Thread Philippe Mathieu-Daudé
On 5/5/25 20:59, Richard Henderson wrote: On 5/5/25 09:47, Philippe Mathieu-Daudé wrote: On 4/5/25 22:57, Richard Henderson wrote: Check 32 vs 64-bit and pointer masking state. Cc: qemu-ri...@nongnu.org Signed-off-by: Richard Henderson ---   target/riscv/tcg/tcg-cpu.c | 26 +++

Re: [PATCH] accel/tcg: Fix atomic_mmu_lookup vs TLB_FORCE_SLOW

2025-05-26 Thread Philippe Mathieu-Daudé
On 24/5/25 16:40, Richard Henderson wrote: When we moved TLB_MMIO and TLB_DISCARD_WRITE to TLB_SLOW_FLAGS_MASK, we failed to update atomic_mmu_lookup to properly reconstruct flags. Fixes: 24b5e0fdb543 ("include/exec: Move TLB_MMIO, TLB_DISCARD_WRITE to slow flags") Cc'ing Pierrick Reported-

Re: [PATCH] hw/xen: Fix trace_xs_node_read() params

2025-05-26 Thread Philippe Mathieu-Daudé
On 23/5/25 18:01, Liam Merwick wrote: When the '--enable-trace-backends=syslog' build option is configured, the following compilation error is encountered. In file included from /usr/include/sys/syslog.h:207, from /usr/include/syslog.h:1, from ./trace/trace-hw

[RFC PATCH 1/2] hw/ide/ahci: Introduce ahci_reset_delayed() and ahci_reset_complete()

2025-05-26 Thread Philippe Mathieu-Daudé
AHCI reset is not instantaneous in physical world, and software might poll the reset bits of port and host control registers to detect completion (see chapter 14 of AHCI spec). In preparation of adding a timed reset, split ahci_reset() as ahci_reset_delayed() which keeps the reset bits and ahci_re

[RFC PATCH 2/2] hw/ide/ahci: Delay a bit before completing reset

2025-05-26 Thread Philippe Mathieu-Daudé
Give few milliseconds to (emulated) hardware to complete its reset sequence. The intent is to have this model better match hardware, reducing firmware bugs "works in QEMU but not in real world" such https://github.com/FlyGoat/csmwrap/issues/14. Reported-by: Jiaxun Yang Signed-off-by: Philippe Ma

[RFC PATCH 0/2] hw/ide/ahci: Delay a bit before completing reset

2025-05-26 Thread Philippe Mathieu-Daudé
Intented to help SeaBIOS development; untested there (except with QEMU test suite). Jiaxun, is it helpful to you? Philippe Mathieu-Daudé (2): hw/ide/ahci: Introduce ahci_reset_delayed() and ahci_reset_complete() hw/ide/ahci: Delay a bit before completing reset include/hw/ide/ahci.h | 1 +

Re: [PULL 00/39] aspeed queue

2025-05-26 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: [PATCH rfcv3 15/21] intel_iommu: Bind/unbind guest page table to host

2025-05-26 Thread Nicolin Chen
OK. Let me clarify this at the top as I see the gap here now: First, the vSMMU model is based on Zhenzhong's older series that keeps an ioas_id in the HostIOMMUDeviceIOMMUFD structure, which now it only keeps an hwpt_id in this RFCv3 series. This ioas_id is allocated when a passthrough cdev attach

Re: [PATCH v3 1/2] semihosting/uaccess: Remove uses of target_ulong type

2025-05-26 Thread Richard Henderson
On 5/26/25 10:52, Philippe Mathieu-Daudé wrote: Replace target_ulong by vaddr or size_t types to match cpu_memory_rw_debug() prototype in "exec/cpu-common.h": > int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, > void *ptr, size_t len, >

Re: [PATCH v3 2/2] semihosting/uaccess: Compile once

2025-05-26 Thread Richard Henderson
On 5/26/25 10:52, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- semihosting/meson.build | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/semihosting/meson.build b/semihosting/meson.build index f3d38dda91d..b1ab2506c6e 100644 --- a/semihosting/m

[PATCH] tests/unit/test-util-sockets: fix mem-leak on error object

2025-05-26 Thread Matheus Tavares Bernardino
The test fails with --enable-asan as the error struct is never freed. In the case where the test expects a success but it fails, let's also report the error for debugging (it will be freed internally). Fixes 316e8ee8d6 ("util/qemu-sockets: Refactor inet_parse() to use QemuOpts") Signed-off-by: Mat

Re: [PATCH v4 00/11] Improve futex usage

2025-05-26 Thread Paolo Bonzini
On 5/26/25 07:29, Akihiko Odaki wrote: Changes in v4: - Added patch "qemu-thread: Remove qatomic_read() in qemu_event_set()". Hi Akihiko, I'm not so confident about putting this patch before the other changes; I'm referring basically to this hunk: diff --git a/util/event.c b/util/event.c inde

Re: [PATCH V5] vfio: return mr from vfio_get_xlat_addr

2025-05-26 Thread Cédric Le Goater
On 5/19/25 15:26, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in. This will be needed by CPR in a subsequent patch to map blocks using IOMMU_IOAS_MAP_FILE. Also return the xlat offset, so we can simplif

Re: [PATCH v2] vfio/igd: Fix incorrect error propagation in vfio_pci_igd_opregion_detect()

2025-05-26 Thread Cédric Le Goater
On 5/22/25 17:16, Tomita Moeko wrote: In vfio_pci_igd_opregion_detect(), errp will be set when the device does not have OpRegion or is hotplugged. This errp will be propagated to pci_qdev_realize(), which interprets it as failure, causing unexpected termination on devices without OpRegion like SR

Re: [PATCH v5 05/25] target/alpha: call plugin trap callbacks

2025-05-26 Thread Richard Henderson
On 5/26/25 10:54, Julian Ganz wrote: Hi Richard, May 26, 2025 at 11:01 AM, Richard Henderson wrote: On 5/25/25 21:16, Julian Ganz wrote: Also, some targets such as tricore only have a dummy/stub do_interrupt and handle exceptions differently inside non-returning functions. For those, we wo

Re: [PATCH] hw/xen: Fix trace_xs_node_read() params

2025-05-26 Thread Anthony PERARD
On Fri, May 23, 2025 at 04:01:34PM +, Liam Merwick wrote: > When the '--enable-trace-backends=syslog' build option is configured, > the following compilation error is encountered. > > In file included from /usr/include/sys/syslog.h:207, > from /usr/include/syslog.h:1, >

Re: [PATCH v9 00/55] QEMU TDX support

2025-05-26 Thread Paolo Bonzini
On 5/8/25 16:59, Xiaoyao Li wrote: This is the v9 series of TDX QEMU enabling. The series is also available at github: https://github.com/intel-staging/qemu-tdx/tree/tdx-qemu-upstream-v9 Note, this series has a dependency on https://lore.kernel.org/qemu-devel/20241217123932.948789-1-xiaoyao...@i

Re: [PATCH v2 0/7] single-binary: build target common libraries with dependencies

2025-05-26 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-26 Thread Peter Xu
On Fri, May 23, 2025 at 02:06:42AM +, Zhijian Li (Fujitsu) wrote: > > > On 22/05/2025 21:16, Peter Xu wrote: > > I followed up with Dave's idea, but then added all entries into it, below. > > > >Status: postcopy-active > >Time (ms): total=40504, setup=14, down=145 > >RAM info: >

Re: [RFC PATCH 04/13] migration: Fix parameter validation

2025-05-26 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 22, 2025 at 02:39:48PM -0300, Fabiano Rosas wrote: >> Actually, this doesn't work... >> >> The migrate-set-* commands have optional fields, so we need some form of >> checking has_* to know which fields the user is setting. Otherwise >> MigrationSetParameters will

Re: [PATCH] tests/qtest: Remove migration-helpers.c

2025-05-26 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Commit 407bc4bf90 ("qapi: Move include/qapi/qmp/ to include/qobject/") >> brought the migration-helpers.c back by mistake. This file has been >> replaced with migration/migration-qmp.c and >> migration/migration-util.c. >> >> Fixes: 407bc4bf

Re: [PATCH] tests/qtest: Remove migration-helpers.c

2025-05-26 Thread Peter Xu
On Mon, May 26, 2025 at 08:09:13AM +0200, Markus Armbruster wrote: > Fabiano Rosas writes: > > > Commit 407bc4bf90 ("qapi: Move include/qapi/qmp/ to include/qobject/") > > brought the migration-helpers.c back by mistake. This file has been > > replaced with migration/migration-qmp.c and > > migra

Re: [PATCH 2/5] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-05-26 Thread Eric Auger
Hi Gustavo, On 5/26/25 7:31 AM, Gustavo Romero wrote: > ACPI PCI hotplug is now turned on by default so we need to change the > existing tests to keep it off. However, even setting the ACPI PCI > hotplug off in the existing tests, there will be changes in the ACPI > tables because the _OSC method

Re: [PATCH v4 5/7] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-05-26 Thread Michael Scherle
Hi all, I just noticed that Dmitry Osipenko had already pointed out a similar issue earlier—so my message was somewhat redundant. Apologies for the duplication. Also, I made a small mistake in the patch I proposed: The call to glDeleteMemoryObjectsEXT(1, &mem_obj); should be placed above the

Re: [PATCH v12 10/10] docs/system: virtio-gpu: Document host/guest requirements

2025-05-26 Thread Dmitry Osipenko
On 5/24/25 02:33, Dmitry Osipenko wrote: > + * - Asahi DRM native context > +- `Downstream version`_ of Asahi Linux kernel > +- `mr1274`_ > + > +.. _mr1384: > https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1384 > +.. _mr1274: > https://gitlab.freedesktop.org/virgl/vi

[PATCH 05/12] util/error: allow non-NUL-terminated err->src

2025-05-26 Thread Paolo Bonzini
Rust makes the current file available as a statically-allocated string, but without a NUL terminator. Allow this by storing an optional maximum length in the Error. Note that for portability I am not relying on fprintf's precision specifier not accessing memory beyond what will be printed. Signe

Re: [PATCH v12 03/10] virtio-gpu: Handle virgl fence creation errors

2025-05-26 Thread Dmitry Osipenko
On 5/24/25 02:32, Dmitry Osipenko wrote: > @@ -872,6 +872,8 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g, >struct virtio_gpu_ctrl_command *cmd) > { > bool cmd_suspended = false; > +uint32_t flags; Realized I re-introduced the build warning wit

Re: [RFC PATCH 13/13] [PoC] migration: Allow migrate commands to provide the migration config

2025-05-26 Thread Peter Xu
On Mon, May 26, 2025 at 10:03:55AM +0200, Markus Armbruster wrote: > > diff --git a/qapi/migration.json b/qapi/migration.json > > index bb2487dbc6..5bd8f0f1b2 100644 > > --- a/qapi/migration.json > > +++ b/qapi/migration.json > > @@ -1638,6 +1638,10 @@ >## ># @migrate: ># ># Migrate

Re: [PATCH v4 00/11] Improve futex usage

2025-05-26 Thread Peter Xu
On Mon, May 26, 2025 at 02:29:10PM +0900, Akihiko Odaki wrote: > Akihiko Odaki (11): > futex: Check value after qemu_futex_wait() > futex: Support Windows > qemu-thread: Remove qatomic_read() in qemu_event_set() > qemu-thread: Replace __linux__ with CONFIG_LINUX > qemu

Re: [PATCH 3/5] tests/qtest/bios-tables-test: Update changed ACPI blobs

2025-05-26 Thread Eric Auger
On 5/26/25 3:51 PM, Gustavo Romero wrote: > Hi Eric, > > On 5/26/25 07:25, Eric Auger wrote: >> Hi Gustavo, >> >> On 5/26/25 7:31 AM, Gustavo Romero wrote: >>> Update the aarch64 'virt' base blob and all of its variants. All of >>> them >>> have the same diff, so only one is shown below. The ess

Re: [PATCH v2 18/25] s390x: Guest support for Secure-IPL Code Loading Attributes Facility (SCLAF)

2025-05-26 Thread Hendrik Brueckner
On Thu, May 08, 2025 at 06:50:34PM -0400, Zhuoying Cai wrote: > The secure-IPL-code-loading-attributes facility (SCLAF) > provides additional security during IPL. > > Availability of SCLAF is determined by byte 136 bit 3 of the > SCLP Read Info block. > > Signed-off-by: Zhuoying Cai > --- > tar

[PATCH 04/12] util/error: expose Error definition to Rust code

2025-05-26 Thread Paolo Bonzini
This is used to preserve the file and line in a roundtrip from C Error to Rust and back to C. Signed-off-by: Paolo Bonzini --- include/qapi/error-internal.h | 26 ++ rust/wrapper.h| 1 + util/error.c | 10 +- 3 files changed, 28 i

[PATCH 10/12] hpet: return errors from realize if properties are incorrect

2025-05-26 Thread Paolo Bonzini
Do not silently adjust num_timers, and fail if intcap is 0. Signed-off-by: Paolo Bonzini --- hw/timer/hpet.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index d1b7bc52b7b..d78aba04bcd 100644 --- a/hw/timer/hpet.c +++ b/hw/

[PATCH 03/12] subprojects: add the foreign crate

2025-05-26 Thread Paolo Bonzini
This is a cleaned up and separated version of the patches at https://lore.kernel.org/all/20240701145853.1394967-4-pbonz...@redhat.com/ https://lore.kernel.org/all/20240701145853.1394967-5-pbonz...@redhat.com/ Its first user will be the Error bindings; for example a QEMU Error ** can be converted t

Re: [PATCH V5] vfio: return mr from vfio_get_xlat_addr

2025-05-26 Thread Michael S. Tsirkin
On Sun, May 25, 2025 at 11:23:57PM +0200, Cédric Le Goater wrote: > Michael, > > On 5/20/25 15:46, Cédric Le Goater wrote: > > > > > > > @@ -1010,6 +1017,8 @@ static void > > > > > vfio_iommu_map_dirty_notify(IOMMUNotifier *n, IOMMUTLBEntry *iotlb) > > > > >   ram_addr_t translated_addr; > >

[PATCH RFC v2 1/1] TCG insn.c: Implement counting specific addresses

2025-05-26 Thread steffen_hirschmann
From: Steffen Hirschmann This commit implements counting of executed instruction within certain virtual address ranges via libinsn.so Signed-off-by: Steffen Hirschmann --- docs/about/emulation.rst | 2 + tests/tcg/plugins/insn.c | 91 2 files changed,

[PATCH v4 5/7] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-05-26 Thread Michael Scherle
Great to see this patch making progress. I've tested it extensively, and unfortunately, I’ve noticed a memory leak in surface_gl_create_texture_from_fd(). The memory leak is hard to see since the memory is owned by the gpu driver. On Intel hardware, it's possible to observe the leak using: ca

[PATCH 08/12] rust: qdev: support returning errors from realize

2025-05-26 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 5 +++-- rust/hw/timer/hpet/src/hpet.rs | 5 +++-- rust/qemu-api/src/qdev.rs| 10 ++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/de

Re: [PATCH 1/4] hw/microblaze: Add endianness property to the petalogix_s3adsp1800 machine

2025-05-26 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > +Markus > > On 24/5/25 13:55, Richard Henderson wrote: >> On 5/15/25 14:20, Thomas Huth wrote: >>> +static int machine_get_endianness(Object *obj, Error **errp G_GNUC_UNUSED) >>> +{ >>> +    S3Adsp1800MachineState *ms = PETALOGIX_S3ADSP1800_MACHINE(obj); >>> +   

[PATCH 07/12] qemu-api: add bindings to Error

2025-05-26 Thread Paolo Bonzini
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 a return value + Error** pair. Signed-off-by: Paolo Bonzini --- ru

[PATCH 11/12] rust/hpet: return errors from realize if properties are incorrect

2025-05-26 Thread Paolo Bonzini
Match the code in hpet.c; this also allows removing the BqlCell from the num_timers field. Signed-off-by: Paolo Bonzini --- rust/hw/timer/hpet/src/fw_cfg.rs | 7 +++ rust/hw/timer/hpet/src/hpet.rs | 16 +++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/rust

[PATCH 12/12] rust/hpet: Drop BqlCell wrapper for num_timers

2025-05-26 Thread Paolo Bonzini
From: Zhao Liu Now that the num_timers field is initialized as a property, someone may change its default value using qdev_prop_set_uint8(), but the value is fixed after the Rust code sees it first. Since there is no need to modify it after realize(), it is not to be necessary to have a BqlCell

[PATCH 06/12] util/error: make func optional

2025-05-26 Thread Paolo Bonzini
The function name is not available in Rust, so make it optional. Signed-off-by: Paolo Bonzini --- util/error.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util/error.c b/util/error.c index 6c1033eaba5..b977007faaf 100644 --- a/util/error.c +++ b/util/error.c @@ -2

[PATCH 09/12] rust/hpet: change timer of num_timers to usize

2025-05-26 Thread Paolo Bonzini
Remove the need to convert after every read of the BqlCell. Because the vmstate uses a u8 as the size of the VARRAY, this requires switching the VARRAY to use num_timers_save; which in turn requires ensuring that the num_timers_save is always there. For simplicity do this by removing support for

[PATCH 02/12] subprojects: add the anyhow crate

2025-05-26 Thread Paolo Bonzini
This is a standard replacement for Box which is more efficient (it only occcupies one word) and provides a backtrace of the error. This could be plumbed into &error_abort in the future. Signed-off-by: Paolo Bonzini --- rust/meson.build | 2 ++ subprojects/.gitign

[PATCH 01/12] rust: make declaration of dependent crates more consistent

2025-05-26 Thread Paolo Bonzini
Crates like "bilge" and "libc" can be shared by more than one directory, so declare them directly in rust/meson.build. While at it, make their variable names end with "_rs" and always add a subproject() statement (as that pinpoints the error better if the subproject is missing and cannot be downlo

[PATCH 00/12] rust: bindings for Error

2025-05-26 Thread Paolo Bonzini
This was one of the first bindings that I wrote in https://lore.kernel.org/qemu-devel/20240701145853.1394967-1-pbonz...@redhat.com/T/, but there were a few obstacles to clear before including them: 1) cleaning up the *foreign*() functions (patches 3-4 from the above series) or deciding not to use

Re: [PATCH 0/3] hw/boards: Remove MachineState::usb_disabled field

2025-05-26 Thread Philippe Mathieu-Daudé
On 26/5/25 15:18, BALATON Zoltan wrote: On Mon, 26 May 2025, Philippe Mathieu-Daudé wrote: Only add default devices checking defaults_enabled(). Remove the unused usb_disabled field in MachineState. At least for Mac machines this may be more complex. I think there is a - usb switch to enable/

[PATCH v3 24/24] block: add bdrv_graph_wrlock_drained() convenience wrapper

2025-05-26 Thread Fiona Ebner
Many write-locked sections are also drained sections. A new bdrv_graph_wrunlock_drained() wrapper around bdrv_graph_wrunlock() is introduced, which will begin a drained section first. A global variable is used so bdrv_graph_wrunlock() knows if it also needs to end such a drained section. Both the a

Re: [PATCH 2/5] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-05-26 Thread Gustavo Romero
Hi Eric, On 5/26/25 10:23, Eric Auger wrote: Hi Gustavo, On 5/26/25 7:31 AM, Gustavo Romero wrote: ACPI PCI hotplug is now turned on by default so we need to change the existing tests to keep it off. However, even setting the ACPI PCI hotplug off in the existing tests, there will be changes in

Re: [PATCH v2 3/4] tests/functional: Test with scripts/vmstate-static-checker.py

2025-05-26 Thread Peter Xu
On Thu, May 22, 2025 at 08:08:44PM +0200, Thomas Huth wrote: > On 22/05/2025 16.38, Peter Xu wrote: > > On Thu, May 22, 2025 at 03:37:55PM +0200, Thomas Huth wrote: > > > > [...] > > > > > +def test_vmstate(self): > > > +target_machine = { > > > +'aarch64': 'virt-7.2', > >

Re: [PATCH 00/22] ACPI PCI Hotplug support on ARM

2025-05-26 Thread Gustavo Romero
Hi Eric, On 5/26/25 07:21, Eric Auger wrote: Hi Gustavo, On 5/26/25 7:55 AM, Gustavo Romero wrote: Hi Eric, On 5/14/25 14:00, Eric Auger wrote: This series enables ACPI PCI hotplug/hotunplug on ARM and makes it default for 10.1 machine type. This aligns with x86 q35 machine. Expected benefit

[PATCH v3 20/24] iotests/graph-changes-while-io: remove image file after test

2025-05-26 Thread Fiona Ebner
Suggested-by: Kevin Wolf Signed-off-by: Fiona Ebner --- No changes in v3. tests/qemu-iotests/tests/graph-changes-while-io | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/tests/graph-changes-while-io b/tests/qemu-iotests/tests/graph-changes-while-io index 194fda500e..354

Re: [PATCH 3/5] tests/qtest/bios-tables-test: Update changed ACPI blobs

2025-05-26 Thread Gustavo Romero
Hi Eric, On 5/26/25 07:25, Eric Auger wrote: Hi Gustavo, On 5/26/25 7:31 AM, Gustavo Romero wrote: Update the aarch64 'virt' base blob and all of its variants. All of them have the same diff, so only one is shown below. The essential changes is in the AML code of the _OSC (OS Capabilities) met

Re: [PATCH v2 4/4] tests/functional/test_vmstate: Test whether the checker script works as expected

2025-05-26 Thread Peter Xu
On Thu, May 22, 2025 at 08:12:49PM +0200, Thomas Huth wrote: > On 22/05/2025 16.40, Peter Xu wrote: > > On Thu, May 22, 2025 at 03:37:56PM +0200, Thomas Huth wrote: > > > From: Thomas Huth > > > > > > We've got two vmstate dump files in the repository which are meant > > > for verifying whether t

[PATCH v3 15/24] block: move drain outside of bdrv_root_unref_child()

2025-05-26 Thread Fiona Ebner
This is part of resolving the deadlock mentioned in commit "block: move draining out of bdrv_change_aio_context() and mark GRAPH_RDLOCK". bdrv_root_unref_child() is called by: 1. blk_remove_bs(), where a drained section is introduced. 2. bdrv_unref_child(), which runs under the graph lock, so the

[PATCH v3 03/24] block/snapshot: move drain outside of read-locked bdrv_snapshot_delete()

2025-05-26 Thread Fiona Ebner
This is in preparation to mark bdrv_drained_begin() as GRAPH_UNLOCKED. More granular draining is not trivially possible, because bdrv_snapshot_delete() can recursively call itself. The return value of bdrv_all_delete_snapshot() changes from -1 to -errno propagated from failed sub-calls. This is f

[PATCH v3 02/24] block: move drain outside of read-locked bdrv_reopen_queue_child()

2025-05-26 Thread Fiona Ebner
This is in preparation to mark bdrv_drained_begin() as GRAPH_UNLOCKED. More granular draining is not trivially possible, because bdrv_reopen_queue_child() can recursively call itself. Signed-off-by: Fiona Ebner Reviewed-by: Kevin Wolf --- No changes in v3. block.c | 19 +++ 1

[PATCH v3 17/24] blockdev: drain while unlocked in internal_snapshot_action()

2025-05-26 Thread Fiona Ebner
This is in preparation to mark bdrv_drained_begin() as GRAPH_UNLOCKED. Signed-off-by: Fiona Ebner --- No changes in v3. blockdev.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index bd5ca77619..506755bef1 100644 --- a/blockdev

[PATCH v3 05/24] block: mark bdrv_parent_change_aio_context() GRAPH_RDLOCK

2025-05-26 Thread Fiona Ebner
This is a small step in preparation to mark bdrv_drained_begin() as GRAPH_UNLOCKED. More concretely, it allows marking the change_aio_ctx() callback GRAPH_RDLOCK_PTR, which is the next step. Signed-off-by: Fiona Ebner Reviewed-by: Kevin Wolf --- No changes in v3. block.c | 8 1 file

  1   2   3   >