Re: [PATCH 1/1] vhost-scsi: support VIRTIO_SCSI_F_HOTPLUG

2025-02-11 Thread Stefano Garzarella
On Sun, Feb 02, 2025 at 04:52:15PM -0800, Dongli Zhang wrote: So far there isn't way to test host kernel vhost-scsi event queue path, because VIRTIO_SCSI_F_HOTPLUG isn't supported by QEMU. virtio-scsi.c and vhost-user-scsi.c already support VIRTIO_SCSI_F_HOTPLUG as property "hotplug". Add suppo

[PULL 32/68] target/arm: Handle FPCR.AH in vector FABD

2025-02-11 Thread Peter Maydell
Split the handling of vector FABD so that it calls a different set of helpers when FPCR.AH is 1, which implement the "no negation of the sign of a NaN" semantics. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/helper.h| 4 target/arm/tcg/translate-a

[PULL 04/68] fpu: allow flushing of output denormals to be after rounding

2025-02-11 Thread Peter Maydell
Currently we handle flushing of output denormals in uncanon_normal always before we deal with rounding. This works for architectures that detect tininess before rounding, but is usually not the right place when the architecture detects tininess after rounding. For example, for x86 the SDM states

[PULL 15/68] target/arm: Define and use new write_fp_*reg_merging() functions

2025-02-11 Thread Peter Maydell
For FEAT_AFP's FPCR.NEP bit, we need to programmatically change the behaviour of the writeback of the result for most SIMD scalar operations, so that instead of zeroing the upper part of the result register it merges the upper elements from one of the input registers. Provide new functions write_f

[PULL 67/68] target/arm: Read fz16 from env->vfp.fpcr

2025-02-11 Thread Peter Maydell
From: Richard Henderson Read the bit from the source, rather than from the proxy via get_flush_inputs_to_zero. This makes it clear that it does not matter which of the float_status structures is used. Signed-off-by: Richard Henderson Message-id: 20250129013857.135256-34-richard.hender...@linar

Re: [PATCH] target/alpha: Do not mix exception flags and FPCR bits

2025-02-11 Thread Richard Henderson
On 2/11/25 08:26, Philippe Mathieu-Daudé wrote: get_float_exception_flags() returns exception flags, which are distinct from the FPCR bits used as error code. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20250211130626.3940412-1-peter.mayd...@linaro.org> --- target/alpha/fpu_helper.c

[PULL 1/7] tests/functional: Convert the aarch64 xen test to the functional framework

2025-02-11 Thread Thomas Huth
This test just needs the adaption for the asset handling, then we can move it to the functional framework. Reviewed-by: Alex Bennée Tested-by: Alex Bennée Message-ID: <20250207144409.220006-1-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/a

[PULL 3/7] tests/functional: Convert the hotplug_blk avocado test

2025-02-11 Thread Thomas Huth
By using the serial console instead of ssh for executing commands in the guest, we can convert this test to the functional framework. Reviewed-by: Daniel P. Berrangé Message-ID: <20250130192712.19542-1-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS

[PULL 5/7] gitlab: don't fail cirrus CI jobs when credits are exhausted

2025-02-11 Thread Thomas Huth
From: Daniel P. Berrangé In the last week of the month we have often run out of credits on Cirrus CI, which causes the jobs to fail, in turn causing the overall pipeline to fail. The cirrus-run tool can now detect the "out of credits" scenario and exits with a code of '3'. We can tell gitlab to

[PULL 7/7] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2

2025-02-11 Thread Thomas Huth
The FreeBSD job started to fail since the 14-1 image disappeared from the cloud. Update the job to v14.2 to fix it. Message-ID: <20250211120817.35050-1-th...@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- .gitlab-ci.d/cirrus.yml | 2 +- 1 file changed, 1 insertion(+)

[PULL 4/7] tests/functional: Add a ppc sam460ex test

2025-02-11 Thread Thomas Huth
From: Cédric Le Goater The test sequence boots from kernel a sam460ex machine with a virtio-net device to check PCI. The buildroot is built with config : BR2_powerpc=y BR2_powerpc_440fp=y and the kernel with the '44x/canyonlands' deconfig and virtio support. Signed-off-by: Cédric Le Goate

[PULL 0/7] Functional tests and Gitlab-CI patches

2025-02-11 Thread Thomas Huth
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 repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2025-02-11

Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust)

2025-02-11 Thread Junjie Mao
Paolo Bonzini writes: > On Tue, Feb 11, 2025 at 7:47 AM Junjie Mao wrote: >> I would suggest to keep the "sysbus" prefix in the method name, or in >> general, keep the class prefix in the method names in XXXClassMethods >> traits. Otherwise APIs from different parent classes may also >> confli

[PATCH] target/alpha: Don't corrupt error_code with unknown softfloat flags

2025-02-11 Thread Peter Maydell
In do_cvttq() we set env->error_code with what is supposed to be a set of FPCR exception bit values. However, if the set of float exception flags we get back from softfloat for the conversion includes a flag which is not one of the three we expect here (invalid_cvti, invalid, inexact) then we will

Re: [PULL 4/7] tests/functional: Add a ppc sam460ex test

2025-02-11 Thread BALATON Zoltan
On Tue, 11 Feb 2025, Thomas Huth wrote: From: Cédric Le Goater The test sequence boots from kernel a sam460ex machine with a virtio-net device to check PCI. The buildroot is built with config : BR2_powerpc=y BR2_powerpc_440fp=y and the kernel with the '44x/canyonlands' deconfig and virtio

[PATCH] MAINTAINERS: add more files to `vhost`

2025-02-11 Thread Stefano Garzarella
While sending a patch for backends/cryptodev-vhost.c I noticed that Michael wasn`t in CC so I took a look at the files listed under `vhost` and tried to fix it increasing the coverage by adding new files. Signed-off-by: Stefano Garzarella --- MAINTAINERS | 10 +++--- 1 file changed, 7 insert

Re: [PATCH v4 20/33] vfio/migration: Add x-migration-load-config-after-iter VFIO property

2025-02-11 Thread Maciej S. Szmigiero
On 10.02.2025 18:24, Cédric Le Goater wrote: On 1/30/25 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This property allows configuring whether to start the config load only after all iterables were loaded. Such interlocking is required for ARM64 due to this platform VFIO depend

Re: [PATCH] 9pfs: fix dead code in qemu_open_flags_tostr()

2025-02-11 Thread Peter Maydell
On Mon, 10 Feb 2025 at 14:40, Christian Schoenebeck wrote: > > Coverity scan complained about expression "|LARGEFILE" to be non reachable > and the detailed Coverity report claims O_LARGEFILE was zero. I can't > reproduce this here, but I assume that means there are at least some > system(s) which

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: [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 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: [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

[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

[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: [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

[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

[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 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 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

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

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 v3] hw/arm/virt: Support larger highmem MMIO regions

2025-02-11 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Matthew R. Ochs > Sent: Friday, February 7, 2025 8:37 PM > To: qemu-devel@nongnu.org; Shameerali Kolothum Thodi > ; nath...@nvidia.com > Cc: qemu-...@nongnu.org; peter.mayd...@linaro.org; > ddut...@redhat.com; eric.au...@redhat.com; nicol...@nvidia.com; > an

Re: [PATCH 4/4] vhost-iova-tree: Update documentation

2025-02-11 Thread Eugenio Perez Martin
On Wed, Feb 5, 2025 at 3:58 PM Jonah Palmer wrote: > > Signed-off-by: Jonah Palmer Reviewed-by: Eugenio Pérez Thanks! > --- > hw/virtio/vhost-iova-tree.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/hw/virtio/vhost-iova-tree.c b/hw/virtio/

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-11 Thread Alexander Graf
On 11.02.25 10:23, Gerd Hoffmann wrote: This is the core code for guest <-> host communication. This accepts request messages from the guest, dispatches them to the service called, and sends back the response message. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-core.c | 237 ++

Re: [PATCH 12/14] target/arm: Remove CP_ACCESS_TRAP handling

2025-02-11 Thread Peter Maydell
On Mon, 10 Feb 2025 at 19:35, Richard Henderson wrote: > > On 1/30/25 10:23, Peter Maydell wrote: > > There are no longer any uses of CP_ACCESS_TRAP in access functions, > > because we have converted them all to use either CP_ACCESS_TRAP_EL1 > > or CP_ACCESS_TRAP_UNCATEGORIZED, as appropriate. Rem

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

2025-02-11 Thread 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 minimum: CPUs, RAM, interrupt > >> controller, > >> serial. All other de

[PATCH v3 06/23] hw/uefi: add var-service-vars.c

2025-02-11 Thread Gerd Hoffmann
This is the uefi variable service (EfiSmmVariableProtocol), providing functions for listing, reading and updating variables. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-vars.c | 725 + 1 file changed, 725 insertions(+) create mode 100644 hw/uefi/var-

[PATCH v3 01/23] hw/uefi: add include/hw/uefi/var-service-api.h

2025-02-11 Thread Gerd Hoffmann
This file defines the register interface of the uefi-vars device. It's only a handful of registers: magic value, command and status registers, location and size of the communication buffer. Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- include/hw/uefi/var-service-api.h | 43 +++

Re: [PATCH v5 11/16] hw/microblaze: Support various endianness for s3adsp1800 machines

2025-02-11 Thread Philippe Mathieu-Daudé
On 6/2/25 14:20, Daniel P. Berrangé wrote: On Thu, Feb 06, 2025 at 02:10:47PM +0100, Philippe Mathieu-Daudé wrote: Introduce an abstract machine parent class which defines the 'little_endian' property. Duplicate the current machine, which endian is tied to the binary endianness, to one big endia

[PATCH v3 12/23] hw/uefi: add var-service-siglist.c

2025-02-11 Thread Gerd Hoffmann
Functions to serialize and de-serialize EFI signature databases. This is needed to merge signature databases (happens in practice when appending dbx updates) and also to extract the certificates for pkcs7 signature verification. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-siglist.c | 2

[PATCH v3 00/23] hw/uefi: add uefi variable service

2025-02-11 Thread Gerd Hoffmann
This patch adds a virtual device to qemu which the uefi firmware can use to store variables. This moves the UEFI variable management from privileged guest code (managing vars in pflash) to the host. Main advantage is that the need to have privilege separation in the guest goes away. On x86 privi

[PATCH v3 02/23] hw/uefi: add include/hw/uefi/var-service-edk2.h

2025-02-11 Thread Gerd Hoffmann
A bunch of #defines and structs copied over from edk2, mostly needed to decode and encode the messages in the communication buffer. Signed-off-by: Gerd Hoffmann --- include/hw/uefi/var-service-edk2.h | 227 + 1 file changed, 227 insertions(+) create mode 100644 inclu

[PATCH v3 10/23] hw/uefi: add var-service-pkcs7.c

2025-02-11 Thread Gerd Hoffmann
This implements pkcs7 signature verification using gnutls. Needed to check authenticated variable updates. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-pkcs7.c | 436 1 file changed, 436 insertions(+) create mode 100644 hw/uefi/var-service-pkcs7.c d

[PATCH v3 03/23] hw/uefi: add include/hw/uefi/var-service.h

2025-02-11 Thread Gerd Hoffmann
Add state structs and function declarations for the uefi-vars device. Signed-off-by: Gerd Hoffmann --- include/hw/uefi/var-service.h | 186 ++ 1 file changed, 186 insertions(+) create mode 100644 include/hw/uefi/var-service.h diff --git a/include/hw/uefi/var-ser

[PATCH v3 04/23] hw/uefi: add var-service-guid.c

2025-02-11 Thread Gerd Hoffmann
Add variables for a bunch of UEFI GUIDs we will need. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-guid.c | 99 ++ 1 file changed, 99 insertions(+) create mode 100644 hw/uefi/var-service-guid.c diff --git a/hw/uefi/var-service-guid.c b/hw/uefi/var-se

[PATCH v3 17/23] hw/uefi: add uefi-vars-sysbus device

2025-02-11 Thread Gerd Hoffmann
This adds sysbus bindings for the variable service. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-sysbus.c | 89 hw/uefi/meson.build | 3 +- 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 hw/uefi/var-service-sysbus.c di

[PATCH v3 20/23] hw/uefi: add uefi-vars-isa device

2025-02-11 Thread Gerd Hoffmann
This adds isa bindings for the variable service. Usage: qemu-system-x86_64 -device uefi-vars-isa,jsonfile=/path/to/uefivars.json Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-isa.c | 90 +++ hw/uefi/Kconfig | 6 +++ hw/uefi/meson.build

[PATCH v3 21/23] hw/uefi-vars-isa: add acpi device

2025-02-11 Thread Gerd Hoffmann
Tell the guest OS the io address range is used. Shows up in /proc/ioports in linux. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-isa.c | 25 + 1 file changed, 25 insertions(+) diff --git a/hw/uefi/var-service-isa.c b/hw/uefi/var-service-isa.c index 8247b9ae054a..

[PATCH v3 15/23] hw/uefi: add UEFI_VARS to Kconfig

2025-02-11 Thread Gerd Hoffmann
Add UEFI_VARS config option, enable by default for x86_64 and aarch64. Signed-off-by: Gerd Hoffmann --- hw/Kconfig | 1 + hw/uefi/Kconfig | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 hw/uefi/Kconfig diff --git a/hw/Kconfig b/hw/Kconfig index 1b4e9bb07f7d..c4dfe2e7af7c 1006

[PATCH v3 08/23] hw/uefi: add var-service-policy.c

2025-02-11 Thread Gerd Hoffmann
Implement variable policies (Edk2VariablePolicyProtocol). This EFI protocol allows to define restrictions for variables. It also allows to lock down variables (disallow write access). Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-policy.c | 370 +++ 1 file

[PATCH v3 18/23] hw/uefi-vars-sysbus: qemu platform bus support

2025-02-11 Thread Gerd Hoffmann
Add and register function to create an device tree entry when the device is added to the qemu platform bus. Signed-off-by: Gerd Hoffmann --- hw/core/sysbus-fdt.c | 24 hw/uefi/var-service-sysbus.c | 1 + 2 files changed, 25 insertions(+) diff --git a/hw/core/sy

[PATCH v3 14/23] hw/uefi: add trace-events

2025-02-11 Thread Gerd Hoffmann
Add trace events for debugging and trouble shooting. Signed-off-by: Gerd Hoffmann --- hw/uefi/trace-events | 17 + 1 file changed, 17 insertions(+) create mode 100644 hw/uefi/trace-events diff --git a/hw/uefi/trace-events b/hw/uefi/trace-events new file mode 100644 index 00

[PATCH v3 11/23] hw/uefi: add var-service-pkcs7-stub.c

2025-02-11 Thread Gerd Hoffmann
pkcs7 stub which is used in case gnutls is not available. It throws EFI_WRITE_PROTECTED errors unconditionally, so all authenticated variables are readonly for the guest. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-pkcs7-stub.c | 16 1 file changed, 16 insertions(+) c

Re: [PATCH 1/1] mem/cxl-type3: Add a default value of sn

2025-02-11 Thread Jonathan Cameron via
On Tue, 11 Feb 2025 10:24:13 +0800 Yuquan Wang wrote: > The previous default value of sn is UI64_NULL which would cause the > cookie of nd_interleave_set be '0' and the "invalid interleave-set > -cookie" failure in label validation. Hi Yuquan, Maybe we should harden the nd_interleave_set code to

[PATCH v3 13/23] hw/uefi: add var-service-json.c + qapi for NV vars.

2025-02-11 Thread Gerd Hoffmann
Define qapi schema for the uefi variable store state. Use it and the generated visitor helper functions to store persistent (EFI_VARIABLE_NON_VOLATILE) variables in JSON format on disk. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-json.c | 242 + qapi

[PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-11 Thread Gerd Hoffmann
This is the core code for guest <-> host communication. This accepts request messages from the guest, dispatches them to the service called, and sends back the response message. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-core.c | 237 + 1 file chang

[PATCH v3 16/23] hw/uefi: add to meson

2025-02-11 Thread Gerd Hoffmann
Wire up uefi-vars in the build system. Signed-off-by: Gerd Hoffmann --- hw/meson.build | 1 + hw/uefi/meson.build | 18 ++ meson.build | 1 + 3 files changed, 20 insertions(+) create mode 100644 hw/uefi/meson.build diff --git a/hw/meson.build b/hw/meson.build ind

[PATCH v3 23/23] hw/uefi: add MAINTAINERS entry

2025-02-11 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0091bd1a90f6..cd45771f5cd2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2799,6 +2799,12 @@ F: hw/misc/ivshmem-flat.c F: include/hw/misc/ivshmem-flat.h F: docs

[PATCH v3 22/23] docs: add uefi variable service documentation

2025-02-11 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- docs/devel/index-internals.rst | 1 + docs/devel/uefi-vars.rst | 66 ++ hw/uefi/LIMITATIONS.md | 7 3 files changed, 74 insertions(+) create mode 100644 docs/devel/uefi-vars.rst create mode 100644 hw/uefi/LIMI

[PATCH v3 07/23] hw/uefi: add var-service-auth.c

2025-02-11 Thread Gerd Hoffmann
This implements authenticated variable handling (see AuthVariableLib in edk2). The by far most common use case for auth variables is secure boot. The secure boot certificate databases ('PK', 'KEK', 'db' and 'dbx') are authenticated variables, with update rules being specified in the UEFI specific

[PATCH v3 05/23] hw/uefi: add var-service-utils.c

2025-02-11 Thread Gerd Hoffmann
Add utility functions. Helpers for UEFI (ucs2) string handling. Helpers for readable trace messages. Compare UEFI time stamps. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-utils.c | 241 1 file changed, 241 insertions(+) create mode 100644 hw/uefi/

[PATCH v3 19/23] hw/uefi-vars-sysbus: allow for arm virt

2025-02-11 Thread Gerd Hoffmann
Allow the device being added to aarch64 virt VMs. Signed-off-by: Gerd Hoffmann --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 99e0a68b6c55..6146f47f746e 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -81,6 +81,7 @@ #include "hw/mem

Re: [PATCH] 9pfs: fix dead code in qemu_open_flags_tostr()

2025-02-11 Thread Christian Schoenebeck
On Monday, February 10, 2025 4:32:08 PM CET Philippe Mathieu-Daudé wrote: > On 10/2/25 15:33, Christian Schoenebeck wrote: > > Coverity scan complained about expression "|LARGEFILE" to be non reachable > > and the detailed Coverity report claims O_LARGEFILE was zero. I can't > > reproduce this here

Re: [PATCH v3 0/8] qapi-go: add generator for Golang interfaces

2025-02-11 Thread Victor Toso
Hi, On Thu, Jan 16, 2025 at 09:59:52PM +, Daniel P. Berrangé wrote: > Pause here if you've read enough for now. > > > > As a way to validate these thoughts, I spent a day to mock up a demo > of a QAPI client and server implementation. > > First I created some manually written

Re: vtables and procedural macros (was Re: [PATCH] rust: pl011: convert pl011_create to safe Rust)

2025-02-11 Thread Paolo Bonzini
On Tue, Feb 11, 2025 at 7:47 AM Junjie Mao wrote: > I would suggest to keep the "sysbus" prefix in the method name, or in > general, keep the class prefix in the method names in XXXClassMethods > traits. Otherwise APIs from different parent classes may also > conflict. As an example, in the follow

Re: [PATCH v5 3/5] migration: enable multifd and postcopy together

2025-02-11 Thread Prasad Pandit
On Mon, 10 Feb 2025 at 22:29, Peter Xu wrote: > Yes, and I suggest a rename or introduce a new helper, per previous reply. * Okay, will try it. > I didn't follow, sorry - do you mean this patch is correct on dropping the > mapped-ram check? I don't yet understand how it can work if without. * I

Re: ldrd implementation issue?

2025-02-11 Thread Peter Maydell
(added qemu-devel to the cc list) On Mon, 10 Feb 2025 at 17:26, Stu Grossman wrote: > > I've been getting SIGBUS cores with a bunch of user apps running under > linux 5.15 and qemu-system-aarch64. These happen to be 32 bit (T32?) > programs. > > All of the cores point at the following instructio

Re: [PATCH 01/42] docs/qapidoc: support header-less freeform sections

2025-02-11 Thread John Snow
On Tue, Feb 11, 2025, 9:51 AM Markus Armbruster wrote: > John Snow writes: > > > The code as written can't handle if a header isn't found and will crash, > > because `node` will be uninitialized. If we don't have a section title, > > create a generic block to insert text into instead. > > Sugges

Re: [PATCH v2 4/9] migration: Fix hang after error in destination setup phase

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:31PM -0300, Fabiano Rosas wrote: > If the destination side fails at migration_ioc_process_incoming() > before starting the coroutine, it will report the error but QEMU will > not exit. > > Set the migration state to FAILED and exit the process if > exit-on-error allow

Re: [PATCH v2 3/9] migration: Change migrate_fd_ to migration_

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:30PM -0300, Fabiano Rosas wrote: > Remove all instances of _fd_ from the migration generic code. These > functions have grown over time and the _fd_ part is now just > confusing. > > migration_fd_error() -> migration_error() makes it a little vague, so > change it to

[PATCH] vdpa: Fix endian bugs in shadow virtqueue

2025-02-11 Thread Konstantin Shkolnyy
VDPA didn't work on a big-endian machine due to missing/incorrect CPU<->LE data format conversions. Signed-off-by: Konstantin Shkolnyy --- hw/virtio/vhost-shadow-virtqueue.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c b

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

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 1/9] migration: Set migration error outside of migrate_cancel

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 12:01:28PM -0300, Fabiano Rosas wrote: > There's no point passing the error into migration cancel only for it > to call migrate_set_error(). > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- 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 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 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 v3 0/8] qapi-go: add generator for Golang interfaces

2025-02-11 Thread Victor Toso
Hi, On Tue, Feb 11, 2025 at 11:10:37AM +, Daniel P. Berrangé wrote: > On Tue, Feb 11, 2025 at 11:25:05AM +0100, Victor Toso wrote: > > Hi, > > > > On Thu, Jan 16, 2025 at 09:59:52PM +, Daniel P. Berrangé wrote: > > > Pause here if you've read enough for now. > > > > > > >

[PATCH] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2

2025-02-11 Thread Thomas Huth
The FreeBSD job started to fail since the 14-1 image disappeared from the cloud. Update the job to v14.2 to fix it. Signed-off-by: Thomas Huth --- .gitlab-ci.d/cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml index 1

Re: [PATCH] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2

2025-02-11 Thread Daniel P . Berrangé
On Tue, Feb 11, 2025 at 01:08:17PM +0100, Thomas Huth wrote: > The FreeBSD job started to fail since the 14-1 image disappeared > from the cloud. Update the job to v14.2 to fix it. > > Signed-off-by: Thomas Huth > --- > .gitlab-ci.d/cirrus.yml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion

[PATCH] cryptodev/vhost: allocate CryptoDevBackendVhost using g_mem0()

2025-02-11 Thread Stefano Garzarella
The function `vhost_dev_init()` expects the `struct vhost_dev` (passed as a parameter) to be fully initialized. This is important because some parts of the code check whether `vhost_dev->config_ops` is NULL to determine if it has been set (e.g. later via `vhost_dev_set_config_notifier`). To ensure

Re: [PATCH 1/1] Added support for get/set alert configuration commands

2025-02-11 Thread Sweta Kumari
On 04/02/25 05:29PM, Fan Ni wrote: On Mon, Feb 03, 2025 at 05:14:45PM +0530, Sweta Kumari wrote: Signed-off-by: Sweta Kumari Reviewed-by: Alok Rathore Reviewed-by: Krishna Kanth Reddy Hi Sweta, Since this series only have one patch, you do not need a cover letter. Move the commit comment in

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

2025-02-11 Thread Fabiano Rosas
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 --- tests/qtest/migration/migration-util.c | 24 tests/qtest/migration/

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

2025-02-11 Thread Fabiano Rosas
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 --- migration/migration.c | 18 +++--- migration/trace-events | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/migra

Re: [PATCH] 9pfs: fix dead code in qemu_open_flags_tostr()

2025-02-11 Thread Christian Schoenebeck
On Tuesday, February 11, 2025 3:47:33 PM CET Peter Maydell wrote: > On Mon, 10 Feb 2025 at 14:40, Christian Schoenebeck > wrote: > > > > Coverity scan complained about expression "|LARGEFILE" to be non reachable > > and the detailed Coverity report claims O_LARGEFILE was zero. I can't > > reproduc

Re: Deprecate nwfpe emulation?

2025-02-11 Thread Peter Maydell
On Mon, 27 Jan 2025 at 21:02, Richard Henderson wrote: > > On 1/27/25 09:46, Peter Maydell wrote: > > On Mon, 27 Jan 2025 at 17:27, Philippe Mathieu-Daudé > > wrote: > >> On 27/1/25 12:27, Peter Maydell wrote: > >>> We have one test case in check-tcg which purports to be checking > >>> iwMMXt. I

[PATCH v2 1/9] migration: Set migration error outside of migrate_cancel

2025-02-11 Thread Fabiano Rosas
There's no point passing the error into migration cancel only for it to call migrate_set_error(). Signed-off-by: Fabiano Rosas --- migration/migration.c | 7 ++- migration/migration.h | 2 +- migration/ram.c | 4 +++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/migra

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

2025-02-11 Thread Fabiano Rosas
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 order to make the test more deterministic, instead of calling qmp_migrate_can

Re: [PATCH v4 20/33] vfio/migration: Add x-migration-load-config-after-iter VFIO property

2025-02-11 Thread Cédric Le Goater
On 2/11/25 15:37, Maciej S. Szmigiero wrote: On 10.02.2025 18:24, Cédric Le Goater wrote: On 1/30/25 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This property allows configuring whether to start the config load only after all iterables were loaded. Such interlocking is requi

Re: [PATCH 27/42] qapi: differentiate "intro" and "detail" sections

2025-02-11 Thread Markus Armbruster
John Snow writes: > This patch begins distinguishing "Plain" sections as being either > "Intro" or "Details" sections for the purpose of knowing when and where > to inline those sections. > > Signed-off-by: John Snow [...] > diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py > index

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

2025-02-11 Thread Fabiano Rosas
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 to try to cancel the migration after postcopy has started. Reject the

Re: [PATCH 01/42] docs/qapidoc: support header-less freeform sections

2025-02-11 Thread Markus Armbruster
John Snow writes: > The code as written can't handle if a header isn't found and will crash, > because `node` will be uninitialized. If we don't have a section title, > create a generic block to insert text into instead. Suggest to show input that makes it crash. Something like The code as w

[PATCH v2 0/9] migration: Fix issues during qmp_migrate_cancel

2025-02-11 Thread Fabiano Rosas
Continuing with the migrate_cancel testing, this time I blocked cancel during postcopy. This simplified the tests a lot. I also added a new fix for pre-switchover, which was ignoring the cancelling state. Upfront are some trivial cleanups to function names. Thanks CI run: https://gitlab.com/far

Re: [PATCH v5 3/5] migration: enable multifd and postcopy together

2025-02-11 Thread Peter Xu
On Tue, Feb 11, 2025 at 02:34:07PM +0530, Prasad Pandit wrote: > On Mon, 10 Feb 2025 at 22:29, Peter Xu wrote: > > Yes, and I suggest a rename or introduce a new helper, per previous reply. > > * Okay, will try it. > > > I didn't follow, sorry - do you mean this patch is correct on dropping the

[PATCH v2 4/9] migration: Fix hang after error in destination setup phase

2025-02-11 Thread Fabiano Rosas
If the destination side fails at migration_ioc_process_incoming() before starting the coroutine, it will report the error but QEMU will not exit. Set the migration state to FAILED and exit the process if exit-on-error allows. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2633 Reported-b

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

2025-02-11 Thread Fabiano Rosas
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 --- qapi/migration.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qapi/migration.json b/qapi/migration.

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 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.

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:

<    1   2   3   >