[PULL 04/45] migration: push Error **errp into vmstate_load()

2025-10-03 Thread Peter Xu
: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-4-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 8ac3d33814..fffea57cd9 100644

[PULL 45/45] migration-test: test cpr-exec

2025-10-03 Thread Peter Xu
From: Steve Sistare Add a test for the cpr-exec migration mode. Signed-off-by: Steve Sistare Link: https://lore.kernel.org/r/1759332851-370353-20-git-send-email-steven.sist...@oracle.com Signed-off-by: Peter Xu --- tests/qtest/migration/cpr-tests.c | 133 ++ 1

[PULL 33/45] include/system/memory.h: Clarify address_space_destroy() behaviour

2025-10-03 Thread Peter Xu
From: Peter Maydell address_space_destroy() doesn't actually immediately destroy the AS; it queues it to be destroyed via RCU. This means you can't g_free() the memory the AS struct is in until that has happened. Clarify this in the documentation. Signed-off-by: Peter Maydell R

[PULL 12/45] migration: Update qemu_file_get_return_path() docs and remove dead checks

2025-10-03 Thread Peter Xu
: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-12-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/colo.c | 4 migration/migration.c | 12 ++-- migration/qemu-file.c | 1 - migration/savevm.c| 4 4 files changed, 2 insertions

[PULL 31/45] migration: Fix state transition in postcopy_start() error handling

2025-10-03 Thread Peter Xu
: qemu-sta...@nongnu.org Fixes: 48814111366b ("migration: Always set DEVICE state") Signed-off-by: Juraj Marcin Reviewed-by: Peter Xu Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250826115145.871272-1-jmar...@redhat.com Signed-off-by: Peter Xu --- migration/migration

[PULL 27/45] io/crypto: Move tls premature termination handling into QIO layer

2025-10-03 Thread Peter Xu
normally will be concurrently shutdown()ed by the main thread. Reviewed-by: Daniel P. Berrangé Reviewed-by: Juraj Marcin Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250918203937.200833-2-pet...@redhat.com Signed-off-by: Peter Xu --- include/crypto/tlssession.h | 10 ++

[PULL 17/45] migration: push Error **errp into loadvm_postcopy_handle_run()

2025-10-03 Thread Peter Xu
Reviewed-by: Daniel P. Berrangé Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-17-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 10 +++--- 1 file changed, 3 insertions

[PULL 37/45] migration: multi-mode notifier

2025-10-03 Thread Peter Xu
Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/1759332851-370353-2-git-send-email-steven.sist...@oracle.com Signed-off-by: Peter Xu --- include/migration/misc.h | 12 migration/migration.c| 60 +++- 2 files changed, 59 insertions(+), 13

[PULL 02/45] migration: push Error **errp into vmstate_load_state()

2025-10-03 Thread Peter Xu
Rosas Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-2-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- include/migration/vmstate.h | 2 +- hw/display/virtio-gpu.c | 2 +- hw/pci/pci.c

[PULL 13/45] migration: make loadvm_postcopy_handle_resume() void

2025-10-03 Thread Peter Xu
://lore.kernel.org/r/20250918-propagate_tpm_error-v14-13-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index eb2a905f32..d145e7b1e5 100644 --- a/migration

[PULL 26/45] backends/tpm: Propagate vTPM error on migration failure

2025-10-03 Thread Peter Xu
on Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-27-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- backends/tpm/tpm_emulator.c | 40 +++-- 1 file changed, 21 insertions(+), 19 deleti

[PULL 16/45] migration: push Error **errp into loadvm_postcopy_handle_listen()

2025-10-03 Thread Peter Xu
Reviewed-by: Daniel P. Berrangé Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-16-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 17 +++-- 1 file changed, 7

[PULL 15/45] migration: push Error **errp into loadvm_postcopy_handle_advise()

2025-10-03 Thread Peter Xu
Reviewed-by: Daniel P. Berrangé Reviewed-by: Marc-André Lureau Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-15-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 40

[PULL 19/45] migration: push Error **errp into loadvm_handle_recv_bitmap()

2025-10-03 Thread Peter Xu
Reviewed-by: Fabiano Rosas Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-19-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 21 ++--- 1 file changed, 10

[PULL 22/45] migration: push Error **errp into loadvm_postcopy_handle_switchover_start()

2025-10-03 Thread Peter Xu
: Fabiano Rosas Reviewed-by: Daniel P. Berrangé Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-22-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 9 +++-- 1 file changed, 3

[PULL 44/45] vfio: cpr-exec mode

2025-10-03 Thread Peter Xu
From: Steve Sistare All blockers and notifiers for cpr-transfer mode also apply to cpr-exec. Signed-off-by: Steve Sistare Acked-by: Cédric Le Goater Link: https://lore.kernel.org/r/30750362-d4a1-4392-8dd6-016624d01...@oracle.com Signed-off-by: Peter Xu --- hw/vfio/container-legacy.c | 3

[PULL 09/45] migration: push Error **errp into qemu_loadvm_state_main()

2025-10-03 Thread Peter Xu
estination side error logs. Reviewed-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-9-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migratio

[PULL 01/45] migration: push Error **errp into vmstate_subsection_load()

2025-10-03 Thread Peter Xu
: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-1-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/vmstate.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index 5feaa3244d

[PULL 05/45] migration: push Error **errp into loadvm_process_command()

2025-10-03 Thread Peter Xu
Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-5-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 86 +- 1 file changed, 63 insertions(+), 23 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c

[PULL 03/45] migration: push Error **errp into qemu_loadvm_state_header()

2025-10-03 Thread Peter Xu
Reviewed-by: Marc-André Lureau Signed-off-by: Arun Menon Tested-by: Fabiano Rosas Reviewed-by: Akihiko Odaki Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-3-36f11a6fb...@redhat.com Signed-off-by: Peter Xu --- migration/savevm.c | 28 +--- 1 file changed

[PULL 00/45] Staging patches

2025-10-03 Thread Peter Xu
nel read Juraj Marcin (1): migration: Fix state transition in postcopy_start() error handling Peter Maydell (2): include/system/memory.h: Clarify address_space_destroy() behaviour physmem: Destroy all CPU AddressSpaces on unrealize Peter Xu (4): io/crypto: Move tls premature ter

Re: [PATCH 02/14] qdev: Automatically delete memory subregions

2025-10-03 Thread Peter Xu
On Fri, Oct 03, 2025 at 11:01:38PM +0900, Akihiko Odaki wrote: > On 2025/10/03 4:40, Peter Xu wrote: > > On Thu, Oct 02, 2025 at 03:23:10PM -0400, Peter Xu wrote: > > > On Wed, Sep 17, 2025 at 07:32:48PM +0900, Akihiko Odaki wrote: > > > > +static int del_memory_regi

Re: [PATCH V5 00/19] Live update: cpr-exec

2025-10-03 Thread Peter Xu
On Fri, Oct 03, 2025 at 07:36:50AM -0400, Steven Sistare wrote: > Hi Peter, do you need anything more from me at this time? > AFAIK I have addressed all current issues, with the snippet above, and > with the new 0001-vfio-cpr-exec-mode.patch attached earlier in this thread. I got every

[PATCH 1/3] qht: Zero-initialize qht_map

2025-10-02 Thread Peter Xu
QEMU almost always do this across the tree except QHT. This prepares for rcu to track double free. Signed-off-by: Peter Xu --- util/qht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qht.c b/util/qht.c index 208c2f4b32..872d9f9cec 100644 --- a/util/qht.c +++ b/util

Re: [PATCH V5 00/19] Live update: cpr-exec

2025-10-02 Thread Peter Xu
tc src, where I didn't dig deeper yet.. The other thing is, this series doesn't apply on master branch. I didn't feel confident to do it myself on the vfio change, please have a look on both issues. Thanks, -- Peter Xu

Re: [PATCH 02/14] qdev: Automatically delete memory subregions

2025-10-02 Thread Peter Xu
On Thu, Oct 02, 2025 at 03:23:10PM -0400, Peter Xu wrote: > On Wed, Sep 17, 2025 at 07:32:48PM +0900, Akihiko Odaki wrote: > > +static int del_memory_region(Object *child, void *opaque) > > +{ > > +MemoryRegion *mr = (MemoryRegion *)object_dynamic_cast(child, &

Re: [PATCH 02/14] qdev: Automatically delete memory subregions

2025-10-02 Thread Peter Xu
found that some MRs are auto-detached and some are not. One example that I'm aware of is this: https://lore.kernel.org/all/20250910115420.1012191-2-aest...@redhat.com/#t TYPE_VIRTIO_SHARED_MEMORY_MAPPING is an object, not qdev here, which can be the owner of the MR. Thanks, -- Peter Xu

Re: [PATCH 01/14] hw/pci-bridge: Do not assume immediate MemoryRegion finalization

2025-10-02 Thread Peter Xu
ption is rarely necessary, and therefore it is discouraged, but nevertheless it is used in a few places. I was expecting the current code should at least be fine, no? Thanks, -- Peter Xu

Re: [PATCH v3 0/5] system/ramblock: Sanitize header

2025-10-02 Thread Peter Xu
On Thu, Oct 02, 2025 at 05:28:07AM +0200, Philippe Mathieu-Daudé wrote: > (series fully reviewed, I plan to merge via my tree) > > Usual API cleanups, here focusing on RAMBlock API: > move few prototypes out of "exec/cpu-common.h" and > "system/ram_addr.h" to &q

[PATCH] MAINTAINERS: Mark VHDX block driver as "Odd Fixes"

2025-10-02 Thread Peter Maydell
ider system is usually to mark them as "Odd Fixes". The vhdx.c code has had no commits which aren't a part of more general refactoring changes since 2020, and Jeff himself hasn't been active on qemu-devel since 2018, so this seems also to be how we've handled the code in p

[RFC PATCH 1/2] target/arm: Clear AArch64 ID regs from ARMISARegisters if AArch64 disabled

2025-10-02 Thread Peter Maydell
e aa64_ feature tests generally return false. Signed-off-by: Peter Maydell --- target/arm/cpu.h | 3 ++- target/arm/cpu.c | 25 + 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 2b9585dc80a..b9f5d70ea35 100644 -

[RFC PATCH 0/2] target/arm: Allow aarch64=off for TCG

2025-10-02 Thread Peter Maydell
it any places where we should instead have been checking ARM_FEATURE_V8 or something else instead. thanks -- PMM Peter Maydell (2): target/arm: Clear AArch64 ID regs from ARMISARegisters if AArch64 disabled target/arm: Allow 'aarch64=off' to be set for TCG CPUs docs/system/

[RFC PATCH 2/2] target/arm: Allow 'aarch64=off' to be set for TCG CPUs

2025-10-02 Thread Peter Maydell
sn't compile in the A32-specific GDB xml files like arm-neon.xml). Signed-off-by: Peter Maydell --- docs/system/arm/cpu-features.rst | 7 --- target/arm/cpu-features.h| 5 + target/arm/cpu.c | 36 tests/qtest/arm-cpu-features

Re: [PATCH 0/3] system: Don't leak CPU AddressSpaces

2025-10-02 Thread Peter Maydell
On Wed, 1 Oct 2025 at 22:59, Richard Henderson wrote: > > On 10/1/25 14:37, Peter Xu wrote: > > I only have a very preliminary understanding on this, so please bare with > > me if I'll make silly mistakes... > > > > I was expecting QEMU provides both th

Re: [PATCH] migration: ensure APIC is loaded prior to VFIO PCI devices

2025-10-01 Thread Peter Xu
C, /* Must happen before PCI devices */ > MIG_PRI_GICV3_ITS, /* Must happen before PCI devices */ > MIG_PRI_GICV3, /* Must happen before the ITS */ > MIG_PRI_MAX, > -- > 2.20.1 > +Cedric, +Alex queued. -- Peter Xu

Re: [PATCH 0/3] system: Don't leak CPU AddressSpaces

2025-10-01 Thread Peter Xu
On Wed, Oct 01, 2025 at 01:36:16PM -0700, Richard Henderson wrote: > On 9/29/25 07:42, Peter Maydell wrote: > > When a vCPU is created, it typically calls cpu_address_space_init() > > one or more times to set up its address spaces. We don't currently > > do anything to de

Re: [PATCH V5 00/19] Live update: cpr-exec

2025-10-01 Thread Peter Xu
by replying it to this email or that vfio patch? I can fix the win build. -- Peter Xu

Re: [PATCH V5 05/19] migration: cpr-exec save and load

2025-10-01 Thread Peter Xu
ompiled when "host_os == 'linux'". I'm not even sure above qemu_memfd_create() is always defined. But even if it'll work right now, we still compile these codes that will not be used outside linux.. -- Peter Xu

Re: [PATCH v6 14/19] migration: add MIG_EVENT_PRE_INCOMING

2025-09-30 Thread Peter Xu
ion parameters and capabilities, > but we are not in downtime, so we can continue initialization > of TAP device. > > This commit introduces MIG_EVENT_PRE_INCOMING, to be used by TAP > code in following commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Peter Xu -- Peter Xu

Re: [PATCH V4 6/8] migration: cpr-exec mode

2025-09-30 Thread Peter Xu
On Tue, Sep 30, 2025 at 01:18:34PM -0400, Steven Sistare wrote: > On 9/30/2025 12:39 PM, Peter Xu wrote: > > On Mon, Sep 22, 2025 at 06:49:43AM -0700, Steve Sistare wrote: > > > Add the cpr-exec migration mode. Usage: > > >qemu-system-$arc

Re: [PATCH V1 11/11] migration-test: test cpr-exec

2025-09-30 Thread Peter Xu
t; +.start.opts_source = "-machine aux-ram-share=on -nodefaults", > +.start.memory_backend = "-object > memory-backend-memfd,id=pc.ram,size=%s" > +" -machine memory-backend=pc.ram", > +.connect_uri = uri, > +.listen_uri = listen_uri, > +.start_hook = test_mode_exec_start, > +}; > + > +test_cpr_exec(&args); > +} > + > void migration_test_add_cpr(MigrationTestEnv *env) > { > tmpfs = env->tmpfs; > @@ -132,5 +251,6 @@ void migration_test_add_cpr(MigrationTestEnv *env) > migration_test_add("/migration/mode/transfer", test_mode_transfer); > migration_test_add("/migration/mode/transfer/defer", > test_mode_transfer_defer); > +migration_test_add("/migration/mode/exec", test_mode_exec); > } > } > -- > 1.8.3.1 > -- Peter Xu

Re: [PATCH V4 0/8] Live update: cpr-exec

2025-09-30 Thread Peter Xu
On Tue, Sep 30, 2025 at 11:28:58AM -0400, Steven Sistare wrote: > Just a reminder, these patches still need review from Peter and/or Fabiano: > > Patch 5/8: migration: cpr-exec save and load > Patch 6/8: migration: cpr-exec mode I read them and left some comments where I have.

Re: [PATCH 3/3] rcu: Avoid double rcu frees

2025-09-30 Thread Peter Xu
On Tue, Sep 30, 2025 at 10:19:54AM +0100, Peter Maydell wrote: > On Mon, 29 Sept 2025 at 20:08, Peter Xu wrote: > > > > Trap call_rcu1() to make sure it won't be invoked twice for one rcu head. > > > > Suggested-by: Peter Maydell > > Signed-off-by: Peter Xu

[PATCH 0/3] rcu: Detect accidental reuse of rcu head

2025-09-29 Thread Peter Xu
This is an idea suggested by Peter Maydell: https://lore.kernel.org/all/CAFEAcA--K0=EJNNvj98i=ewGY=tn3u4s0+fnb9kjpyynzjh...@mail.gmail.com/ After this small series applied, we should be able to assert on misuse of accidental (wrong) re-use on a rcu head. Please review, thanks. Peter Xu (3

Re: [PATCH v14 25/27] migration: Rename post_save() to cleanup_save() and make it void

2025-09-29 Thread Peter Xu
to send it separately or just leave post_save() as-is for now. PS: IMHO post_save() is still a good name to me, pairing well with pre_save() and all *_load*() functions too. Dropping the retval should already imply it cannot fail with/without a name change (and also because modules can do more than "cleanups" in post_save()..). -- Peter Xu

Re: [PATCH v14 00/27] migration: propagate vTPM errors using Error objects

2025-09-29 Thread Peter Xu
On Mon, Sep 29, 2025 at 11:30:20AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Sep 29, 2025 at 02:19:48PM +0530, Arun Menon wrote: > >> Hi, > >> Gentle ping for the series. > >> Is there something more to be done to improve this before que

[PATCH 3/3] physmem: Destroy all CPU AddressSpaces on unrealize

2025-09-29 Thread Peter Maydell
:1520:15 #12 0x5b63879fe510 in qdev_realize /data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../hw/core/qdev.c:276:12 Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2517 Signed-off-by: Peter Maydell --- include/exec/cpu-common.h

[PATCH 2/3] memory: New AS helper to serialize destroy+free

2025-09-29 Thread Peter Maydell
From: Peter Xu If an AddressSpace has been created in its own allocated memory, cleaning it up requires first destroying the AS and then freeing the memory. Doing this doesn't work: address_space_destroy(as); g_free_rcu(as, rcu); because both address_space_destroy() and g_fre

[PATCH 1/3] include/system/memory.h: Clarify address_space_destroy() behaviour

2025-09-29 Thread Peter Maydell
address_space_destroy() doesn't actually immediately destroy the AS; it queues it to be destroyed via RCU. This means you can't g_free() the memory the AS struct is in until that has happened. Clarify this in the documentation. Signed-off-by: Peter Maydell --- include/system/mem

[PULL 00/44] target-arm queue

2025-09-27 Thread Peter Maydell
ssing GIO dependency Laurent Vivier (1): net/passt: Fix build failure due to missing GIO dependency Peter Maydell (3): hw/usb/hcd-uhci: don't assert for SETUP to non-0 endpoint target/arm: Move ID register fie

Re: [PATCH] docs/devel: Correct uefi-vars-x64 device name

2025-09-27 Thread Peter Maydell
On Sat, 27 Sept 2025 at 09:48, Michael Tokarev wrote: > > On 23.09.2025 14:57, Peter Maydell wrote: > > > We could probably also correct the bit of the text in this file > > that currently reads "depend on SMM emulation on x64" to either > > say "x86&quo

[PULL 08/44] target/arm/hvf: Remove hvf_sreg_match.key

2025-09-26 Thread Peter Maydell
From: Richard Henderson Use conversion functions instead of table lookup. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 35 +++ 1 file changed, 19

Re: [PATCH v2 3/3] memory: Stop piggybacking on memory region owners

2025-09-26 Thread Peter Maydell
On Fri, 26 Sept 2025 at 16:59, Peter Maydell wrote: > I'm trying to repro the setup I had last year, but I can't > figure out a setup where I can get hot-unplug to work: > the "device-del" command documented in system/cpu-hotplug.html > always fails with: > >

Re: [PULL 54/61] i386/cpu: Enable SMM cpu address space under KVM

2025-09-26 Thread Peter Maydell
On Sat, 13 Sept 2025 at 09:25, Paolo Bonzini wrote: > > From: Xiaoyao Li > > Kirill Martynov reported assertation in cpu_asidx_from_attrs() being hit > when x86_cpu_dump_state() is called to dump the CPU state[*]. It happens > when the CPU is in SMM and KVM emulation failure due to misbehaving >

Re: [PATCH v2 3/3] memory: Stop piggybacking on memory region owners

2025-09-26 Thread Peter Maydell
On Fri, 26 Sept 2025 at 16:16, Peter Xu wrote: > > On Fri, Sep 26, 2025 at 10:09:29AM +0100, Peter Maydell wrote: > > On Thu, 25 Sept 2025 at 21:06, Peter Xu wrote: > > > > > > On Thu, Sep 25, 2025 at 10:03:45AM +0100, Peter Maydell wrote: > > > > On W

[PULL 20/44] target/arm: Remove cp argument to ENCODE_AA64_CP_REG

2025-09-26 Thread Peter Maydell
: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpregs.h| 5 ++--- target/arm/kvm-consts.h| 3 --- target/arm/helper.c| 11 +-- target/arm/hvf/hvf.c | 3 +-- target/arm/tcg/translate-a64.c | 6 ++ 5 files changed, 10

[PULL 21/44] target/arm: Reorder ENCODE_AA64_CP_REG arguments

2025-09-26 Thread Peter Maydell
Signed-off-by: Peter Maydell --- target/arm/cpregs.h| 2 +- target/arm/helper.c| 4 ++-- target/arm/hvf/hvf.c | 6 +++--- target/arm/tcg/translate-a64.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/arm/cpregs.h b/target/arm/cpregs.h

Re: [PATCH v2 3/3] memory: Stop piggybacking on memory region owners

2025-09-26 Thread Peter Xu
On Fri, Sep 26, 2025 at 10:09:29AM +0100, Peter Maydell wrote: > On Thu, 25 Sept 2025 at 21:06, Peter Xu wrote: > > > > On Thu, Sep 25, 2025 at 10:03:45AM +0100, Peter Maydell wrote: > > > On Wed, 24 Sept 2025 at 22:14, Peter Xu wrote: > > > > Side note: whe

[PULL 01/44] hw/usb/hcd-uhci: don't assert for SETUP to non-0 endpoint

2025-09-26 Thread Peter Maydell
. This is the UHCI equivalent of the same bug in OHCI that we fixed in commit 3c3c233677 ("hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT"). This bug has been tracked as CVE-2024-8354. Cc: qemu-sta...@nongnu.org Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2548 Signed-o

Re: [PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models

2025-09-26 Thread Peter Maydell
On Fri, 26 Sept 2025 at 13:28, Mark Cave-Ayland wrote: > > On 26/09/2025 13:05, Peter Maydell wrote: > > > On Thu, 25 Sept 2025 at 17:07, Mark Cave-Ayland > > wrote: > >> > >> Add a new paragraph in the "Backwards compatibility" section doc

[PULL 34/44] target/arm: Split out redirect_cpreg

2025-09-26 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/tcg/translate-a64.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/target/arm

[PULL 02/44] net/passt: Fix build failure due to missing GIO dependency

2025-09-26 Thread Peter Maydell
dd passt network backend") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3121 Reported-by: Thomas Huth Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Signed-off-by: Peter Maydell --- meson.build | 1 + 1 file changed, 1 insertion(+) diff

[PULL 30/44] target/arm: Move alias setting for wildcards

2025-09-26 Thread Peter Maydell
of comma in a comment] Signed-off-by: Peter Maydell --- target/arm/helper.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index a199320f140..274b7b5808e 100644 --- a/target/arm/helper.c +++ b/target/arm

Re: [PATCH] docs/code-provenance: add an exception for non-creative AI changes

2025-09-26 Thread Peter Maydell
On Thu, 25 Sept 2025 at 08:56, Paolo Bonzini wrote: > > AI tools can be used as a natural language refactoring engine for simple > tasks such as modifying all callers of a given function or all accesses > to a variable. These tasks are interesting for an exception because: > > * it is credible fo

[PULL 35/44] target/arm: Redirect VHE FOO_EL1 -> FOO_EL2 during translation

2025-09-26 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpregs.h| 6 target/arm/gdbstub.c | 5 target/arm/helper.c

[PULL 12/44] target/arm: Use raw_write in cp_reg_reset

2025-09-26 Thread Peter Maydell
From: Richard Henderson Reduce the places that know about field types by 1. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpu.c | 10 ++ 1 file

[PULL 44/44] target/arm: Implement ID_AA64PFR2_EL1

2025-09-26 Thread Peter Maydell
ere are the ones documented in rev L.b of the Arm ARM. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/cpu-features.h| 5 + target/arm/cpu-sysregs.h.inc | 1 + target/arm/helper.c | 6 -- target/arm/hvf/hv

[PULL 27/44] target/arm: Split out alloc_cpreg

2025-09-26 Thread Peter Maydell
From: Richard Henderson Include provision for a name suffix. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 29 +++-- 1 file changed, 23 insertions(+), 6

[PULL 32/44] target/arm: Move endianness fixup for 32-bit registers

2025-09-26 Thread Peter Maydell
From: Richard Henderson Move the test outside of the banked register block, and repeat the AA32 test. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 17 - 1 file

[PULL 06/44] target/arm/hvf: Reorder DEF_SYSREG arguments

2025-09-26 Thread Peter Maydell
sidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c| 2 +- target/arm/hvf/sysreg.c.inc | 224 ++-- 2 files changed, 113 insertions(+), 113

[PULL 19/44] target/arm: Convert init_cpreg_list to g_hash_table_foreach

2025-09-26 Thread Peter Maydell
add_cpreg_to_list. This allows us to sort the data that we actually care about, the kvm id, as computed within add_cpreg_to_list, instead of having to repeatedly compute the kvm id within cpreg_key_compare. Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell

[PULL 28/44] target/arm: Hoist the allocation of ARMCPRegInfo

2025-09-26 Thread Peter Maydell
27;re done querying the wildcards. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 97 ++--- 1 file changed, 48 insertions(+), 49 deletions(-)

[PULL 17/44] target/arm: Add CP_REG_AA32_64BIT_{SHIFT,MASK}

2025-09-26 Thread Peter Maydell
From: Richard Henderson Give a name to the bit we're already using. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 15 ++- 1

[PULL 31/44] target/arm: Move writeback of CP_ANY fields

2025-09-26 Thread Peter Maydell
From: Richard Henderson Move the writeback of cp, crm, opc1, opc2 to define_one_arm_cp_reg, which means we don't have to pass all those parameters down to subroutines. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by:

[PULL 13/44] target/arm: Rename all ARMCPRegInfo from opaque to ri

2025-09-26 Thread Peter Maydell
From: Richard Henderson These pointers are no opaque, they have a specific type. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 10

[PULL 04/44] target/arm: Move compare_u64 to helper.c

2025-09-26 Thread Peter Maydell
From: Richard Henderson We will use this function beyond kvm.c. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/internals.h | 3 +++ target/arm/helper.c

[PULL 25/44] target/arm: Move cpreg elimination to define_one_arm_cp_reg

2025-09-26 Thread Peter Maydell
From: Richard Henderson Eliminate unused registers earlier, so that by the time we arrive in add_cpreg_to_hashtable we never skip. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 123

[PULL 29/44] target/arm: Remove name argument to alloc_cpreg

2025-09-26 Thread Peter Maydell
From: Richard Henderson All callers now pass in->name, so take the value from there. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 12 ++-- 1 file changed, 6 inserti

[PULL 39/44] target/arm: Replace magic GIC values by proper definitions

2025-09-26 Thread Peter Maydell
From: Philippe Mathieu-Daudé Prefer the FIELD_DP64() macro and self-describing GIC definitions over magic values. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PULL 23/44] target/arm: Improve asserts in define_one_arm_cp_reg

2025-09-26 Thread Peter Maydell
eu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 39f5297a1a7..8c2b7e037e8 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7651,12 +7651,17

[PULL 26/44] target/arm: Add key parameter to add_cpreg_to_hashtable

2025-09-26 Thread Peter Maydell
From: Richard Henderson Hoist the computation of key into the caller, where state is a known constant. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé [PMM: added comment about CRN key field increment] Signed-off-by: Peter Maydell

[PULL 38/44] target/arm: Remove define_arm_vh_e2h_redirects_aliases

2025-09-26 Thread Peter Maydell
From: Richard Henderson Populate vhe_redir_to_{el2,el01} on each ARMCPRegInfo. Clear the fields within add_cpreg_to_hashtable_aa32. Create the FOO_EL12 cpreg within add_cpreg_to_hashtable_aa64; add ARM_CP_NO_RAW. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Tested-by: Philippe

[PULL 05/44] target/arm/hvf: Split out sysreg.c.inc

2025-09-26 Thread Peter Maydell
From: Richard Henderson Move the list of supported sysregs to a reuseable file. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c| 147

[PULL 43/44] target/arm: Move ID register field defs to cpu-features.h

2025-09-26 Thread Peter Maydell
e where we need to use some of these macro definitions that we weren't already including cpu-features.h: linux-user/arm/target_proc.h. Otherwise this patch is a pure movement of code from one file to the other. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ri

[PULL 18/44] target/arm: Rename CP_REG_AA32_NS_{SHIFT,MASK}

2025-09-26 Thread Peter Maydell
From: Richard Henderson Rename from CP_REG_NS_* to emphasize this is specific to AArch32. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 8

[PULL 24/44] target/arm: Move cp processing to define_one_arm_cp_reg

2025-09-26 Thread Peter Maydell
From: Richard Henderson Processing of cp was split between add_cpreg_to_hashtable and define_one_arm_cp_reg. Unify it all to the top-level function. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell

[PULL 36/44] target/arm: Redirect VHE FOO_EL12 to FOO_EL1 during translation

2025-09-26 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Tested-by: Philippe Mathieu-Daudé [PMM: expanded a comment slightly] Signed-off-by: Peter Maydell --- target/arm/cpregs.h| 22 - target/arm/gdbstub.c | 2 ++ target/arm

[PULL 09/44] target/arm/hvf: Replace hvf_sreg_match with hvf_sreg_list

2025-09-26 Thread Peter Maydell
proper enum type: hv_sys_reg_t. Rename from hvf_sreg_match to hvf_sreg_list because there is no longer any matching going on. Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 45

[PULL 40/44] target/arm: Convert power control DPRINTF() uses to trace events

2025-09-26 Thread Peter Maydell
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/arm-powerctl.c | 26 -- target/arm/trace-events | 6 ++ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a

[PULL 11/44] target/arm/hvf: Use raw_read, raw_write to access

2025-09-26 Thread Peter Maydell
From: Richard Henderson Reduce the places that know about field types by 2. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PULL 33/44] target/arm: Rename TBFLAG_A64_NV2_MEM_E20 with *_E2H

2025-09-26 Thread Peter Maydell
From: Richard Henderson Install e2h in tbflags and compute nv2_mem_e20 from that in aarch64_tr_init_disas_context. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpu.h | 3

[PULL 16/44] target/arm: Replace cpreg_field_is_64bit with cpreg_field_type

2025-09-26 Thread Peter Maydell
From: Richard Henderson Prepare for 128-bit fields by using a better query api. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 10

[PULL 14/44] target/arm: Drop define_one_arm_cp_reg_with_opaque

2025-09-26 Thread Peter Maydell
is Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 32 hw/intc/arm_gicv3_cpuif.c | 10 +- target/arm/helper.c

[PULL 37/44] target/arm: Rename some cpreg to their aarch64 names

2025-09-26 Thread Peter Maydell
From: Richard Henderson Rename those registers which will have FOO_EL12 aliases. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 22

[PULL 03/44] target/arm: Introduce KVMID_AA64_SYS_REG64

2025-09-26 Thread Peter Maydell
From: Richard Henderson Allow us to create kvm ids directly, rather than going through ENCODE_AA64_CP_REG + cpreg_to_kvm_id. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/kvm-consts.h | 11

[PULL 07/44] target/arm/hvf: Add KVMID_TO_HVF, HVF_TO_KVMID

2025-09-26 Thread Peter Maydell
From: Richard Henderson Conversion between KVM system registers ids and the HVF system register ids is trivial. Reviewed-by: Manos Pitsidianakis Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target

Re: [PATCH v2 2/2] docs/about/deprecated.rst: document new restrictions for isapc CPU models

2025-09-26 Thread Peter Maydell
On Thu, 25 Sept 2025 at 17:07, Mark Cave-Ayland wrote: > > Add a new paragraph in the "Backwards compatibility" section documenting that > the isapc machine is now restricted to 32-bit x86 CPUs, and -cpu host and > -cpu max are no longer supported. > > Signed-off-by: Mark Cave-Ayland > --- > doc

Re: [PATCH 0/3] target/arm: Few tracing improvements around power/reset

2025-09-26 Thread Peter Maydell
On Wed, 24 Sept 2025 at 17:32, Philippe Mathieu-Daudé wrote: > > Few patches adding trace events to power/reset methods > which have been helpful when debugging nested guest > behavior under HVF. > > Philippe Mathieu-Daudé (3): > target/arm: Convert power control DPRINTF() uses to trace events >

Re: [PATCH] target/arm: Replace magic GIC values by proper definitions

2025-09-26 Thread Peter Maydell
On Thu, 25 Sept 2025 at 04:21, Philippe Mathieu-Daudé wrote: > > Prefer the FIELD_DP64() macro and self-describing GIC > definitions over magic values. > > Signed-off-by: Philippe Mathieu-Daudé > --- Applied to target-arm.next, thanks. -- PMM

Re: [PATCH v2 3/3] memory: Stop piggybacking on memory region owners

2025-09-26 Thread Peter Maydell
On Thu, 25 Sept 2025 at 21:06, Peter Xu wrote: > > On Thu, Sep 25, 2025 at 10:03:45AM +0100, Peter Maydell wrote: > > On Wed, 24 Sept 2025 at 22:14, Peter Xu wrote: > > > Side note: when I was trying to test hotplugs with i386/q35, unfortunately > > > I didn'

  1   2   3   4   5   6   7   8   9   10   >