Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-10 Thread Peter Xu
t; g) config not touching the parameter, value is reset to default: > > { 'execute': 'migrate', 'arguments': { ..., 'config': { 'multifd': true } } } > => "multifd-channels": 2, HMP: multifd-channels: 2 > > h) config overrides all: > > { 'execute': 'migrate', 'arguments': { ..., 'config': {'multifd-channels': > 16 } } } > => QMP: "multifd-channels": 16, HMP: multifd-channels: 16 > > I'll update the variable names and code comments to be more > precise. Sorry for the noise. Good to know it's even working. Thanks for digging it. -- Peter Xu

Re: [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-10 Thread Peter Xu
On Tue, Jun 10, 2025 at 01:53:40PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Jun 10, 2025 at 12:08:23AM +, Dr. David Alan Gilbert wrote: > > > > diff --git a/qapi/migration.json b/qapi/migration.json > > > > in

Re: [PATCH v2] migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread Peter Xu
ick comment while we can wait for others to look at the details: when it involves both qemu and tests changes, please consider splitting that into two patches. The test patch can be prefixed with "tests/migration:". Thanks, -- Peter Xu

Re: [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-10 Thread Peter Xu
es in the report, maybe I should also mark all of these fields experimental from the start? So we don't necessarily need to maintain the ABI - the expectation is even if a mgmt would like to fetch those they should only fetch and dump it into log so that human can read later only for debugging purposes. -- Peter Xu

Re: [PATCH] hw/arm/npcm7xx_boards: Add support for specifying SPI flash model

2025-06-10 Thread Peter Maydell
On Tue, 10 Jun 2025 at 14:31, Guenter Roeck wrote: > > On 6/10/25 01:42, Peter Maydell wrote: > > I think the question I would have here is "is this the flash > > device the hardware actually has?". If QEMU's using the wrong > > flash type, we should

Re: [PATCH v2 0/3] scripts: render_block_graph: Fix with new python and improve argument parsing

2025-06-10 Thread Peter Krempa
On Wed, Mar 19, 2025 at 17:28:06 +0100, Peter Krempa wrote: > New python doesn't like '\l' escapes from the 'dot' language. > > While at it improve usability of the script by employing proper argument > parsing. > > v2: > - use mutually e

Re: [PATCH] hw/arm/npcm7xx_boards: Add support for specifying SPI flash model

2025-06-10 Thread Peter Maydell
On Tue, 10 Jun 2025 at 02:28, Guenter Roeck wrote: > > In some situations it is desirable to be able to specify the flash type > connected to a board. For example, the target operating system may not > support the default flash type, its support may be broken, or the qemu > emulation is insufficie

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

2025-06-09 Thread Peter Xu
sec -8 sec ]: 0 [8 sec - 16 sec ]: 0 Cc: Dr. David Alan Gilbert Cc: Markus Armbruster Signed-off-by: Peter Xu --- This patch is based on: [PATCH v2 00/13] migration/postcopy: Blocktime tracking overhaul Based-on: <20250609191259.9053-1-pet...@redhat.com>

Re: [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 06:05:16PM -0400, Peter Xu wrote: > On Mon, Jun 09, 2025 at 03:12:54PM -0400, Peter Xu wrote: > > +static void migration_dump_blocktime(Monitor *mon, MigrationInfo *info) > > +{ > > +if (info->has_postcopy_blocktime) { > > +

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

2025-06-09 Thread Peter Xu
access a guest page that was missing. These kind of faults are not accounted by blocktime so far. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 68 ++-- migration/trace-events | 3 +- 2 files changed, 59 insertions(+), 12 d

Re: [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 03:12:54PM -0400, Peter Xu wrote: > +static void migration_dump_blocktime(Monitor *mon, MigrationInfo *info) > +{ > +if (info->has_postcopy_blocktime) { > +monitor_printf(mon, "Postcopy Blocktime (ms): %" PRIu32 "\n&qu

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 04:41:06PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 09, 2025 at 03:02:06PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Mon, Jun 09, 2025 at 11:37:02AM -0300, Fab

[PATCH v2 09/13] migration/postcopy: Initialize blocktime context only until listen

2025-06-09 Thread Peter Xu
;t created instead this time; the old "if" trick isn't needed when we're sure it will only happen once now. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 12/13] migration/postcopy: Optimize blocktime fault tracking with hashtable

2025-06-09 Thread Peter Xu
. One tracepoint is added when walking all the fault entries. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 259 --- migration/trace-events | 5 +- 2 files changed, 216 insertions(+), 48 deletions(-) diff --git a/migration/p

[PATCH v2 00/13] migration/postcopy: Blocktime tracking overhaul

2025-06-09 Thread Peter Xu
statistics for the latency report, e.g. how many faults were resolved in (2^N, 2^(N+1)) us window, etc. Comments welcomed, thanks. Peter Xu (13): migration: Add option to set postcopy-blocktime migration/postcopy: Push blocktime start/end into page req mutex migration/postcopy

[PATCH v2 01/13] migration: Add option to set postcopy-blocktime

2025-06-09 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

[PATCH v2 07/13] migration/postcopy: Add blocktime fault counts per-vcpu

2025-06-09 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/pos

[PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-09 Thread Peter Xu
get_vcpu_blocktime_list() so we don't need to walk the list twice, meanwhile add the entry checks in qtests for all postcopy tests. Cc: Markus Armbruster Cc: Dr. David Alan Gilbert Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- qapi/migration.json

[PATCH v2 06/13] migration/postcopy: Bring blocktime layer to us level

2025-06-09 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/pos

[PATCH v2 05/13] migration/postcopy: Drop PostcopyBlocktimeContext.start_time

2025-06-09 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 v2 11/13] migration/postcopy: Cleanup the total blocktime accounting

2025-06-09 Thread Peter Xu
e variable at all: since nobody is touching smp_cpus_down except ourselves, we can safely do the calculation at the end before decrementing smp_cpus_down. Hopefully this makes the logic easier to read, side benefit is we drop one temp var. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu ---

[PATCH v2 03/13] migration/postcopy: Drop all atomic ops in blocktime feature

2025-06-09 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

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

2025-06-09 Thread Peter Xu
ed". Cc: Markus Armbruster Cc: Dr. David Alan Gilbert Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- qapi/migration.json | 7 +++ migration/migration-hmp-cmds.c| 5 +++ migration/postcopy-ram.c | 64 +-- tests/qtest/mig

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

2025-06-09 Thread Peter Xu
ayer. Note that we need a stub for mark_postcopy_blocktime_begin() for Windows builds. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/migration.h| 2 +- migration/postcopy-ram.h | 2 ++ migration/migration.c| 24 ++--- migration/postcopy-ram.c | 56 ++

[PATCH v2 04/13] migration/postcopy: Make all blocktime vars 64bits

2025-06-09 Thread Peter Xu
cktime_start. - Rename vcpu_blocktime to vcpu_blocktime_total. - Touch up the trace-events to not dump blocktime ctx pointer Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 50 migration/trace-events | 4 ++-- 2 files chan

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 03:02:06PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 09, 2025 at 11:37:02AM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Fri, Jun 06, 2025 at 05:23:18PM -0300, Fab

Re: [PATCH 0/2] docs: Avoid duplicate labels with a sphinx extn

2025-06-09 Thread Peter Maydell
On Mon, 9 Jun 2025 at 17:38, Paolo Bonzini wrote: > > On 6/9/25 18:18, Peter Maydell wrote: > > Ping^2 on this one? > > No objections if it's the easiest way to solve the issue. > > Alternatively, is there a Sphinx way to write something in the spirit of > >

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
at one step even further to decouple savevm: I would think the other way round to obsolete savevm completely if necessary when we have fine "file:" migrations now, especially with mapped-ram. Thanks, -- Peter Xu

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 05:15:43PM +0100, Daniel P. Berrangé wrote: > On Mon, Jun 09, 2025 at 11:53:47AM -0400, Peter Xu wrote: > > On Mon, Jun 09, 2025 at 04:43:40PM +0100, Daniel P. Berrangé wrote: > > > On Mon, Jun 09, 2025 at 11:33:14AM -0400, Peter Xu wrote: > > &g

[PATCH v2 07/11] migration: qemu_savevm_complete*() helpers

2025-06-09 Thread Peter Xu
Since we use the same save_complete() hook for both precopy and postcopy, add a set of helpers to invoke the hook() to dedup the code. Signed-off-by: Peter Xu --- migration/savevm.c | 78 ++ 1 file changed, 44 insertions(+), 34 deletions(-) diff

[PATCH v2 05/11] migration: Drop save_live_complete_postcopy hook

2025-06-09 Thread Peter Xu
The hook is only defined in two vmstate users ("ram" and "block dirty bitmap"), meanwhile both of them define the hook exactly the same as the precopy version. Hence, this postcopy version isn't needed. No functional change intended. Signed-off-by: Peter Xu --- inc

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

2025-06-09 Thread Peter Xu
with this optimization: Before: 268.00us (+-1.87%) After: 232.67us (+-2.01%) The test was done with a 16GB VM with 80 vCPUs, running a workload that busy random writes to 13GB memory. Cc: Yanfei Xu Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/ram.c | 4 +++- 1 file

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

2025-06-09 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 ---

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

2025-06-09 Thread Peter Xu
n Gilbert Tested-by: Li Zhijian Reviewed-by: Li Zhijian Acked-by: Dr. David Alan Gilbert Reviewed-by: Juraj Marcin Signed-off-by: Peter Xu --- migration/migration-hmp-cmds.c | 59 ++ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/migration/m

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

2025-06-09 Thread Peter Xu
ses (precopy v.s. postcopy). (4) Trivial touch up on threshold_size comparision Which changes: "(!pending_size || pending_size < s->threshold_size)" into: "(pending_size <= s->threshold_size)" Reviewed-by: Juraj Marcin Signed-off-by: Peter

[PATCH v2 09/11] migration/ram: Add tracepoints for ram_save_complete()

2025-06-09 Thread Peter Xu
Take notes on start/end state of dirty pages for the whole system. Reviewed-by: Juraj Marcin Signed-off-by: Peter Xu --- migration/ram.c| 5 + migration/trace-events | 1 + 2 files changed, 6 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index c66ad3cf8b..a1d0e8ada2

[PATCH v2 06/11] migration: Rename save_live_complete_precopy to save_complete

2025-06-09 Thread Peter Xu
Signed-off-by: Peter Xu --- include/migration/register.h | 4 ++-- hw/ppc/spapr.c | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/vfio/migration.c| 2 +- migration/block-dirty-bitmap.c | 2 +- migration/ram.c| 2 +- migration/savevm.c

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

2025-06-09 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

[PATCH v2 08/11] migration/ram: One less indent for ram_find_and_save_block()

2025-06-09 Thread Peter Xu
The check over PAGE_DIRTY_FOUND isn't necessary. We could indent one less and assert that instead. Reviewed-by: Juraj Marcin Signed-off-by: Peter Xu --- migration/ram.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/

[PATCH v2 02/11] migration/hmp: Fix postcopy-blocktime per-vCPU results

2025-06-09 Thread Peter Xu
52, 50, 38, 40, 37, 40, 49, 40, 35, 35, 35, 81, 19, 18, 19, 18, 30, 22, 3, 0, 0, 0, 0, 0, 0, 0, 0] Cc: Dr. David Alan Gilbert Cc: Alexey Perevalov Cc: Markus Armbruster Signed-off-by: Peter Xu --- migration/migration-hmp-cmds.c | 22 +- 1 file changed, 13 insert

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

2025-06-09 Thread Peter Xu
patch 10 which changes the core switchover decision logic Patch 11:The one-liner optimization Comments welcomed, thanks. Peter Xu (11): migration/hmp: Reorg "info migrate" once more migration/hmp: Fix postcopy-blocktime per-vCPU results migration/docs: Move

Re: [PATCH 0/2] docs: Avoid duplicate labels with a sphinx extn

2025-06-09 Thread Peter Maydell
Ping^2 on this one? -- PMM On Mon, 19 May 2025 at 15:32, Peter Maydell wrote: > > Ping? Any opinions on this? > > In the interim we've applied commit 82707dd4f0 to drop > the specific duplicate-label that is causing problems > right now, so patch 2 here will need the o

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 11:53:47AM -0400, Peter Xu wrote: > On Mon, Jun 09, 2025 at 04:43:40PM +0100, Daniel P. Berrangé wrote: > > On Mon, Jun 09, 2025 at 11:33:14AM -0400, Peter Xu wrote: > > > > > > Now I think I know part of what I've missed: I used to thi

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 04:43:40PM +0100, Daniel P. Berrangé wrote: > On Mon, Jun 09, 2025 at 11:33:14AM -0400, Peter Xu wrote: > > > > Now I think I know part of what I've missed: I used to think the "config" > > of per-QMP-migrate-command can be totally te

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 11:37:02AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Jun 06, 2025 at 05:23:18PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Mon, Jun 02, 2025 at 10:38:08PM -0300, Fabiano Rosas wrote: >

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-09 Thread Peter Xu
On Mon, Jun 09, 2025 at 04:03:01PM +0100, Daniel P. Berrangé wrote: > On Fri, Jun 06, 2025 at 04:50:54PM -0400, Peter Xu wrote: > > On Fri, Jun 06, 2025 at 05:23:18PM -0300, Fabiano Rosas wrote: > > > Peter Xu writes: > > > > > > > On Mon, Jun 02, 2025 a

Re: [PATCH] hw/arm/smmuv3: Fix incorrect reserved mask for SMMU CR0 register

2025-06-09 Thread Peter Maydell
On Thu, 5 Jun 2025 at 03:26, wrote: > > From: Tao Tang > > The current definition of the SMMU_CR0_RESERVED mask is incorrect. > It mistakenly treats bit 10 (DPT_WALK_EN) as a reserved bit This is because our implementation pre-dates the revision of the SMMUv3 spec which adds the DPT and this DPT

Re: [PATCH] tests/functional: Add a test for the realview-eb-mpcore machine

2025-06-09 Thread Peter Maydell
On Tue, 3 Jun 2025 at 11:15, Thomas Huth wrote: > > From: Thomas Huth > > Check that we can boot a Linux kernel here and that we can at > least send one ping network packet. > > Signed-off-by: Thomas Huth > --- > MAINTAINERS | 1 + > tests/functional/meson.build

Re: [PATCH] hw/arm/virt: Check bypass iommu is not set for iommu-map DT property

2025-06-09 Thread Peter Maydell
On Tue, 3 Jun 2025 at 10:50, Eric Auger wrote: > > Hi Shameer, > > On 6/2/25 1:46 PM, Shameer Kolothum wrote: > > default_bus_bypass_iommu tells us whether the bypass_iommu is set > > for the default PCIe root bus. Make sure we check that before adding > > the "iommu-map" DT property. > > > > Fixe

[PATCH 2/2] target/arm: Implement ID_AA64PFR2_EL1

2025-06-09 Thread Peter Maydell
ere are the ones documented in rev L.a of the Arm ARM. Signed-off-by: Peter Maydell --- target/arm/cpu-features.h | 5 + target/arm/cpu.h | 1 + target/arm/helper.c | 6 -- target/arm/hvf/hvf.c | 2 ++ target/arm/kvm.c | 2 ++ 5 files changed, 14 insertions(+)

[PATCH 1/2] target/arm: Move ID register field defs to cpu-features.h

2025-06-09 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 --- linux-user/arm/target_proc.h | 2 + target/arm

[PATCH 0/2] target/arm: Implement ID_AA64PFR2_EL1

2025-06-09 Thread Peter Maydell
Cv5 patches ready to send. (Compare commit f7ddd7b6a1f90c from last year which added the ID_AA64MMFR3_EL1 register.) thanks -- PMM Peter Maydell (2): target/arm: Move ID register field defs to cpu-features.h target/arm: Implement ID_AA64PFR2_EL1 linux-user/arm/target_proc.h | 2 + target/ar

Re: [PATCH v3 2/2] hw/arm: Add the romfile compatatibility

2025-06-09 Thread Peter Maydell
On Mon, 9 Jun 2025 at 08:34, Shaoqin Huang wrote: > > On arm64, it doesn't use the vgabios-ramfb.bin, so set the property > "use-legacy-x86-rom" to false, thus the ramfb won't load the > vgabios-ramfb.bin. > > This can mitigate the problem that on release version the qemu can't > find the vgabios-

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-06 Thread Peter Xu
On Fri, Jun 06, 2025 at 05:23:18PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 02, 2025 at 10:38:08PM -0300, Fabiano Rosas wrote: > >> Allow the migrate and migrate_incoming commands to pass the migration > >> configuration options all

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-06 Thread Peter Xu
this command can receive the entire migration > +# configuration via the @config field, dispensing the use of > +# @migrate-set-parameters. > +# > # Since: 2.3 > # > # .. admonition:: Notes > @@ -1610,7 +1629,9 @@ > { 'command': 'migrate-incoming', > 'data': {'*uri': 'str', >'*channels': [ 'MigrationChannel' ], > - '*exit-on-error': 'bool' } } > + '*config': 'MigrationParameters', > + '*exit-on-error': 'bool' }, > + 'features': [ 'config' ] } > > ## > # @xen-save-devices-state: > diff --git a/system/vl.c b/system/vl.c > index 3b7057e6c6..b29fd24d08 100644 > --- a/system/vl.c > +++ b/system/vl.c > @@ -2823,7 +2823,8 @@ void qmp_x_exit_preconfig(Error **errp) > g_new0(MigrationChannelList, 1); > > channels->value = incoming_channels[MIGRATION_CHANNEL_TYPE_MAIN]; > -qmp_migrate_incoming(NULL, true, channels, true, true, > &local_err); > +qmp_migrate_incoming(NULL, true, channels, NULL, true, true, > + &local_err); > if (local_err) { > error_reportf_err(local_err, "-incoming %s: ", incoming); > exit(1); > -- > 2.35.3 > -- Peter Xu

Re: [PATCH 18/21] qapi/migration: Deprecate capabilities commands

2025-06-06 Thread Peter Xu
> > - migrate-set-capabilities > - query-migrate-capabilities > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 17/21] migration: Remove s->capabilities

2025-06-06 Thread Peter Xu
goes > away. We can check each capability by name (if s->parameters.cap ...) > > - savevm uses the helper functions introduced in the last patch to do > validation of capabilities found on the migration stream. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 15/21] migration: Add capabilities into MigrationParameters

2025-06-06 Thread Peter Xu
on > and the new representation as members of MigrationParameters. > > Signed-off-by: Fabiano Rosas Acked-by: Peter Xu -- Peter Xu

Re: [PATCH 14/21] migration: Cleanup hmp_info_migrate_parameters

2025-06-06 Thread Peter Xu
> - Remove the if (params), qmp_query_migrate_parameters never returns > NULL. > > - Add a macro to encapsulate boilerplate. > > - Line breaks for legibility. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 09/21] migration: Extract code to mark all parameters as present

2025-06-06 Thread Peter Xu
On Fri, Jun 06, 2025 at 12:51:58PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 02, 2025 at 10:37:58PM -0300, Fabiano Rosas wrote: > >> MigrationParameters needs to have all of its has_* fields marked as > >> true when used as the return of qu

Re: [PATCH 05/21] migration: Add a flag to track block-bitmap-mapping input

2025-06-06 Thread Peter Xu
On Fri, Jun 06, 2025 at 12:43:04PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 02, 2025 at 10:37:54PM -0300, Fabiano Rosas wrote: > >> The QAPI converts an empty list on the block-bitmap-mapping input into > >> a NULL BitmapMigrationNodeAliasL

Re: [PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-06 Thread Peter Xu
_dirty_limit_period = > s->parameters.x_vcpu_dirty_limit_period; > -params->vcpu_dirty_limit = s->parameters.vcpu_dirty_limit; > -params->mode = s->parameters.mode; > -params->zero_page_detection = s->parameters.zero_page_detection; > -params->direct_io = s->parameters.direct_io; > > /* > * query-migrate-parameters expects all members of > -- > 2.35.3 > -- Peter Xu

Re: [PATCH 09/21] migration: Extract code to mark all parameters as present

2025-06-06 Thread Peter Xu
rameters.mode; > -params->has_zero_page_detection = true; > params->zero_page_detection = s->parameters.zero_page_detection; > -params->has_direct_io = true; > params->direct_io = s->parameters.direct_io; > > +/* > + * query-migrate-parameters expects all members of > + * MigrationParameters to be present, but we cannot mark them > + * non-optional in QAPI because the structure is also used for > + * migrate-set-parameters, which needs the optionality. Force all > + * parameters to be seen as present now. Note that this depends on > + * some form of default being set for every member of > + * MigrationParameters, currently done during qdev init using > + * migration_properties defined in this file. > + */ > +migrate_mark_all_params_present(params); > return params; > } > > -- > 2.35.3 > -- Peter Xu

Re: [PATCH 08/21] migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:37:57PM -0300, Fabiano Rosas wrote: > The QERR_INVALID_PARAMETER_VALUE macro is documented as not to be used > in new code. Remove the usage from migration/options.c. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 06/21] migration: Remove checks for s->parameters has_* fields

2025-06-06 Thread Peter Xu
eters not set by the user (i.e. 0) would override the > corresponding value in s->parameters. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 05/21] migration: Add a flag to track block-bitmap-mapping input

2025-06-06 Thread Peter Xu
mapping = > QAPI_CLONE(BitmapMigrationNodeAliasList, > params->block_bitmap_mapping); > -- > 2.35.3 > This is definitely unfortunate, and I'm still scratching my head on understanding why it's neces

[PATCH] hw/core: Permit devices to define an array of link properties

2025-06-06 Thread Peter Maydell
t the information like the target QOM type, but I have pulled out a new function object_resolve_and_typecheck() for the shared "given a QOM path and a type, give me the object or an error" code. Signed-off-by: Peter Maydell --- I want this specifically for the GICv5 interrupt controller dev

Re: [PATCH 0/4] system: Forbid alloca()

2025-06-06 Thread Peter Maydell
On Thu, 5 Jun 2025 at 20:35, Philippe Mathieu-Daudé wrote: > > Eradicate alloca() uses on system code, then enable > -Walloca to prevent new ones to creep back in. > > Philippe Mathieu-Daudé (4): > hw/gpio/pca9552: Avoid using g_newa() > backends/tpmL Avoid using g_alloca() > tests/unit/test

Re: [PATCH 03/21] qapi/migration: Don't document MigrationParameter

2025-06-05 Thread Peter Xu
e > completion. > > Documenting this enum only serves to duplicate documentation between > MigrationParameter and MigrationParameters. > > Add an exception to QAPIs pragma.json and stop documenting it. > > Signed-off-by: Fabiano Rosas Acked-by: Peter Xu -- Peter Xu

Re: [PATCH 02/21] migration: Remove MigrateSetParameters

2025-06-05 Thread Peter Xu
igned-off-by: Fabiano Rosas It's like some wish is going to come true.. Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH 01/21] migration: Normalize tls arguments

2025-06-05 Thread Peter Xu
name->u.n); > -params->tls_hostname->type = QTYPE_QSTRING; > -params->tls_hostname->u.s = strdup(""); > -} > -if (params->tls_authz > -&& params->tls_authz->type == QTYPE_QNULL) { > -qobject_unref(params->tls_authz->u.n); > -params->tls_authz->type = QTYPE_QSTRING; > -params->tls_authz->u.s = strdup(""); > -} > - > migrate_params_test_apply(params, &tmp); > > -if (!migrate_params_check(&tmp, errp)) { > -/* Invalid parameter */ > -return; > +if (migrate_params_check(&tmp, errp)) { > +migrate_params_apply(params, errp); > } > > -migrate_params_apply(params, errp); > +migrate_tls_opts_free(&tmp); > } > diff --git a/migration/options.h b/migration/options.h > index 82d839709e..999eee6f3b 100644 > --- a/migration/options.h > +++ b/migration/options.h > @@ -91,4 +91,5 @@ ZeroPageDetection migrate_zero_page_detection(void); > > bool migrate_params_check(MigrationParameters *params, Error **errp); > void migrate_params_init(MigrationParameters *params); > +void migrate_tls_opts_free(MigrationParameters *params); > #endif > diff --git a/migration/tls.c b/migration/tls.c > index 5cbf952383..8a89d3f767 100644 > --- a/migration/tls.c > +++ b/migration/tls.c > @@ -126,7 +126,7 @@ QIOChannelTLS *migration_tls_client_create(QIOChannel > *ioc, > } > > const char *tls_hostname = migrate_tls_hostname(); > -if (tls_hostname && *tls_hostname) { > +if (tls_hostname) { > hostname = tls_hostname; > } > > diff --git a/qapi/migration.json b/qapi/migration.json > index 41826bde45..fa42d94810 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -1293,9 +1293,9 @@ > '*cpu-throttle-initial': 'uint8', > '*cpu-throttle-increment': 'uint8', > '*cpu-throttle-tailslow': 'bool', > -'*tls-creds': 'str', > -'*tls-hostname': 'str', > -'*tls-authz': 'str', > +'*tls-creds': 'StrOrNull', > +'*tls-hostname': 'StrOrNull', > +'*tls-authz': 'StrOrNull', > '*max-bandwidth': 'size', > '*avail-switchover-bandwidth': 'size', > '*downtime-limit': 'uint64', > -- > 2.35.3 > -- Peter Xu

Re: [PATCH] virtio: avoid cost of -ftrivial-auto-var-init in hot path

2025-06-05 Thread Peter Maydell
On Thu, 5 Jun 2025 at 17:18, Philippe Mathieu-Daudé wrote: > > On 5/6/25 14:50, Stefan Hajnoczi wrote: > > On Thu, Jun 05, 2025 at 01:28:49PM +0200, Philippe Mathieu-Daudé wrote: > >> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > >> index 85110bce374..b96c6ec603c 100644 > >> --- a/hw/virt

Re: [PATCH] hw/arm/mps2: Configure the AN500 CPU with 16 MPU regions

2025-06-05 Thread Peter Maydell
On Thu, 5 Jun 2025 at 15:18, Peter Maydell wrote: > > The AN500 application note documents that it configures the Cortex-M7 > CPU to have 16 MPU regions. We weren't doing this in our emulation, > so the CPU had only the default 8 MPU regions. Set the mpu-ns-regions > property

[PATCH] hw/arm/mps2: Configure the AN500 CPU with 16 MPU regions

2025-06-05 Thread Peter Maydell
d types we model in this source file, because they all use either the Cortex-M3 or Cortex-M4. Those CPUs do not have an RTL configurable number of MPU regions, and always provide 8 regions if the MPU is built in. Cc: qemu-sta...@nongnu.org Reported-by: Corentin GENDRE Signed-off-by: Peter Maydell -

Re: [PATCH v4 2/3] docs: define policy limiting the inclusion of generated files

2025-06-05 Thread Peter Maydell
On Thu, 5 Jun 2025 at 11:52, Markus Armbruster wrote: > +At times contributors may use or create scripts/tools to generate an initial > +boilerplate code template which is then filled in to produce the final patch. > +The output of such a tool would still be considered the "preferred format", > +s

Re: virsh migrate fails when --copy-storage-all option is given!

2025-06-04 Thread Peter Krempa
On Wed, Jun 04, 2025 at 14:41:54 +0200, Kevin Wolf wrote: > Am 28.05.2025 um 17:34 hat Peter Xu geschrieben: > > Copy Kevin. > > > > On Wed, May 28, 2025 at 07:21:12PM +0530, Anushree Mathur wrote: > > > Hi all, > > > > > > > > > When

Re: [PATCH 08/13] migration/postcopy: Report fault latencies in blocktime

2025-06-02 Thread Peter Xu
On Mon, Jun 02, 2025 at 11:26:36AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > 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 reque

Re: Is anybody still using the "highbank" or "midway" QEMU machines?

2025-06-02 Thread Peter Maydell
boot something on the "highbank" machine. > > Peter mentioned on IRC that he also does not test these machines > > by default, so we started wondering whether anybody is still > > using these machines? If not, we should maybe start the > > deprecation process

Re: [RFC PATCH] system/cpus: Only kick running vCPUs

2025-06-02 Thread Peter Maydell
On Mon, 2 Jun 2025 at 10:08, Philippe Mathieu-Daudé wrote: > > We shouldn't kick a stopped vCPU, as it will be resumed. What is this trying to fix? Do we get wrong-behaviour, or is it just a bit inefficient as the vcpu thread goes round its loop and decides it still has nothing to do? thanks --

[PULL 10/15] target/arm/cpu-features: Include missing 'cpu.h' header

2025-05-30 Thread Peter Maydell
_DIVIDE_SHIFT' 47 | return FIELD_EX32(id->id_isar0, ID_ISAR0, DIVIDE) != 0; |^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-id: 20250513173928.77376-7-phi...@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu-features.h

[PULL 04/15] docs/interop: convert text files to restructuredText

2025-05-30 Thread Peter Maydell
From: Souleymane Conte buglink: https://gitlab.com/qemu-project/qemu/-/issues/527 Signed-off-by: Souleymane Conte Reviewed-by: Peter Maydell Reviewed-by: Eric Blake Message-id: 20250522092622.40869-1-conte.souleym...@gmail.com [PMM: switched a few more bits of formatting to monospaced

[PULL 14/15] tests/functional: Add a test for the Stellaris arm machines

2025-05-30 Thread Peter Maydell
Message-id: 20250519170242.520805-1-th...@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- MAINTAINERS| 1 + tests/functional/meson.build | 1 + tests/functional/test_arm_stellaris.py | 48 ++ 3 files changed, 50

[PULL 08/15] target/arm/cpregs: Include missing 'target/arm/cpu.h' header

2025-05-30 Thread Peter Maydell
ARMState *env, const ARMCPRegInfo *opaque); ^ Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-id: 20250513173928.77376-5-phi...@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpregs.h | 1 + 1 file changed, 1 insertion(+) dif

[PULL 13/15] target/arm/hvf: Include missing 'cpu-qom.h' header

2025-05-30 Thread Peter Maydell
rom_host(ARMCPU *cpu); | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-id: 20250513173928.77376-10-phi...@linaro.org Signed-off-by: Peter Maydell --- target/arm/hvf_arm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ar

[PULL 06/15] target/arm/hvf_arm: Avoid using poisoned CONFIG_HVF definition

2025-05-30 Thread Peter Maydell
Signed-off-by: Peter Maydell --- MAINTAINERS| 1 + target/arm/hvf_arm.h | 16 target/arm/hvf-stub.c | 20 target/arm/meson.build | 1 + 4 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 target/arm/hvf-stub.c diff --git a/M

[PULL 15/15] hw/block: Drop unused nand.c

2025-05-30 Thread Peter Maydell
Remove the NAND device code entirely; this is effectively leftover cleanup from when we dropped the PXA boards and the OMAP boards other than the sx1. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20250522142859.3122389-1-peter.may

[PULL 02/15] tests/qtest: Migrate GMAC test from 7xx to 8xx

2025-05-30 Thread Peter Maydell
...@google.com Reviewed-by: Tyrone Ting Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- tests/qtest/npcm_gmac-test.c | 85 ++-- tests/qtest/meson.build | 6 ++- 2 files changed, 86 insertions(+), 5 deletions(-) diff --git a/tests/qtest/npcm_gmac-test.c

[PULL 12/15] target/arm/kvm: Include missing 'cpu-qom.h' header

2025-05-30 Thread Peter Maydell
MCPU *cpu, int level); | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-id: 20250513173928.77376-9-phi...@linaro.org Signed-off-by: Peter Maydell --- target/arm/kvm_arm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/kvm_arm.h b/target

[PULL 03/15] hw/arm: Add missing psci_conduit to NPCM8XX SoC boot info

2025-05-30 Thread Peter Maydell
nongnu.org Cc: Hao Wu Cc: Peter Maydell Signed-off-by: Guenter Roeck Message-id: 20250315142050.3642741-1-li...@roeck-us.net Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/npcm8xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/npcm8xx.c b/hw/arm/npcm8

[PULL 11/15] target/arm/qmp: Include missing 'cpu.h' header

2025-05-30 Thread Peter Maydell
G_ON(ARM_MAX_VQ > 16); | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-id: 20250513173928.77376-8-phi...@linaro.org Signed-off-by: Peter Maydell --- target/arm/arm-qmp-cmds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/arm-qmp-

[PULL 07/15] target/arm: Only link with zlib when TCG is enabled

2025-05-30 Thread Peter Maydell
ned-off-by: Peter Maydell --- target/arm/meson.build | 1 - target/arm/tcg/meson.build | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 2747f4b404c..dcba4ef3792 100644 --- a/target/arm/meson.build +++ b/target/arm/m

[PULL 01/15] hw/arm: Add GMAC devices to NPCM8XX SoC

2025-05-30 Thread Peter Maydell
: 20250508220718.735415-2-nabiheste...@google.com Reviewed-by: Tyrone Ting Signed-off-by: Peter Maydell --- include/hw/arm/npcm8xx.h | 5 +++- hw/arm/npcm8xx.c | 54 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/include/hw/arm/npcm8xx.h b

[PULL 09/15] hw/arm/boot: Include missing 'system/memory.h' header

2025-05-30 Thread Peter Maydell
tl_notdirty' is invalid in C99 [-Werror,-Wimplicit-function-declaration] address_space_stl_notdirty(as, info->smp_bootreg_addr, ^ Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-id: 20250513173928.77376-6-phi...@linaro.org Signed-off-by: Peter Maydell

[PULL 00/15] target-arm queue

2025-05-30 Thread Peter Maydell
est from 7xx to 8xx Peter Maydell (1): hw/block: Drop unused nand.c Philippe Mathieu-Daudé (9): target/arm/tcg-stubs: compile file once (system) target/arm/hvf_arm: Avoid using poisoned CONFIG_HVF definition target/arm: Only link with zlib when TCG is enabled ta

[PULL 05/15] target/arm/tcg-stubs: compile file once (system)

2025-05-30 Thread Peter Maydell
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-id: 20250513173928.77376-2-phi...@linaro.org Signed-off-by: Peter Maydell --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH v4 00/27] hw/i386/pc: Remove deprecated 2.6 and 2.7 PC machines

2025-05-30 Thread Peter Krempa
On Fri, May 30, 2025 at 07:35:38 -0400, Michael S. Tsirkin via Devel wrote: > On Tue, May 13, 2025 at 01:23:38PM +0200, Igor Mammedov wrote: > > On Thu, 8 May 2025 15:35:23 +0200 > > Philippe Mathieu-Daudé wrote: > > > > > Since v3: > > > - Addressed Thomas and Zhao review comments > > > - Renam

Re: [PATCH] tests/functional: Add a test for the Stellaris arm machines

2025-05-29 Thread Peter Maydell
On Mon, 19 May 2025 at 18:02, Thomas Huth wrote: > > From: Thomas Huth > > The 2023 edition of the QEMU advent calendar featured an image > that we can use to test whether the lm3s6965evb machine is basically > still working. > > And for the lm3s811evb there is a small test kernel on github > whi

Re: [PATCH 05/11] migration: Drop save_live_complete_postcopy hook

2025-05-29 Thread Peter Xu
On Thu, May 29, 2025 at 04:48:41PM +0200, Juraj Marcin wrote: > On 2025-05-29 16:42, Juraj Marcin wrote: > > Hi Peter Hey, Juraj! > > > > On 2025-05-27 17:58, Peter Xu wrote: > > > The hook is only defined in two vmstate users ("ram" and "block

Re: [PATCH 00/19] target/arm: More header rework around arm_feature() & multiprocessing.h

2025-05-29 Thread Peter Maydell
On Tue, 13 May 2025 at 18:39, Philippe Mathieu-Daudé wrote: > > Before I respin my "single-binary: Make hw/arm/ common" [1] I'm > extracting these random cleanup patches. Some aren't necessary > anymore because now units in arm_common_ss[] can access "cpu.h", > but the patches are reviewed and sim

Re: [PATCH v3] docs/interop: convert text files to restructuredText

2025-05-29 Thread Peter Maydell
On Thu, 22 May 2025 at 10:27, wrote: > > From: Souleymane Conte > > buglink: https://gitlab.com/qemu-project/qemu/-/issues/527 > > Signed-off-by: Souleymane Conte > Reviewed-by: Peter Maydell > Reviewed-by: Eric Blake Thanks; I have applied this to target-arm.n

  1   2   3   4   5   6   7   8   9   10   >