[PATCH 2/2] test_driver: provide basic disk hotunplug support

2024-10-03 Thread John Levon via Devel
Signed-off-by: John Levon --- src/test/test_driver.c | 114 - 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index b7e36e8451..789b1a 100644 --- a/src/test/test_driver.c +++ b/src/test/tes

[PATCH 1/2] test_driver: provide basic disk hotplug support

2024-10-03 Thread John Levon via Devel
Add some basic plumbing, based on the qemu driver. Signed-off-by: John Levon --- src/test/test_driver.c | 162 - 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 03afe8af8d..b7e36e8451 100

[PATCH 0/2] add disk hotplug/unplug support to test hypervisor

2024-10-03 Thread John Levon via Devel
John Levon (2): test_driver: provide basic disk hotplug support test_driver: provide basic disk hotunplug support src/test/test_driver.c | 276 - 1 file changed, 273 insertions(+), 3 deletions(-) -- 2.34.1

Re: [PATCH v2 1/1] qemu: Add support for RAPL MSRs feature

2024-10-03 Thread Peter Krempa
On Thu, Sep 05, 2024 at 13:01:53 +0200, Anthony Harivel wrote: > > Hi, > > Anthony Harivel, Sep 03, 2024 at 14:41: > > Daniel P. Berrangé, Sep 03, 2024 at 14:24: > > > On Tue, Sep 03, 2024 at 02:16:58PM +0200, Peter Krempa wrote: > > > > On Tue, Sep 03, 2024 at 13:29:28 +0200, Anthony Harivel wro

Re: [PATCH] util: Look for newer name of cpu wait time statistic

2024-10-03 Thread Peter Krempa
On Thu, Oct 03, 2024 at 17:06:55 +0200, Martin Kletzander wrote: > It looks like linux changed the key for wait time in /proc//sched > and /proc//task//sched files in commit ceeadb83aea2 (or around > that time) from se.statistics.wait_sum to just wait_sum. Similarly to > the previous change (from

[PATCH] util: Look for newer name of cpu wait time statistic

2024-10-03 Thread Martin Kletzander
It looks like linux changed the key for wait time in /proc//sched and /proc//task//sched files in commit ceeadb83aea2 (or around that time) from se.statistics.wait_sum to just wait_sum. Similarly to the previous change (from se.wait_sum) just look for the new name first. Resolves: https://issues.

[PATCH v3 09/10] qemu: snapshot: Allow internal snapshots with PFLASH nvram

2024-10-03 Thread Peter Krempa
With the new snapshot QMP command we can select which block device backend receives the VM state and thus the main issue with internal snapshots with pflash was addressed. Thus we can relax the check and allow snapshots if the pflash nvram is on qcow2. Signed-off-by: Peter Krempa --- src/qemu/q

[PATCH v3 10/10] news: mention internal snapshot changes

2024-10-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 16 1 file changed, 16 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 437e032b90..7efc440202 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,22 @@ v10.9.0 (unreleased) * **Improvements** + * qemu: internal snapshot improveme

[PATCH v3 07/10] qemu snapshot: use QMP snapshot-delete for internal snapshots deletion

2024-10-03 Thread Peter Krempa
Switch to using the modern QMP command. As the user visible logic when deleting internal snapshots using the old 'delvm' command was very lax in terms of catching inconsistencies between the snapshot metadata and on-disk state we re-implement this behaviour even using the new command. We could imp

[PATCH v3 08/10] qemuSnapshotActiveInternalDeleteGetDevices: Add warning when deleting inconsistent snapshot

2024-10-03 Thread Peter Krempa
As explained in the commit which added the new internal snapshot deletion code we don't want to do any form of strict checking whether the libvirt metadata is consistent with the on-disk state as we didn't historically do that. In order to be able to spot the cases add a warning into the logs if s

[PATCH v3 04/10] qemu: capabilities: Introduce QEMU_CAPS_SNAPSHOT_INTERNAL_QMP capability

2024-10-03 Thread Peter Krempa
From: Nikolai Barybin via Devel The 'snapshot-save/delete' QMP commands were introduced in QEMU 6.0.0, so we add a compatible capability to check if target QEMU binary supports it. Signed-off-by: Nikolai Barybin Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c

[PATCH v3 06/10] qemu snapshot: use QMP snapshot-save for internal snapshots creation

2024-10-03 Thread Peter Krempa
From: Nikolai Barybin via Devel The usage of HMP commands are highly discouraged by qemu. Moreover, current snapshot creation routine does not provide flexibility in choosing target device for VM state snapshot. This patch makes use of QMP commands snapshot-save and by default chooses first writ

[PATCH v3 02/10] qemu: monitor: Add plumbing for 'snaphot-save'/'snapshot-delete' QMP commands

2024-10-03 Thread Peter Krempa
From: Nikolai Barybin via Devel Signed-off-by: Nikolai Barybin Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 30 ++ src/qemu/qemu_monitor.h | 14 + src/qemu/qemu_monitor_json.c | 60 src/qemu/qemu_monitor_json.h

[PATCH v3 05/10] qemu: monitor: Store internal snapshot names from 'query-named-block-nodes'

2024-10-03 Thread Peter Krempa
Store the names of internal snapshots present in supported images in the data we dump from 'query-named-block-nodes' so that the upcoming changes to the internal snapshot code can access it. To test this we use the bitmap detection test cases which can be easily extended to dump this data. Signed

[PATCH v3 03/10] qemu: blockjob: Add job types for 'snapshot-save/delete'

2024-10-03 Thread Peter Krempa
From: Nikolai Barybin via Devel The snapshot creation/deletion QMP commands use the qemu 'job' API to signal completion thus we need to add corresponding job types. As the job handles everything internally we don't store anything about the job. Signed-off-by: Nikolai Barybin Signed-off-by: Pet

[PATCH v3 01/10] qemuDomainObjWait: Annotate with G_GNUC_WARN_UNUSED_RESULT

2024-10-03 Thread Peter Krempa
Callers must handle the return value of this function as the VM might have died. Add compiler annotation to force it. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index

[PATCH v3 00/10] qemu: Rework internal active snapshots to use QMP commands

2024-10-03 Thread Peter Krempa
Changes to v2: - added few cleanups - added qemumonitorjson test cases for new commands - dropped duplicate capability flags - fixed bugs pointed out in v2 - rewritten logic for selecting snapshot images (both for creation/deletion) - fixed the logic to be fault tolerant same way as 'delvm'

Re: [PATCH v7 14/14] qemu: Handle locking of TPM state directory for incoming migration

2024-10-03 Thread Peter Krempa
On Thu, Oct 03, 2024 at 05:15:54 -0700, Andrea Bolognani wrote: > On Wed, Oct 02, 2024 at 06:27:39PM GMT, Peter Krempa wrote: > > On Wed, Oct 02, 2024 at 17:41:47 +0200, Andrea Bolognani wrote: > > > By not attempting to lock the lock file, which would fail. > > > > > > Signed-off-by: Andrea Bologn

Re: [PATCH v7 14/14] qemu: Handle locking of TPM state directory for incoming migration

2024-10-03 Thread Andrea Bolognani
On Wed, Oct 02, 2024 at 06:27:39PM GMT, Peter Krempa wrote: > On Wed, Oct 02, 2024 at 17:41:47 +0200, Andrea Bolognani wrote: > > By not attempting to lock the lock file, which would fail. > > > > Signed-off-by: Andrea Bolognani > > --- > > src/qemu/qemu_security.c | 10 ++ > > src/qemu/q

Re: [PATCH v2 3/4] schema: add TPM emulator

2024-10-03 Thread Marc-André Lureau
Hi Martin, Daniel On Wed, Oct 2, 2024 at 6:01 PM Martin Kletzander wrote: > > On Wed, Oct 02, 2024 at 03:43:22PM +0400, Marc-André Lureau wrote: > >Hi > > > >On Wed, Oct 2, 2024 at 11:34 AM Martin Kletzander > >wrote: > >> > >> On Wed, Oct 02, 2024 at 11:30:39AM +0400, Marc-André Lureau wrote:

Re: [PATCH V2 0/4] Rework qemu internal active snapshots to use QMP

2024-10-03 Thread Nikolai Barybin via Devel
On 8/29/24 11:12, Peter Krempa wrote: On Thu, Aug 29, 2024 at 11:09:23 +0200, Nikolai Barybin wrote: On 8/14/24 14:03, Peter Krempa wrote: On Wed, Jul 17, 2024 at 21:21:33 +0300, Nikolai Barybin via Devel wrote: Den, Peter, Daniel thank you for your comments! I'm sending v2 of this patchset.

Re: [PATCH 1/2] test_driver: provide basic NIC hotplug support

2024-10-03 Thread Martin Kletzander
On Wed, Oct 02, 2024 at 03:31:21PM +0100, John Levon wrote: On Wed, Oct 02, 2024 at 03:55:58PM +0200, Martin Kletzander wrote: If you are fine with me removing the audit call, audit header include and changing the "!ret" to "ret == 0", I'll fixup those changes and push it as I'm fine with these

Re: [PATCH 2/2] test_driver: provide basic NIC hotunplug support

2024-10-03 Thread Martin Kletzander
On Thu, Aug 01, 2024 at 12:47:41PM +0100, John Levon wrote: Provide minimal support for hotunplugging ETHERNET or BRIDGE type NICs in the test driver. Signed-off-by: John Levon Reviewed-by: Martin Kletzander signature.asc Description: PGP signature