Re: [PATCH 05/12] include/hw: replace FSF postal address with licenses URL

2025-06-13 Thread Cédric Le Goater
Hello Sean, On 6/13/25 18:44, Sean Wei wrote: Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei Instead, I would remov

[PATCH 2/2] hw/9pfs: move G_GNUC_PRINTF to header

2025-06-13 Thread Sean Wei
v9fs_path_sprintf() is annotated with G_GNUC_PRINTF(2, 3) in hw/9pfs/9p.c, but the prototype in hw/9pfs/9p.h is missing the attribute, so callers that include only the header do not get format checking. Move the annotation to the header and delete the duplicate in the source file. No behavior chan

[PoC] show header-vs-source G_GNUC_PRINTF behavior

2025-06-13 Thread Sean Wei
This patch is NOT meant for merge. Just a simple proof-of-concept so reviewers can quickly reproduce the difference between placing a G_GNUC_PRINTF attribute in *.c versus *.h file. What it tests - * Two identical printf-style helpers (my_printf) are provided: - v1: attribute lives

[PATCH 1/2] fsdev/9p-marshal: move G_GNUC_PRINTF to header

2025-06-13 Thread Sean Wei
v9fs_string_sprintf() is annotated with G_GNUC_PRINTF(2, 3) in 9p-marshal.c, but the prototype in fsdev/9p-marshal.h is missing the attribute, so callers that include only the header do not get format checking. Move the annotation to the header and delete the duplicate in the source file. No behav

[PATCH 0/2] virtio-9p: move G_GNUC_PRINTF to header

2025-06-13 Thread Sean Wei
v9fs_string_sprintf() and v9fs_path_sprintf() already have G_GNUC_PRINTF annotations in their own *.c files, but the prototypes in the corresponding headers lack them. When another translation unit includes only the header, -Wformat can no longer validate the argument list. This series relocates

Re: (subset) [PATCH v5 00/25] passage: Define a standard for firmware data flow

2025-06-13 Thread Tom Rini
On Wed, 28 May 2025 06:32:02 -0600, Simon Glass wrote: > This series adds a standard way of passing information between different > firmware phases. This already exists in U-Boot at a very basic level, in > the form of a bloblist containing an spl_handoff structure, but the intent > here is to def

Re: [PATCH v2 11/20] amd_iommu: Use iova_tree records to determine large page size on UNMAP

2025-06-13 Thread Alejandro Jimenez
On 6/11/25 4:29 AM, Sairaj Kodilkar wrote: On 5/2/2025 7:45 AM, Alejandro Jimenez wrote:   next: -    iova = iova_next; +    iova = (iova & ~(pagesize - 1)) + pagesize; Hi Alejandro, While experimenting with iommu.forcedac=1, I found that above line causes unsigned integer over

Re: [PATCH 1/1] docs/qapi-domain: Improve QAPI indices

2025-06-13 Thread John Snow
On Fri, May 23, 2025 at 2:08 PM John Snow wrote: > This patch changes the "by type" categorization in favor of using > sub-categories of a literal "By type" category instead. A new "By > module" categorization is also added that follows a similar pattern. > > Alphabetical sorting has been improve

[PATCH 04/18] qapi: add cross-references to crypto.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/crypto.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/crypto.json b/qapi/crypto.json index 9ec6301e188..57620d95da6 100644 --- a/qapi/crypto.json +++ b/qapi/crypto.json @@ -589,9 +589,9 @@ # # Specific parameters for RSA algor

[PATCH 05/18] qapi: add cross-references to dump.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/dump.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi/dump.json b/qapi/dump.json index 3a9b67efb1b..c311ccb4d2d 100644 --- a/qapi/dump.json +++ b/qapi/dump.json @@ -110,7 +110,7 @@ # # Describe the status of a long-runnin

[PATCH 10/18] qapi: add cross-references to pci.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/pci.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/pci.json b/qapi/pci.json index 29549d94551..4aad5f98e2a 100644 --- a/qapi/pci.json +++ b/qapi/pci.json @@ -83,7 +83,7 @@ # # @bus: information about the bus the device resides on

[PATCH 17/18] qapi: add cross-references to yank.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/yank.json | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/qapi/yank.json b/qapi/yank.json index 9bd8ecce27f..931d4b22d4b 100644 --- a/qapi/yank.json +++ b/qapi/yank.json @@ -9,7 +9,7 @@ ## # @YankInstanceType: # -# An

[PATCH 15/18] qapi: add cross-references to ui.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/ui.json | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index 7136c985c38..5bc54403cc2 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -39,7 +39,7 @@ ## # @SetPasswordOptions:

[PATCH 08/18] qapi: add cross-references to migration.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/migration.json | 62 ++--- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index d7c5047462e..fec6479a23e 100644 --- a/qapi/migration.json +++ b/qapi/migration.json

[PATCH 13/18] qapi: add cross-references to run-state.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/run-state.json | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/qapi/run-state.json b/qapi/run-state.json index 759f8730059..b7cc182707c 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@

[PATCH 14/18] qapi: add cross-references to sockets.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/sockets.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/sockets.json b/qapi/sockets.json index f9f559dabae..e7f8b42bda3 100644 --- a/qapi/sockets.json +++ b/qapi/sockets.json @@ -209,14 +209,14 @@ 'unix': 'UnixSocketAddres

[PATCH 18/18] qapi: add cross-references to misc modules

2025-06-13 Thread John Snow
These modules don't have specific maintainers, so they're lumped in together here as miscellaneous. Signed-off-by: John Snow --- qapi/control.json| 2 +- qapi/ebpf.json | 2 +- qapi/introspect.json | 22 +++--- qapi/misc-arm.json | 4 ++-- qapi/misc-i386.json | 2

[PATCH 09/18] qapi: add cross-references to net.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/net.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/net.json b/qapi/net.json index 371ade0dc6a..ab0b9aba46e 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -655,7 +655,7 @@ # this to zero disables this function. This memb

[PATCH 16/18] qapi: add cross-references to virtio.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/virtio.json | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qapi/virtio.json b/qapi/virtio.json index d1556dbf24a..3bc8700e943 100644 --- a/qapi/virtio.json +++ b/qapi/virtio.json @@ -135,7 +135,7 @@ # @num-vqs: VirtIODevice virtqueue

[PATCH 12/18] qapi: add cross-references to replay.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/replay.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi/replay.json b/qapi/replay.json index 35e0c4a6926..78244a9d0bf 100644 --- a/qapi/replay.json +++ b/qapi/replay.json @@ -47,8 +47,8 @@ # @query-replay: # # Retrieve t

[PATCH 07/18] qapi: add cross-references to Machine core

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/machine-common.json | 20 qapi/machine.json| 100 +++ 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/qapi/machine-common.json b/qapi/machine-common.json index 298e51f373a..a9f56cbbb43 100644

[PATCH 11/18] qapi: add cross-references to QOM

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/qdev.json | 4 ++-- qapi/qom.json | 9 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/qapi/qdev.json b/qapi/qdev.json index 5d18fb8e0e0..ff3f06a36d6 100644 --- a/qapi/qdev.json +++ b/qapi/qdev.json @@ -95,10 +95,10 @@ #from the gue

[PATCH 01/18] qapi: add cross-references to acpi.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/acpi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/acpi.json b/qapi/acpi.json index 2d53b823656..8e48d8874dd 100644 --- a/qapi/acpi.json +++ b/qapi/acpi.json @@ -106,7 +106,7 @@ ## # @query-acpi-ospm-status: # -# Return a list o

[PATCH 06/18] qapi: add cross-references to job.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/job.json | 73 ++- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/qapi/job.json b/qapi/job.json index c1ddae9c0fe..ffeac7989dd 100644 --- a/qapi/job.json +++ b/qapi/job.json @@ -10,26 +10,26 @@ #

[PATCH 03/18] qapi: add cross-references to block layer

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/block-core.json | 186 - qapi/block-export.json | 36 qapi/block.json| 14 ++-- qapi/transaction.json | 20 ++--- 4 files changed, 128 insertions(+), 128 deletions(-) diff --git a/qapi/block-core.jso

[PATCH 02/18] qapi: add cross-references to authz.json

2025-06-13 Thread John Snow
Signed-off-by: John Snow --- qapi/authz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/authz.json b/qapi/authz.json index 7fc6e3032ea..cbd9399c461 100644 --- a/qapi/authz.json +++ b/qapi/authz.json @@ -75,7 +75,7 @@ # Properties for authz-listfile objects. # # @f

[PATCH 00/18] QAPI: add cross-references to qapi docs

2025-06-13 Thread John Snow
Based-on: 20250612214200.1208340-1-js...@redhat.com [PATCH v4 0/4] qapi: add auto-generated return docs Hi, this patch series is a *mostly* mechanical application of QAPI cross-references to the QAPI/QMP documentation. I exported all cross-referenceable symbols from the QMP QAPI schema and ran

Re: [PATCH v2 01/12] python: convert packages to PEP517/pyproject.toml

2025-06-13 Thread John Snow
On Fri, Jun 13, 2025 at 4:36 AM Thomas Huth wrote: > On 12/06/2025 22.54, John Snow wrote: > > Newer versions of setuptools increasingly expect that packages are > > defined using the pyproject.toml/PEP517 packaging layout format. With > > 3.9 as our minimum, I believe it's finally appropriate to

[PATCH v3] hw/misc/aspeed_scu: Handle AST2600 protection key registers correctly

2025-06-13 Thread Tan Siewert
The AST2600 SCU has two protection key registers (0x00 and 0x10) that both need to be unlocked. (Un-)locking 0x00 modifies both protection key registers, while modifying 0x10 only modifies itself. This commit updates the SCU write logic to reject writes unless both protection key registers are unl

Re: [PATCH 11/12] target/xtensa: replace FSF postal address with licenses URL

2025-06-13 Thread Max Filippov
On Fri, Jun 13, 2025 at 9:54 AM Sean Wei wrote: > > Some of the GPLv2 boiler-plate still contained the > obsolete "51 Franklin Street" postal address. > > Replace it with the canonical GNU licenses URL recommended by the FSF: > https://www.gnu.org/licenses/ > > Signed-off-by: Sean Wei > --- > ta

Re: [PATCH v2 06/20] amd_iommu: Return an error when unable to read PTE from guest memory

2025-06-13 Thread Alejandro Jimenez
On 6/12/25 6:37 AM, Vasant Hegde wrote: Alejandro, On 5/2/2025 7:45 AM, Alejandro Jimenez wrote: Make amdvi_get_pte_entry() return an error value (-1) in cases where the memory read fails, versus the current return of 0 to indicate failure. The reason is that 0 is also a valid PTE value, an

Re: [PATCH v15 3/4] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2025-06-13 Thread Jonathan Cameron via
On Fri, 13 Jun 2025 17:07:24 +0100 Peter Maydell wrote: > On Fri, 13 Jun 2025 at 16:20, Jonathan Cameron > wrote: > > > > On Fri, 13 Jun 2025 13:57:39 +0100 > > Peter Maydell wrote: > > > > > On Thu, 12 Jun 2025 at 14:45, Jonathan Cameron > > > wrote: > > > > > > > > Code based on i386/pc

Re: [PATCH v15 2/4] hw/cxl: Make the CXL fixed memory windows devices.

2025-06-13 Thread Jonathan Cameron via
On Fri, 13 Jun 2025 17:08:28 +0100 Peter Maydell wrote: > On Fri, 13 Jun 2025 at 14:10, Jonathan Cameron > wrote: > > For these specific devices (the fixed memory windows) there isn't > > any state as they are representing fixed configuration of the system. > > The state is all in the host bridg

Re: [PATCH v15 4/4] qtest/cxl: Add aarch64 virt test for CXL

2025-06-13 Thread Jonathan Cameron via
On Fri, 13 Jun 2025 13:32:03 +0100 Peter Maydell wrote: > On Thu, 12 Jun 2025 at 14:45, Jonathan Cameron > wrote: > > > > Add a single complex case for aarch64 virt machine. > > Given existing much more comprehensive tests for x86 cover the > > common functionality, a single test should be enoug

[PATCH 06/12] include/qemu: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The LGPLv2.1 boiler-plate in rcu.h and rcu_queue.h still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- include/qemu/rcu.h | 4 ++-- include/qemu/r

[PATCH 12/12] target/i386/emulate: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
Some of the LGPLv2.1 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- target/i386/emulate/x86_emu.c | 4 ++-- target/i386/emulate/x86_

[PATCH 11/12] target/xtensa: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- target/xtensa/core-dc232b/gdb-config.c.inc | 5 ++--- target/xten

[PATCH 10/12] contrib: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The LGPLv2.1 boiler-plate in pdb.c file still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- contrib/elf2dmp/pdb.c | 4 ++-- 1 file changed, 2 insertions

[PATCH 09/12] scripts: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The GPLv2 boiler-plate in scripts/device-crash-test still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- scripts/device-crash-test | 3 +-- 1 file change

[PATCH 08/12] hw: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The GPLv2 boiler-plate in vmxnet3.h and vmw_pvscsi.h still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- hw/net/vmxnet3.h | 4 ++-- hw/scsi/vmw_pvsc

[PATCH 07/12] util/rcu.c: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The LGPLv2.1 boiler-plate in util/rcu.c still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- util/rcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH 05/12] include/hw: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- include/hw/i2c/aspeed_i2c.h | 3 +-- include/hw/pci/pci_bridge.h

[PATCH 04/12] include/libdecnumber: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- include/libdecnumber/dconfig.h | 5 ++--- include/libdecn

[PATCH 03/12] libdecnumber: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- libdecnumber/decContext.c | 5 ++--- libdecnumber/decNumber.c

[PATCH 02/12] linux-headers: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The GPLv2 boiler-plate in asm-arm/kvm.h and asm-powerpc/kvm.h still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei --- linux-headers/asm-arm/kvm.h | 4 ++

[PATCH 01/12] COPYING: replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The license text in COPYING (GPLv2), COPYING.LIB (LGPLv2.1), and the linux-headers/LICENSES/preferred/GPL-2.0 file are referenced to the obsolete FSF postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei ---

[PATCH 00/12] Replace FSF postal address with licenses URL

2025-06-13 Thread Sean Wei
The boiler-plate licence headers in several parts of QEMU still contain the obsolete “51 Franklin Street" contact line. The Free Software Foundation now recommends using the canonical URL: https://www.gnu.org/licenses/ This patch updates those headers. The patches are comment-only; no sourc

[PATCH v8 15/16] i386/sev: Add implementation of CGS set_guest_policy()

2025-06-13 Thread Roy Hopkins
The new cgs_set_guest_policy() function is provided to receive the guest policy flags, SNP ID block and SNP ID authentication from guest configuration such as an IGVM file and apply it to the platform prior to launching the guest. The policy is used to populate values for the existing 'policy', 'i

Re: [PATCH v15 2/4] hw/cxl: Make the CXL fixed memory windows devices.

2025-06-13 Thread Peter Maydell
On Fri, 13 Jun 2025 at 14:10, Jonathan Cameron wrote: > For these specific devices (the fixed memory windows) there isn't > any state as they are representing fixed configuration of the system. > The state is all in the host bridges and beyond. I'll add > a comment as you suggest. > > Currently CX

Re: [PATCH v15 3/4] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2025-06-13 Thread Peter Maydell
On Fri, 13 Jun 2025 at 16:20, Jonathan Cameron wrote: > > On Fri, 13 Jun 2025 13:57:39 +0100 > Peter Maydell wrote: > > > On Thu, 12 Jun 2025 at 14:45, Jonathan Cameron > > wrote: > > > > > > Code based on i386/pc enablement. The memory layout places space for 16 > > > host bridge register regio

Re: [PATCH 3/6] MAX78000 UART implementation

2025-06-13 Thread Peter Maydell
On Sat, 10 May 2025 at 07:57, wrote: > > This patch implements UART support for the MAX78000 SOC > > Signed-off-by: Jackson Donaldson > --- > hw/arm/Kconfig | 1 + > hw/arm/max78000_soc.c | 27 +++- > hw/char/Kconfig | 3 + > hw/char/max78000_uart.

[PATCH] linux-user/arm: Fix return value of SYS_cacheflush

2025-06-13 Thread J . Neuschäfer
*/ +env->regs[0] = 0; break; case ARM_NR_set_tls: cpu_set_tls(env, env->regs[0]); --- base-commit: d9ce74873a6a5a7c504379857461e4ae64fcf0cd change-id: 20250613-cache-723a77168c8e Best regards,

Re: [PATCH v12 0/7] Add additional plugin API functions to read and write memory and registers

2025-06-13 Thread Alex Bennée
Pierrick Bouvier writes: > On 6/11/25 4:24 PM, Rowan Hart wrote: >> This patch series adds several new API functions focused on enabling use >> cases around reading and writing guest memory from QEMU plugins. To support >> these new APIs, some utility functionality around retrieving information

Re: [PATCH v15 0/4] arm/virt: CXL support via pxb_cxl

2025-06-13 Thread Jonathan Cameron via
On Fri, 13 Jun 2025 14:07:32 +0900 Itaru Kitayama wrote: > On Thu, Jun 12, 2025 at 02:43:34PM +0100, Jonathan Cameron wrote: > > v15: > > - Split the address map calculations and mmio setup into separate > > functions in patch 2, allowing v14 patch 3 to be dropped as not > > x86 and arm

[PATCH v8 16/16] sev: Provide sev_features flags from IGVM VMSA to KVM_SEV_INIT2

2025-06-13 Thread Roy Hopkins
IGVM files can contain an initial VMSA that should be applied to each vcpu as part of the initial guest state. The sev_features flags are provided as part of the VMSA structure. However, KVM only allows sev_features to be set during initialization and not as the guest is being prepared for launch.

Re: [PATCH 2/6] MAX78000: ICC Implementation

2025-06-13 Thread Peter Maydell
On Sat, 10 May 2025 at 07:58, wrote: > > This patch implements the Instruction Cache Controller for the MAX78000 SOC > > Signed-off-by: Jackson Donaldson > --- > hw/arm/Kconfig | 1 + > hw/arm/max78000_soc.c | 20 ++-- > hw/misc/Kconfig| 3 ++ > hw/

[PATCH v8 13/16] backends/igvm: Process initialization sections in IGVM file

2025-06-13 Thread Roy Hopkins
The initialization sections in IGVM files contain configuration that should be applied to the guest platform before it is started. This includes guest policy and other information that can affect the security level and the startup measurement of a guest. This commit introduces handling of the init

[PATCH v8 14/16] backends/igvm: Handle policy for SEV guests

2025-06-13 Thread Roy Hopkins
Adds a handler for the guest policy initialization IGVM section and builds an SEV policy based on this information and the ID block directive if present. The policy is applied using by calling 'set_guest_policy()' on the ConfidentialGuestSupport object. Signed-off-by: Roy Hopkins Acked-by: Michae

Re: [PATCH v15 3/4] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2025-06-13 Thread Jonathan Cameron via
On Fri, 13 Jun 2025 13:57:39 +0100 Peter Maydell wrote: > On Thu, 12 Jun 2025 at 14:45, Jonathan Cameron > wrote: > > > > Code based on i386/pc enablement. The memory layout places space for 16 > > host bridge register regions after the GIC_REDIST2 in the extended memmap. > > The CFMWs are place

Re: [PATCH v12 0/7] Add additional plugin API functions to read and write memory and registers

2025-06-13 Thread Pierrick Bouvier
On 6/11/25 4:24 PM, Rowan Hart wrote: This patch series adds several new API functions focused on enabling use cases around reading and writing guest memory from QEMU plugins. To support these new APIs, some utility functionality around retrieving information about address spaces is added as well

Re: [PATCH v12 6/7] plugins: Add patcher plugin and test

2025-06-13 Thread Pierrick Bouvier
On 6/11/25 4:24 PM, Rowan Hart wrote: From: novafacing This patch adds a plugin that exercises the virtual and hardware memory read-write API functions added in a previous patch. The plugin takes a target and patch byte sequence, and will overwrite any instruction matching the target byte seque

Re: [PATCH 1/6] MAX78000: Add MAX78000FTHR Machine

2025-06-13 Thread Peter Maydell
On Sat, 10 May 2025 at 07:57, wrote: > > This patch adds support for the MAX78000FTHR machine. > > The MAX78000FTHR contains a MAX78000 and a RISC-V core. This patch > implements only the MAX78000, which is Cortex-M4 based. > Details can be found at: > https://www.analog.com/media/en/technical-doc

[PATCH v8 12/16] backends/confidential-guest-support: Add set_guest_policy() function

2025-06-13 Thread Roy Hopkins
For confidential guests a policy can be provided that defines the security level, debug status, expected launch measurement and other parameters that define the configuration of the confidential platform. This commit adds a new function named set_guest_policy() that can be implemented by each conf

[PATCH v8 11/16] docs/interop/firmware.json: Add igvm to FirmwareDevice

2025-06-13 Thread Roy Hopkins
Create an enum entry within FirmwareDevice for 'igvm' to describe that an IGVM file can be used to map firmware into memory as an alternative to pre-existing firmware devices. Signed-off-by: Roy Hopkins Acked-by: Michael S. Tsirkin Acked-by: Gerd Hoffman Reviewed-by: Stefano Garzarella --- do

[PATCH v3 02/14] migration/postcopy: Push blocktime start/end into page req mutex

2025-06-13 Thread Peter Xu
The postcopy blocktime feature was tricky that it used quite some atomic operations over quite a few arrays and vars, without explaining how that would be thread safe. The thread safety here is about concurrency between the fault thread and the fault resolution threads, possible to access the same

[PATCH v8 09/16] i386/sev: Implement ConfidentialGuestSupport functions for SEV

2025-06-13 Thread Roy Hopkins
The ConfidentialGuestSupport object defines a number of virtual functions that are called during processing of IGVM directives to query or configure initial guest state. In order to support processing of IGVM files, these functions need to be implemented by relevant isolation hardware support code

[PATCH v8 10/16] docs/system: Add documentation on support for IGVM

2025-06-13 Thread Roy Hopkins
IGVM support has been implemented for Confidential Guests that support AMD SEV and AMD SEV-ES. Add some documentation that gives some background on the IGVM format and how to use it to configure a confidential guest. Signed-off-by: Roy Hopkins Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefano

[PATCH v4 7/7] qemu-options.hx: Document the arm-smmuv3 device

2025-06-13 Thread Shameer Kolothum via
Now that arm,virt can have user-creatable smmuv3 devices, document it. Signed-off-by: Shameer Kolothum --- qemu-options.hx | 6 ++ 1 file changed, 6 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 7eb8e02b4b..3edbde45bb 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @

[PATCH v4 0/7] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-06-13 Thread Shameer Kolothum via
Hi All, Changes from v3: https://lore.kernel.org/qemu-devel/20250602154110.48392-1-shameerali.kolothum.th...@huawei.com/ Addressed feedback on v3. Thanks to all. Major changes: 1. Based on Igor's suggestion, moved the associated primary-bus is of type TYPE_PCI_HOST_BRIDGE check to smmu-common.

[PATCH v4 6/7] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-06-13 Thread Shameer Kolothum via
Allow cold-plug of smmuv3 device to virt if there is no machine wide legacy smmuv3 or a virtio-iommu is specified. Device tree support for new smmuv3 dev is limited to the case where it is associated with the default pcie.0 RC. Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/

[PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-06-13 Thread Shameer Kolothum via
Although this change does not affect functionality at present, it is required when we add support for user-creatable SMMUv3 devices in future patches. Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -

[PATCH v4 3/7] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-06-13 Thread Shameer Kolothum via
With the soon to be introduced user-creatable SMMUv3 devices for virt, it is possible to have multiple SMMUv3 devices associated with different PCIe root complexes. Update IORT nodes accordingly. An example IORT Id mappings for a Qemu virt machine with two PCIe Root Complexes each assocaited with

[PATCH v4 2/7] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

2025-06-13 Thread Shameer Kolothum via
Introduces a new struct AcpiIortSMMUv3Dev to hold all the information required for SMMUv3 IORT node and use that for populating the node. The current machine wide SMMUv3 is named as legacy SMMUv3 as we will soon add support for user-creatable SMMUv3 devices. These changes will be useful to have co

[PATCH v4 4/7] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-06-13 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Reviewed-by: Nicolin Chen Reviewed-by: Eric Auger Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54 +++ 1 file

[PATCH v4 5/7] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-06-13 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Reviewed-by: Donald Dutile Reviewed-by: Eric Auger Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 8 +--- 1 file changed, 5 ins

[PATCH v8 07/16] target/i386: Allow setting of R_LDTR and R_TR with cpu_x86_load_seg_cache()

2025-06-13 Thread Roy Hopkins
The x86 segment registers are identified by the X86Seg enumeration which includes LDTR and TR as well as the normal segment registers. The function 'cpu_x86_load_seg_cache()' uses the enum to determine which segment to set. However, specifying R_LDTR or R_TR results in an out-of-bounds access of th

[PATCH v8 08/16] i386/sev: Refactor setting of reset vector and initial CPU state

2025-06-13 Thread Roy Hopkins
When an SEV guest is started, the reset vector and state are extracted from metadata that is contained in the firmware volume. In preparation for using IGVM to setup the initial CPU state, the code has been refactored to populate vmcb_save_area for each CPU which is then applied during guest start

Re: [PATCH] migration/postcopy: Add latency distribution report for blocktime

2025-06-13 Thread Peter Xu
On Mon, Jun 09, 2025 at 06:36:07PM -0400, Peter Xu wrote: > Add the latency distribution too for blocktime, using order-of-two buckets. > It accounts for all the faults, from either vCPU or non-vCPU threads. With > prior rework, it's very easy to achieve by adding an array to account for > faults

[PATCH v3 07/14] migration/postcopy: Add blocktime fault counts per-vcpu

2025-06-13 Thread Peter Xu
Add a field to count how many remote faults one vCPU has taken. So far it's still not used, but will be soon. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 5 + 1 file changed, 5 insertions(+) diff --git a/migration/postcopy-ram.c b/migration/postcopy-r

[PATCH v3 05/14] migration/postcopy: Drop PostcopyBlocktimeContext.start_time

2025-06-13 Thread Peter Xu
Now with 64bits, the offseting using start_time is not needed anymore, because the array can always remember the whole timestamp. Then drop the unused parameter in get_low_time_offset() altogether. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 10 --

[PATCH v3 00/14] migration/postcopy: Blocktime tracking overhaul

2025-06-13 Thread Peter Xu
This series is based on the other series I posted here: Based-on: <20250609161855.6603-1-pet...@redhat.com> https://lore.kernel.org/r/20250609161855.6603-1-pet...@redhat.com v1: https://lore.kernel.org/r/20250527231248.1279174-1-pet...@redhat.com v2: https://lore.kernel.org/r/20250609191259.9053-

[PATCH v3 11/11] migration/postcopy: Avoid clearing dirty bitmap for postcopy too

2025-06-13 Thread Peter Xu
This is a follow up on the other commit "migration/ram: avoid to do log clear in the last round" but for postcopy. https://lore.kernel.org/r/20250514115827.3216082-1-yanfei...@bytedance.com I can observe more than 10% reduction of average page fault latency during postcopy phase with this optimiz

[PATCH v3 01/14] migration: Add option to set postcopy-blocktime

2025-06-13 Thread Peter Xu
Add a global property to allow enabling postcopy-blocktime feature. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/options.c b/migration/options.c index 162c72cda4..4e923a2e07 100644 --- a/migration/opti

[PATCH v3 12/14] migration/postcopy: Optimize blocktime fault tracking with hashtable

2025-06-13 Thread Peter Xu
Currently, the postcopy blocktime feature maintains vCPU fault information using an array (vcpu_addr[]). It has two issues. Issue 1: Performance Concern The old algorithm was almost OK and fast on inserts, except that the lookup is slow and won't scale if there are a

[PATCH v3 09/14] migration/postcopy: Initialize blocktime context only until listen

2025-06-13 Thread Peter Xu
Before this patch, the blocktime context can be created very early, because postcopy_ram_supported_by_host() <- migrate_caps_check() can happen during migration object init. The trick here is the blocktime context needs system vCPU information, which seems to be possible to change after that point

[PATCH v3 03/14] migration/postcopy: Drop all atomic ops in blocktime feature

2025-06-13 Thread Peter Xu
Now with the mutex protection it's not needed anymore. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 32fa06da

[PATCH v3 11/14] migration/postcopy: Cleanup the total blocktime accounting

2025-06-13 Thread Peter Xu
The variable vcpu_total_blocktime isn't easy to follow. In reality, it wants to capture the case where all vCPUs are stopped, and now there will be some vCPUs starts running. The name now starts to conflict with vcpu_blocktime_total[], meanwhile it's actually not necessary to have the variable at

[PATCH v3 04/14] migration/postcopy: Make all blocktime vars 64bits

2025-06-13 Thread Peter Xu
I am guessing it was used to be 32bits because of the atomic ops. Now all the atomic ops are gone and we're protected by a mutex instead, it's ok we can switch to 64 bits. Reasons to move over: - Allow further patches to change the unit from ms to us: with postcopy preempt mode, we're really

[PATCH v3 13/14] migration/postcopy: blocktime allows track / report non-vCPU faults

2025-06-13 Thread Peter Xu
When used to report page fault latencies, the blocktime feature can be almost useless when KVM async page fault is enabled, because in most cases such remote fault will kickoff async page faults, then it's not trackable from blocktime layer. After all these recent rewrites to blocktime layer, it's

[PATCH v3 08/14] migration/postcopy: Report fault latencies in blocktime

2025-06-13 Thread Peter Xu
Blocktime so far only cares about the time one vcpu (or the whole system) got blocked. It would be also be helpful if it can also report the latency of page requests, which could be very sensitive during postcopy. Blocktime itself is sometimes not very important, especially when one thinks about

[PATCH v3 10/14] migration/postcopy: Cache the tid->vcpu mapping for blocktime

2025-06-13 Thread Peter Xu
Looking up the vCPU index for each fault can be expensive when there're hundreds of vCPUs. Provide a cache for tid->vcpu instead with a hash table, then lookup from there. When at it, add another counter to record how many non-vCPU faults it gets. For example, the main thread can also access a gu

[PATCH v3 06/14] migration/postcopy: Bring blocktime layer to ns level

2025-06-13 Thread Peter Xu
With 64-bit fields, it is trivial. The caution is when exposing any values in QMP, it was still declared with milliseconds (ms). Hence it's needed to do the convertion when exporting the values to existing QMP queries. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-

[PATCH v3 14/14] migration/postcopy: Add latency distribution report for blocktime

2025-06-13 Thread Peter Xu
Add the latency distribution too for blocktime, using order-of-two buckets. It accounts for all the faults, from either vCPU or non-vCPU threads. With prior rework, it's very easy to achieve by adding an array to account for faults in each buckets. Sample output for HMP (while for QMP it's simply

[PATCH v8 06/16] sev: Update launch_update_data functions to use Error handling

2025-06-13 Thread Roy Hopkins
The class function and implementations for updating launch data return a code in case of error. In some cases an error message is generated and in other cases, just the error return value is used. This small refactor adds an 'Error **errp' parameter to all functions which consistently set an error

[PATCH v3 04/11] migration/bg-snapshot: Do not check for SKIP in iterator

2025-06-13 Thread Peter Xu
It's not possible to happen in bg-snapshot case. Reviewed-by: Juraj Marcin Signed-off-by: Peter Xu --- migration/migration.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 4098870bce..e33e39ac74 100644 --- a/migration

[PATCH v8 05/16] i386/pc_sysfw: Ensure sysfw flash configuration does not conflict with IGVM

2025-06-13 Thread Roy Hopkins
When using an IGVM file the configuration of the system firmware is defined by IGVM directives contained in the file. In this case the user should not configure any pflash devices. This commit skips initialization of the ROM mode when pflash0 is not set then checks to ensure no pflash devices have

[PATCH v3 10/11] migration: Rewrite the migration complete detect logic

2025-06-13 Thread Peter Xu
There're a few things off here in that logic, rewrite it. When at it, add rich comment to explain each of the decisions. Since this is very sensitive path for migration, below are the list of things changed with their reasonings. (1) Exact pending size is only needed for precopy not postcopy

[PATCH v3 00/11] migration: Some enhancements and cleanups for 10.1

2025-06-13 Thread Peter Xu
v1: https://lore.kernel.org/r/20250527215850.1271072-1-pet...@redhat.com v2: https://lore.kernel.org/r/20250609161855.6603-1-pet...@redhat.com v3 changelog: - Fix checkpatch issues on spaces etc. - Added Tested-by tags for Mario on relevant patches The series is based on a small patch from Yanfei

[PATCH v3 01/11] migration/hmp: Reorg "info migrate" once more

2025-06-13 Thread Peter Xu
Dave suggested the HMP output for "info migrate" can not only leverage the lines but also better grouping: https://lore.kernel.org/r/aC4_-nMc7FwsMf9p@gallifrey I followed Dave's suggestion, and some more modifications on top: - Added all elements into the picture - Use size_to_str() and d

[PATCH v3 03/11] migration/docs: Move docs for postcopy blocktime feature

2025-06-13 Thread Peter Xu
Move it out of vanilla postcopy session, but instead a standalone feature. When at it, removing the NOTE because it's incorrect now after introduction of max-postcopy-bandwidth, which can control the throughput even for postcopy phase. Reviewed-by: Juraj Marcin Signed-off-by: Peter Xu --- docs/

  1   2   >