Re: [PATCH PoC 7/7] gpiodev: Add gpiobackend over GUSE

2025-04-08 Thread Markus Armbruster
Nikita Shubin via B4 Relay writes: > From: Nikita Shubin > > Add GUSE (FUSE based kernel module similiar to CUSE) based backend. > > This allows transparent usage of Linux GPIO UAPI based tools like > in kernel tools/gpio or libgpiod. > > libgpiod requires some modification to allow "/sys/class/

Re: [PATCH v4 01/13] memory: Export a helper to get intersection of a MemoryRegionSection with a given range

2025-04-08 Thread Chenyi Qiang
On 4/9/2025 10:47 AM, Alexey Kardashevskiy wrote: > > On 7/4/25 17:49, Chenyi Qiang wrote: >> Rename the helper to memory_region_section_intersect_range() to make it >> more generic. Meanwhile, define the @end as Int128 and replace the >> related operations with Int128_* format since the helper

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-08 Thread Gerd Hoffman
Hi, > > The chicken-and-egg problem arises if you go for hashing and want embed > > the igvm file in the UKI. > > I don't really see how signing the IGVM file for secure boot helps anything. It doesn't help indeed. This comes from the original idea by Alex to simply add a firmware image to th

Re: [PATCH v6 3/4] virtio_net: Add second acceptable configuration for MAC setup

2025-04-08 Thread Cindy Lu
On Tue, Apr 8, 2025 at 2:48 PM Jason Wang wrote: > > On Tue, Apr 8, 2025 at 2:13 PM Cindy Lu wrote: > > > > For VDPA devices, Allow configurations where the hardware MAC address > > is non-zero while the MAC address in the QEMU command line is zero. > > > > Signed-off-by: Cindy Lu > > --- > > h

Re: [PATCH 06/11] docs/sphinx/qmp_lexer: Generalize elision syntax

2025-04-08 Thread Markus Armbruster
John Snow writes: > On Fri, Apr 4, 2025 at 8:14 AM Markus Armbruster wrote: > >> Accept "... lorem ipsum ..." in addition to "...". >> >> Signed-off-by: Markus Armbruster [...] > Cool, sure! > > ACK (Who is responsible for this now? Me?) Yup. I posted the PR without waiting for your approv

Re: [PATCH v3 4/4] hw/s390x: compat handling for backward migration

2025-04-08 Thread Thomas Huth
On 03/04/2025 14.49, Shalini Chellathurai Saroja wrote: On 2025-04-02 09:52, Thomas Huth wrote: On 31/03/2025 16.00, Shalini Chellathurai Saroja wrote: Add Control-Program Identification (CPI) device to QOM only when the virtual machine supports CPI. CPI is supported from "s390-ccw-virtio-10.0"

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

2025-04-08 Thread Alexey Kardashevskiy
On 7/4/25 17:49, Chenyi Qiang wrote: Update ReplayRamDiscard() function to return the result and unify the ReplayRamPopulate() and ReplayRamDiscard() to ReplayStateChange() at the same time due to their identical definitions. This unification simplifies related structures, such as VirtIOMEMRep

Re: [PATCH v3 2/4] hw/s390x: add Control-Program Identification to QOM

2025-04-08 Thread Thomas Huth
On 03/04/2025 16.33, Shalini Chellathurai Saroja wrote: On 2025-04-01 15:55, Nina Schoetterl-Glausch wrote: On Mon, 2025-03-31 at 16:00 +0200, Shalini Chellathurai Saroja wrote: Add Control-Program Identification data to the QEMU Object Model (QOM), along with the timestamp in which the data wa

Re: [PATCH 12/27] target/riscv: do not make RISCVCPUConfig fields conditional

2025-04-08 Thread Alistair Francis
On Sun, Apr 6, 2025 at 5:03 PM Paolo Bonzini wrote: > > Avoid the need for #ifdefs in CPU declarations, keeping them > simple. After all class_data used to be specified for all > emulators, not just system ones. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alistair Francis Alistair > --- >

Re: [PATCH 11/27] target/riscv: include default value in cpu_cfg_fields.h.inc

2025-04-08 Thread Alistair Francis
On Sun, Apr 6, 2025 at 5:03 PM Paolo Bonzini wrote: > > In preparation for adding a function to merge two RISCVCPUConfigs > (pulling values from the parent if they are not overridden) annotate > cpu_cfg_fields.h.inc with the default value of the fields. > > Signed-off-by: Paolo Bonzini Reviewed-

Re: [PATCH] hw/acpi: Remove legacy reset handling from vmclock

2025-04-08 Thread Ani Sinha
> On Apr 9, 2025, at 09:53, Ani Sinha wrote: > > > >> On Feb 7, 2025, at 20:04, David Woodhouse wrote: >> >> From: David Woodhouse >> >> The vmclock device only has a reset method in order to plug its memory >> region into the system memory. It was originally done this way in order >> to

Re: [PATCH] hw/acpi: Remove legacy reset handling from vmclock

2025-04-08 Thread Ani Sinha
> On Feb 7, 2025, at 20:04, David Woodhouse wrote: > > From: David Woodhouse > > The vmclock device only has a reset method in order to plug its memory > region into the system memory. It was originally done this way in order > to defer the memory_region_add_subregion_overlap() from vmclock_

Re: [PATCH v8 17/55] i386/tdvf: Introduce function to parse TDVF metadata

2025-04-08 Thread Xiaoyao Li
On 4/2/2025 8:08 PM, Daniel P. Berrangé wrote: On Tue, Apr 01, 2025 at 09:01:27AM -0400, Xiaoyao Li wrote: From: Isaku Yamahata TDX VM needs to boot with its specialized firmware, Trusted Domain Virtual Firmware (TDVF). QEMU needs to parse TDVF and map it in TD guest memory prior to running th

Re: [PATCH v8 12/55] i386/tdx: Validate TD attributes

2025-04-08 Thread Xiaoyao Li
On 4/2/2025 7:47 PM, Daniel P. Berrangé wrote: On Tue, Apr 01, 2025 at 09:01:22AM -0400, Xiaoyao Li wrote: Validate TD attributes with tdx_caps that only supported bits are allowed by KVM. Besides, sanity check the attribute bits that have not been supported by QEMU yet. e.g., debug bit, it wil

[PATCH v2 0/4] Several sstc extension fixes

2025-04-08 Thread Jim Shu
This patch series contains several sstc fixes: (1) Writing to ACLINT mtime should also update the period of S/VS-mode timer, just like M-mode timer. (2) VSTIP bit of $mip CSR should check both M-mode and H-mode STCE. (3) Writing to STCE bit may enable/disable sstc extension in S/VS-mode, w

[PATCH v3 07/16] hw/intc/loongarch_pch: Use generic read callback for iomem32_low region

2025-04-08 Thread Bibo Mao
For memory region iomem32_low, generic read callback is used. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 67 ++--- 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/hw/intc/loongarch_pch_pic.c b/hw/intc/loongarch_pch_pic.c index 421ede

[PATCH v3 04/16] hw/intc/loongarch_pch: Set version information at initial stage

2025-04-08 Thread Bibo Mao
Register PCH_PIC_INT_ID constains version and supported irq number information, and it is read only register. The detailed value can be set at initial stage, rather than read callback. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c| 22 +++--- include/hw/intc

[PATCH v2 3/4] target/riscv: Fix VSTIP bit in sstc extension.

2025-04-08 Thread Jim Shu
VSTIP is only writable when both [mh]envcfg.STCE is enabled, or it will revert it's defined behavior as if sstc extension is not implemented. Signed-off-by: Jim Shu Acked-by: Alistair Francis --- target/riscv/csr.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/targ

Re: [PATCH v2 0/4] Several sstc extension fixes

2025-04-08 Thread Jim Shu
Sorry, I forgot to write v2 changes in cover-letter. Changes in v2: - Remove duplicated code in riscv_timer_stce_changed() function - Add sstc spec description in the commit log On Wed, Apr 9, 2025 at 10:51 AM Jim Shu wrote: > > This patch series contains several sstc fixes: > > (1) Writing to

[PATCH v2 1/4] target/riscv: Add the checking into stimecmp write function.

2025-04-08 Thread Jim Shu
Preparation commit to let aclint timer to use stimecmp write function. Aclint timer doesn't call sstc() predicate so we need to check inside the stimecmp write function. Signed-off-by: Jim Shu Acked-by: Alistair Francis --- target/riscv/time_helper.c | 19 +-- 1 file changed, 17

Re: [PATCH v4 01/13] memory: Export a helper to get intersection of a MemoryRegionSection with a given range

2025-04-08 Thread Alexey Kardashevskiy
On 7/4/25 17:49, Chenyi Qiang wrote: Rename the helper to memory_region_section_intersect_range() to make it more generic. Meanwhile, define the @end as Int128 and replace the related operations with Int128_* format since the helper is exported as a wider API. Suggested-by: Alexey Kardashevski

[PATCH v2 2/4] hw/intc: riscv_aclint: Fix mtime write for sstc extension

2025-04-08 Thread Jim Shu
When changing the mtime value, the period of [s|vs]timecmp timers should also be updated, similar to the period of mtimecmp timer. The period of the stimecmp timer is the time until the next S-mode timer IRQ. The value is calculated as "stimecmp - time". [1] It is equal to "stimecmp - mtime" since

[PATCH v2 4/4] target/riscv: Enable/Disable S/VS-mode Timer when STCE bit is changed

2025-04-08 Thread Jim Shu
Updating STCE will enable/disable SSTC in S-mode or/and VS-mode, so we also need to update S/VS-mode Timer and S/VSTIP bits in $mip CSR. Signed-off-by: Jim Shu --- target/riscv/csr.c | 44 target/riscv/time_helper.c | 46 ++

[PATCH v3 15/16] hw/intc/loongarch_pch: Set flexible memory access size with iomem region

2025-04-08 Thread Bibo Mao
The original iomem region only supports 4 bytes access size, set it ok with 1/2/4/8 bytes. Also unaligned memory access is not supported. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/intc/loongarch_p

[PATCH v3 16/16] hw/intc/loongarch_pch: Merge three memory region into one

2025-04-08 Thread Bibo Mao
Since memory region iomem supports memory access size with 1/2/4/8, it can be used for memory region iomem8 and iomem32_high. Now remove memory region iomem8 and iomem32_high, merge them into iomem together. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c| 66 +---

[PATCH v3 06/16] hw/intc/loongarch_pch: Discard write operation with ISR register

2025-04-08 Thread Bibo Mao
With the latest 7A1000 user manual, interrupt status register ISR is read only. Here discard write operation with ISR register. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/intc/loongarch_pch_pic.c b/hw/intc/loongarch_pch_pic

[PATCH v3 14/16] hw/intc/loongarch_pch: Rename memory region iomem32_low with iomem

2025-04-08 Thread Bibo Mao
Rename memory region iomem32_low with iomem, also change ops name as follows: loongarch_pch_pic_reg32_low_ops --> loongarch_pch_pic_ops loongarch_pch_pic_low_readw --> loongarch_pch_pic_read loongarch_pch_pic_low_writew --> loongarch_pch_pic_write Signed-off-by: Bibo Mao --- hw/i

[PATCH v3 09/16] hw/intc/loongarch_pch: Use generic read callback for iomem8 region

2025-04-08 Thread Bibo Mao
Add iomem8 region register read operation emulation in generic read function loongarch_pch_pic_read(), and use this function for iomem8 region. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 28 1 file changed, 8 insertions(+), 20 deletions(-) diff --git

[PATCH v3 08/16] hw/intc/loongarch_pch: Use generic read callback for iomem32_high region

2025-04-08 Thread Bibo Mao
Add register read operation emulation in generic read function loongarch_pch_pic_read(), and use this function for iomem32_high region. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/hw/intc

[PATCH v3 00/16] hw/intc/loongarch_pch: Cleanup with memory region ops

2025-04-08 Thread Bibo Mao
This series patchset is to clean up with memory regions of loongarch pch pic interrupt controller. Originally there are three iomem regions: iomem32_low, iomem8, iomem32_highm. Since these regions only support 4 bytes/1 byte/4 bytes access, it is divided into three regions. Now it is merged into o

[PATCH v3 05/16] hw/intc/loongarch_pch: Use relative address in MemoryRegionOps

2025-04-08 Thread Bibo Mao
Parameter address for read and write callback in MemoryRegionOps is relative offset with base address of this MemoryRegionOps. It can be directly used as offset and offset calculation can be removed. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 34 --

[PATCH v3 03/16] hw/intc/loongarch_pch: Remove some duplicate macro

2025-04-08 Thread Bibo Mao
The meaning of macro definition STATUS_LO_START is simliar with PCH_PIC_INT_STATUS, only that offset is different, the same for macro POL_LO_START. Now remove these duplicated macro definitions. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c| 20 ++-- include

[PATCH v3 13/16] hw/intc/loongarch_pch: Use unified trace event for memory region ops

2025-04-08 Thread Bibo Mao
Add trace event trace_loongarch_pch_pic_read(), replaces the following three events: trace_loongarch_pch_pic_low_readw() trace_loongarch_pch_pic_high_readw() trace_loongarch_pch_pic_readb() The similiar with write trace event. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 24 ++

Re: [PATCH v2 1/2] vfio/spapr: Enhance error handling in vfio_spapr_create_window()

2025-04-08 Thread Cédric Le Goater
Hello Amit, Please use --cover-letter for the next spin. On 4/7/25 16:31, Amit Machhiwal wrote: Introduce an Error ** parameter to vfio_spapr_create_window() to enable structured error reporting. This allows the function to propagate detailed errors back to callers. Suggested-by: Cédric Le Go

Re: [PATCH] ui/curses: Fix infinite loop on windows

2025-04-08 Thread Philippe Mathieu-Daudé
On 8/4/25 16:08, Stefan Hajnoczi wrote: On Thu, Apr 03, 2025 at 01:07:56AM +, William Hu via wrote: >From a42046272f0544dd18ed58661e53ea17d1584c2c Mon Sep 17 00:00:00 2001 From: William Hu Date: Wed, 2 Apr 2025 12:00:00 -0400 Subject: [PATCH] ui/curses: Fix infinite loop on windows Replace

[PATCH 1/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-08 Thread Alan Adamson
Allow the value of CMIC to to be set via a new subsystem specific parameter. This removes the requirement that all subsystems must have the CMIC bit enabled. New NVMe Subsystem QEMU Parameter (See NVMe Specification for details): ,cmic=BOOLEAN (default: off) Signed-off-by: Alan Adamson -

[PATCH 0/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-08 Thread Alan Adamson
While testing Linux atomic writes with qemu-nvme v10.0.0-rc1, Linux was incorrectly displaying atomic_write_max_bytes # cat /sys/block/nvme0n1/queue/atomic_write_max_bytes 0 # nvme id-ctrl /dev/nvme0n1 | grep awupf awupf : 15 # Since AWUPF was set to 15, it was expected atomic_write_max_bytes

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-08 Thread Dionna Amalie Glaze
On Tue, Apr 8, 2025 at 1:33 AM Gerd Hoffman wrote: > > Hi, > > > > Well. If you want put the db into the igvm and the igvm into the uki > > > you've got a chicken-and-egg problem. Moving the firmware from the main > > > UKI to UKI add-on would solve that. > > > > Why is embedding a public key

Re: [PATCH 0/2] Add property to support writing ERSTBA in high-low order

2025-04-08 Thread Bernhard Beschow
Am 8. April 2025 20:31:58 UTC schrieb Guenter Roeck : >On 4/8/25 12:57, Bernhard Beschow wrote: >> >> >> Am 8. April 2025 16:09:58 UTC schrieb Guenter Roeck : >>> On 4/6/25 11:08, Bernhard Beschow wrote: >>> [ .. ] >>> >> Yeah, it works with Buildroot as described in the handbook. When I

Re: [PATCH preview 0/3] rust: update build system for Meson 1.8.0

2025-04-08 Thread Paolo Bonzini
Il mar 8 apr 2025, 22:34 Bernhard Beschow ha scritto: > > > Am 5. April 2025 10:06:00 UTC schrieb Paolo Bonzini : > >Meson 1.7.0 and 1.8.0 include improved support for Rust, namely: > >* support for "objects" in Rust executables > >* support for doctest targets > > Using Meson 1.7.2 (shipped with

Re: [PATCH 1/2] rust/qemu-api: Add initial logging support based on C API

2025-04-08 Thread Bernhard Beschow
Am 1. April 2025 10:51:06 UTC schrieb Bernhard Beschow : > > >Am 31. März 2025 09:53:41 UTC schrieb Paolo Bonzini : >>On 3/30/25 22:58, Bernhard Beschow wrote: >>> A qemu_log_mask!() macro is provided which expects similar arguments as the >>> C >>> version. However, the formatting works as one

Re: [PATCH 06/11] docs/sphinx/qmp_lexer: Generalize elision syntax

2025-04-08 Thread John Snow
On Fri, Apr 4, 2025 at 8:14 AM Markus Armbruster wrote: > Accept "... lorem ipsum ..." in addition to "...". > > Signed-off-by: Markus Armbruster > --- > docs/devel/qapi-code-gen.rst| 6 -- > docs/sphinx/qmp_lexer.py| 2 +- > tests/qapi-schema/doc-good.json | 2 +- > tests/qapi

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-04-08 Thread BALATON Zoltan
On Tue, 8 Apr 2025, Christian Schoenebeck wrote: On Friday, April 4, 2025 1:34:27 PM CEST BALATON Zoltan wrote: On Fri, 4 Apr 2025, Christian Schoenebeck wrote: On Monday, March 31, 2025 3:05:24 PM CEST BALATON Zoltan wrote: On Sun, 23 Mar 2025, Christian Schoenebeck wrote: On Sunday, March 1

Re: [PATCH 0/2] Add property to support writing ERSTBA in high-low order

2025-04-08 Thread Guenter Roeck
On 4/8/25 12:57, Bernhard Beschow wrote: Am 8. April 2025 16:09:58 UTC schrieb Guenter Roeck : On 4/6/25 11:08, Bernhard Beschow wrote: [ .. ] Yeah, it works with Buildroot as described in the handbook. When I append `-netdev user,id=net0 -device virtio-net-pci,netdev=net0` on the cli I can

Re: [PATCH-for-10.0 0/3] More imx8mp-evk improvements

2025-04-08 Thread Bernhard Beschow
Am 8. April 2025 18:57:45 UTC schrieb "Philippe Mathieu-Daudé" : >On 5/4/25 23:48, Bernhard Beschow wrote: > >> Guenter Roeck (2): >>hw/arm/imx8mp-evk: Remove unimplemented cpu-idle-states properties >> from devicetree >>hw/arm/imx8mp-evk: Remove unimplemented nxp,imx8mp-fspi node

Re: [PATCH preview 0/3] rust: update build system for Meson 1.8.0

2025-04-08 Thread Bernhard Beschow
Am 5. April 2025 10:06:00 UTC schrieb Paolo Bonzini : >Meson 1.7.0 and 1.8.0 include improved support for Rust, namely: >* support for "objects" in Rust executables >* support for doctest targets Using Meson 1.7.2 (shipped with my distro) I didn't succeed with either of these. If just applying

Re: [PATCH 0/2] Add property to support writing ERSTBA in high-low order

2025-04-08 Thread Guenter Roeck
On 4/8/25 12:57, Bernhard Beschow wrote: Am 8. April 2025 16:09:58 UTC schrieb Guenter Roeck : On 4/6/25 11:08, Bernhard Beschow wrote: [ .. ] Yeah, it works with Buildroot as described in the handbook. When I append `-netdev user,id=net0 -device virtio-net-pci,netdev=net0` on the cli I can

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-04-08 Thread Volker Rümelin
Am 08.04.25 um 14:55 schrieb Christian Schoenebeck: > On Friday, April 4, 2025 1:34:27 PM CEST BALATON Zoltan wrote: >> On Fri, 4 Apr 2025, Christian Schoenebeck wrote: >>> On Monday, March 31, 2025 3:05:24 PM CEST BALATON Zoltan wrote: On Sun, 23 Mar 2025, Christian Schoenebeck wrote: > O

[PATCH 1/3] scripts: nixify archive-source.sh

2025-04-08 Thread Joel Granados
Use "#!/usr/bin/env bash" instead of "#!/bin/bash". This is necessary for nix environments as they only provide /usr/bin/env at the standard location. Signed-off-by: Joel Granados --- scripts/archive-source.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/archive-so

[PATCH 0/3] scripts: Add a root dir in archve-source.sh

2025-04-08 Thread Joel Granados
arguments scripts: Clarify doc messages in archive-source.sh scripts/archive-source.sh | 92 +++ 1 file changed, 69 insertions(+), 23 deletions(-) --- base-commit: ea35a5082a5fe81ce8fd184b0e163cd7b08b7ff7 change-id: 20250408-jag-sysctl-36c35b960c28 Best

[PATCH 3/3] scripts: Clarify doc messages in archive-source.sh

2025-04-08 Thread Joel Granados
Signed-off-by: Joel Granados --- scripts/archive-source.sh | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 7143aaefc1133fe991b329df3c78e6ed7726322f..eb6ee715a8a3a33d8abe333fd896ad1048821b0f 100755 --- a

[PATCH 2/3] scripts: Add root dir to arguments

2025-04-08 Thread Joel Granados
The archive-source script appended everything directly on the tar root making it unusable for creating nix overlays; nix expects all files to be under a directory in the tarbal. Add a "-d|--dir" argument that places all files under a custom root. Behaviour is unchanged when the argument is not giv

Re: [PATCH 0/2] Add property to support writing ERSTBA in high-low order

2025-04-08 Thread Bernhard Beschow
Am 8. April 2025 16:09:58 UTC schrieb Guenter Roeck : >On 4/6/25 11:08, Bernhard Beschow wrote: >[ .. ] > Yeah, it works with Buildroot as described in the handbook. When I append `-netdev user,id=net0 -device virtio-net-pci,netdev=net0` on the cli I can `wget http://www.google.

Re: [PATCH 0/2] Add property to support writing ERSTBA in high-low order

2025-04-08 Thread Bernhard Beschow
Am 5. April 2025 14:00:00 UTC schrieb Guenter Roeck : >This series is needed to support the USB interface on imx8mp-evk when >booting the Linux kernel. > >According to the XHCI specification, ERSTBA should be written in Low-High >order. The Linux kernel writes the high word first. This results i

Re: [PATCH] ui/curses: Fix infinite loop on windows

2025-04-08 Thread Philippe Mathieu-Daudé
On 3/4/25 03:07, William Hu via wrote: From a42046272f0544dd18ed58661e53ea17d1584c2c Mon Sep 17 00:00:00 2001 From: William Hu Date: Wed, 2 Apr 2025 12:00:00 -0400 Subject: [PATCH] ui/curses: Fix infinite loop on windows Replace -1 comparisons for wint_t with WEOF to fix infinite loop caused b

Re: [PATCH v6] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-08 Thread Pinku Deb Nath
Yay! 😊 On Tue, Apr 8, 2025, 8:43 a.m. Stefan Hajnoczi wrote: > On Mon, Apr 07, 2025 at 08:47:30AM -0700, Pinku Deb Nath wrote: > > Full Unit Access (FUA) is an optimization where a disk write with the > > flag set will be persisted to disk immediately instead of potentially > > remaining in the

[PULL 4/8] hw/ufs: Fix incorrect comment for segment_size and allocation_unit_size

2025-04-08 Thread Philippe Mathieu-Daudé
From: Keoseong Park The comments for segment_size and allocation_unit_size incorrectly described them as 4KB. According to the UFS specification, segment_size is expressed in units of 512 bytes. Given segment_size = 0x2000 (8192), the actual size is 4MB. Similarly, allocation_unit_size = 1 means

[PULL 6/8] hw/arm/imx8mp-evk: Temporarily remove unimplemented imx8mp-fspi node from devicetree

2025-04-08 Thread Philippe Mathieu-Daudé
From: Guenter Roeck The nxp,imx8mp-fspi node triggers a warning backtrace. Remove it from the devicetree file. Signed-off-by: Guenter Roeck Inspired-by: commit bf1da4b308 ("hw/arm/raspi4b: Temporarily disable unimplemented rpi4b devices") Signed-off-by: Bernhard Beschow [Bernhard: split patch

Re: [PATCH] scripts/checkpatch: Fix typo in SPDX-License-Identifier keyword

2025-04-08 Thread Philippe Mathieu-Daudé
On 8/4/25 18:27, Zhao Liu wrote: Fix the typo in the error message to help `grep` the example: ERROR: New file '***' requires 'SPDX-License-Identifer' Fixes: fa4d79c64dae ("scripts: mandate that new files have SPDX-License-Identifier") Signed-off-by: Zhao Liu --- scripts/checkpatch.pl | 4 +

[PULL 7/8] hw/nvme: fix attachment of private namespaces

2025-04-08 Thread Philippe Mathieu-Daudé
rk csi handling") Reported-by: Alan Adamson Suggested-by: Alan Adamson Signed-off-by: Klaus Jensen Tested-by: Alan Adamson Reviewed-by: Alan Adamson Reviewed-by: Keith Busch Message-ID: <20250408-fix-private-ns-v1-1-28e169b6b...@samsung.com> Signed-off-by: Philippe Mathieu-Daudé --- hw

[PULL 8/8] scripts/checkpatch: Fix typo in SPDX-License-Identifier keyword

2025-04-08 Thread Philippe Mathieu-Daudé
From: Zhao Liu Fix the typo in the error message to help `grep` the example: ERROR: New file '***' requires 'SPDX-License-Identifer' Fixes: fa4d79c64dae ("scripts: mandate that new files have SPDX-License-Identifier") Signed-off-by: Zhao Liu Reviewed-by: Alex Bennée Message-ID: <202504081627

[PULL 3/8] docs/arm: Add apple HVF host for supported guest CPU type

2025-04-08 Thread Philippe Mathieu-Daudé
From: Zhang Chen In my test, latest QEMU already support Apple HVF for -cpu host and max. >From guest VM lscpu: Architecture: aarch64 CPU op-mode(s): 64-bit Byte Order: Little Endian CPU(s): 11 On-line CPU(s) list:0-10 Vendor ID:

[PULL 2/8] hw/core/machine: Fix -machine dumpdtb=file.dtb

2025-04-08 Thread Philippe Mathieu-Daudé
From: Joel Stanley In commit 8fd2518ef2f8 ("hw: Centralize handling of -machine dumpdtb option") the call to dump was moved with respect to the init of the machine. This resulted in the device tree missing parts of the machine description, depending on how they construct their device tree. The

[PULL 1/8] smbios: Fix buffer overrun when using path= option

2025-04-08 Thread Philippe Mathieu-Daudé
From: Daan De Meyer We have to make sure the array of bytes read from the path= file is null-terminated, otherwise we run into a buffer overrun later on. Fixes: bb99f4772f54017490e3356ecbb3df25c5d4537f ("hw/smbios: support loading OEM strings values from a file") Resolves: https://gitlab.com/qe

[PATCH v1 12/24] hw/s390x/ipl: Add IPIB flags to IPL Parameter Block

2025-04-08 Thread Zhuoying Cai
Add IPIB flags to IPL Parameter Block to determine if IPL needs to perform securely and if IPL Information Report Block (IIRB) exists. Secure boot in audit mode will perform if certificate(s) exist in the key store. IIRB will exist and results of verification will be stored in IIRB. Signed-off-by

[PATCH v1 16/24] pc-bios/s390-ccw: Refactor zipl_load_segment function

2025-04-08 Thread Zhuoying Cai
Make the address variable a parameter of zipl_load_segment. Modify this function for reuse in the next patch, which allows loading segment or signature data to the destination memory address. Signed-off-by: Zhuoying Cai --- pc-bios/s390-ccw/bootmap.c | 6 ++ 1 file changed, 2 insertions(+),

[PATCH v1 08/24] s390x/diag: Introduce DIAG 508 for secure IPL operations

2025-04-08 Thread Zhuoying Cai
From: Collin Walling In order to support secure IPL (aka secure boot) for the s390-ccw BIOS, a new s390 DIAGNOSE instruction is introduced to leverage QEMU for handling operations such as signature verification and certificate retrieval. Currently, only subcode 0 is supported with this patch, wh

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-08 Thread Gerd Hoffman
Hi, > > Well. If you want put the db into the igvm and the igvm into the uki > > you've got a chicken-and-egg problem. Moving the firmware from the main > > UKI to UKI add-on would solve that. > > Why is embedding a public key that will sign the IGVM in the IGVM a > chicken-and-egg problem? I

Re: [PATCH] scripts/checkpatch: Fix typo in SPDX-License-Identifier keyword

2025-04-08 Thread Alex Bennée
Zhao Liu writes: > Fix the typo in the error message to help `grep` the example: > > ERROR: New file '***' requires 'SPDX-License-Identifer' > > Fixes: fa4d79c64dae ("scripts: mandate that new files have > SPDX-License-Identifier") > Signed-off-by: Zhao Liu Reviewed-by: Alex Bennée -- Alex

[PULL 02/11] qapi/rocker: Tidy up query-rocker-of-dpa-flows example

2025-04-08 Thread Markus Armbruster
The command can return any number of RockerOfDpaFlow objects. The example shows it returning exactly two, with the second object's members elided. Tweak it so it elides elements after the first instead. Signed-off-by: Markus Armbruster Message-ID: <20250404121413.1743790-3-arm...@redhat.com> Re

Re: [PATCH] hw/nvme: fix attachment of private namespaces

2025-04-08 Thread alan . adamson
On 4/8/25 3:20 AM, Klaus Jensen wrote: From: Klaus Jensen Fix regression when attaching private namespaces that gets attached to the wrong controller. Keep track of the original controller "owner" of private namespaces, and only attach if this matches on controller enablement. Tested-by: A

[PATCH v1 05/24] s390x/diag: Refactor address validation check from diag308_parm_check

2025-04-08 Thread Zhuoying Cai
From: Collin Walling Create a function to validate the address parameter of DIAGNOSE. Refactor the function for reuse in the next patch, which allows address validation in read or write operation of DIAGNOSE. Signed-off-by: Zhuoying Cai --- hw/s390x/ipl.h | 6 ++ target/s390x/diag.c

[PATCH v1 13/24] hw/s390x/ipl: Set iplb->len to maximum length of IPL Parameter Block

2025-04-08 Thread Zhuoying Cai
The IPL Information Report Block (IIRB) immediately follows the IPL Parameter Block (IPLB). The IPLB struct is allocated 4KB in memory, and iplb->len indicates the amount of memory currently used by the IPLB. To ensure proper alignment of the IIRB and prevent overlap, set iplb->len to the maximum

[PATCH v1 15/24] pc-bios/s390-ccw: Refactor zipl_run()

2025-04-08 Thread Zhuoying Cai
Refactor to enhance readability before enabling secure IPL in later patches. Signed-off-by: Zhuoying Cai --- pc-bios/s390-ccw/bootmap.c | 58 ++ 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootm

[PATCH v1 04/24] s390x/diag: Introduce DIAG 320 for certificate store facility

2025-04-08 Thread Zhuoying Cai
From: Collin Walling DIAGNOSE 320 is introduced to support certificate store facility, which includes operations such as query certificate storage information and provide certificates in the certificate store. Currently, only subcode 0 is supported with this patch, which is used to query a bitma

[PATCH v1 23/24] pc-bios/s390-ccw: Handle secure boot with multiple boot devices

2025-04-08 Thread Zhuoying Cai
The current approach to enabling secure boot relies on providing -secure-boot and -boot-certificates options, which apply to all boot devices. With the possibility of multiple boot devices, secure boot expects all provided devices to be supported and eligible (e.g., virtio-blk/virtio-scsi using th

[PATCH v1 11/24] pc-bios/s390-ccw: Define memory for IPLB and convert IPLB to pointers

2025-04-08 Thread Zhuoying Cai
This patch is necessary because of the architectural design of IPL Parameter Block (IPLB) and IPL Information Report Block (IIRB). IIRB will be introduced in the next patch. Define a memory space for both IPL Parameter Block (IPLB) and IPL Information Report Block (IIRB) since IIRB is stored immed

[PATCH v1 07/24] s390x/diag: Implement DIAG 320 subcode 2

2025-04-08 Thread Zhuoying Cai
DIAG 320 subcode 2 provides certificates that are in the certificate store. The subcode value is denoted by setting the second-left-most bit of an 8-byte field. The verification-certificate-block (VCB) contains the output data when the operation completes successfully. VCB includes a common heade

[PATCH v1 03/24] s390x: Guest support for Certificate Store Facility (CS)

2025-04-08 Thread Zhuoying Cai
DIAG 320 is supported when the certificate-store (CS) facility is installed. Availability of CS facility is determined by byte 134 bit 5 of the SCLP Read Info block. Signed-off-by: Zhuoying Cai --- target/s390x/cpu_features.c | 1 + target/s390x/cpu_features_def.h.inc | 1 + target/s390

[PATCH v1 17/24] pc-bios/s390-ccw: Add signature verification for secure boot in audit mode

2025-04-08 Thread Zhuoying Cai
Enable secure IPL in audit mode, which performs signature verification, but any error does not terminate the boot process. Only warnings will be logged to the console instead. Add a comp_len variable to store the length of a segment in zipl_load_segment. comp_len variable is necessary to store the

[PATCH v1 20/24] Add -secure-boot on|off option in QEMU command line

2025-04-08 Thread Zhuoying Cai
The `-secure-boot on|off` command line option is implemented to enable secure IPL. By default, -secure-boot is set to false if not specified in the command line. Signed-off-by: Zhuoying Cai --- qemu-options.hx | 8 system/vl.c | 21 + 2 files changed, 29 insert

[PATCH v1 14/24] s390x: Guest support for Secure-IPL Facility

2025-04-08 Thread Zhuoying Cai
Introduce Secure-IPL (SIPL) facility. Use the abbreviation CBL (Consolidated-Boot-Loader facility at bit 0 of byte 136) to represent bytes 136 and 137 for IPL device facilities of the SCLP Read Info block. Availability of SIPL facility is determined by byte 136 bit 1 of the SCLP Read Info block.

[PATCH v1 09/24] s390x/diag: Implement DIAG 508 subcode 2 for signature verification

2025-04-08 Thread Zhuoying Cai
From: Collin Walling DIAG 508 subcode 2 performs signature-verfication on signed components. A signed component may be a Linux kernel image, or any other signed binary. **Verification of initrd is not supported.** The instruction call expects two item-pairs: an address of a device component, an

[PATCH v1 02/24] hw/s390x/ipl: Create certificate store

2025-04-08 Thread Zhuoying Cai
Create a certificate store for boot certificates used for secure IPL. Load certificates from the -boot-certificate option into the cert store. Currently, only x509 certificates in DER format and uses SHA-256 hashing algorithm are supported, as these are the types required for secure boot on s390.

[PATCH v1 22/24] pc-bios/s390-ccw: Handle true secure IPL mode

2025-04-08 Thread Zhuoying Cai
When secure boot is enabled (-secure-boot on) and certificate(s) are provided, the boot operates in True Secure IPL mode. Any verification error during True Secure IPL mode will cause the entire boot process to terminate. Secure IPL in audit mode requires at least one certificate provided in the

[PATCH v1 10/24] pc-bios/s390-ccw: Introduce IPL Information Report Block (IIRB)

2025-04-08 Thread Zhuoying Cai
The IPL information report block (IIRB) contains information used to locate IPL records and to report the results of signature verification of one or more secure components of the load device. IIRB is stored immediately following the IPL Parameter Block. Results on component verification in any ca

Re: [PATCH 0/2] Add property to support writing ERSTBA in high-low order

2025-04-08 Thread Guenter Roeck
On 4/6/25 11:08, Bernhard Beschow wrote: [ .. ] Yeah, it works with Buildroot as described in the handbook. When I append `-netdev user,id=net0 -device virtio-net-pci,netdev=net0` on the cli I can `wget http://www.google.com` successfully. When I omit it there is no network connectivity. This

[PATCH] scripts/checkpatch: Fix typo in SPDX-License-Identifier keyword

2025-04-08 Thread Zhao Liu
Fix the typo in the error message to help `grep` the example: ERROR: New file '***' requires 'SPDX-License-Identifer' Fixes: fa4d79c64dae ("scripts: mandate that new files have SPDX-License-Identifier") Signed-off-by: Zhao Liu --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+)

Re: [PATCH v2 1/3] cleanup: Re-run return_directly.cocci

2025-04-08 Thread Philippe Mathieu-Daudé
On 7/4/25 10:26, Markus Armbruster wrote: Coccinelle's indentation of virt_create_plic() results in a long line. Avoid that by mimicking the old indentation manually. Don't touch tests/tcg/mips/user/. I'm not sure these files are ours to make style cleanups on. They might be imported third-par

Re: [PATCH v6] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-08 Thread Stefan Hajnoczi
On Mon, Apr 07, 2025 at 08:47:30AM -0700, Pinku Deb Nath wrote: > Full Unit Access (FUA) is an optimization where a disk write with the > flag set will be persisted to disk immediately instead of potentially > remaining in the disk's write cache. > > This commit address the todo task > for using p

[PULL 2/4] qcow2: Don't crash qemu-img info with missing crypto header

2025-04-08 Thread Kevin Wolf
qcow2_refresh_limits() assumes that s->crypto is non-NULL whenever bs->encrypted is true. This is actually not the case: qcow2_do_open() allows to open an image with a missing crypto header for BDRV_O_NO_IO, and then bs->encrypted is true, but s->crypto is still NULL. It doesn't make sense to open

Re: [RFC 0/3] Qemu FM emulation

2025-04-08 Thread Gregory Price
On Mon, Apr 07, 2025 at 09:20:27PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > The RFC provides a way for FM emulation in Qemu. The goal is to provide > a context where we can have more FM emulation discussions and share solutions > for a reasonable FM implementation in Qemu. > ... snip

Re: [PATCH] migration: add FEATURE_SEEKABLE to QIOChannelBlock

2025-04-08 Thread Marco Cavenati
On Tuesday, April 08, 2025 07:25 CEST, Prasad Pandit wrote: > * _channel_preadv/_writev functions are generic. They are independent > of whether the underlying channel is file or socket or memory or > something else. They are called if and when they are defined and they > in turn call channel sp

[PATCH v2] Revert "virtio-net: Copy received header to buffer"

2025-04-08 Thread Antoine Damhet
This reverts commit 7987d2be5a8bc3a502f89ba8cf3ac3e09f64d1ce. The goal was to remove the need to patch the (const) input buffer with a recomputed UDP checksum by copying headers to a RW region and inject the checksum there. The patch computed the checksum only from the header fields (missing the r

Re: [PATCH 00/16] Add Multi-Core Debug (MCD) API support

2025-04-08 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> Alex Bennée writes: >> >>> Markus Armbruster writes: >>> Mario Fleischmann writes: > Apologies for the line wrapping in yesterday's answer. Should be fixed > now. > > On 08.04.2025 09:00, Markus Armbruster wrote:

Re: [PATCH] smbios: Fix buffer overrun when using path= option

2025-04-08 Thread Stefan Hajnoczi
On Mon, Mar 24, 2025 at 07:24:59AM +0100, Thomas Huth wrote: > On 23/03/2025 22.35, Daan De Meyer wrote: > > We have to make sure the array of bytes read from the path= file > > is null-terminated, otherwise we run into a buffer overrun later on. > > > > Fixes: bb99f4772f54017490e3356ecbb3df25c5d4

Re: [PATCH 00/16] Add Multi-Core Debug (MCD) API support

2025-04-08 Thread Alex Bennée
Markus Armbruster writes: > Alex Bennée writes: > >> Markus Armbruster writes: >> >>> Mario Fleischmann writes: >>> Apologies for the line wrapping in yesterday's answer. Should be fixed now. On 08.04.2025 09:00, Markus Armbruster wrote: > > [...] > > What about providing th

Re: [PATCH] ui/curses: Fix infinite loop on windows

2025-04-08 Thread Stefan Hajnoczi
On Thu, Apr 03, 2025 at 01:07:56AM +, William Hu via wrote: > >From a42046272f0544dd18ed58661e53ea17d1584c2c Mon Sep 17 00:00:00 2001 > From: William Hu > Date: Wed, 2 Apr 2025 12:00:00 -0400 > Subject: [PATCH] ui/curses: Fix infinite loop on windows > > Replace -1 comparisons for wint_t with

[PULL 0/2] loongarch bug fix for 10.0

2025-04-08 Thread Song Gao
tags/pull-loongarch-20250408 for you to fetch changes up to fa0dde12db045ddc84f69b1aa0a4c98d176c903d: hw/loongarch/virt: Replace destination error with error_abort (2025-04-08 14:44:53 +0800) loongarch bug fi

Re: [PATCH] Revert "virtio-net: Copy received header to buffer"

2025-04-08 Thread Stefan Hajnoczi
On Fri, Apr 04, 2025 at 05:18:21PM +0200, Antoine Damhet wrote: > This reverts commit 7987d2be5a8bc3a502f89ba8cf3ac3e09f64d1ce. > > The goal was to remove the need to patch the (const) input buffer > with a recomputed UDP checksum by copying headers to a RW region and > inject the checksum there.

  1   2   >