Re: [PATCH 1/3] qtest: migration: Enhance qtest migration functions to support 'channels' argument

2024-02-20 Thread Het Gala
On 21/02/24 7:54 am, Peter Xu wrote: On Tue, Feb 20, 2024 at 06:14:46PM +, Het Gala wrote: From: Peter Xu Date: Tuesday, 20 February 2024 at 11:33 AM To: Het Gala Cc:qemu-devel@nongnu.org ,arm...@redhat.com ,berra...@redhat.com ,faro...@suse.de Subject: Re: [PATCH 1/3] qtest: migrat

[PATCH] hw/virtio: Add support for VDPA network simulation devices

2024-02-20 Thread Hao Chen
This patch adds support for VDPA network simulation devices. The device is developed based on virtio-net and tap backend, and supports hardware live migration function. For more details, please refer to "docs/system/devices/vdpa-net.rst" Signed-off-by: Hao Chen --- MAINTAINERS

[PATCH] tests: skip dbus-display tests that need a console

2024-02-20 Thread marcandre . lureau
From: Marc-André Lureau When compiling with "configure --without-default-devices", the dbus-display-test fails since it implicitly assumes that the machine comes with a default console. There doesn't seem to be an easy way to figure this during build time, so skip the tests requiring the Console

[PATCH v2] hw/intc: Handle the error of IOAPICCommonClass.realize()

2024-02-20 Thread Zhao Liu
From: Zhao Liu IOAPICCommonClass implements its own private realize(), and this private realize() allows error. Therefore, return directly if IOAPICCommonClass.realize() meets error. Signed-off-by: Zhao Liu --- v2: Add the missing ERRP_GUARD(). (Markus) --- hw/intc/ioapic_common.c | 4 1

Re: [PATCH 3/3] .gitlab-ci.d/windows.yml: Remove shared-msys2 abstraction

2024-02-20 Thread Thomas Huth
On 20/02/2024 19.06, Daniel P. Berrangé wrote: On Tue, Feb 20, 2024 at 05:44:12PM +, Peter Maydell wrote: Now we don't build msys2-32bit we don't need the abstraction out of the common msys2 handling from the 32-vs-64-bit specifics. Collapse it down into the msys2-64bit job definition. Sign

Re: [PATCH 2/3] .gitlab-ci.d: Drop cross-win32-system job

2024-02-20 Thread Thomas Huth
On 20/02/2024 18.44, Peter Maydell wrote: We don't support 32-bit Windows any more, so we don't need to defend it with this CI job. Signed-off-by: Peter Maydell --- .gitlab-ci.d/container-cross.yml | 5 - .gitlab-ci.d/crossbuilds.yml | 14 --- .../dockerfile

Re: [PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-20 Thread Yong Huang
On Wed, Feb 21, 2024 at 2:43 PM Markus Armbruster wrote: > Hyman Huang writes: > > > Add comment in detail for commit 433957bb7f (qapi: > > Make parameter 'file' optional for > > BlockdevCreateOptionsLUKS). > > > > Signed-off-by: Hyman Huang > > --- > > qapi/block-core.json | 20 ++

Re: [PATCH 1/3] docs: Document that 32-bit Windows is unsupported

2024-02-20 Thread Thomas Huth
On 20/02/2024 18.44, Peter Maydell wrote: --- docs/about/build-platforms.rst | 2 ++ docs/about/removed-features.rst | 15 +++ 2 files changed, 17 insertions(+) diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst index f2a7aec56ff..8fd7da140a3 100644 --

Re: [PATCH] qapi: Misc cleanups to migrate QAPIs

2024-02-20 Thread Het Gala
Sorry Markus, firstly I thought its just regarding qapi documentation so migration maintainers might not be needed ? but then I realize the commit message fails to specify that IIRC, you are one of the maintainers for qapi. So, just cc'd to you, but you are right, should have done to migration

Re: [PATCH 2/3] .gitlab-ci.d: Drop cross-win32-system job

2024-02-20 Thread Thomas Huth
On 20/02/2024 19.55, Daniel P. Berrangé wrote: On Tue, Feb 20, 2024 at 07:46:37PM +0100, Philippe Mathieu-Daudé wrote: On 20/2/24 18:44, Peter Maydell wrote: We don't support 32-bit Windows any more, so we don't need to defend it with this CI job. Signed-off-by: Peter Maydell --- .gitlab-c

Re: [PATCH qemu-web] _download/windows.md: Drop 32-bit Windows support

2024-02-20 Thread Thomas Huth
On 20/02/2024 19.06, Peter Maydell wrote: 32-bit Windows is no longer a supported platform for QEMU, and both MSYS2 and Stefan Weil have stopped building 32-bit packages of it. Remove the no-longer-working i686 pacman rune, and state explicitly that 32 bit Windows isn't supported. Fix a grammar

Re: [PATCH] qapi: Misc cleanups to migrate QAPIs

2024-02-20 Thread Markus Armbruster
You neglected to cc: migration maintainers; I'm doing that for you now. Peter or Fabiano, please have a look. Het Gala writes: > Signed-off-by: Het Gala > --- > qapi/migration.json | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/qapi/migration.json b/qap

Re: [PATCH] hw/char/pl011: Add support for loopback

2024-02-20 Thread Ho, Tong
On Thu, Feb 8, 2024 at 3:36 AM, Peter Maydell wrote: > This implementation will send the transmitted characters > to the QEMU chardev and also loop them back into the UART > when loopback is enabled. Similarly if we receive a character > from the real input we will put it into the FIFO still, so

Re: [RFC 1/4] drive-mirror: add support for sync=bitmap mode=never

2024-02-20 Thread Markus Armbruster
Fiona Ebner writes: > From: John Snow > > This patch adds support for the "BITMAP" sync mode to drive-mirror and > blockdev-mirror. It adds support only for the BitmapSyncMode "never," > because it's the simplest mode. > > This mode simply uses a user-provided bitmap as an initial copy > manifes

Re: [PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-20 Thread Markus Armbruster
Hyman Huang writes: > Add comment in detail for commit 433957bb7f (qapi: > Make parameter 'file' optional for > BlockdevCreateOptionsLUKS). > > Signed-off-by: Hyman Huang > --- > qapi/block-core.json | 20 +++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/q

[PATCH v7] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-02-20 Thread Shaoqin Huang
The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide which PMU events are provided to the guest. Add a new option `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. Without the filter, all PMU events are exposed from host to guest by default. The usage of the n

Re: [PATCH 0/8] tests/unit/test-smp-parse.c: Add more CPU topology test cases

2024-02-20 Thread Zhao Liu
Hi Philippe, Could you pls help me review this series? ...Except you, I'm not sure the other machine core maintainers will review this. If this series is acceptable, next I can add module level test case, cache topology test case and more clean up based on this. Thanks, Zhao On Mon, Jan 29, 20

Re: [PATCH v6] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-02-20 Thread Shaoqin Huang
Hi Eric, On 2/15/24 17:13, Eric Auger wrote: Hi Shaoqin, On 2/1/24 09:51, Shaoqin Huang wrote: The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide which PMU events are provided to the guest. Add a new option `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filteri

Re: [PATCH v3] pc: q35: Bump max_cpus to 4096 vcpus

2024-02-20 Thread Ani Sinha
> On 20-Feb-2024, at 21:46, Gerd Hoffmann wrote: > > On Tue, Feb 20, 2024 at 03:50:57PM +, Daniel P. Berrangé wrote: >> On Tue, Feb 20, 2024 at 09:12:04PM +0530, Ani Sinha wrote: >>> Since commit f10a570b093e6 ("KVM: x86: Add CONFIG_KVM_MAX_NR_VCPUS to allow >>> up to 4096 vCPUs") >>> Lin

Re: [PATCH 18/23] plugins: add an API to read registers

2024-02-20 Thread Akihiko Odaki
On 2024/02/20 23:14, Alex Bennée wrote: Akihiko Odaki writes: On 2024/02/17 1:30, Alex Bennée wrote: We can only request a list of registers once the vCPU has been initialised so the user needs to use either call the get function on vCPU initialisation or during the translation phase. We don'

Re: [PATCH v1 13/21] hw/riscv/virt.h: correct typos

2024-02-20 Thread Alistair Francis
On Tue, Feb 20, 2024 at 6:55 PM Manos Pitsidianakis wrote: > > Correct typos automatically found with the `typos` tool > > > Signed-off-by: Manos Pitsidianakis Reviewed-by: Alistair Francis Alistair > --- > include/hw/riscv/virt.h | 4 ++-- > 1 file changed,

Re: [PATCH 5/5] tests: Add migration test for loongarch64

2024-02-20 Thread Peter Xu
On Wed, Feb 21, 2024 at 11:47:27AM +0800, maobibo wrote: > Now loongarch virt machine type is not full-featured, it will be long-term > issue to keep compatible ability access different qemu versions or kernel > versions. It is a big challenge for us, now the main purpose of migration > test is tha

Re: [PATCH v3 2/3] virtio: Declare the decoding functions to static

2024-02-20 Thread Yong Huang
On Mon, Feb 19, 2024 at 11:38 PM Markus Armbruster wrote: > Hyman Huang writes: > > > qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() > > are now only used in virtio-hmp-cmds.c. So move them into there, > > redeclare them to static, and replace the qmp_ prefix with hmp_.

[PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-20 Thread Hyman Huang
Add comment in detail for commit 433957bb7f (qapi: Make parameter 'file' optional for BlockdevCreateOptionsLUKS). Signed-off-by: Hyman Huang --- qapi/block-core.json | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.js

Re: [PATCH v1 07/21] sh4: correct typos

2024-02-20 Thread Yoshinori Sato
On Tue, 20 Feb 2024 17:52:14 +0900, Manos Pitsidianakis wrote: > > Correct typos automatically found with the `typos` tool > > > Signed-off-by: Manos Pitsidianakis > --- > hw/sh4/sh7750_regs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --g

Re: [PATCH 1/2] migration/multifd: Cleanup TLS iochannel referencing

2024-02-20 Thread Peter Xu
On Thu, Feb 08, 2024 at 04:10:58PM +0200, Avihai Horon wrote: > > On 08/02/2024 5:51, pet...@redhat.com wrote: > > External email: Use caution opening links or attachments > > > > > > From: Peter Xu > > > > Commit a1af605bd5 ("migration/multifd: fix hangup with TLS-Multifd due to > > blocking

Re: [PATCH 2/2] migration/multifd: Drop registered_yank

2024-02-20 Thread Peter Xu
On Thu, Feb 08, 2024 at 09:48:33AM -0300, Fabiano Rosas wrote: > pet...@redhat.com writes: > > > From: Peter Xu > > > > With a clear definition of p->c protocol, where we only set it up if the > > channel is fully established (TLS or non-TLS), registered_yank boolean will > > have equal meaning o

Re: [PATCH 5/5] tests: Add migration test for loongarch64

2024-02-20 Thread Peter Xu
On Tue, Feb 20, 2024 at 08:41:26PM +0800, Bibo Mao wrote: > @@ -823,6 +827,12 @@ static int test_migrate_start(QTestState **from, > QTestState **to, > arch_opts = g_strdup_printf("-cpu max -kernel %s", bootpath); > start_address = ARM_TEST_MEM_START; > end_address = ARM_

Re: [PATCH] migration: Fix qmp_query_migrate mbps value

2024-02-20 Thread Peter Xu
On Mon, Feb 19, 2024 at 04:44:57PM -0300, Fabiano Rosas wrote: > The QMP command query_migrate might see incorrect throughput numbers > if it runs after we've set the migration completion status but before > migration_calculate_complete() has updated s->total_time and s->mbps. > > The migration st

Re: [PATCH v5 4/7] target/riscv/translate.c: remove 'cpu_vstart' global

2024-02-20 Thread Richard Henderson
On 2/20/24 16:22, Daniel Henrique Barboza wrote: The global is unused after recent changes. Signed-off-by: Daniel Henrique Barboza --- target/riscv/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Richard Henderson Does this leave exactly one use of cpu_v

[PATCH v5 5/7] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()

2024-02-20 Thread Daniel Henrique Barboza
The helper isn't setting env->vstart = 0 after its execution, as it is expected from every vector instruction that completes successfully. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson --- target/riscv/vector_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/t

[PATCH v5 4/7] target/riscv/translate.c: remove 'cpu_vstart' global

2024-02-20 Thread Daniel Henrique Barboza
The global is unused after recent changes. Signed-off-by: Daniel Henrique Barboza --- target/riscv/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 177418b2b9..f2f0593830 100644 --- a/target/riscv/transla

[PATCH v5 2/7] trans_rvv.c.inc: remove 'is_store' bool from load/store fns

2024-02-20 Thread Daniel Henrique Barboza
After the 'mark_vs_dirty' changes from the previous patch the 'is_store' bool is unused in all load/store functions that were changed. Remove it. Signed-off-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc | 69 - 1 file changed, 34 insertions(+), 3

Re: [PATCH 1/3] qtest: migration: Enhance qtest migration functions to support 'channels' argument

2024-02-20 Thread Peter Xu
On Tue, Feb 20, 2024 at 06:14:46PM +, Het Gala wrote: > > > From: Peter Xu > Date: Tuesday, 20 February 2024 at 11:33 AM > To: Het Gala > Cc: qemu-devel@nongnu.org , arm...@redhat.com > , berra...@redhat.com , > faro...@suse.de > Subject: Re: [PATCH 1/3] qtest: migration: Enhance qtest m

[PATCH v5 6/7] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls

2024-02-20 Thread Daniel Henrique Barboza
trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson ---

[PATCH v5 7/7] target/riscv: Clear vstart_qe_zero flag

2024-02-20 Thread Daniel Henrique Barboza
From: Ivan Klokov The vstart_qe_zero flag is set at the beginning of the translation phase from the env->vstart variable. During the execution phase all functions will set env->vstart = 0 after a successful execution, but the vstart_eq_zero flag remains the same as at the start of the block. This

[PATCH v5 3/7] target/riscv: remove 'over' brconds from vector trans

2024-02-20 Thread Daniel Henrique Barboza
Most of the vector translations has this following pattern at the start: TCGLabel *over = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_GEU, cpu_vstart, cpu_vl, over); And then right at the end: gen_set_label(over); return true; This means that if vstart >= vl we'll not set vsta

[PATCH v5 1/7] trans_rvv.c.inc: mark_vs_dirty() before loads and stores

2024-02-20 Thread Daniel Henrique Barboza
While discussing a problem with how we're (not) setting vstart_eq_zero Richard had the following to say w.r.t the conditional mark_vs_dirty() calls on load/store functions [1]: "I think it's required to have stores set dirty unconditionally, before the operation. Consider a store that traps on th

[PATCH v5 0/7] riscv: set vstart_eq_zero on mark_vs_dirty

2024-02-20 Thread Daniel Henrique Barboza
Hi, In this new version we removed the remaining brconds() from trans_rvbf16.c.inc like Richard suggested in patch 3. Richard, I kept your ack in that patch. This change caused the 'cpu_vstart' global to be unused. A new patch (4) was added to remove it. Series based on alistair/riscv-to-apply.n

Re: [PATCH V3 00/13] allow cpr-reboot for vfio

2024-02-20 Thread Peter Xu
On Tue, Feb 20, 2024 at 05:32:34PM -0500, Steven Sistare wrote: > On 2/20/2024 2:49 AM, Peter Xu wrote: > > On Thu, Feb 08, 2024 at 10:53:53AM -0800, Steve Sistare wrote: > >> Allow cpr-reboot for vfio if the guest is in the suspended runstate. The > >> guest drivers' suspend methods flush outstan

Re: [PATCH v4 02/36] linux-user: Adjust SVr4 NULL page mapping

2024-02-20 Thread Richard Henderson
On 2/16/24 01:35, Alex Bennée wrote: Richard Henderson writes: Use TARGET_PAGE_SIZE and MAP_FIXED_NOREPLACE. We really should be attending to this earlier during probe_guest_base, as well as better detection and emulation of various Linux personalities. Do we know all our supported systems

Re: [PATCH 4/5] hw/loongarch: Set minimium memory size as 256M

2024-02-20 Thread maobibo
On 2024/2/21 上午12:47, Thomas Huth wrote: On 20/02/2024 13.41, Bibo Mao wrote: The minium memory size for LoongArch UEFI bios is 256M, also some test cases such as migration and qos uses parameter 256M. Here set minium memory size for Loongarch VirtMachine with 256M, also default memory size

Re: [PATCH v4 3/6] target/riscv: remove 'over' brconds from vector trans

2024-02-20 Thread Richard Henderson
On 2/20/24 12:25, Daniel Henrique Barboza wrote: target/riscv/insn_trans/trans_rvv.c.inc | 117 --- target/riscv/insn_trans/trans_rvvk.c.inc | 18 2 files changed, 135 deletions(-) There are additional instances in trans_rvbf16.c.inc, including extra useless check

Re: [PATCH v4 2/6] trans_rvv.c.inc: remove 'is_store' bool from load/store fns

2024-02-20 Thread Richard Henderson
On 2/20/24 12:25, Daniel Henrique Barboza wrote: After the 'mark_vs_dirty' changes from the previous patch the 'is_store' bool is unused in all load/store functions that were changed. Remove it. Signed-off-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc | 69 +++

Re: [PATCH v4 1/6] trans_rvv.c.inc: mark_vs_dirty() before loads and stores

2024-02-20 Thread Richard Henderson
On 2/20/24 12:25, Daniel Henrique Barboza wrote: While discussing a problem with how we're (not) setting vstart_eq_zero Richard had the following to say w.r.t the conditional mark_vs_dirty() calls on load/store functions [1]: "I think it's required to have stores set dirty unconditionally, befor

[PATCH v3] docs/system/ppc: Document running Linux on AmigaNG machines

2024-02-20 Thread BALATON Zoltan
Documentation on how to run Linux on the amigaone, pegasos2 and sam460ex machines is currently buried in the depths of the qemu-devel mailing list and in the source code. Let's collect the information in the QEMU handbook for a one stop solution. Co-authored-by: Bernhard Beschow Signed-off-by: BA

Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-20 Thread Bernhard Beschow
Am 20. Februar 2024 16:06:14 UTC schrieb Peter Maydell : >In the i386 PC machine, we want to run the pc_cmos_init_late() >function only once the IDE and floppy drive devices have been set up. >We currently do this using qemu_register_reset(), and then have the >function call qemu_unregister_res

[PATCH v4 10/34] migration/qemu-file: add utility methods for working with seekable channels

2024-02-20 Thread Fabiano Rosas
Add utility methods that will be needed when implementing 'fixed-ram' migration capability. Signed-off-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé --- - handling EAGAIN and partial reads/writes - removed the list of functions from the commit message --- include/migration/qemu-file-types.h

[PATCH v4 09/34] io: fsync before closing a file channel

2024-02-20 Thread Fabiano Rosas
Make sure the data is flushed to disk before closing file channels. This is to ensure data is on disk and not lost in the event of a host crash. This is currently being implemented to affect the migration code when migrating to a file, but all QIOChannelFile users should benefit from the change.

[PATCH v4 34/34] tests/qtest/migration: Add a test for fixed-ram with passing of fds

2024-02-20 Thread Fabiano Rosas
Add a multifd test for fixed-ram with passing of fds into QEMU. This is how libvirt will consume the feature. There are a couple of details to the fdset mechanism: - multifd needs two distinct file descriptors (not duplicated with dup()) on the outgoing side so it can enable O_DIRECT only on th

[PATCH v4 33/34] migration: Add support for fdset with multifd + file

2024-02-20 Thread Fabiano Rosas
Allow multifd to use an fdset when migrating to a file. This is useful for the scenario where the management layer wants to have control over the migration file. By receiving the file descriptors directly, QEMU can delegate some high level operating system operations to the management layer (such

[PATCH v4 08/34] io: implement io_pwritev/preadv for QIOChannelFile

2024-02-20 Thread Fabiano Rosas
From: Nikolay Borisov The upcoming 'fixed-ram' feature will require qemu to write data to (and restore from) specific offsets of the migration file. Add a minimal implementation of pwritev/preadv and expose them via the io_pwritev and io_preadv interfaces. Signed-off-by: Nikolay Borisov Review

[PATCH v4 27/34] migration: Add direct-io parameter

2024-02-20 Thread Fabiano Rosas
Add the direct-io migration parameter that tells the migration code to use O_DIRECT when opening the migration stream file whenever possible. This is currently only used with the fixed-ram migration that has a clear window guaranteed to perform aligned writes. Signed-off-by: Fabiano Rosas --- i

[PATCH v4 07/34] io: Add generic pwritev/preadv interface

2024-02-20 Thread Fabiano Rosas
From: Nikolay Borisov Introduce basic pwritev/preadv support in the generic channel layer. Specific implementation will follow for the file channel as this is required in order to support migration streams with fixed location of each ram page. Signed-off-by: Nikolay Borisov Reviewed-by: Daniel

Re: [PATCH] vl, pc: turn -no-fd-bootchk into a machine property

2024-02-20 Thread Bernhard Beschow
Am 20. Februar 2024 15:53:52 UTC schrieb Paolo Bonzini : >Add a fd-bootchk property to PC machine types, so that -no-fd-bootchk >returns an error if the machine does not support booting from floppies >and checking for boot signatures therein. > >Suggested-by: Philippe Mathieu-Daudé >Signed-off-

[PATCH v4 13/34] migration/ram: Add outgoing 'fixed-ram' migration

2024-02-20 Thread Fabiano Rosas
Implement the outgoing migration side for the 'fixed-ram' capability. A bitmap is introduced to track which pages have been written in the migration file. Pages are written at a fixed location for every ramblock. Zero pages are ignored as they'd be zero in the destination migration as well. The m

[PATCH v4 16/34] migration/multifd: Rename MultiFDSend|RecvParams::data to compress_data

2024-02-20 Thread Fabiano Rosas
Use a more specific name for the compression data so we can use the generic for the multifd core code. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/multifd-zlib.c | 20 ++-- migration/multifd-zstd.c | 20 ++-- migration/multifd.h | 4 ++-

[PATCH v4 26/34] tests/qtest/migration: Add a multifd + fixed-ram migration test

2024-02-20 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 68 1 file changed, 68 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index d61f93b151..cb9f16f78e 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qt

[PATCH v4 14/34] migration/ram: Add incoming 'fixed-ram' migration

2024-02-20 Thread Fabiano Rosas
Add the necessary code to parse the format changes for the 'fixed-ram' capability. One of the more notable changes in behavior is that in the 'fixed-ram' case ram pages are restored in one go rather than constantly looping through the migration stream. Signed-off-by: Nikolay Borisov Signed-off-b

[PATCH v4 25/34] migration/multifd: Add fixed-ram support to fd: URI

2024-02-20 Thread Fabiano Rosas
If we receive a file descriptor that points to a regular file, there's nothing stopping us from doing multifd migration with fixed-ram to that file. Enable the fd: URI to work with multifd + fixed-ram. Signed-off-by: Fabiano Rosas --- migration/fd.c| 30 ++ m

[PATCH v4 02/34] tests/qtest/migration: Rename fd_proto test

2024-02-20 Thread Fabiano Rosas
Next patch adds another fd test. Rename the existing one closer to what's used on other tests, with the 'precopy' prefix. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qt

[PATCH v4 05/34] migration/multifd: Release recv sem_sync earlier

2024-02-20 Thread Fabiano Rosas
Now that multifd_recv_terminate_threads() is called only once, release the recv side sem_sync earlier like we do for the send side. Signed-off-by: Fabiano Rosas --- migration/multifd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migration/multifd.c b/migratio

[PATCH v4 19/34] migration/multifd: Allow receiving pages without packets

2024-02-20 Thread Fabiano Rosas
Currently multifd does not need to have knowledge of pages on the receiving side because all the information needed is within the packets that come in the stream. We're about to add support to fixed-ram migration, which cannot use packets because it expects the ramblock section in the migration fi

[PATCH v4 11/34] migration/ram: Introduce 'fixed-ram' migration capability

2024-02-20 Thread Fabiano Rosas
Add a new migration capability 'fixed-ram'. The core of the feature is to ensure that each RAM page has a specific offset in the resulting migration stream. The reasons why we'd want such behavior are: - The resulting file will have a bounded size, since pages which are dirtied multiple times

[PATCH v4 22/34] migration/multifd: Prepare multifd sync for fixed-ram migration

2024-02-20 Thread Fabiano Rosas
The fixed-ram migration can be performed live or non-live, but it is always asynchronous, i.e. the source machine and the destination machine are not migrating at the same time. We only need some pieces of the multifd sync operations. multifd_send_sync_main() Issued by t

[PATCH v4 32/34] monitor: fdset: Match against O_DIRECT

2024-02-20 Thread Fabiano Rosas
We're about to enable the use of O_DIRECT in the migration code and due to the alignment restrictions imposed by filesystems we need to make sure the flag is only used when doing aligned IO. The migration will do parallel IO to different regions of a file, so we need to use more than one file desc

[PATCH v4 31/34] monitor: Extract fdset fd flags comparison into a function

2024-02-20 Thread Fabiano Rosas
We're about to add one more condition to the flags comparison that requires an ifdef. Move the code into a separate function now to make it cleaner after the next patch. Signed-off-by: Fabiano Rosas --- monitor/fds.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --g

[PATCH v4 30/34] monitor: Honor QMP request for fd removal immediately

2024-02-20 Thread Fabiano Rosas
We're currently only removing an fd from the fdset if the VM is running. This causes a QMP call to "remove-fd" to not actually remove the fd if the VM happens to be stopped. While the fd would eventually be removed when monitor_fdset_cleanup() is called again, the user request should be honored an

[PATCH v4 17/34] migration/multifd: Decouple recv method from pages

2024-02-20 Thread Fabiano Rosas
Next patch will abstract the type of data being received by the channels, so do some cleanup now to remove references to pages and dependency on 'normal_num'. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/multifd-zlib.c | 6 +++--- migration/multifd-zstd.c | 6 +++--- migra

[PATCH v4 24/34] migration/multifd: Support incoming fixed-ram stream format

2024-02-20 Thread Fabiano Rosas
For the incoming fixed-ram migration we need to read the ramblock headers, get the pages bitmap and send the host address of each non-zero page to the multifd channel thread for writing. Usage on HMP is: (qemu) migrate_set_capability multifd on (qemu) migrate_set_capability fixed-ram on (qemu) mi

[PATCH v4 12/34] migration: Add fixed-ram URI compatibility check

2024-02-20 Thread Fabiano Rosas
The fixed-ram migration format needs a channel that supports seeking to be able to write each page to an arbitrary offset in the migration stream. Signed-off-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé --- migration/migration.c | 29 + 1 file changed, 29 insert

[PATCH v4 04/34] migration/multifd: Remove p->quit from recv side

2024-02-20 Thread Fabiano Rosas
Like we did on the sending side, replace the p->quit per-channel flag with a global atomic 'exiting' flag. Signed-off-by: Fabiano Rosas --- migration/multifd.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/migration/multifd.c b/mi

[PATCH v4 06/34] io: add and implement QIO_CHANNEL_FEATURE_SEEKABLE for channel file

2024-02-20 Thread Fabiano Rosas
From: Nikolay Borisov Add a generic QIOChannel feature SEEKABLE which would be used by the qemu_file* apis. For the time being this will be only implemented for file channels. Signed-off-by: Nikolay Borisov Reviewed-by: Daniel P. Berrangé Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --

[PATCH v4 15/34] tests/qtest/migration: Add tests for fixed-ram file-based migration

2024-02-20 Thread Fabiano Rosas
Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 59 1 file changed, 59 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 83512bce85..d61f93b151 100644 --- a/tests/qtest/migratio

[PATCH v4 28/34] migration/multifd: Add direct-io support

2024-02-20 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- migration/file.c | 18 +- migration/migration.c | 24 migration/options.h | 1 + util/osdep.c | 9 + 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/migration/file.c b/migration/file

[PATCH v4 21/34] migration/multifd: Add incoming QIOChannelFile support

2024-02-20 Thread Fabiano Rosas
On the receiving side we don't need to differentiate between main channel and threads, so whichever channel is defined first gets to be the main one. And since there are no packets, use the atomic channel count to index into the params array. Signed-off-by: Fabiano Rosas --- migration/file.c

[PATCH v4 29/34] tests/qtest/migration: Add tests for file migration with direct-io

2024-02-20 Thread Fabiano Rosas
The tests are only allowed to run in systems that know and in filesystems which support O_DIRECT. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 39 ++ tests/qtest/migration-helpers.h | 1 + tests/qtest/migration-test.c| 42 +++

[PATCH v4 20/34] migration/multifd: Add outgoing QIOChannelFile support

2024-02-20 Thread Fabiano Rosas
Allow multifd to open file-backed channels. This will be used when enabling the fixed-ram migration stream format which expects a seekable transport. The QIOChannel read and write methods will use the preadv/pwritev versions which don't update the file offset at each call so we can reuse the fd wi

[PATCH v4 23/34] migration/multifd: Support outgoing fixed-ram stream format

2024-02-20 Thread Fabiano Rosas
The new fixed-ram stream format uses a file transport and puts ram pages in the migration file at their respective offsets and can be done in parallel by using the pwritev system call which takes iovecs and an offset. Add support to enabling the new format along with multifd to make use of the thr

[PATCH v4 18/34] migration/multifd: Allow multifd without packets

2024-02-20 Thread Fabiano Rosas
For the upcoming support to the new 'fixed-ram' migration stream format, we cannot use multifd packets because each write into the ramblock section in the migration file is expected to contain only the guest pages. They are written at their respective offsets relative to the ramblock section header

[PATCH v4 00/34] migration: File based migration with multifd and fixed-ram

2024-02-20 Thread Fabiano Rosas
Hi, In this v4: - Added support for 'fd:'. With fixed-ram, that comes free by the existing routing to file.c. With multifd I added a loop to create the channels. - Dropped support for direct-io with fixed-ram _without_ multifd. This is something I said I would do for this version, but I ha

[PATCH v4 03/34] tests/qtest/migration: Add a fd + file test

2024-02-20 Thread Fabiano Rosas
The fd URI supports an fd that is backed by a file. The code should select between QIOChannelFile and QIOChannelSocket, depending on the type of the fd. Add a test for that. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 41 1 file changed, 4

[PATCH v4 01/34] docs/devel/migration.rst: Document the file transport

2024-02-20 Thread Fabiano Rosas
When adding the support for file migration with the file: transport, we missed adding documentation for it. Signed-off-by: Fabiano Rosas --- docs/devel/migration/main.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/devel/migration/main.rst b/docs/devel/migration/main.rst index 3

Re: [PATCH V3 00/13] allow cpr-reboot for vfio

2024-02-20 Thread Steven Sistare
On 2/20/2024 2:49 AM, Peter Xu wrote: > On Thu, Feb 08, 2024 at 10:53:53AM -0800, Steve Sistare wrote: >> Allow cpr-reboot for vfio if the guest is in the suspended runstate. The >> guest drivers' suspend methods flush outstanding requests and re-initialize >> the devices, and thus there is no dev

[PATCH v4 6/6] target/riscv: Clear vstart_qe_zero flag

2024-02-20 Thread Daniel Henrique Barboza
From: Ivan Klokov The vstart_qe_zero flag is set at the beginning of the translation phase from the env->vstart variable. During the execution phase all functions will set env->vstart = 0 after a successful execution, but the vstart_eq_zero flag remains the same as at the start of the block. This

[PATCH v4 4/6] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()

2024-02-20 Thread Daniel Henrique Barboza
The helper isn't setting env->vstart = 0 after its execution, as it is expected from every vector instruction that completes successfully. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson --- target/riscv/vector_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/t

[PATCH v4 5/6] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls

2024-02-20 Thread Daniel Henrique Barboza
trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson ---

[PATCH v4 3/6] target/riscv: remove 'over' brconds from vector trans

2024-02-20 Thread Daniel Henrique Barboza
Most of the vector translations has this following pattern at the start: TCGLabel *over = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_GEU, cpu_vstart, cpu_vl, over); And then right at the end: gen_set_label(over); return true; This means that if vstart >= vl we'll not set vsta

[PATCH v4 0/6] riscv: set vstart_eq_zero on mark_vs_dirty

2024-02-20 Thread Daniel Henrique Barboza
Hi, In this v4 we changed patch 1 to do mark_vs_dirty() after both loads and stores, not just stores. A new patch, patch 2, was added to clean-up the now unused 'is_store' argument from these functions. All other patches unchanged. Patches missing reviews/acks: patches 1 and 2. Changes from

[PATCH v4 1/6] trans_rvv.c.inc: mark_vs_dirty() before loads and stores

2024-02-20 Thread Daniel Henrique Barboza
While discussing a problem with how we're (not) setting vstart_eq_zero Richard had the following to say w.r.t the conditional mark_vs_dirty() calls on load/store functions [1]: "I think it's required to have stores set dirty unconditionally, before the operation. Consider a store that traps on th

[PATCH v4 2/6] trans_rvv.c.inc: remove 'is_store' bool from load/store fns

2024-02-20 Thread Daniel Henrique Barboza
After the 'mark_vs_dirty' changes from the previous patch the 'is_store' bool is unused in all load/store functions that were changed. Remove it. Signed-off-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc | 69 - 1 file changed, 34 insertions(+), 3

Re: QNX VM hang on Qemu

2024-02-20 Thread Faiq Ali Sayed
The real hardware ( xlnx-zcu102 ) is being used for our software. The software is in the development phase, and for that, I need to create a VM for simulation purposes. Qemu has a machine type (-M xlnx-zcu102) which is supported with the board/hardware. I have two more images for the same hardware

Re: [PATCH V3 10/13] migration: stop vm for cpr

2024-02-20 Thread Steven Sistare
On 2/20/2024 2:33 AM, Peter Xu wrote: > On Thu, Feb 08, 2024 at 10:54:03AM -0800, Steve Sistare wrote: >> When migration for cpr is initiated, stop the vm and set state >> RUN_STATE_FINISH_MIGRATE before ram is saved. This eliminates the >> possibility of ram and device state being out of sync, an

Re: Sponsorship via Github

2024-02-20 Thread Stefan Hajnoczi
Hi Jakob, Thanks for the generous offer to sponsor QEMU. It's great to hear you are finding QEMU useful! I am forwarding the request to Software Freedom Conservancy, which handles donations and expenses for the QEMU project. I'll let you know when we have an answer. Thanks, Stefan signature.as

Re: [PATCH V3 09/13] migration: notifier error checking

2024-02-20 Thread Steven Sistare
On 2/20/2024 2:12 AM, Peter Xu wrote: > On Thu, Feb 08, 2024 at 10:54:02AM -0800, Steve Sistare wrote: >> Check the status returned by migration notifiers and report errors. >> If notifiers fail, call the notifiers again so they can clean up. >> None of the notifiers return an error status at this

Re: [PATCH RFC] target: riscv: Add Svvptc extension support

2024-02-20 Thread Alexandre Ghiti
Hi Andrew, Sorry for the very late reply, I was (and still am) off! On Tue, Feb 13, 2024 at 4:33 PM Andrew Jones wrote: > > On Tue, Feb 13, 2024 at 03:53:08PM +0100, Alexandre Ghiti wrote: > > The Svvptc extension describes a uarch that does not cache invalid TLB > > entries: that's the case for

Re: [PATCH 00/10] reset: Make whole system three-phase-reset aware

2024-02-20 Thread Michael S. Tsirkin
On Tue, Feb 20, 2024 at 04:06:12PM +, Peter Maydell wrote: > This patchset is an incremental improvement to our reset handling that > tries to roll out the "three-phase-reset" design we have for devices > to a wider scope. > > At the moment devices and buses have a three-phase reset system, wi

Re: QNX VM hang on Qemu

2024-02-20 Thread Peter Maydell
On Tue, 20 Feb 2024 at 20:56, Faiq Ali Sayed wrote: > > The image I am using is currently in use for real hardware, and > I received it from a third party/vendor. OK, so what exactly is the real hardware it's for? > Could you please suggest to me what I can do now? If QEMU has a model of the ha

Re: [PATCH 06/10] hw/core: Add ResetContainer which holds objects implementing Resettable

2024-02-20 Thread Peter Maydell
On Tue, 20 Feb 2024 at 19:46, Richard Henderson wrote: > > On 2/20/24 06:06, Peter Maydell wrote: > > +void resettable_container_add(ResettableContainer *rc, Object *obj) > > +{ > > +g_ptr_array_add(rc->children, obj); > > +} > > Did you want to assert here that obj does in fact implement Rese

Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-20 Thread Peter Maydell
On Tue, 20 Feb 2024 at 19:31, Richard Henderson wrote: > > On 2/20/24 06:06, Peter Maydell wrote: > > -static void pc_cmos_init_late(void *opaque) > > +static void pc_cmos_init_late(PCMachineState *pcms) > > { > > -pc_cmos_init_late_arg *arg = opaque; > > -MC146818RtcState *s = arg->rtc_

  1   2   3   4   5   >