[libvirt PATCH 1/1] meson: Fix XDR check for GNU/Hurd

2023-10-24 Thread Andrea Bolognani
The situation is the same as Linux: since glibc no longer includes the RPC functionality, libtirpc must be used to complement it. Signed-off-by: Andrea Bolognani --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index

[libvirt PATCH 0/1] meson: Fix XDR check for GNU/Hurd

2023-10-24 Thread Andrea Bolognani
The inability of libvirt to successfully build on GNU/Hurd has been, I'm sure we all agree, a major sticking point for the project. No more! Note that there are a bunch of known issues in the storage driver and elsewhere, some of which I'm going to address in future patches, but this one-liner

Re: [PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-10-24 Thread Andrea Bolognani
On Tue, Oct 24, 2023 at 05:14:41PM +0200, Marc Hartmayer wrote: > On Tue, Oct 24, 2023 at 02:12 PM +0200, Michal Prívozník > wrote: > > On 9/28/23 17:37, Marc Hartmayer wrote: > >> Marc Hartmayer (3): > >> virsh: add `console --resume` support > >> Improve `virsh start --console` behavior >

Re: [libvirt PATCH 00/11] systemd: Further improvements

2023-10-24 Thread Andrea Bolognani
On Mon, Oct 02, 2023 at 10:51:15AM +0200, Andrea Bolognani wrote: > This series addresses two pieces of feedback from my recent systemd > changes: that some settings, such as LimitNOFILE, where still being > repeated verbatim in multiple locations, and that only having the >

Re: [libvirt PATCH 0/6] meson: Improve handling of tests

2023-10-24 Thread Andrea Bolognani
On Tue, Oct 03, 2023 at 04:56:31PM +0200, Andrea Bolognani wrote: > Andrea Bolognani (6): > meson: Do less when not building from git > meson: Move all handling of test options together > meson: Handle -Dtests=enabled with Clang > meson: Make -Dexpensive_tests depend on -Dtests > meson:

Re: [PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-10-24 Thread Marc Hartmayer
On Tue, Oct 24, 2023 at 02:12 PM +0200, Michal Prívozník wrote: > On 9/28/23 17:37, Marc Hartmayer wrote: >> Currently, early console output may be lost, e.g. if starting a guest with >> `virsh start --console` guest, which can make debugging of early failures >> very >> difficult >> (like zipl

Re: hdd kills vm

2023-10-24 Thread Martin Kletzander
On Mon, Oct 23, 2023 at 04:59:08PM +0200, daggs wrote: Greetings Martin, Sent: Sunday, October 22, 2023 at 12:37 PM From: "Martin Kletzander" To: "daggs" Cc: libvir-list@redhat.com Subject: Re: hdd kills vm On Fri, Oct 20, 2023 at 02:42:38PM +0200, daggs wrote: >Greetings, > >I have a

[PULL 32/39] migration: Use vmstate_register_any() for audio

2023-10-24 Thread Juan Quintela
We can have more than one audio backend. void audio_init_audiodevs(void) { AudiodevListEntry *e; QSIMPLEQ_FOREACH(e, , next) { audio_init(e->dev, _fatal); } } Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-12-quint...@redhat.com>

[PULL 39/39] migration: Deprecate old compression method

2023-10-24 Thread Juan Quintela
Acked-by: Stefan Hajnoczi Acked-by: Peter Xu Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-6-quint...@redhat.com> --- docs/about/deprecated.rst | 8 + qapi/migration.json | 63 ++-

[PULL 38/39] migration: Deprecate block migration

2023-10-24 Thread Juan Quintela
It is obsolete. It is better to use driver-mirror with NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-5-quint...@redhat.com> ---

[PULL 37/39] migration: migrate 'blk' command option is deprecated.

2023-10-24 Thread Juan Quintela
Use blocked-mirror with NBD instead. Acked-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-4-quint...@redhat.com> --- docs/about/deprecated.rst | 9 + qapi/migration.json| 7

[PULL 36/39] migration: migrate 'inc' command option is deprecated.

2023-10-24 Thread Juan Quintela
Use blockdev-mirror with NBD instead. Reviewed-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-3-quint...@redhat.com> --- docs/about/deprecated.rst | 8 qapi/migration.json| 8

[PULL 33/39] migration: Use vmstate_register_any() for eeprom93xx

2023-10-24 Thread Juan Quintela
We can have more than one eeprom93xx. For instance: e100_nic_realize() -> eeprom93xx_new() Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-13-quint...@redhat.com> --- hw/nvram/eeprom93xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PULL 35/39] qemu-iotests: Filter warnings about block migration being deprecated

2023-10-24 Thread Juan Quintela
Create a new filter that removes the two warnings for test 183. Reviewed-by: Hanna Czenczek Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-2-quint...@redhat.com> --- tests/qemu-iotests/183 | 2 +- tests/qemu-iotests/common.filter | 7 +++ 2 files changed, 8

[PULL 34/39] migration: Use vmstate_register_any() for vmware_vga

2023-10-24 Thread Juan Quintela
I have no idea if we can have more than one vmware_vga device, so play it safe. Reviewed-by: Stefan Berger Reviewed-by: Thomas Huth Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-14-quint...@redhat.com> --- hw/display/vmware_vga.c | 2 +- 1 file changed, 1 insertion(+), 1

[PULL 31/39] migration: Improve example and documentation of vmstate_register()

2023-10-24 Thread Juan Quintela
Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-11-quint...@redhat.com> --- docs/devel/migration.rst | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index

[PULL 30/39] migration: Check in savevm_state_handler_insert for dups

2023-10-24 Thread Juan Quintela
From: Peter Xu Before finally register one SaveStateEntry, we detect for duplicated entries. This could be helpful to notify us asap instead of get silent migration failures which could be hard to diagnose. For example, this patch will generate a message like this (if without previous fixes on

[PULL 29/39] migration: Hack to maintain backwards compatibility for ppc

2023-10-24 Thread Juan Quintela
Current code does: - register pre_2_10_vmstate_dummy_icp with "icp/server" and instance dependinfg on cpu number - for newer machines, it register vmstate_icp with "icp/server" name and instance 0 - now it unregisters "icp/server" for the 1st instance. This is wrong at many levels: - we

[PULL 28/39] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp

2023-10-24 Thread Juan Quintela
Each user network conection create a new slirp instance. We register more than one slirp instance for number 0. qemu-system-x86_64: -netdev user,id=hs1: savevm_state_handler_insert: Detected duplicate SaveStateEntry: id=slirp, instance_id=0x0 Broken pipe

[PULL 27/39] migration: Use vmstate_register_any() for isa-ide

2023-10-24 Thread Juan Quintela
Otherwise qom-test fails. ok 4 /i386/qom/x-remote qemu-system-i386: savevm_state_handler_insert: Detected duplicate SaveStateEntry: id=isa-ide, instance_id=0x0 Broken pipe ../../../../../mnt/code/qemu/full/tests/qtest/libqtest.c:195: kill_qemu() tried to terminate QEMU process but encountered

[PULL 26/39] migration: Use vmstate_register_any()

2023-10-24 Thread Juan Quintela
This are the easiest cases, where we were already using VMSTATE_INSTANCE_ID_ANY. Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-3-quint...@redhat.com> --- backends/dbus-vmstate.c | 3 +-- backends/tpm/tpm_emulator.c | 3 +-- hw/i2c/core.c

[PULL 25/39] migration: Create vmstate_register_any()

2023-10-24 Thread Juan Quintela
We have lots of cases where we are using an instance_id==0 when we should be using VMSTATE_INSTANCE_ID_ANY (-1). Basically everything that can have more than one needs to have a proper instance_id or -1 and the system will take one for it. vmstate_register_any(): We register with -1.

[PULL 24/39] migration: set file error on subsection loading

2023-10-24 Thread Juan Quintela
From: Marc-André Lureau commit 13cde50889237 ("vmstate: Return error in case of error") sets QemuFile error to stop reading from it and report to the caller (checked by unit tests). We should do the same on subsection loading error. Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela

[PULL 23/39] migration: rename vmstate_save_needed->vmstate_section_needed

2023-10-24 Thread Juan Quintela
From: Marc-André Lureau The function is used on save at this point. The following commits will use it on load. Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231024084043.2926316-5-marcandre.lur...@redhat.com> ---

[PULL 22/39] migration/ram: Fix compilation with -Wshadow=local

2023-10-24 Thread Juan Quintela
From: Thomas Huth Rename the variable here to avoid that it shadows a variable from the beginning of the function scope. With this change the code now successfully compiles with -Wshadow=local. Signed-off-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID:

[PULL 21/39] hw/s390x/s390-stattrib: Don't call register_savevm_live() during instance_init()

2023-10-24 Thread Juan Quintela
From: Thomas Huth We must not call register_savevm_live() from an instance_init() function (since this could be called multiple times during device introspection). Move this to the realize() function instead. Acked-by: David Hildenbrand Reviewed-by: Eric Farman Signed-off-by: Juan Quintela

[PULL 20/39] hw/s390x/s390-stattrib: Simplify handling of the "migration-enabled" property

2023-10-24 Thread Juan Quintela
From: Thomas Huth There's no need for dedicated handlers here if they don't do anything special. Acked-by: David Hildenbrand Reviewed-by: Eric Farman Acked-by: Juan Quintela Signed-off-by: Thomas Huth Signed-off-by: Juan Quintela Message-ID: <20231020150554.664422-3-th...@redhat.com> ---

[PULL 18/39] hw/ipmi: Don't call vmstate_register() from instance_init() functions

2023-10-24 Thread Juan Quintela
From: Thomas Huth instance_init() can be called multiple times, e.g. during introspection of the device. We should not install the vmstate handlers here. Do it in the realize() function instead. Signed-off-by: Thomas Huth Reviewed-by: Juan Quintela Acked-by: Corey Minyard Signed-off-by: Juan

[PULL 19/39] hw/s390x/s390-skeys: Don't call register_savevm_live() during instance_init()

2023-10-24 Thread Juan Quintela
From: Thomas Huth Since the instance_init() function immediately tries to set the property to "true", the s390_skeys_set_migration_enabled() tries to register a savevm handler during instance_init(). However, instance_init() functions can be called multiple times, e.g. for introspection of

[PULL 17/39] migration: Rename ram_compressed_pages() to compress_ram_pages()

2023-10-24 Thread Juan Quintela
We are moving to have all functions exported from ram-compress.c to start with compress_. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-12-quint...@redhat.com> --- migration/ram-compress.h | 2 +- migration/ram-compress.c | 2 +- migration/ram.c

[PULL 14/39] migration: Export send_queued_data()

2023-10-24 Thread Juan Quintela
This function is only used for compression. So we rename it as compress_send_queued_data(). We put it on ram-compress.h because we are moving it later to ram-compress.c. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-9-quint...@redhat.com> ---

[PULL 16/39] migration: Merge flush_compressed_data() and compress_flush_data()

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-11-quint...@redhat.com> --- migration/ram-compress.h | 1 - migration/ram-compress.c | 17 ++--- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/migration/ram-compress.h

[PULL 12/39] migration: Move busy++ to migrate_with_multithread

2023-10-24 Thread Juan Quintela
And now we can simplify save_compress_page(). Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-7-quint...@redhat.com> --- migration/ram-compress.c | 1 + migration/ram.c | 8 ++-- 2 files changed, 3 insertions(+),

[PULL 15/39] migration: Move ram_flush_compressed_data() to ram-compress.c

2023-10-24 Thread Juan Quintela
As we export it, rename it compress_flush_data(). Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-10-quint...@redhat.com> --- migration/ram-compress.h | 1 + migration/ram-compress.c | 9 + migration/ram.c | 17 - 3

[PULL 13/39] migration: Create compress_update_rates()

2023-10-24 Thread Juan Quintela
So we can move more compression_counters stuff to ram-compress.c. Create compression_counters struct to add the stuff that was on MigrationState. Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-8-quint...@redhat.com> ---

[PULL 11/39] migration: Simplify compress_page_with_multithread()

2023-10-24 Thread Juan Quintela
Move the goto to a while true. Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-6-quint...@redhat.com> --- migration/ram-compress.c | 48 1 file changed, 24 insertions(+), 24

[PULL 10/39] migration: Make compress_data_with_multithreads return bool

2023-10-24 Thread Juan Quintela
Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-5-quint...@redhat.com> --- migration/ram-compress.h | 4 ++-- migration/ram-compress.c | 17 ++--- migration/ram.c | 3 +-- 3 files changed, 13

[PULL 09/39] migration: Remove save_page_use_compression()

2023-10-24 Thread Juan Quintela
After previous patch, we disable the posiblity that we use compression together with xbzrle. So we can use directly migrate_compress(). Once there, now we don't need the rs parameter, so remove it. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID:

[PULL 08/39] migration: Give one error if trying to set COMPRESSION and XBZRLE

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-3-quint...@redhat.com> --- migration/options.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration/options.c b/migration/options.c index b8c3c3218d..37fa1cfe74 100644 ---

[PULL 07/39] migration: Give one error if trying to set MULTIFD and XBZRLE

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-2-quint...@redhat.com> --- migration/options.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration/options.c b/migration/options.c index 42fb818956..b8c3c3218d 100644 ---

[PULL 06/39] migration: Rename ram_handle_compressed() to ram_handle_zero()

2023-10-24 Thread Juan Quintela
Now that we know it only handles zero, we can remove the ch parameter. Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-ID: <20231019085259.13307-3-quint...@redhat.com> --- migration/ram.h | 2 +- migration/ram.c | 10 +- migration/rdma.c | 2

[PULL 05/39] migration: Receiving a zero page non zero is an error

2023-10-24 Thread Juan Quintela
We don't allow non zero compressed pages since: commit 3edcd7e6ebae3ef0ac178eed5f4225803159562d Author: Peter Lieven Date: Tue Mar 26 10:58:35 2013 +0100 migration: search for zero instead of dup pages RDMA case is a bit more complicated, but they don't handle it since: commit

[PULL 04/39] migration/doc: We broke backwards compatibility

2023-10-24 Thread Juan Quintela
When we detect that we have broken backwards compatibility in a released version, we can't do anything for that version. But once we fix that bug on the next released version, we can "mitigate" that problem when migrating to new versions to give a way out of that machine until it does a hard

[PULL 03/39] migration/doc: How to migrate when hosts have different features

2023-10-24 Thread Juan Quintela
Sometimes devices have different features depending of things outside of qemu. For instance the kernel. Document how to handle that cases. Acked-by: Peter Xu Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231018112827.1325-4-quint...@redhat.com> ---

[PULL 02/39] migration/doc: Add documentation for backwards compatiblity

2023-10-24 Thread Juan Quintela
State what are the requeriments to get migration working between qemu versions. And once there explain how one is supposed to implement a new feature/default value and not break migration. Reviewed-by: Vladimir Sementsov-Ogievskiy Acked-by: Peter Xu Signed-off-by: Juan Quintela Message-ID:

[PULL 00/39] Migration 20231024 patches

2023-10-24 Thread Juan Quintela
The following changes since commit a95260486aa7e78d7c7194eba65cf03311ad94ad: Merge tag 'pull-tcg-20231023' of https://gitlab.com/rth7680/qemu into staging (2023-10-23 14:45:46 -0700) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/migration-20231024

[PULL 01/39] migration/doc: Add contents

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231018112827.1325-2-quint...@redhat.com> --- docs/devel/migration.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index c3e1400c0c..4d6a98ae58 100644 ---

Re: [PATCH libvirt v1 3/3] Improve `virsh create --console` behavior

2023-10-24 Thread Michal Prívozník
On 9/28/23 17:37, Marc Hartmayer wrote: > When starting a guest via libvirt (`virsh create --console`), early > console output was missed because the guest was started first and then > the console was attached. This patch changes this to the following > sequence: > > 1. create a paused transient

Re: [PATCH libvirt v1 1/3] virsh: add `console --resume` support

2023-10-24 Thread Michal Prívozník
On 9/28/23 17:37, Marc Hartmayer wrote: > This patch adds the command line flag `--resume` to the `virsh console` > command. This resumes a paused guest after connecting to the console. > This might be handy since it's a "common" pattern to start a guest > paused, connect to the console, and then

Re: [PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-10-24 Thread Michal Prívozník
On 9/28/23 17:37, Marc Hartmayer wrote: > Currently, early console output may be lost, e.g. if starting a guest with > `virsh start --console` guest, which can make debugging of early failures very > difficult > (like zipl messages or disabled wait conditions happening early). This is > because

Re: [PATCH libvirt v1 2/3] Improve `virsh start --console` behavior

2023-10-24 Thread Michal Prívozník
On 9/28/23 17:37, Marc Hartmayer wrote: > When starting a guest via libvirt (`virsh start --console`), early > console output was missed because the guest was started first and then > the console was attached. This patch changes this to the following > sequence: > > 1. create a paused guest > 2.

Re: [PATCH v4 5/6] docs/about/deprecated: Document RISC-V "pmu-num" deprecation

2023-10-24 Thread Atish Kumar Patra
On Sun, Oct 22, 2023 at 7:04 PM Alistair Francis wrote: > > On Thu, Oct 19, 2023 at 1:47 AM Rob Bradford wrote: > > > > This has been replaced by a "pmu-mask" property that provides much more > > flexibility. > > > > Signed-off-by: Rob Bradford > > Acked-by: LIU Zhiwei > > Reviewed-by:

Re: [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated

2023-10-24 Thread Hanna Czenczek
On 18.10.23 13:55, Juan Quintela wrote: Create a new filter that removes the two warnings for test 183. Signed-off-by: Juan Quintela --- tests/qemu-iotests/183 | 2 +- tests/qemu-iotests/common.filter | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) Reviewed-by:

Re: [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated

2023-10-24 Thread Juan Quintela
Hanna Czenczek wrote: > On 18.10.23 13:55, Juan Quintela wrote: >> Create a new filter that removes the two warnings for test 183. >> >> Signed-off-by: Juan Quintela >> --- >> tests/qemu-iotests/183 | 2 +- >> tests/qemu-iotests/common.filter | 7 +++ >> 2 files changed, 8