Re: [PATCH v3 4/5] vhost-user-dev: Add cache BAR

2024-11-25 Thread Albert Esteve
On Mon, Nov 25, 2024 at 5:16 PM Albert Esteve wrote: > > On Tue, Sep 17, 2024 at 10:27 AM Stefan Hajnoczi wrote: > > > > On Thu, Sep 12, 2024 at 04:53:34PM +0200, Albert Esteve wrote: > > > Add a cache BAR in the vhost-user-device > > > into which files can be directly mapped. > > > > > > The num

Re: [PATCH] hw/timer: fix int underflow

2024-11-25 Thread Дмитрий Фролов
ping

[PATCH 0/2] hw/loongarch/virt: Improve fdt table creation

2024-11-25 Thread Bibo Mao
Here move fdt table creation from spotted places to machine done notification, since all objects finish to create when machine is done. Also create fdt table for CPU objects with possible_cpu_arch_ids() function rather than smp.cpus, since command -smp x, -device la464-loongarch-cpu can be used.

[PATCH] hw/timer: fix int underflow

2024-11-25 Thread Дмитрий Фролов
ping

Re: [PATCH v3 10/26] target/arm/kvm-rme: Add Realm Personalization Value parameter

2024-11-25 Thread Markus Armbruster
Jean-Philippe Brucker writes: > The Realm Personalization Value (RPV) is provided by the user to > distinguish Realms that have the same initial measurement. > > The user provides up to 64 hexadecimal bytes. They are stored into the > RPV in the same order, zero-padded on the right. > > Cc: Eric

[PATCH 2/2] hw/loongarch/virt: Improve fdt table creation for CPU object

2024-11-25 Thread Bibo Mao
For CPU object, possible_cpu_arch_ids() function is used rather than smp.cpus. With command -smp x, -device la464-loongarch-cpu, smp.cpus is not accurate for all possible CPU objects, possible_cpu_arch_ids() is used here. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 39 +

Re: [PATCH 3/6] linux-user: Adjust brk for load_bias [regression]

2024-11-25 Thread Dominique MARTINET
This commit is fairly old, but this appears to cause a segfault for older versions of ldconfig: ``` $ docker run --rm --platform linux/arm64/v8 -ti docker.io/debian:bullseye-slim ldconfig qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault (core dumped) ``` The s

Re: [PATCH-for-10.0 0/3] hw/boards: Try to make sense of MachineClass::no_sdcard flag

2024-11-25 Thread Philippe Mathieu-Daudé
On 25/11/24 19:14, Philippe Mathieu-Daudé wrote: Invert MachineClass 'no_sdcard' flag logic and rename it to 'create_default_sdcard_drive' to make sense of this default value applied to all machines. No logical change intended. Philippe Mathieu-Daudé (3): hw/boards: Convert no_sdcard flag to

Re: [PATCH 4/4] ppc/pnv: Add xscom- prefix to pervasive-control region name

2024-11-25 Thread Philippe Mathieu-Daudé
On 26/11/24 04:54, Nicholas Piggin wrote: On Tue Nov 26, 2024 at 5:28 AM AEST, Philippe Mathieu-Daudé wrote: Hi, On 25/11/24 14:20, Nicholas Piggin wrote: By convention, xscom regions get a xscom- prefix. Fixes: 1adf24708bf7 ("hw/ppc: Add pnv nest pervasive common chiplet model") Signed-off-b

Re: [PATCH 39/39] docs: explicitly permit a "commonly known identity" with SoB

2024-11-25 Thread Ani Sinha
> On 21 Nov 2024, at 10:28 PM, Alex Bennée wrote: > > From: Daniel P. Berrangé > > The docs for submitting a patch describe using your "Real Name" with > the Signed-off-by line. Although somewhat ambiguous, this has often > been interpreted to mean someone's legal name. > > In recent times,

Re: [External] Re: [PATCH v7 00/12] Use Intel DSA accelerator to offload zero page checking in multifd live migration.

2024-11-25 Thread Yichen Wang
On Tue, Nov 19, 2024 at 1:31 PM Fabiano Rosas wrote: > > Yichen Wang writes: > > > v7 > > * Rebase on top of f0a5a31c33a8109061c2493e475c8a2f4d022432; > > * Fix a bug that will crash QEMU when DSA initialization failed; > > * Use a more generalized accel-path to support other accelerators; > > *

Re: [External] Re: [PATCH v7 09/12] migration/multifd: Enable DSA offloading in multifd sender path.

2024-11-25 Thread Yichen Wang
On Thu, Nov 21, 2024 at 12:52 PM Fabiano Rosas wrote: > > Yichen Wang writes: > > > From: Hao Xiang > > > > Multifd sender path gets an array of pages queued by the migration > > thread. It performs zero page checking on every page in the array. > > The pages are classfied as either a zero page

Re: [External] Re: [PATCH v7 06/12] util/dsa: Implement zero page checking in DSA task.

2024-11-25 Thread Yichen Wang
On Mon, Nov 25, 2024 at 7:53 AM Fabiano Rosas wrote: > > Yichen Wang writes: > > > From: Hao Xiang > > > > Create DSA task with operation code DSA_OPCODE_COMPVAL. > > Here we create two types of DSA tasks, a single DSA task and > > a batch DSA task. Batch DSA task reduces task submission overhea

[PULL 0/1] Net patches round 2

2024-11-25 Thread Jason Wang
The following changes since commit 791e3837c1105aec4e328674aad32e34056957e2: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2024-11-25 10:44:11 +) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you

[PULL 1/1] virtio-net: Add queues before loading them

2024-11-25 Thread Jason Wang
From: Akihiko Odaki Call virtio_net_set_multiqueue() to add queues before loading their states. Otherwise the loaded queues will not have handlers and elements in them will not be processed. Cc: qemu-sta...@nongnu.org Fixes: 8c49756825da ("virtio-net: Add only one queue pair when realizing") Rep

Re: [PULL 08/28] tests/functional: honour self.workdir in ACPI bits tests

2024-11-25 Thread Ani Sinha
On Mon, Nov 25, 2024 at 8:51 PM Alex Bennée wrote: > > From: Daniel P. Berrangé > > The ACPI bits test sets up its own private temporary directory into it > creates scratch files. This is justified by a suggestion that we need > to be able to preserve the scratch files. We have the ability to > p

Re: [PATCH 4/4] ppc/pnv: Add xscom- prefix to pervasive-control region name

2024-11-25 Thread Nicholas Piggin
On Tue Nov 26, 2024 at 5:28 AM AEST, Philippe Mathieu-Daudé wrote: > Hi, > > On 25/11/24 14:20, Nicholas Piggin wrote: > > By convention, xscom regions get a xscom- prefix. > > > > Fixes: 1adf24708bf7 ("hw/ppc: Add pnv nest pervasive common chiplet model") > > Signed-off-by: Nicholas Piggin > > -

Re: [PULL 07/28] tests/functional: remove comments talking about avocado

2024-11-25 Thread Ani Sinha
On Mon, Nov 25, 2024 at 8:51 PM Alex Bennée wrote: > > From: Daniel P. Berrangé > > The first comment is still relevant but should talk about our own test > harness instead. The second comment adds no value over reading the code > and can be removed. I know I am late in the party (been away from

RE: [PATCH v2 17/18] test/qtest: Introduce a new aspeed-smc-utils.c to place common testcases

2024-11-25 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v2 17/18] test/qtest: Introduce a new aspeed-smc-utils.c > to > > + > > +typedef struct TestData { > > +QTestState *s; > > +uint64_t spi_base;> +uint64_t flash_base; > > +uint32_t jedec_id; > > +char *tmp_path; > > +uint8_t cs; > > +co

Re: [PATCH v3 0/6] virtio-net fixes

2024-11-25 Thread Lei Yang
QE tested this series patches with regression tests, everything works well. Tested-by: Lei Yang On Fri, Nov 22, 2024 at 1:04 PM Akihiko Odaki wrote: > > Most of this series are fixes for software RSS and hash reporting, which > should have no production user. > > However there is one exception

Re: [PULL 0/6] Net patches

2024-11-25 Thread Jason Wang
On Mon, Nov 25, 2024 at 7:06 PM Laurent Vivier wrote: > > Hi Jason, > > "[PATCH] virtio-net: Add queues before loading them" is missing from this PR. > > Thanks, > Laurent > My bad, let me do another pull request for this. Thanks

Re: [PATCH] tests/functional/aarch64_virt: add test for FEAT_RME

2024-11-25 Thread Pierrick Bouvier
On 11/25/24 10:00, Alex Bennée wrote: Pierrick Bouvier writes: This boot an OP-TEE environment, and launch a nested guest VM inside it using the Realms feature. Signed-off-by: Pierrick Bouvier --- tests/functional/test_aarch64_virt.py | 62 +++ 1 file changed, 62 i

Re: [RFC PATCH v3 25/26] target/arm/kvm-rme: Add measurement log

2024-11-25 Thread Stefan Berger
On 11/25/24 2:56 PM, Jean-Philippe Brucker wrote: Create an event log, in the format defined by Trusted Computing Group for TPM2. It contains information about the VMM, the Realm parameters, any data loaded into guest memory before boot and the initial vCPU state. The guest can access this lo

Re: Supporting clang on windows

2024-11-25 Thread Pierrick Bouvier
On 11/25/24 09:05, Peter Maydell wrote: On Mon, 25 Nov 2024 at 16:48, Pierrick Bouvier wrote: Before sending the a series removing gcc_struct and editing the documentation, do we all agree here it's the right move forward? If yes, should we apply this to 9.2 release? I would prefer not to put

[PULL 1/2] migration: Allow pipes to keep working for fd migrations

2024-11-25 Thread Peter Xu
Libvirt may still use pipes for old file migrations in fd: URI form, especially when loading old images dumped from Libvirt's compression algorithms. In that case, Libvirt needs to compress / uncompress the images on its own over the migration binary stream, and pipes are passed over to QEMU for o

Re: [PATCH v2 00/22] tests/qtest: migration-test refactoring

2024-11-25 Thread Peter Xu
On Mon, Nov 25, 2024 at 06:18:15PM -0300, Fabiano Rosas wrote: > > One thing we could do (but you can decide which you prefer..) is you can > > respin with the initial 18 patches, then we may get it in in the 1st 10.0 > > pull. It may conflict with some other series for sure, but it's > > unavoida

[PULL 2/2] migration: Fix extra cleanup at postcopy listen

2024-11-25 Thread Peter Xu
From: Fabiano Rosas After fixing the loadvm cleanup race the qemu_loadvm_state_cleanup() is now being called twice in the postcopy listen thread. Fixes: 4ce5622908 ("migration/multifd: Fix rb->receivedmap cleanup race") Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20241125191128

[PULL 0/2] Migration 20241125 patches

2024-11-25 Thread Peter Xu
The following changes since commit 791e3837c1105aec4e328674aad32e34056957e2: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2024-11-25 10:44:11 +) are available in the Git repository at: https://gitlab.com/peterx/qemu.git tags/migration-202

Re: [PATCH v2 00/22] tests/qtest: migration-test refactoring

2024-11-25 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Nov 13, 2024 at 04:46:08PM -0300, Fabiano Rosas wrote: >> Fabiano Rosas (22): >> tests/qtest/migration: Fix indentations >> tests/qtest/migration: Standardize hook names >> tests/qtest/migration: Stop calling everything "test" >> tests/migration: Disambiguate gu

Re: [PATCH v2 02/22] tests/qtest/migration: Standardize hook names

2024-11-25 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Nov 13, 2024 at 04:46:10PM -0300, Fabiano Rosas wrote: >> static void * >> -test_migration_precopy_tcp_multifd_start_no_zero_page(QTestState *from, >> +test_migration_precopy_tcp_multifd_no_zero_page_start(QTestState *from, > > Looks like this one is leftover to do s/t

Re: [PATCH v2 00/22] tests/qtest: migration-test refactoring

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:08PM -0300, Fabiano Rosas wrote: > Fabiano Rosas (22): > tests/qtest/migration: Fix indentations > tests/qtest/migration: Standardize hook names > tests/qtest/migration: Stop calling everything "test" > tests/migration: Disambiguate guestperf vs. a-b > tests/

Re: [PATCH 2/2] hw/display: Allow injection of virtio-gpu EDID name

2024-11-25 Thread Andrew Keesler
I follow what you are saying. I misunderstood what a "display" was in the domain of QEMU. Yes, this makes more sense now. > the user should give names for every output at startup I see DEFINE_PROP_ARRAY exists. I can use that to define the new "outputs" property. Any reason that each "output" wou

Re: [PATCH v3 04/24] thread-pool: Implement generic (non-AIO) pool support

2024-11-25 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > On 25.11.2024 20:41, Fabiano Rosas wrote: >> "Maciej S. Szmigiero" writes: >> >>> From: "Maciej S. Szmigiero" >>> >>> Migration code wants to manage device data sending threads in one place. >>> >>> QEMU has an existing thread pool implementation, however it is

Re: [PATCH v2 02/22] tests/qtest/migration: Standardize hook names

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:10PM -0300, Fabiano Rosas wrote: > static void * > -test_migration_precopy_tcp_multifd_start_no_zero_page(QTestState *from, > +test_migration_precopy_tcp_multifd_no_zero_page_start(QTestState *from, Looks like this one is leftover to do s/test_migration/migrate_hook/

Re: [PATCH v2 03/22] tests/qtest/migration: Stop calling everything "test"

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:11PM -0300, Fabiano Rosas wrote: > Test frameworks usually prefix "test_" to the entry point of the test > code. Having every function prefixed with test_ makes it hard to > understand the code and to grep for the actual tests. > > Remove the "test" prefix from everyt

[PATCH v3 11/26] target/arm/kvm-rme: Add measurement algorithm property

2024-11-25 Thread Jean-Philippe Brucker
This option selects which measurement algorithm to use for attestation. Supported values are SHA256 and SHA512. Default to SHA512 arbitrarily. SHA512 is generally faster on 64-bit architectures. On a few arm64 CPUs I tested SHA256 is much faster, but that's most likely because they only support ac

[PATCH v3 09/26] target/arm/kvm-rme: Initialize Realm memory

2024-11-25 Thread Jean-Philippe Brucker
Initialize the IPA state of RAM. Collect the images copied into guest RAM into a sorted list, and issue POPULATE_REALM KVM ioctls once we've created the Realm Descriptor. The images are part of the Realm Initial Measurement. Signed-off-by: Jean-Philippe Brucker --- v2->v3: RIPAS is now initialize

[PATCH v3 15/26] hw/arm/virt: Add support for Arm RME

2024-11-25 Thread Jean-Philippe Brucker
When confidential-guest-support is enabled for the virt machine, add the RME flag to the VM type. The HVC conduit for PSCI is not supported for Realms. Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/

[PATCH v3 03/26] target/arm/kvm: Return immediately on error in kvm_arch_init()

2024-11-25 Thread Jean-Philippe Brucker
Returning an error to kvm_init() is fatal anyway, no need to continue the initialization. Signed-off-by: Jean-Philippe Brucker --- target/arm/kvm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 8bdf4abeb6..95bcecf804 100644

[PATCH v3 10/26] target/arm/kvm-rme: Add Realm Personalization Value parameter

2024-11-25 Thread Jean-Philippe Brucker
The Realm Personalization Value (RPV) is provided by the user to distinguish Realms that have the same initial measurement. The user provides up to 64 hexadecimal bytes. They are stored into the RPV in the same order, zero-padded on the right. Cc: Eric Blake Cc: Markus Armbruster Cc: Daniel P.

[PATCH v3 18/26] hw/arm/boot: Mark all guest memory as RIPAS_RAM.

2024-11-25 Thread Jean-Philippe Brucker
All Realm IPA states are by default RIPAS_EMPTY, and accessing them in that state causes injection of synchronous exception. Either the loader or the guest needs to set IPA state to RIPAS_RAM before accessing it. Since a Linux guest needs all memory ready at boot [1], initialize it here. [1] https

[PATCH v3 08/26] hw/core/loader: Add ROM loader notifier

2024-11-25 Thread Jean-Philippe Brucker
Add a function to register a notifier, that is invoked after a ROM gets loaded into guest memory. It will be used by Arm confidential guest support, in order to register all blobs loaded into memory with KVM, so that their content is moved into Realm state and measured into the initial VM state.

[PATCH v3 00/26] arm: Run Arm CCA VMs with KVM

2024-11-25 Thread Jean-Philippe Brucker
This series enables running confidential VMs on Arm CCA. The host KVM support is progressing but still under discussion [1], so there is no urgency to upstream this series. I'm sending this new version to give a status update, and also to discuss remote attestation below. Since v2 [2] I addressed

[PATCH v3 19/26] hw/arm/virt: Move virt_flash_create() to machvirt_init()

2024-11-25 Thread Jean-Philippe Brucker
For confidential VMs we'll want to skip flash device creation. Unfortunately, in virt_instance_init() the machine->cgs member has not yet been initialized, so we cannot check whether confidential guest is enabled. Move virt_flash_create() to machvirt_init(), where we can access the machine->cgs mem

[PATCH v3 20/26] hw/arm/virt: Use RAM instead of flash for confidential guest firmware

2024-11-25 Thread Jean-Philippe Brucker
The flash device that holds firmware code relies on read-only stage-2 mappings. Read accesses behave as RAM and write accesses as MMIO. Since the RMM does not support read-only mappings we cannot use the flash device as-is. That isn't a problem because the firmware does not want to disclose any in

[RFC PATCH v3 25/26] target/arm/kvm-rme: Add measurement log

2024-11-25 Thread Jean-Philippe Brucker
Create an event log, in the format defined by Trusted Computing Group for TPM2. It contains information about the VMM, the Realm parameters, any data loaded into guest memory before boot and the initial vCPU state. The guest can access this log from RAM and send it to a verifier, to help the verif

[RFC PATCH v3 24/26] hw/core/loader: Add fields to RomLoaderNotify

2024-11-25 Thread Jean-Philippe Brucker
In order to write an event log, the ROM load notification handler needs two more fields. Signed-off-by: Jean-Philippe Brucker --- v2->v3: New --- include/hw/loader.h | 2 ++ hw/core/loader.c| 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/hw/loader.h b/include/hw/loader.h index

[PATCH v3 16/26] hw/arm/virt: Disable DTB randomness for confidential VMs

2024-11-25 Thread Jean-Philippe Brucker
The dtb-randomness feature, which adds random seeds to the DTB, isn't really compatible with confidential VMs since it randomizes the Realm Initial Measurement. Enabling it is not an error, but it prevents attestation. It also isn't useful to a Realm, which doesn't trust host input. Currently the

[PATCH v3 14/26] target/arm/cpu: Inform about reading confidential CPU registers

2024-11-25 Thread Jean-Philippe Brucker
The host cannot access registers of a Realm. Instead of showing all registers as zero in "info registers", display a message about this restriction. Signed-off-by: Jean-Philippe Brucker --- target/arm/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cp

[RFC PATCH v3 26/26] hw/arm/virt: Add measurement log for confidential boot

2024-11-25 Thread Jean-Philippe Brucker
Create a measurement log describing operations performed by QEMU to initialize the guest, and load it into guest memory above the DTB. Cc: Stefan Berger Signed-off-by: Jean-Philippe Brucker --- v2->v3: New --- include/hw/arm/boot.h | 3 +++ include/hw/arm/virt.h | 1 + hw/arm/boot.c |

[RFC PATCH v3 21/26] hw/arm/boot: Load DTB as is for confidential VMs

2024-11-25 Thread Jean-Philippe Brucker
For confidential VMs it may be necessary to measure the DTB, to ensure a malicious host does not insert harmful information in there. In case an external tool can generated and measured the DTB, load it as is without patching it. Signed-off-by: Jean-Philippe Brucker --- v2->v3: new --- hw/arm/bo

[RFC PATCH v3 22/26] hw/arm/boot: Skip bootloader for confidential guests

2024-11-25 Thread Jean-Philippe Brucker
An independent verifier needs to reconstruct the content of guest memory in order to attest that it is running trusted code. To avoid having to reconstruct the bootloader generated by QEMU, skip this step and jump directly to the kernel, with the DTB address in x0 as specified by the Linux boot pro

[PATCH v3 01/26] kvm: Merge kvm_check_extension() and kvm_vm_check_extension()

2024-11-25 Thread Jean-Philippe Brucker
The KVM_CHECK_EXTENSION ioctl can be issued either on the global fd (/dev/kvm), or on the VM fd obtained with KVM_CREATE_VM. For most extensions, KVM returns the same value with either method, but for some of them it can refine the returned value depending on the VM type. The KVM documentation [1]

[PATCH v3 12/26] target/arm/cpu: Set number of breakpoints and watchpoints in KVM

2024-11-25 Thread Jean-Philippe Brucker
Add "num-breakpoints" and "num-watchpoints" CPU parameters to configure the debug features that KVM presents to the guest. The KVM vCPU configuration is modified by calling SET_ONE_REG on the ID register. This is needed for Realm VMs, whose parameters include breakpoints and watchpoints, and influ

[PATCH v3 06/26] target/arm/kvm-rme: Initialize vCPU

2024-11-25 Thread Jean-Philippe Brucker
The target code calls kvm_arm_vcpu_init() to mark the vCPU as part of a Realm. For a Realm vCPU, only x0-x7 can be set at runtime. Before boot, the PC can also be set, and is ignored at runtime. KVM also accepts a few system register changes during initial configuration, as returned by KVM_GET_REG_

[RFC PATCH v3 23/26] hw/tpm: Add TPM event log

2024-11-25 Thread Jean-Philippe Brucker
Provide a library allowing the VMM to create an event log that describes what is loaded into memory. During remote attestation in confidential computing this helps an independent verifier reconstruct the initial measurements of a VM, which contain the initial state of memory and CPUs. We provide s

[PATCH v3 17/26] hw/arm/virt: Reserve one bit of guest-physical address for RME

2024-11-25 Thread Jean-Philippe Brucker
When RME is enabled, the upper GPA bit is used to distinguish protected from unprotected addresses. Reserve it when setting up the guest memory map. Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/arm/v

[PATCH v3 04/26] target/arm/kvm-rme: Initialize realm

2024-11-25 Thread Jean-Philippe Brucker
The machine code calls kvm_arm_rme_vm_type() to get the VM flag and KVM calls kvm_arm_rme_init() to prepare for launching a Realm. Once VM creation is complete, create the Realm: * Create the realm descriptor, * load images into Realm RAM (in another patch), * finalize the REC (vCPU) after the reg

[PATCH v3 13/26] target/arm/cpu: Set number of PMU counters in KVM

2024-11-25 Thread Jean-Philippe Brucker
Add a "num-pmu-counters" CPU parameter to configure the number of counters that KVM presents to the guest. This is needed for Realm VMs, whose parameters include the number of PMU counters and influence the Realm Initial Measurement. Signed-off-by: Jean-Philippe Brucker --- target/arm/cpu.h

[PATCH v3 05/26] target/arm/kvm: Split kvm_arch_get/put_registers

2024-11-25 Thread Jean-Philippe Brucker
The confidential guest support in KVM limits the number of registers that we can read and write. Split the get/put_registers function to prepare for it. Signed-off-by: Jean-Philippe Brucker --- target/arm/kvm.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-)

[PATCH v3 02/26] target/arm: Add confidential guest support

2024-11-25 Thread Jean-Philippe Brucker
Add a new RmeGuest object, inheriting from ConfidentialGuestSupport, to support the Arm Realm Management Extension (RME). It is instantiated by passing on the command-line: -M virt,confidential-guest-support= -object rme-guest,id=[,options...] This is only the skeleton. Support will be added

[PATCH v3 07/26] target/arm/kvm: Create scratch VM as Realm if necessary

2024-11-25 Thread Jean-Philippe Brucker
Some ID registers have a different value for a Realm VM, for example ID_AA64DFR0_EL1 contains the number of breakpoints/watchpoints implemented by RMM instead of the hardware. Even though RMM is in charge of setting up most Realm registers, KVM still provides GET_ONE_REG interface on a Realm VM to

Re: [PATCH v3 08/24] migration: Add thread pool of optional load threads

2024-11-25 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > Some drivers might want to make use of auxiliary helper threads during VM > state loading, for example to make sure that their blocking (sync) I/O > operations don't block the rest of the migration process. > > Add a migration core

Re: [PATCH v3 04/24] thread-pool: Implement generic (non-AIO) pool support

2024-11-25 Thread Maciej S. Szmigiero
On 25.11.2024 20:41, Fabiano Rosas wrote: "Maciej S. Szmigiero" writes: From: "Maciej S. Szmigiero" Migration code wants to manage device data sending threads in one place. QEMU has an existing thread pool implementation, however it is limited to queuing AIO operations only and essentially

Re: [PATCH v3 05/24] migration: Add MIG_CMD_SWITCHOVER_START and its load handler

2024-11-25 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > This QEMU_VM_COMMAND sub-command and its switchover_start SaveVMHandler is > used to mark the switchover point in main migration stream. > > It can be used to inform the destination that all pre-switchover main > migration stream da

Re: [PATCH] migration: Fix extra cleanup at postcopy listen

2024-11-25 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Nov 25, 2024 at 04:11:28PM -0300, Fabiano Rosas wrote: >> After fixing the loadvm cleanup race the qemu_loadvm_state_cleanup() >> is now being called twice in the postcopy listen thread. >> >> Fixes: 4ce5622908 ("migration/multifd: Fix rb->receivedmap cleanup race") >>

Re: [PATCH v3 04/24] thread-pool: Implement generic (non-AIO) pool support

2024-11-25 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > Migration code wants to manage device data sending threads in one place. > > QEMU has an existing thread pool implementation, however it is limited > to queuing AIO operations only and essentially has a 1:1 mapping between > the cur

Re: [PATCH] migration: Fix extra cleanup at postcopy listen

2024-11-25 Thread Peter Xu
On Mon, Nov 25, 2024 at 04:11:28PM -0300, Fabiano Rosas wrote: > After fixing the loadvm cleanup race the qemu_loadvm_state_cleanup() > is now being called twice in the postcopy listen thread. > > Fixes: 4ce5622908 ("migration/multifd: Fix rb->receivedmap cleanup race") > Signed-off-by: Fabiano Ro

Re: [PATCH 4/4] ppc/pnv: Add xscom- prefix to pervasive-control region name

2024-11-25 Thread Philippe Mathieu-Daudé
Hi, On 25/11/24 14:20, Nicholas Piggin wrote: By convention, xscom regions get a xscom- prefix. Fixes: 1adf24708bf7 ("hw/ppc: Add pnv nest pervasive common chiplet model") Signed-off-by: Nicholas Piggin --- hw/ppc/pnv_nest_pervasive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [PATCH v3 03/24] thread-pool: Rename AIO pool functions to *_aio() and data types to *Aio

2024-11-25 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > These names conflict with ones used by future generic thread pool > equivalents. > Generic names should belong to the generic pool type, not specific (AIO) > type. > > Signed-off-by: Maciej S. Szmigiero Acked-by: Fabiano Rosas

[PATCH] migration: Fix extra cleanup at postcopy listen

2024-11-25 Thread Fabiano Rosas
After fixing the loadvm cleanup race the qemu_loadvm_state_cleanup() is now being called twice in the postcopy listen thread. Fixes: 4ce5622908 ("migration/multifd: Fix rb->receivedmap cleanup race") Signed-off-by: Fabiano Rosas --- migration/savevm.c | 1 - 1 file changed, 1 deletion(-) diff -

Re: [PATCH v3 02/24] thread-pool: Remove thread_pool_submit() function

2024-11-25 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > This function name conflicts with one used by a future generic thread pool > function and it was only used by one test anyway. > > Update the trace event name in thread_pool_submit_aio() accordingly. > > Signed-off-by: Maciej S. Szm

Re: [PATCH v3 01/24] migration: Clarify that {load, save}_cleanup handlers can run without setup

2024-11-25 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > It's possible for {load,save}_cleanup SaveVMHandlers to get called without > the corresponding {load,save}_setup handler being called first. > > One such example is if {load,save}_setup handler of a proceeding device > returns error

Re: [PATCH v7 12/12] migration/doc: Add DSA zero page detection doc

2024-11-25 Thread Fabiano Rosas
Yichen Wang writes: > From: Yuan Liu > > Signed-off-by: Yuan Liu > Signed-off-by: Yichen Wang Reviewed-by: Fabiano Rosas

Re: [PATCH v7 11/12] migration/multifd: Add integration tests for multifd with Intel DSA offloading.

2024-11-25 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > * Add test case to start and complete multifd live migration with DSA > offloading enabled. > * Add test case to start and cancel multifd live migration with DSA > offloading enabled. > > Signed-off-by: Bryan Zhang > Signed-off-by: Hao Xiang > Signed-o

[PATCH-for-10.0 3/3] hw/boards: Rename no_sdcard -> create_default_sdcard_drive

2024-11-25 Thread Philippe Mathieu-Daudé
Invert the 'no_sdcard' logic, renaming it as the more explicit "create_default_sdcard_drive". Machines are supposed to create a SD Card drive when this flag is set. In many cases it doesn't make much sense (as boards don't expose SD Card host controller), but this is patch only aims to expose that

[PATCH-for-10.0 0/3] hw/boards: Try to make sense of MachineClass::no_sdcard flag

2024-11-25 Thread Philippe Mathieu-Daudé
Invert MachineClass 'no_sdcard' flag logic and rename it to 'create_default_sdcard_drive' to make sense of this default value applied to all machines. No logical change intended. Philippe Mathieu-Daudé (3): hw/boards: Convert no_sdcard flag to OnOffAuto tri-state hw/boards: Explicit no_sdcard=

[PATCH-for-10.0 2/3] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF

2024-11-25 Thread Philippe Mathieu-Daudé
Update MachineClass::no_sdcard default implicit AUTO initialization to explicit OFF. This flag is consumed in system/vl.c::qemu_disable_default_devices(). Use this place to assert we don't have anymore AUTO state. In hw/ppc/e500.c we add the ppce500_machine_class_init() method to initialize once a

[PATCH-for-10.0 1/3] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state

2024-11-25 Thread Philippe Mathieu-Daudé
MachineClass::no_sdcard is initialized as false by default. To catch all uses, convert it to a tri-state, having the current default (false) becoming AUTO. No logical change intended. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h| 2 +- hw/arm/xilinx_zynq.c | 2 +-

Re: [PATCH v7 07/12] util/dsa: Implement DSA task asynchronous submission and wait for completion.

2024-11-25 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > * Add a DSA task completion callback. > * DSA completion thread will call the tasks's completion callback > on every task/batch task completion. > * DSA submission path to wait for completion. > * Implement CPU fallback if DSA is not able to complete the

Re: [PATCH] tests/functional/aarch64_virt: add test for FEAT_RME

2024-11-25 Thread Alex Bennée
Pierrick Bouvier writes: > This boot an OP-TEE environment, and launch a nested guest VM inside it > using the Realms feature. > > Signed-off-by: Pierrick Bouvier > --- > tests/functional/test_aarch64_virt.py | 62 +++ > 1 file changed, 62 insertions(+) > > diff --git a/

Re: [PATCH v2 14/22] tests/qtest/migration: Split postcopy tests

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:22PM -0300, Fabiano Rosas wrote: > Split the next group of tests from migration-test.c, the postcopy > tests. This is another well-defined group of tests and postcopy is a > unique enough feature that it deserves it's own file. > > Signed-off-by: Fabiano Rosas Revie

Re: [PATCH v2 18/22] tests/qtest/migration: Split validation tests + misc

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:26PM -0300, Fabiano Rosas wrote: > Move the remaining tests into a misc-tests.c file. These tests are > mostly about validation of input and should be in the future replaced > by unit testing. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 17/22] tests/qtest/migration: Split CPR tests

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:25PM -0300, Fabiano Rosas wrote: > Move the mode/reboot test into a separate file to hold all the CPR > tests. Currently there's just one test, but we're adding more CPR > modes and the feature is different enough from live migration that > it's worth it to have a sepa

Re: [PATCH v2 16/22] tests/qtest/migration: Split precopy tests

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:24PM -0300, Fabiano Rosas wrote: > Split the precopy tests from migration-test.c. This is the largest > group of tests and the more difficult one to break into smaller > groups, so move all of it. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 15/22] tests/qtest/migration: Split file tests

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:23PM -0300, Fabiano Rosas wrote: > Split the file tests from migration-test.c. These are being moved to > their own file due to being special enough compared with the regular > stream migration. There is also the entire mapped-ram feature which > depends on file migrat

Re: [PATCH v2 13/22] tests/qtest/migration: Split compression tests from migration-test.c

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:21PM -0300, Fabiano Rosas wrote: > Continuing the split of groups of tests from migration-test.c, split > the compression tests into their own file. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 12/22] tests/qtest/migration: Split TLS tests from migration-test.c

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:20PM -0300, Fabiano Rosas wrote: > The migration-test.c file has become unwieldy large. It's quite > confusing to navigate with all the test definitions mixed with hook > definitions. The TLS tests make this worse with ifdef'ery. > > Since we're planning on having a s

Re: [PATCH 4/5] migration: Activate block devices if VM is paused when migrating

2024-11-25 Thread Peter Xu
On Mon, Nov 25, 2024 at 11:46:11AM -0300, Fabiano Rosas wrote: > Currently a VM that has been target of a migration using > late-block-activate will crash at the end of a new migration (with it > as source) when releasing ownership of the disks due to the VM having > never taken ownership of the di

Re: [PATCH v2 11/22] tests/qtest/migration: Move common test code

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:19PM -0300, Fabiano Rosas wrote: > The migration tests have a set of core infrastructure routines. These > are functions that are called by (almost) all tests and centralize the > common operations of: starting migration on both sides, waiting for > guests to boot, per

Re: [PATCH v2 10/22] tests/qtest/migration: Isolate test initialization

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:18PM -0300, Fabiano Rosas wrote: > We currently have some environment validation to perform and flags to > set during the initialization of the tests. To be able to add more > migration test binaries, we'll need these tasks to be in their own > function so they can be

Re: [PATCH v2 09/22] tests/qtest/migration: Move kvm_dirty_ring_supported to utils

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:17PM -0300, Fabiano Rosas wrote: > Move kvm_dirty_ring_supported() to migration-util.c. Similarly to > ufd_version_check(), this function is used during test definition so > put it in the utils file. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter

Re: [PATCH v2 08/22] tests/qtest/migration: Move ufd_version_check to utils

2024-11-25 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:16PM -0300, Fabiano Rosas wrote: > Move ufd_version_check() to migration-util.c file. This is a helper > function that is used during tests definition so it should be > available outside of migration-test.c > > Signed-off-by: Fabiano Rosas Nitpick: may want to menti

Re: Supporting clang on windows

2024-11-25 Thread Peter Maydell
On Mon, 25 Nov 2024 at 16:48, Pierrick Bouvier wrote: > Before sending the a series removing gcc_struct and editing the > documentation, do we all agree here it's the right move forward? > If yes, should we apply this to 9.2 release? I would prefer not to put it into the 9.2 release -- it's one o

Re: Supporting clang on windows

2024-11-25 Thread Pierrick Bouvier
On 11/24/24 23:00, Paolo Bonzini wrote: On Sun, Nov 24, 2024 at 9:23 PM Pierrick Bouvier wrote: * there is no pushback against clang support, there is pushback against asking for a change without understanding the problem Thanks for taking time to share more insights about it. As an aside,

Re: [PATCH 11/12] docs/system/arm/virt: document missing properties

2024-11-25 Thread Peter Maydell
On Fri, 22 Nov 2024 at 22:52, Pierrick Bouvier wrote: > > Signed-off-by: Pierrick Bouvier > --- > docs/bypass-iommu.txt| 2 ++ > docs/system/arm/virt.rst | 15 +++ > 2 files changed, 17 insertions(+) > > diff --git a/docs/bypass-iommu.txt b/docs/bypass-iommu.txt > index e6677bdd

Re: [PATCH-for-10.0 0/8] hw/boards: Remove legacy MachineClass::pci_allow_0_address flag

2024-11-25 Thread Peter Maydell
On Mon, 25 Nov 2024 at 14:49, Philippe Mathieu-Daudé wrote: > > On 25/11/24 15:14, Peter Maydell wrote: > > On Mon, 25 Nov 2024 at 14:06, Philippe Mathieu-Daudé > > wrote: > >> > >> This series aims to remove a legacy field from > >> MachineClass. > >> > >> Rather than a global exposed to all ma

Re: Supporting clang on windows

2024-11-25 Thread Pierrick Bouvier
Thanks everyone for your valuable feedback on this, and taking time to give more rationale about the previous position you had. On 11/25/24 03:19, Thomas Huth wrote: So fine for me if we allow compiling with Clang on Windows now, but we should make sure to avoid that those problems are sneakin

Re: [PATCH 2/4] ppc/pnv: Fix direct controls quiesce

2024-11-25 Thread Miles Glenn
Reviewed-by: Glenn Miles On Mon, 2024-11-25 at 23:20 +1000, Nicholas Piggin wrote: > powernv CPUs have a set of control registers that can stop, start, > and > do other things to control a thread's execution. > > Using this interface to stop a thread puts it into a particular state > that can be

Re: [PATCH 4/4] ppc/pnv: Add xscom- prefix to pervasive-control region name

2024-11-25 Thread Miles Glenn
Reviewed-by: Glenn Miles On Mon, 2024-11-25 at 23:20 +1000, Nicholas Piggin wrote: > By convention, xscom regions get a xscom- prefix. > > Fixes: 1adf24708bf7 ("hw/ppc: Add pnv nest pervasive common chiplet > model") > Signed-off-by: Nicholas Piggin > --- > hw/ppc/pnv_nest_pervasive.c | 2 +- >

  1   2   3   >