Re: [libvirt PATCH v2 11/17] qemu, hypervisor: refactor some cgroup mgmt methods

2021-12-03 Thread Praveen K Paladugu
On 12/3/2021 11:38 AM, Ján Tomko wrote: On a Thursday in 2021, Praveen K Paladugu wrote: Refactor some cgroup management methods from qemu into hypervisor. These methods will be shared by ch driver for cgroup management. The QEMU driver fails to compile after this patch - it seems

Re: [libvirt PATCH v2 11/17] qemu, hypervisor: refactor some cgroup mgmt methods

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Praveen K Paladugu wrote: Refactor some cgroup management methods from qemu into hypervisor. These methods will be shared by ch driver for cgroup management. The QEMU driver fails to compile after this patch - it seems qemu_process.c needs to include the header with the

Re: [libvirt PATCH v2 13/17] ch_driver, ch_domain: vcpupin callback in ch driver

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Praveen K Paladugu wrote: From: Vineeth Pillai Signed-off-by: Vineeth Pillai Signed-off-by: Praveen K Paladugu --- src/ch/ch_domain.c | 30 + src/ch/ch_domain.h | 1 + src/ch/ch_driver.c | 151 + 3 files changed, 182

Re: [libvirt PATCH v2 01/17] util: fix indentation in virprocess.c

2021-12-03 Thread Praveen K Paladugu
On 12/3/2021 11:25 AM, Ján Tomko wrote: On a Thursday in 2021, Praveen K Paladugu wrote: Signed-off-by: Praveen K Paladugu Most of these indentation fixes here are against our coding style: https://libvirt.org/coding-style.html It is hard to follow all the formatting guidelines

Re: [libvirt PATCH v2 07/17] ch_driver, ch_domain: vcpu info getter callbacks

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Praveen K Paladugu wrote: Signed-off-by: Vineeth Pillai Signed-off-by: Praveen K Paladugu --- src/ch/ch_domain.c | 25 + src/ch/ch_domain.h | 4 ++ src/ch/ch_driver.c | 137 + 3 files changed, 166 insertions(+) /*

Re: [libvirt PATCH v2 02/17] util: Helper functions to get process info

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Praveen K Paladugu wrote: Signed-off-by: Praveen K Paladugu It would be helpful to say in the commit message that the functions are being moved, not newly introduced. Jano --- src/libvirt_private.syms | 2 + src/qemu/qemu_driver.c | 116

Re: [libvirt PATCH v2 03/17] ch_domain: fix indentation in ch_domain

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Praveen K Paladugu wrote: Signed-off-by: Praveen K Paladugu --- src/ch/ch_domain.c | 130 ++--- 1 file changed, 64 insertions(+), 66 deletions(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index dd4de9e1ea..44f7d26ca4

Re: [libvirt PATCH v2 01/17] util: fix indentation in virprocess.c

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Praveen K Paladugu wrote: Signed-off-by: Praveen K Paladugu Most of these indentation fixes here are against our coding style: https://libvirt.org/coding-style.html --- src/util/virprocess.c | 501 +- 1 file changed, 249

Re: [libvirt PATCH v2 00/15] WIP/RFC: add QEMU "-display dbus" support

2021-12-03 Thread Daniel P . Berrangé
On Thu, Dec 02, 2021 at 06:23:56PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > This series implements supports for the upcoming QEMU "-display dbus" support. > Development is still in progress, but I hope to land the QEMU support early in > 6.3 (last version

Re: [PATCH 00/17] qemu: Add support for blocking writes for the blockdev-mirror job

2021-12-03 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Blocking writes ensure that the mirroring converges even when the guest is I/O intensive with a fast local storage and slow mirror. This patchset does it by introducing flags which use the blocking mode as it will have performance impact, and for guests

Re: [PATCH 13/17] virDomainMigrate: Introduce VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES flag

2021-12-03 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Non-shared storage migration of guests which are disk I/O intensive and have fast local storage may actually never converge if the guest happens to dirty the disk faster than it can be copied. This patch introduces a new flag

Re: [libvirt PATCH v2 00/15] WIP/RFC: add QEMU "-display dbus" support

2021-12-03 Thread Michal Prívozník
On 12/2/21 15:23, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > This series implements supports for the upcoming QEMU "-display dbus" support. > Development is still in progress, but I hope to land the QEMU support early in > 6.3 (last version posted: >

Re: [PATCH 11/17] man: virsh: Separate paragrapsh describing distinct flags

2021-12-03 Thread Ján Tomko
*paragraphs On a Friday in 2021, Peter Krempa wrote: Separate the paragragraphs where the topic changes to simplify further *paragraphs additions. Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 32 1 file changed, 20 insertions(+), 12

Re: [libvirt PATCH v2 15/15] docs: document type dbus

2021-12-03 Thread Michal Prívozník
On 12/2/21 15:24, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > docs/formatdomain.rst | 43 ++- > 1 file changed, 42 insertions(+), 1 deletion(-) > I think this patch should be dissolved in

Re: [PATCH 04/17] qemuMonitorJSONMigrate: Extract flags prior to constructing command

2021-12-03 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The migration API takes specific flags which are then converted to boolean parameters for the command. Extract the flag into helper variables rather than using ternary operatirs while constructing the operators command itself. Signed-off-by: Peter

Re: [PATCH 00/16] Clean up of virJSONValueFree usage and few related refactors

2021-12-03 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Peter Krempa (16): qemu: hotplug: Use automatic freeing for virJSONValue qemuDomainHotplugAddIOThread: Automatically free virJSONValue qemuMonitorBlockdevCreate: Use double pointer instead of always consuming '@props'

[libvirt PATCH] libxl: libxlLoggerFileFree: remove redundant NULL assignment

2021-12-03 Thread Ján Tomko
The 'file' pointer is already zeroed in virFileFclose and never read again. Signed-off-by: Ján Tomko --- Pushed as trivial. src/libxl/libxl_logger.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libxl/libxl_logger.c b/src/libxl/libxl_logger.c index 44ee5a95da..4708553f29 100644 ---

Re: [libvirt PATCH] meson: Improve network driver enablement logic

2021-12-03 Thread Ján Tomko
On a Friday in 2021, Andrea Bolognani wrote: The Homebrew package explicitly enables this driver despite us disabling it by default on macOS, so it must be functional to at least some extent and certainly can't be causing any build failures. Additionally, if the user has explicitly asked for

Re: [PATCH 3/3] qemu: Implement the virDomainSetLaunchSecurityState API

2021-12-03 Thread Daniel P . Berrangé
On Tue, Nov 30, 2021 at 04:52:00PM -0700, Jim Fehlig wrote: > Set a launch secret in guest memory using the sev-inject-launch-secret > QMP API. Only supported for SEV-enabled guests. > > Signed-off-by: Jim Fehlig > --- > src/qemu/qemu_driver.c | 78 >

Re: [PATCH 1/3] libvirt: Introduce virDomainSetLaunchSecurityState public API

2021-12-03 Thread Daniel P . Berrangé
On Tue, Nov 30, 2021 at 04:51:58PM -0700, Jim Fehlig wrote: > This API allows setting a launch secret within a guests's memory. The > launch secret is created by the guest owner after retrieving and > verifying the launch measurement with virDomainGetLaunchSecurityInfo. > > The API uses

Re: [PATCH 2/3] remote: Add RPC support for the virDomainSetLaunchSecurityState API

2021-12-03 Thread Daniel P . Berrangé
On Tue, Nov 30, 2021 at 04:51:59PM -0700, Jim Fehlig wrote: > Signed-off-by: Jim Fehlig > --- > src/remote/remote_driver.c | 1 + > src/remote/remote_protocol.x | 17 - > src/remote_protocol-structs | 9 + > 3 files changed, 26 insertions(+), 1 deletion(-)

[PATCH 09/17] qemuDomainBlockCopy: Implement VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES

2021-12-03 Thread Peter Krempa
Wire up the flag to enable the 'write-blocking' 'copy-mode' of 'blockdev-mirror'. It's not supported by all qemu versions but it is with those which we use -blockdev with so we can use that instead of adding another custom capability as we use blockdev for some time now. Signed-off-by: Peter

[PATCH 15/17] docs: Convert 'migration' doc to RST

2021-12-03 Thread Peter Krempa
After conversion the table doesn't have to custom colors, but otherwise seems to hold well. Signed-off-by: Peter Krempa --- docs/meson.build | 2 +- docs/migration.html.in | 688 - docs/migration.rst | 458 +++ 3 files

[PATCH 17/17] NEWS: Mention synchronous copy job additions

2021-12-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 12 1 file changed, 12 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4d690ff64b..a4252d555d 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,18 @@ v8.0.0 (unreleased) * **New features** + * qemu: Synchronous write mode for disk

[PATCH 14/17] qemu: migration: Implement VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES

2021-12-03 Thread Peter Krempa
Use it to enable the 'write-blocking' mode of 'blockdev-mirror'. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 16 +--- src/qemu/qemu_migration.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_migration.c

[PATCH 16/17] docs: migration: Add a paragraph about non-shared storage migration

2021-12-03 Thread Peter Krempa
Outline some of the basics and the caveats of the non-shared migration code. Signed-off-by: Peter Krempa --- docs/migration.rst | 32 1 file changed, 32 insertions(+) diff --git a/docs/migration.rst b/docs/migration.rst index 0a40600462..247f345f8c 100644 ---

[PATCH 12/17] VIR_REQUIRE_FLAG_(GOTO|RET): Add parens around arguments in expansion

2021-12-03 Thread Peter Krempa
Make the macro useful also for cases when one of multiple flags is required. Signed-off-by: Peter Krempa --- src/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal.h b/src/internal.h index 2e404cd705..b6e4332542 100644 --- a/src/internal.h +++

[PATCH 11/17] man: virsh: Separate paragrapsh describing distinct flags

2021-12-03 Thread Peter Krempa
Separate the paragragraphs where the topic changes to simplify further additions. Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst

[PATCH 10/17] include: virDomainMigrateFlags: Remove "block alignment" whitespace

2021-12-03 Thread Peter Krempa
Using whitespace to align the '=' and values doesn't make sense for the virDomainMigrateFlags enum as the visual block is interrupted by comments. Signed-off-by: Peter Krempa --- include/libvirt/libvirt-domain.h | 34 1 file changed, 17 insertions(+), 17

[PATCH 13/17] virDomainMigrate: Introduce VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES flag

2021-12-03 Thread Peter Krempa
Non-shared storage migration of guests which are disk I/O intensive and have fast local storage may actually never converge if the guest happens to dirty the disk faster than it can be copied. This patch introduces a new flag 'VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES' which will instruct

[PATCH 08/17] virDomainBlockCopy: Introduce VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES flag

2021-12-03 Thread Peter Krempa
In cases when the destination storage is slower than the normal VM storage and the VM does intensive I/O to the disk a block copy job may never converge. Switching it to synchronous mode will ensure that all writes done by the guest are propagated to the destination at the cost of slowing down

[PATCH 07/17] include: virDomainBlockCopyFlags: Convert to prefix comments

2021-12-03 Thread Peter Krempa
Switch to the comment style allowing more text. Signed-off-by: Peter Krempa --- include/libvirt/libvirt-domain.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 2f017c5b68..dddcae86a4

[PATCH 05/17] qemuMonitorJSONGraphicsRelocate: Clean up command argument construction

2021-12-03 Thread Peter Krempa
Move the construction of the command from the variable declaration so that it doesn't exceed the line length and we can also move the logic of determining the protocol outside of the command construction. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 21 - 1

[PATCH 06/17] qemu: monitor: Add support for 'write-blocking' copy mode for blockdev-mirror

2021-12-03 Thread Peter Krempa
Forces the data to be written synchronously to both the original and the mirrored images which ensures that the job will reach synchronized phase. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 ++- src/qemu/qemu_migration.c| 3 ++- src/qemu/qemu_monitor.c | 10

[PATCH 04/17] qemuMonitorJSONMigrate: Extract flags prior to constructing command

2021-12-03 Thread Peter Krempa
The migration API takes specific flags which are then converted to boolean parameters for the command. Extract the flag into helper variables rather than using ternary operatirs while constructing the command itself. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 16

[PATCH 03/17] qemuMonitorJSONEjectMedia: Use a bool directly for constructing JSON with 'b' modifier

2021-12-03 Thread Peter Krempa
It actually already expects a bool. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 4b339db399..da14eee964 100644 --- a/src/qemu/qemu_monitor_json.c

[PATCH 00/16] Clean up of virJSONValueFree usage and few related refactors

2021-12-03 Thread Peter Krempa
Peter Krempa (16): qemu: hotplug: Use automatic freeing for virJSONValue qemuDomainHotplugAddIOThread: Automatically free virJSONValue qemuMonitorBlockdevCreate: Use double pointer instead of always consuming '@props' virLockDaemonClientPreExecRestart: Modernize JSON object

[PATCH 02/17] qemuMonitorJSONHandleShutdown: Use virTristateBoolFromBool

2021-12-03 Thread Peter Krempa
Instead of a ternary operator we can use the existing helper. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 1ecb06895c..4b339db399 100644 ---

[PATCH 01/17] qemu: monitor: Avoid ternary operators in helpers for drive/blockdev-mirror

2021-12-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index c10ea583fd..1ecb06895c 100644 --- a/src/qemu/qemu_monitor_json.c +++

[PATCH 00/17] qemu: Add support for blocking writes for the blockdev-mirror job

2021-12-03 Thread Peter Krempa
Blocking writes ensure that the mirroring converges even when the guest is I/O intensive with a fast local storage and slow mirror. This patchset does it by introducing flags which use the blocking mode as it will have performance impact, and for guests which do I/O in bursts it might be

[PATCH 09/16] virCHProcessUpdateInfo: Automatically free virJSONValue

2021-12-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/ch/ch_process.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index 1a01ca9384..9f82e04485 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -121,15 +121,13 @@

[PATCH 04/16] virLockDaemonClientPreExecRestart: Modernize JSON object construction

2021-12-03 Thread Peter Krempa
Use virJSONValueObjectAdd instead of step-by-step construction of the object. This also removes a handful impossible to reach errors with translatable messages. Signed-off-by: Peter Krempa --- src/locking/lock_daemon.c | 40 ++- 1 file changed, 10

[PATCH 16/16] qemu: agent: Remove unneeded cleanup sections

2021-12-03 Thread Peter Krempa
Remove the cleanup sections where not needed after we've converted to automatic freeing of virJSONValue. Signed-off-by: Peter Krempa --- src/qemu/qemu_agent.c | 96 +-- 1 file changed, 38 insertions(+), 58 deletions(-) diff --git a/src/qemu/qemu_agent.c

[PATCH 13/16] qemuMonitorAddObject: Use g_clear_pointer for a free and reset operation

2021-12-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index d752b299ab..6beb23e9f7 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2956,10 +2956,9

[PATCH 10/16] tests/virnetdaemontest.c: testExecRestart: Automatically free virJSONValue-s

2021-12-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/virnetdaemontest.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 70af1480df..24f4761bb7 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -273,8

[PATCH 05/16] virLockDaemonPostExecRestart: Automatically free temporary variables

2021-12-03 Thread Peter Krempa
Convert two temp strings and one virJSONValue to g_auto(free|ptr). Signed-off-by: Peter Krempa --- src/locking/lock_daemon.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index fc714052be..1edd912c3e 100644 ---

[PATCH 15/16] qemu: agent: Automatically free virJSONValue-s

2021-12-03 Thread Peter Krempa
Convert the code to use g_autoptr for the few cases sill using explicit cleanup. Signed-off-by: Peter Krempa --- src/qemu/qemu_agent.c | 60 ++- 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c

[PATCH 02/16] qemuDomainHotplugAddIOThread: Automatically free virJSONValue

2021-12-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6333d0af36..13e33a2289 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5233,7 +5233,7 @@

[PATCH 14/16] qemuAgentIOProcessLine: refactor cleanup

2021-12-03 Thread Peter Krempa
Refactor the control flow so we can remove the cleanup label. Signed-off-by: Peter Krempa --- src/qemu/qemu_agent.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index fc402e936f..c573e0fdf4

[PATCH 01/16] qemu: hotplug: Use automatic freeing for virJSONValue

2021-12-03 Thread Peter Krempa
There are a few uses which still explicitly free JSON objects, fix them. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 71c0686190..2e1d18c633

[PATCH 12/16] qemuMonitorJSONGetCPUModelExpansion: Don't use goto for looping

2021-12-03 Thread Peter Krempa
Don't use 'goto' for looping. Extract the monitor interaction code into a new function and restructure the logic to avoid jumping back in the code. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 74 +++- 1 file changed, 47 insertions(+), 27

[PATCH 11/16] qemuAgentGuestSync: Don't use goto for looping

2021-12-03 Thread Peter Krempa
Don't use 'goto' for looping. Extract the sync sending code into a new function and restructure the logic to avoid jumping back in the code. Signed-off-by: Peter Krempa --- src/qemu/qemu_agent.c | 119 +- 1 file changed, 72 insertions(+), 47 deletions(-)

[PATCH 08/16] virLogDaemonPostExecRestart: Refactor cleanup

2021-12-03 Thread Peter Krempa
Move the unlinking of the state file right after reading it so that we can get rid of the cleanup section. Signed-off-by: Peter Krempa --- src/logging/log_daemon.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/logging/log_daemon.c

[PATCH 07/16] virLogDaemonPostExecRestart: Use automatic freeing for variables

2021-12-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/logging/log_daemon.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index cc7889399b..a2a5b5f547 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -435,10

[PATCH 06/16] virLockDaemonPostExecRestart: Refactor cleanup

2021-12-03 Thread Peter Krempa
Move the unlinking of the state file earlier and get rid of the cleanup label. Signed-off-by: Peter Krempa --- src/locking/lock_daemon.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/locking/lock_daemon.c

[PATCH 03/16] qemuMonitorBlockdevCreate: Use double pointer instead of always consuming '@props'

2021-12-03 Thread Peter Krempa
We use this approach for other APIs which take a virJSONValue as argument and the logic is also simpler. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c| 3 +-- src/qemu/qemu_monitor.c | 13 +++-- src/qemu/qemu_monitor.h | 2 +- src/qemu/qemu_monitor_json.c |

Re: [PATCH 2/3] lib: Use g_autoptr() for virDomainDef

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: Instead of calling virDomainDefFree() explicitly, we can annotate variables with g_autoptr(). Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_driver.c| 15 + src/bhyve/bhyve_parse_command.c | 8 ++- src/ch/ch_driver.c

Re: [PATCH 1/3] virdomainobjlist: Use g_autofree

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: Instead of calling VIR_FREE() explicitly, we can annotate variables with g_autofree. Signed-off-by: Michal Privoznik --- src/conf/virdomainobjlist.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) Reviewed-by: Ján Tomko

Re: [PATCH 3/3] lib: Drop some needles labels

2021-12-03 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: After previous cleanups some labels became needles because they s/needles/needless/ both here and in the summary contain just a return statement. There's no point in having such labels. Signed-off-by: Michal Privoznik ---

[PATCH v2 4/4] tests: Add test for virDomainGetSecurityLabelList

2021-12-03 Thread Luke Yue
Signed-off-by: Luke Yue --- tests/virshtest.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/virshtest.c b/tests/virshtest.c index 012edb8601..fc7caf6bc3 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -22,7 +22,8 @@ main(void) # define

[PATCH v2 2/4] virsh: Add '--full-seclabels' option for dominfo

2021-12-03 Thread Luke Yue
There is no virsh command uses virDomainGetSecurityLabelList API, so add an option for dominfo to call it and print full list of security labels. Signed-off-by: Luke Yue --- docs/manpages/virsh.rst | 5 +++-- tools/virsh-domain-monitor.c | 43 +++- 2 files

[PATCH v2 3/4] virsh: Realign some outputs

2021-12-03 Thread Luke Yue
As it's now "Security labels:" instead of "Security label:". Signed-off-by: Luke Yue --- tests/virsh-undefine | 8 ++--- tests/virshtest.c| 70 ++-- tools/virsh-domain-monitor.c | 42 +++--- 3 files changed, 59 insertions(+),

[PATCH v2 1/4] test_driver: Implement virDomainGetSecurityLabelList

2021-12-03 Thread Luke Yue
Signed-off-by: Luke Yue --- src/test/test_driver.c | 43 ++ 1 file changed, 43 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index b6bca884f0..e9d009cfdb 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@

[PATCH v2 0/4] Add an option to use virDomainGetSecurityLabelList and test it

2021-12-03 Thread Luke Yue
diff to v1: - Add some variety when filling the test driver seclabels array - Split 2/3 in v1 to function patch and align output patch link to v1: https://listman.redhat.com/archives/libvir-list/2021-September/msg00015.html link to CI: https://gitlab.com/lukedyue/libvirt/-/pipelines/422002148

[libvirt PATCH] meson: Improve network driver enablement logic

2021-12-03 Thread Andrea Bolognani
The Homebrew package explicitly enables this driver despite us disabling it by default on macOS, so it must be functional to at least some extent and certainly can't be causing any build failures. Additionally, if the user has explicitly asked for the network driver to be enabled but libvirtd is

[PATCH v4 0/8] Implement detach device related APIs for test driver

2021-12-03 Thread Luke Yue
diff to v3: - Add virDomainDeviceDefOperationsCallbacks to xmlopt for de-duplicating purpose - Add virDomainDeviceTypeFlags for de-duplicating purpose - Remove the memballoon helper function - Squash test_driver commits - Move test device xmls to generichotplugdata - Reimplement tests with

[PATCH v4 7/8] examples: xml: test: add xml for testing devices related APIs

2021-12-03 Thread Luke Yue
Also add some device xml to generichotplugdata for testing purpose, and add the forgotten testdomfc5.xml to meson.build. Signed-off-by: Luke Yue --- examples/xml/test/meson.build | 1 + examples/xml/test/testdomfc5.xml | 54 +++

[PATCH v4 2/8] conf: Introduce virDomainDeviceDefOperationsCallbacks to xmlopt

2021-12-03 Thread Luke Yue
virDomainDeviceDefOperationsCallbacks would enable virDomainXMLOption to gain driver specific callback for attaching / detaching / updating devices, also it can store flags for attachable / detachable / updatable devices that driver supported (currently only add flags for detachable devices).

[PATCH v4 8/8] tests: Add generichotplugtest

2021-12-03 Thread Luke Yue
For testing hypervisor independent device detach / attach / update functions, currently only detaching included. Signed-off-by: Luke Yue --- The test would show error messages with expected to fail tests even with VIR_TEST_DEBUG=0, really don't know what I missed to make it quiet :( I would

[PATCH v4 6/8] test_driver: Implement virDomainDetachDeviceFlags

2021-12-03 Thread Luke Yue
Introduce testDomainChgDevice for further development (just like what we did for IOThread). And introduce testDomainDetachDeviceLiveAndConfig for detaching devices. Also as we implement testDomainChgDevice for both DetachDeviceFlags and DetachDeviceAlias, we could easily implement

[PATCH v4 5/8] domain_driver: extract DetachXXXDeviceConfig related functions and use them

2021-12-03 Thread Luke Yue
libxl / LXC / QEMU drivers share some common codes in their DomainDetachDeviceConfig functions, so extract them to domain_conf and use them with xmlopt etc to deduplicate the bigger function. At the same time, this will enable test driver to test these functions in the future. Signed-off-by:

[PATCH v4 4/8] conf: Add tpm helpers for future use

2021-12-03 Thread Luke Yue
Signed-off-by: Luke Yue --- As persistent_state and is bool type and its default value is false, so I guess it's fine that it's not explicitly assigned with false on default. --- src/conf/domain_conf.c | 67 src/conf/domain_conf.h | 6

[PATCH v4 1/8] conf: Introduce virDomainInputDefRemove and fix memory leak

2021-12-03 Thread Luke Yue
Signed-off-by: Luke Yue --- src/conf/domain_conf.c | 12 src/conf/domain_conf.h | 2 ++ src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 3 ++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[PATCH v4 3/8] conf: Add virDomainDeviceTypeFlags and use it in various drivers

2021-12-03 Thread Luke Yue
Declare and use virDomainDeviceDefOperationsCallbacks in test / QEMU / LXC / libxl drivers to store detachable devices that driver support, this would be useful in future. Also add test driver's memballoon device detach function and QEMU driver's char device detach function to their xmlopt.

Re: [PATCH v1 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-03 Thread Anup Patel
On Sat, Nov 20, 2021 at 1:17 PM Yifei Jiang wrote: > > Add kvm_riscv_get/put_regs_timer to synchronize virtual time context > from KVM. > > To set register of RISCV_TIMER_REG(state) will occur a error from KVM > on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter > that

Re: [PATCH v1 09/12] target/riscv: Add host cpu type

2021-12-03 Thread Anup Patel
On Sat, Nov 20, 2021 at 1:17 PM Yifei Jiang wrote: > > 'host' type cpu is set isa to RV32 or RV64 simply, more isa info > will obtain from KVM in kvm_arch_init_vcpu() > > Signed-off-by: Yifei Jiang > Signed-off-by: Mingwang Li > Reviewed-by: Alistair Francis Looks good to me. Reviewed-by:

Re: Release of libvirt-7.10.0

2021-12-03 Thread Andrea Bolognani
On Thu, Dec 02, 2021 at 09:07:06PM +0100, Olaf Hering wrote: > Will there be a v7.10.0 tag in libvirt-perl.git? It's there now. https://gitlab.com/libvirt/libvirt-perl/-/tags/v7.10.0 -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH v1 07/12] target/riscv: Support setting external interrupt by KVM

2021-12-03 Thread Anup Patel
On Sat, Nov 20, 2021 at 1:17 PM Yifei Jiang wrote: > > Extend riscv_cpu_update_mip() to support setting external interrupt > by KVM. It will call kvm_riscv_set_irq() to change the IRQ state in > the KVM module When kvm is enabled and the MIP_SEIP bit is set in "mask" > > In addition, bacause

Re: Release of libvirt-7.10.0

2021-12-03 Thread Daniel P . Berrangé
On Thu, Dec 02, 2021 at 09:07:06PM +0100, Olaf Hering wrote: > Am Wed, 1 Dec 2021 10:59:18 +0100 (CET) > schrieb Jiri Denemark : > > > 7.10.0 release of both libvirt and libvirt-python > > Will there be a v7.10.0 tag in libvirt-perl.git? About 5 seconds ago :-) Thanks for reminding me.

Re: [PATCH] Fix reboot command for LXC containers

2021-12-03 Thread Michal Prívozník
On 12/2/21 19:56, joachim.f...@jfalk.de wrote: > From: Joachim Falk > > The virNetDaemonQuit(dmn) command in virLXCControllerSignalChildIO triggers an > early close of all clients of lxc_controller. Here, libvirtd itself is a > client > of this controller, and the client connection is used to

Re: [PATCH v1 00/12] Add riscv kvm accel support

2021-12-03 Thread Michal Prívozník
On 11/20/21 08:46, Yifei Jiang wrote: > This series adds both riscv32 and riscv64 kvm support, and implements > migration based on riscv. What libvirt does when detecting KVM support is issuing query-kvm monitor command and checking if both 'present' and 'enabled' bools are true. If this is what