Re: [PATCH 10/10] hw/s390x: Remove the "adapter_routes_max_batch" property from the flic

2025-01-07 Thread Cornelia Huck
On Fri, Jan 03 2025, Thomas Huth wrote: > Now that the s390-ccw-virtio-2.8 machine has been removed, we don't > need the "adapter_routes_max_batch" property anymore and can remove it. > > Signed-off-by: Thomas Huth > --- > include/hw/s390x/s390_flic.h | 2 -- > hw/intc/s390_flic.c | 9

[PATCH v3 0/2] qga: Open channel before going daemon

2025-01-07 Thread Michal Privoznik
v3 of: https://lists.nongnu.org/archive/html/qemu-devel/2024-12/msg01073.html diff to v2: - Patch 1/4 from v2 was merged already, - Patch 4/4 from v2 is now dropped because it's no longed applicable (run_agent_once() and subsequently can return two different values). Michal Privoznik (2): qg

[PATCH v3 1/2] qga: Invert logic on return value in main()

2025-01-07 Thread Michal Privoznik
Current logic on return value ('ret' variable) in main() is error prone. The variable is initialized to EXIT_SUCCESS and then set to EXIT_FAILURE on error paths. This makes it very easy to forget to set the variable to indicate error when adding new error path, as is demonstrated by handling of ini

[PATCH v2] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
At present, the libqos/fw_cfg.c library does not support the modern DMA interface which is required to write to the fw_cfg files. It only uses the IO interface. Implement read and write methods based on DMA. This will enable developers to write tests that writes to the fw_cfg file(s). The structure

Re: [PATCH v6 6/8] chardev/char-mux: implement backend chardev multiplexing

2025-01-07 Thread Marc-André Lureau
Hi On Thu, Jan 2, 2025 at 2:22 PM Roman Penyaev wrote: > > Hi, > > First of all Happy New Year :) > > On Mon, Dec 30, 2024 at 12:41 PM Marc-André Lureau > wrote: > > [cut] > > > > + > > > +for (i = 0; i < d->be_cnt; i++) { > > > +written = d->be_written[i] - d->be_min_written; > > >

[PATCH v3 2/2] qga: Don't daemonize before channel is initialized

2025-01-07 Thread Michal Privoznik
If the agent is set to daemonize but for whatever reason fails to init the channel, the error message is lost. Worse, the agent daemonizes needlessly and returns success. For instance: # qemu-ga -m virtio-serial \ -p /dev/nonexistent_device \ -f /run/qemu-ga.pid \

Re: [RFC PATCH 2/9] rust: vmstate: implement VMState for non-leaf types

2025-01-07 Thread Zhao Liu
On Tue, Dec 31, 2024 at 01:23:29AM +0100, Paolo Bonzini wrote: > Date: Tue, 31 Dec 2024 01:23:29 +0100 > From: Paolo Bonzini > Subject: [RFC PATCH 2/9] rust: vmstate: implement VMState for non-leaf types > X-Mailer: git-send-email 2.47.1 > > Arrays, pointers and cells use a VMStateField that is b

Re: [PATCH 2/2] tcg/riscv: Use BEXTI for single-bit extractions

2025-01-07 Thread Richard Henderson
On 1/7/25 02:29, Philippe Mathieu-Daudé wrote: Hi Richard, On 2/1/25 19:16, Richard Henderson wrote: Signed-off-by: Richard Henderson ---   tcg/riscv/tcg-target-has.h |  8 +++-   tcg/riscv/tcg-target.c.inc | 13 +++--   2 files changed, 18 insertions(+), 3 deletions(-) diff --git a

[PATCH v2] hw/ufs: Adjust value to match CPU's endian format

2025-01-07 Thread Keoseong Park
In ufs_write_attr_value(), the value parameter is handled in the CPU's endian format but provided in big-endian format by the caller. Thus, it is converted to the CPU's endian format. The related test code is also fixed to reflect this change. Fixes: 7c85332a2b3e ("hw/ufs: minor bug fixes related

Re: or1k -M virt -hda and net.

2025-01-07 Thread Rob Landley
On 12/31/24 19:19, Rob Landley wrote: On 12/23/24 07:05, Stafford Horne wrote: The kernel config looks like it should have virt block device support, but ...    -device virtio-blk-device,drive=d0 -drive file=${DISK},id=d0,if=none,format=qcow2 -drive file=file.img,format=raw,id=hd0 -device vi

Re: [PATCH] tests/functional/test_x86_64_hotplug_cpu: Fix race condition during unplug

2025-01-07 Thread Daniel P . Berrangé
On Tue, Jan 07, 2025 at 12:52:45PM +0100, Thomas Huth wrote: > When unplugging the CPU, the test tries to check for a successful > unplug by changing to the /sys/devices/system/cpu/cpu1 directory > to see whether that fails. However, the "cd" could be faster than > the unplug operation in the kerne

Re: [PATCH V5 15/23] migration: cpr-transfer mode

2025-01-07 Thread Markus Armbruster
Steve Sistare writes: > Add the cpr-transfer migration mode, which allows the user to transfer > a guest to a new QEMU instance on the same host with minimal guest pause > time, by preserving guest RAM in place, albeit with new virtual addresses > in new QEMU, and by preserving device file descri

Re: [PATCH] tests/functional/test_x86_64_hotplug_cpu: Fix race condition during unplug

2025-01-07 Thread Thomas Huth
On 07/01/2025 12.57, Daniel P. Berrangé wrote: On Tue, Jan 07, 2025 at 12:52:45PM +0100, Thomas Huth wrote: When unplugging the CPU, the test tries to check for a successful unplug by changing to the /sys/devices/system/cpu/cpu1 directory to see whether that fails. However, the "cd" could be fas

Re: [RFC PATCH 1/9] rust: vmstate: add new type safe implementation

2025-01-07 Thread Paolo Bonzini
On Tue, Jan 7, 2025 at 9:39 AM Zhao Liu wrote: > This is very good work! I am curious about how QEMU plays with Rust > forum: > > Rust forum's disscussion is under MIT and Apache 2.0 licenses [1], and > since vmstate.rs is under the GPLv2 license, do we need to specify that > certain code retains

Re: [RESEND][PATCH v3 0/7] Add ivshmem-flat device

2025-01-07 Thread Markus Armbruster
Gustavo Romero writes: > This is a resend of the series: > > https://lore.kernel.org/qemu-devel/2024022218.2261956-1-gustavo.rom...@linaro.org/ > > rebased on the current master. The series was sent about 9 months ago and > remains relevant. Besides addressing the longstanding issue: > > http

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

2025-01-07 Thread Gerd Hoffmann
> > +lseek(uv->jsonfd, 0, SEEK_SET); > > +rc = write(uv->jsonfd, gstr->str, gstr->len); > > +if (rc != gstr->len) { > > +warn_report("%s: write error", __func__); > > +} > > +rc = ftruncate(uv->jsonfd, gstr->len); > > +if (rc != 0) { > > +warn_report("%s: ftr

Re: [PATCH V2] physmem: fix qemu_ram_alloc_from_fd size calculation

2025-01-07 Thread Steven Sistare
On 1/7/2025 5:01 AM, David Hildenbrand wrote: On 02.01.25 22:32, Steve Sistare wrote: qemu_ram_alloc_from_fd allocates space if file_size == 0.  If non-zero, it uses the existing space and verifies it is large enough, but the verification was broken when the offset parameter was introduced.  As

Re: [PATCH v2] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
> On 7 Jan 2025, at 8:21 PM, Ani Sinha wrote: > > At present, the libqos/fw_cfg.c library does not support the modern DMA > interface which is required to write to the fw_cfg files. It only uses the IO > interface. Implement read and write methods based on DMA. This will enable > developers to

Re: [PATCH V2] physmem: fix qemu_ram_alloc_from_fd size calculation

2025-01-07 Thread David Hildenbrand
On 07.01.25 17:11, Steven Sistare wrote: On 1/7/2025 5:01 AM, David Hildenbrand wrote: On 02.01.25 22:32, Steve Sistare wrote: qemu_ram_alloc_from_fd allocates space if file_size == 0.  If non-zero, it uses the existing space and verifies it is large enough, but the verification was broken when

Re: [PATCH] hw/i386/pc: Fix level interrupt sharing for Xen event channel GSI

2025-01-07 Thread David Woodhouse
On Tue, 2025-01-07 at 11:07 -0500, Michael S. Tsirkin wrote: > On Thu, Dec 19, 2024 at 05:24:11PM +0100, David Woodhouse wrote: > > From: David Woodhouse > > > > The system GSIs are not designed for sharing. One device might assert a > > shared interrupt with qemu_set_irq() and another might deas

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

2025-01-07 Thread Philippe Mathieu-Daudé
On 7/1/25 17:03, Paolo Bonzini wrote: On Tue, Jan 7, 2025 at 4:37 PM Zhao Liu wrote: If anybody wants to do it as an exercise, I am happy to help, otherwise I can prepare a patch too. If possible and if no one else wants to practice, I would also like to give it a try (I'll add it to my list)

[PATCH v6] hw/acpi: Add vmclock device

2025-01-07 Thread David Woodhouse
From: David Woodhouse The vmclock device addresses the problem of live migration with precision clocks. The tolerances of a hardware counter (e.g. TSC) are typically around ±50PPM. A guest will use NTP/PTP/PPS to discipline that counter against an external source of 'real' time, and track the pre

A few patches for u-boot-sam460ex

2025-01-07 Thread Michael Tokarev
Hi! For some time, qemu package in debian carries several patches for roms/u-boot-sam460ex, fixing a number of issues. It'd be nice to have them in the official repository. Thanks, /mjtFrom: Michael Tokarev Subject: u-boot-sam460ex: remove obsolete -mstring gcc option Date: Sun Oct 22 23:35

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

2025-01-07 Thread Paolo Bonzini
On Tue, Jan 7, 2025 at 5:24 PM Philippe Mathieu-Daudé wrote: > > but I don't really like the two parameters and also I don't like that > > class_init is called differently for classes and interfaces. It's > > probably possible to design a better API, but I didn't spend too much > > time on it beca

[PATCH v2] hw/i386/pc: Fix level interrupt sharing for Xen event channel GSI

2025-01-07 Thread David Woodhouse
From: David Woodhouse The system GSIs are not designed for sharing. One device might assert a shared interrupt with qemu_set_irq() and another might deassert it, and the level from the first device is lost. This could be solved by using a multiplexer which functions as an OR gate, much like the

[PATCH V3] physmem: fix qemu_ram_alloc_from_fd size calculation

2025-01-07 Thread Steve Sistare
qemu_ram_alloc_from_fd allocates space if file_size == 0. If non-zero, it uses the existing space and verifies it is large enough, but the verification was broken when the offset parameter was introduced. As a result, a file smaller than offset passes the verification and causes errors later. Fi

[PATCH 1/2] tests/qtest: Introduce qtest_init_with_env_and_capabilities()

2025-01-07 Thread Juraj Marcin
This patch adds a new version of qtest_init_with_env() that allows specifying QMP capabilities that should be enabled during handshake. This is useful for example if a test needs out-of-band execution of QMP commands, it can initialize with the oob capability. Signed-off-by: Juraj Marcin --- tes

[PATCH 2/2] tests/qtest/migration: Use out-of-band execution for migrate-recover

2025-01-07 Thread Juraj Marcin
In real use cases, the migrate-recover command requires out-of-band execution, because the thread processing normal commands is blocked by a page fault in the guest memory. With this change, the tests will be closer to real use cases and could help detect regressions and other bugs in migration rec

[PATCH 0/2] test/qtest/migration: Use out-of-band execution for migrate-recover

2025-01-07 Thread Juraj Marcin
In real use cases, the migrate-recover command requires out-of-band execution, because the main thread processing normal commands is blocked by a page fault in the guest memory. Tests, however, do not reflect this which might result in some bugs not being caught with tests. The first patch in the

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

2025-01-07 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

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

2025-01-07 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 | 40 +++

[PATCH v2 05/21] hw/uefi: add var-service-utils.c

2025-01-07 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 v2 04/21] hw/uefi: add var-service-guid.c

2025-01-07 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 v2 16/21] hw/uefi: add to meson

2025-01-07 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 v2 13/21] hw/uefi: add var-service-json.c + qapi for NV vars.

2025-01-07 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 v2 12/21] hw/uefi: add var-service-siglist.c

2025-01-07 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 v2 06/21] hw/uefi: add var-service-vars.c

2025-01-07 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 v2 18/21] hw/uefi: add uefi-vars-isa device

2025-01-07 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 | 91 +++ hw/uefi/Kconfig | 6 +++ hw/uefi/meson.build

[PATCH v2 00/21] hw/uefi: add uefi variable service

2025-01-07 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 v2 03/21] hw/uefi: add include/hw/uefi/var-service.h

2025-01-07 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

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

2025-01-07 Thread Zhao Liu
On Mon, Jan 06, 2025 at 04:21:16PM +0100, Paolo Bonzini wrote: > Date: Mon, 6 Jan 2025 16:21:16 +0100 > From: Paolo Bonzini > Subject: Re: [PULL 25/41] rust: qom: put class_init together from multiple > ClassInitImpl<> > > Il lun 6 gen 2025, 14:32 Peter Maydell ha > scritto: > > > I think here

[PATCH v2 15/21] hw/uefi: add UEFI_VARS to Kconfig

2025-01-07 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 v2 17/21] hw/uefi: add uefi-vars-sysbus device

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

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

2025-01-07 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 v2 08/21] hw/uefi: add var-service-policy.c

2025-01-07 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 v2 07/21] hw/uefi: add var-service-auth.c

2025-01-07 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 v2 10/21] hw/uefi: add var-service-pkcs7.c

2025-01-07 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 v2 09/21] hw/uefi: add var-service-core.c

2025-01-07 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 v2 20/21] docs: add uefi variable service documentation

2025-01-07 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

Re: [PATCH v2 0/2] target/arm/arm-powerctl: Restrict to ARM cores

2025-01-07 Thread Richard Henderson
On 1/7/25 05:57, Philippe Mathieu-Daudé wrote: Since v1: - Factor cpu_is_of_type() out Philippe Mathieu-Daudé (2): cpus: Introduce cpu_is_of_type() helper target/arm/arm-powerctl: Restrict to ARM cores include/hw/core/cpu.h | 9 + cpu-common.c | 5 + targe

[PATCH v2 14/21] hw/uefi: add trace-events

2025-01-07 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

Re: [PATCH V5 15/23] migration: cpr-transfer mode

2025-01-07 Thread Steven Sistare
On 1/7/2025 7:05 AM, Markus Armbruster wrote: Steve Sistare writes: Add the cpr-transfer migration mode, which allows the user to transfer a guest to a new QEMU instance on the same host with minimal guest pause time, by preserving guest RAM in place, albeit with new virtual addresses in new Q

[PATCH v2 19/21] hw/arm: add uefi variable support to virt machine type

2025-01-07 Thread Gerd Hoffmann
Add -machine virt,x-uefi-vars={on,off} property. Default is off. When enabled wire up the uefi-vars-sysbus device. TODO: wire up jsonfile property. Signed-off-by: Gerd Hoffmann --- include/hw/arm/virt.h | 2 ++ hw/arm/virt.c | 41 + 2 files chan

Re: [PATCH v2 00/21] hw/uefi: add uefi variable service

2025-01-07 Thread Daniel P . Berrangé
On Tue, Jan 07, 2025 at 04:33:27PM +0100, Gerd Hoffmann wrote: > 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

[PATCH v2 21/21] hw/uefi: add MAINTAINERS entry

2025-01-07 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2101b5121756..ad2bce45a076 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2785,6 +2785,12 @@ F: hw/hyperv/hv-balloon*.h F: include/hw/hyperv/dynmem-proto.h F: i

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

2025-01-07 Thread Daniel P . Berrangé
On Tue, Jan 07, 2025 at 04:33:40PM +0100, Gerd Hoffmann wrote: > 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 > ---

Re: [PATCH 01/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine types

2025-01-07 Thread Cornelia Huck
On Fri, Jan 03 2025, Thomas Huth wrote: > They are older than 6 years, so according to our machine support > policy, they can be removed now. > > This removes the requirements for the storage keys "migration-enabled" > property which will be removed in the next patch. It also removes > the code t

Re: [PATCH 06/10] hw/s390x/css-bridge: Remove the "css_dev_path" property

2025-01-07 Thread Cornelia Huck
On Fri, Jan 03 2025, Thomas Huth wrote: > Now that the s390-ccw-virtio-2.6 and older machine types have been > removed, the "css_dev_path" property of the css-bridge is also not > used anymore and thus can be removed. > > This way we finally get rid of the problem that has been described > in: ht

[PATCH] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
At present, the libqos/fw_cfg.c library does not support the modern DMA which is required to write to the fw_cfg files. It only uses the IO interface. Implement read and write methods based on DMA. This will enable developers to write tests that writes to the fw_cfg file(s). The structure of the co

[PATCH] vfio/igd: Fix potential overflow in igd_gtt_memory_size()

2025-01-07 Thread Cédric Le Goater
The risk is mainly theoretical since the applied bit mask will keep the 'ggms' shift value below 3. Nevertheless, let's use a 64 bit integer type and resolve the coverity issue. Resolves: Coverity CID 1585908 Fixes: 1e1eac5f3dcd ("vfio/igd: canonicalize memory size calculations") Signed-off-by: Cé

[PATCH v2 1/2] cpus: Introduce cpu_is_of_type() helper

2025-01-07 Thread Philippe Mathieu-Daudé
Introduce a helper to check whether a vCPU instance is from a certain QOM parent type. We don't need to use the type-safe QOM cast macros and can directly access the cached CPUClass (see commit 6fbdff87062 "cpu: cache CPUClass in CPUState for hot code paths"). Signed-off-by: Philippe Mathieu-Daudé

[PATCH v2 0/2] target/arm/arm-powerctl: Restrict to ARM cores

2025-01-07 Thread Philippe Mathieu-Daudé
Since v1: - Factor cpu_is_of_type() out Philippe Mathieu-Daudé (2): cpus: Introduce cpu_is_of_type() helper target/arm/arm-powerctl: Restrict to ARM cores include/hw/core/cpu.h | 9 + cpu-common.c | 5 + target/arm/arm-powerctl.c | 6 -- 3 files changed, 18 i

[PATCH v2 2/2] target/arm/arm-powerctl: Restrict to ARM cores

2025-01-07 Thread Philippe Mathieu-Daudé
When running on a heterogeneous setup, the CPU_FOREACH() macro in arm_get_cpu_by_id() iterates on all vCPUs, regardless they are ARM or not. Check the CPU class type and skip the non-ARM instances. Reviewed-by: Daniel Henrique Barboza Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Da

Re: [PATCH] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-07 Thread Ani Sinha
> On 7 Jan 2025, at 6:28 PM, Ani Sinha wrote: > > At present, the libqos/fw_cfg.c library does not support the modern DMA which > is required to write to the fw_cfg files. It only uses the IO interface. > Implement read and write methods based on DMA. This will enable developers to > write tes

[RFC 4/4] hw/nvme: connect SPDM over NVMe Security Send/Recv

2025-01-07 Thread Wilfred Mallawa via
This patch extends the existing support we have for NVMe with only DoE to also add support to SPDM over the NVMe Security Send/Recv commands. With the new definition of the `spdm-trans` argument, users can specify `spdm_trans=nvme` or `spdm_trans=doe`. This allows us to select the SPDM transport r

[RFC 3/4] hw/nvme: add NVMe Admin Security SPDM support

2025-01-07 Thread Wilfred Mallawa via
Adds the NVMe Admin Security Send/Receive command support with support for DMTFs SPDM. The transport binding for SPDM is defined in the DMTF DSP0286. Signed-off-by: Wilfred Mallawa --- hw/nvme/ctrl.c | 207 ++- hw/nvme/nvme.h | 5 ++ include/

[RFC 2/4] spdm: add spdm storage transport virtual header

2025-01-07 Thread Wilfred Mallawa via
This header contains the transport encoding for an SPDM message that uses the SPDM over Storage transport as defined by the DMTF DSP0286. Signed-off-by: Wilfred Mallawa --- include/system/spdm-socket.h | 12 1 file changed, 12 insertions(+) diff --git a/include/system/spdm-socket.h

[RFC 0/4] Add SPDM over Storage transport support for NVMe

2025-01-07 Thread Wilfred Mallawa via
This series adds support for SPDM to be used over the storage transport, as defined by the DMTF DSP0286 [1] for NVMe. That is, using the admin NVMe Security Send/Receive commands, support transport for SPDM as per DSP0286 [1]. The binding specification (DSP0286) is still currently a draft specifica

[RFC 1/4] spdm-socket: add seperate send/recv functions

2025-01-07 Thread Wilfred Mallawa via
This is to support uni-directional transports such as SPDM over Storage. As specified by the DMTF DSP0286. Signed-off-by: Wilfred Mallawa --- backends/spdm-socket.c | 25 + include/system/spdm-socket.h | 35 +++ 2 files changed, 60 in

Re: [PATCH v2] hw/i386/pc: Fix level interrupt sharing for Xen event channel GSI

2025-01-07 Thread Paul Durrant
On 07/01/2025 16:32, David Woodhouse wrote: From: David Woodhouse The system GSIs are not designed for sharing. One device might assert a shared interrupt with qemu_set_irq() and another might deassert it, and the level from the first device is lost. This could be solved by using a multiplexer

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

2025-01-07 Thread Philippe Mathieu-Daudé
On 7/1/25 17:29, Paolo Bonzini wrote: On Tue, Jan 7, 2025 at 5:24 PM Philippe Mathieu-Daudé wrote: but I don't really like the two parameters and also I don't like that class_init is called differently for classes and interfaces. It's probably possible to design a better API, but I didn't spend

Re: [PATCH v2] hw/i386/pc: Fix level interrupt sharing for Xen event channel GSI

2025-01-07 Thread Philippe Mathieu-Daudé
(Cc'ing Bernhard) On 7/1/25 17:32, David Woodhouse wrote: From: David Woodhouse The system GSIs are not designed for sharing. One device might assert a shared interrupt with qemu_set_irq() and another might deassert it, and the level from the first device is lost. This could be solved by usin

Re: [PATCH v2] pci: ensure valid link status bits for downstream ports

2025-01-07 Thread Sebastian Ott
Hello Michael, Marcel, On Tue, 3 Dec 2024, Alex Williamson wrote: On Tue, 3 Dec 2024 13:19:28 +0100 Sebastian Ott wrote: PCI hotplug for downstream endpoints on arm fails because Linux' PCIe hotplug driver doesn't like the QEMU provided LNKSTA: pcieport :08:01.0: pciehp: Slot(2): Car

Re: [RFC PATCH 7/9] rust: qemu_api: add vmstate_struct and vmstate_cell

2025-01-07 Thread Paolo Bonzini
On Tue, Dec 31, 2024 at 1:23 AM Paolo Bonzini wrote: > > These are not type safe, but they're the best that can be done without > const_refs_static. > > Signed-off-by: Paolo Bonzini FWIW, I'll change these patch to support varrays in v2. Paolo > --- > rust/qemu-api/src/vmstate.rs | 34 +++

[PATCH v3 01/29] tests/functional: update the arm tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-21-alex.ben...@linaro.org> --- tests/functional/test_arm_tuxrun.py | 28 ++---

[PATCH v3 02/29] tests/functional: update the i386 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-23-alex.ben...@linaro.org> --- tests/functional/test_i386_tuxrun.py | 8 1 file chan

[PATCH v3 06/29] tests/functional: update the mips64 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-27-alex.ben...@linaro.org> --- tests/functional/test_mips64_tuxrun.py | 8 1 file ch

[PATCH v3 00/29] testing/next: functional tests, qtest clocks, vm and keymaps (pre-PR)

2025-01-07 Thread Alex Bennée
There are number of parts to this series. The first is the updated images for all the guests that didn't make it into 9.2. There are also some new functional tests for virtio-gpu along with some other clean-ups. The qtest patches focus on ensuring things calling clock_step and clock_set actually

[PATCH v3 12/29] tests/functional: update the s390x tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-33-alex.ben...@linaro.org> --- tests/functional/test_s390x_tuxrun.py | 8 1 file cha

Re: [PULL 0/2] Misc QGA patches for 2025-01-06

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

Re: [PATCH v2 4/4] qga: Make run_agent() and run_agent_once() return no value

2025-01-07 Thread Michal Prívozník
On 12/23/24 13:39, Konstantin Kostiuk wrote: > Hi Michal, > > Do you plan to fix this patch series? Yes, but I got sidetracked just before leaving for Christmas. I'll post another version soon. Michal

Re: [RFC PATCH 6/7] accel/hvf: Use CPU_FOREACH_HVF()

2025-01-07 Thread BALATON Zoltan
On Mon, 6 Jan 2025, Philippe Mathieu-Daudé wrote: On 6/1/25 21:33, Daniel Henrique Barboza wrote: On 1/6/25 5:02 PM, Philippe Mathieu-Daudé wrote: Only iterate over HVF vCPUs when running HVF specific code. Signed-off-by: Philippe Mathieu-Daudé ---   include/system/hvf_int.h  | 4   acc

Re: [PATCH 09/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.8 machine type

2025-01-07 Thread Cornelia Huck
On Fri, Jan 03 2025, Thomas Huth wrote: > The s390-ccw-virtio-2.8 machine is older than 6 years, so according to > our machine support policy, it can be removed now. > > Signed-off-by: Thomas Huth > --- > hw/s390x/s390-virtio-ccw.c | 17 - > 1 file changed, 17 deletions(-) Revi

Re: [PATCH 08/10] hw/s390x: Remove the cpu_model_allowed flag and related code

2025-01-07 Thread Cornelia Huck
On Fri, Jan 03 2025, Thomas Huth wrote: > Now that the last machine type that disabled cpu_model_allowed has > been removed, we can also remove the cpu_model_allowed flag itself > and all the related conditional code. > > Signed-off-by: Thomas Huth > --- > include/hw/s390x/s390-virtio-ccw.h |

[PATCH v3 13/29] tests/functional: update the sparc64 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-34-alex.ben...@linaro.org> --- tests/functional/test_sparc64_tuxrun.py | 8 1 file c

[PATCH v3 08/29] tests/functional: update the ppc32 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-29-alex.ben...@linaro.org> --- tests/functional/test_ppc_tuxrun.py | 8 1 file chang

[PATCH v3 15/29] tests/functional/aarch64: add tests for FEAT_RME

2025-01-07 Thread Alex Bennée
From: Pierrick Bouvier This boot an OP-TEE environment, and launch a nested guest VM inside it using the Realms feature. We do it for virt and sbsa-ref platforms. Signed-off-by: Pierrick Bouvier Message-Id: <20241220165212.3653495-1-pierrick.bouv...@linaro.org> [AJB: tweak ordering of setup] Si

[PATCH v3 28/29] dockerfiles: Remove 'MAINTAINER' entry in debian-tricore-cross.docker

2025-01-07 Thread Alex Bennée
From: Philippe Mathieu-Daudé AMSAT closed its email service [*] so my personal email address is now defunct. Remove it to avoid bouncing emails. [*] https://web.archive.org/web/20240617194936/https://forum.amsat-dl.org/index.php?thread/4581-amsat-mail-alias-service-to-end-august-1-2024/ Signed

[PATCH v3 25/29] tests/vm: partially un-tabify help output

2025-01-07 Thread Alex Bennée
While the make syntax itself uses tabs having a mixture of tabs and spaces in the vm-help output make no sense and confuses things lining up between terminal and editor. Fix that. Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 26 +- 1 file changed, 13 inserti

[PATCH v3 10/29] tests/functional: update the riscv32 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-31-alex.ben...@linaro.org> --- tests/functional/test_riscv32_tuxrun.py | 8 1 file c

[PATCH v3 05/29] tests/functional: update the mips32el tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-26-alex.ben...@linaro.org> --- tests/functional/test_mipsel_tuxrun.py | 8 1 file ch

[PATCH v3 03/29] tests/functional: add a m68k tuxrun tests

2025-01-07 Thread Alex Bennée
We didn't have this before and as it exercises the m68k virt platform it seems worth adding. We don't wait for the shutdown because QEMU will auto-exit on the shutdown. Cc: Laurent Vivier Cc: Anders Roxell Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-2

[PATCH v3 16/29] tests/qtest: remove clock_steps from virtio tests

2025-01-07 Thread Alex Bennée
In the qtest environment time will not step forward if the system is paused (timers disabled) or we have no timer events to fire. As a result VirtIO events are responded to directly and we don't need to step time forward. We still do timeout processing to handle the fact the target QEMU may not be

[PATCH v3 04/29] tests/functional: update the mips32 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-25-alex.ben...@linaro.org> --- tests/functional/test_mips_tuxrun.py | 8 1 file chan

[PATCH v3 27/29] pc-bios: ensure keymaps dependencies set vnc tests

2025-01-07 Thread Alex Bennée
I was seeing failures on vnc-display-test on FreeBSD: make vm-build-freebsd V=1 TARGET_LIST=aarch64-softmmu BUILD_TARGET=check-qtest QEMU_LOCAL=1 DEBUG=1 Leads to: qemu-system-aarch64: -vnc none: could not read keymap file: 'en-us' Broken pipe ../src/tests/qtest/libqtest.c:196: kill_qem

[PATCH v3 14/29] tests/functional: update the x86_64 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-35-alex.ben...@linaro.org> --- tests/functional/test_x86_64_tuxrun.py | 8 1 file ch

[PATCH v3 29/29] MAINTAINERS: Remove myself from reviewers

2025-01-07 Thread Alex Bennée
From: Wainer dos Santos Moschetta The time I spent contributing to QEMU was great, but I've not been active for a long time now. So removing myself from the reviewers list of "Integration Testing with the Avocado framework" and "Build and test automation" subsystems. Signed-off-by: Wainer dos Sa

[PATCH v3 09/29] tests/functional: update the ppc64 tuxrun tests

2025-01-07 Thread Alex Bennée
Now there are new up to date images available we should update to them. Cc: Anders Roxell Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20241121165806.476008-30-alex.ben...@linaro.org> --- tests/functional/test_ppc64_tuxrun.py | 16 1

[PATCH v3 26/29] tests/vm: allow interactive login as root

2025-01-07 Thread Alex Bennée
This is useful when debugging and you want to add packages to an image. Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 3 ++- tests/vm/basevm.py| 9 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include

[PATCH v3 19/29] tests/functional: add zstd support to uncompress utility

2025-01-07 Thread Alex Bennée
Rather than using the python library (which has a different API anyway) lets just call the binary. zstdtools is already in out qemu.yml so all test containers should have it around. Tests should still use @skipIfMissingCommands('zstd') to gracefully handle when only minimal dependencies have been i

  1   2   3   4   >