Re: [libvirt][PATCH v8 3/5] conf: Introduce SGX EPC element into device memory xml

2021-12-13 Thread Ani Sinha
SOB is missing ... On Tue, Dec 14, 2021 at 9:16 AM Haibin Huang wrote: > > From: Lin Yang > > > ... > > > 512 > > > ... > > --- > docs/schemas/domaincommon.rng| 1 + > src/conf/domain_conf.c | 6 ++ > src/conf/domain_conf.h | 1 + >

Re: [libvirt][PATCH v8 4/5] qemu: Add command-line to generate SGX EPC memory backend

2021-12-13 Thread Ani Sinha
SOB is missing in this patch. On Tue, Dec 14, 2021 at 9:16 AM Haibin Huang wrote: > > From: Lin Yang > > According to the result parsing from xml, add the argument of > SGX EPC memory backend into QEMU command line: > > #qemu-system-x86_64 \ > .. \ > -object

Re: [libvirt][PATCH v8 5/5] Add unit tests for guest VM creation command with SGX EPC

2021-12-13 Thread Ani Sinha
There is no SOB line in the patch. Also no patch description :( On Tue, Dec 14, 2021 at 9:14 AM Haibin Huang wrote: > > From: Lin Yang > > --- > .../sgx-epc.x86_64-6.2.0.args | 37 +++ > tests/qemuxml2argvdata/sgx-epc.xml| 36 ++ >

[libvirt][PATCH v8 2/5] Transfer Qemu SGX Capabilities to XML

2021-12-13 Thread Haibin Huang
Convert qemu sgx capabilities: {"sgx": true, "section-size": 0, "flc": false} to XML format: no 1 Signed-off-by: Haibin Huang --- docs/schemas/domaincaps.rng | 22 ++- src/conf/domain_capabilities.c| 19

[libvirt][PATCH v8 4/5] qemu: Add command-line to generate SGX EPC memory backend

2021-12-13 Thread Haibin Huang
From: Lin Yang According to the result parsing from xml, add the argument of SGX EPC memory backend into QEMU command line: #qemu-system-x86_64 \ .. \ -object memory-backend-epc,id=mem1,size=64M,prealloc=on \ -object memory-backend-epc,id=mem2,size=28M \

[libvirt][PATCH v8 3/5] conf: Introduce SGX EPC element into device memory xml

2021-12-13 Thread Haibin Huang
From: Lin Yang ... 512 ... --- docs/schemas/domaincommon.rng| 1 + src/conf/domain_conf.c | 6 ++ src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 1 + src/qemu/qemu_alias.c| 3 +++ src/qemu/qemu_command.c

[libvirt][PATCH v8 0/5] Support query and use SGX

2021-12-13 Thread Haibin Huang
This patch series provides support for enabling Intel's Software Guard Extensions (SGX) feature in guest VM. Giving the SGX support in QEMU be accepted and will be merged in two days Intel Software Guard Extensions (Intel SGX) is a set of instructions that increases the security of application

[libvirt][PATCH v8 5/5] Add unit tests for guest VM creation command with SGX EPC

2021-12-13 Thread Haibin Huang
From: Lin Yang --- .../sgx-epc.x86_64-6.2.0.args | 37 +++ tests/qemuxml2argvdata/sgx-epc.xml| 36 ++ tests/qemuxml2argvtest.c | 2 + 3 files changed, 75 insertions(+) create mode 100644

[libvirt][PATCH v8 1/5] Get SGX Capabilities from QEMU

2021-12-13 Thread Haibin Huang
The Qemu QMP provide the command "query-sgx-capabilities" libvirt call the command to get sgx capabilities {"execute":"query-sgx-capabilities"} {"return": {"sgx": true, "sgx1": true, "sgx2": false, "section-size": 0, \ "flc": false}} Signed-off-by: Haibin Huang ---

Re: [PATCH 6/7] util: Check for pkttyagent availability properly

2021-12-13 Thread Martin Kletzander
On Mon, Dec 13, 2021 at 09:42:04AM -0700, Jim Fehlig wrote: On 12/12/21 14:15, Martin Kletzander wrote: On Sun, Dec 12, 2021 at 10:40:46AM -0700, Jim Fehlig wrote: On 12/11/21 03:28, Martin Kletzander wrote: On Sat, Dec 11, 2021 at 11:16:13AM +0100, Martin Kletzander wrote: On Fri, Dec 10,

[libvirt PATCH 2/5] util: dnsmasq: refactor CapsRefresh

2021-12-13 Thread Ján Tomko
Use two variables with automatic cleanup instead of reusing one. Remove the pointless cleanup label. Signed-off-by: Ján Tomko --- src/util/virdnsmasq.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/src/util/virdnsmasq.c

[libvirt PATCH 4/5] util: refactor virNodeSuspendSetNodeWakeup

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/util/virnodesuspend.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c index 451d798363..c92232dfe9 100644 --- a/src/util/virnodesuspend.c +++ b/src/util/virnodesuspend.c @@

[libvirt PATCH 1/5] docs: use g_auto in virCommand example

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- docs/internals/command.html.in | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/internals/command.html.in b/docs/internals/command.html.in index 585ba53a93..d9f53933c6 100644 --- a/docs/internals/command.html.in +++

[libvirt PATCH 5/5] util: use g_auto in virNodeSuspendHelper

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/util/virnodesuspend.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c index c92232dfe9..e1167605ca 100644 --- a/src/util/virnodesuspend.c +++ b/src/util/virnodesuspend.c @@ -102,7 +102,7

[libvirt PATCH 3/5] util: iscsi: use two vars in CreateIfaceIQN

2021-12-13 Thread Ján Tomko
Do not mix automatic and manual cleanup. Signed-off-by: Ján Tomko --- src/util/viriscsi.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/util/viriscsi.c b/src/util/viriscsi.c index ab4363a5ab..e84d49b03c 100644 ---

[libvirt PATCH 0/5] use g_auto for virCommand (Episode II.V: Goodbye, Galaxy!)

2021-12-13 Thread Ján Tomko
Fear not, the end is near. Ján Tomko (5): docs: use g_auto in virCommand example util: dnsmasq: refactor CapsRefresh util: iscsi: use two vars in CreateIfaceIQN util: refactor virNodeSuspendSetNodeWakeup util: use g_auto in virNodeSuspendHelper docs/internals/command.html.in | 12

[libvirt PATCH 19/20] tests: use g_auto in testCompareXMLToConfFiles

2021-12-13 Thread Ján Tomko
Use g_auto for dnsmasq context and remove the cmd variable. It was unused since its introduction in: commit 8b32c80df089a3612a0448c1a92abc2071d6b6a9 Signed-off-by: Ján Tomko --- tests/networkxml2conftest.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[libvirt PATCH 13/20] openvz: use g_auto in openvzDomainMigratePerform3Params

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index d4c65dbc26..b2589059c8 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@

[libvirt PATCH 17/20] vmware: use g_auto in vmwareLoadDomains

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vmware/vmware_conf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 3f6b51ac44..17e67ea6d2 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware/vmware_conf.c @@ -118,14

[libvirt PATCH 14/20] openvz: refactor openvzVEGetStringParam

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_util.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/openvz/openvz_util.c b/src/openvz/openvz_util.c index d14254c231..9419ce122c 100644 --- a/src/openvz/openvz_util.c +++ b/src/openvz/openvz_util.c

[libvirt PATCH 18/20] vmware: refactor vmwareExtractVersion

2021-12-13 Thread Ján Tomko
Use g_auto for cleanup and remove the cleanup label. Signed-off-by: Ján Tomko --- src/vmware/vmware_conf.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 17e67ea6d2..c88f11fcab 100644 ---

[libvirt PATCH 08/20] openvz: refactor openvzConnectListDomains

2021-12-13 Thread Ján Tomko
Use g_auto where possible, reduce scope of some variables and remove pointless ret and rc variables. Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/openvz/openvz_driver.c

[libvirt PATCH 11/20] openvz: refactor openvzDomainSetBarrierLimit

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 345c31304a..3cd655e5a7 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c

[libvirt PATCH 15/20] vz: utils: use g_auto for virCommand

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vz/vz_utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index 8fed875281..90e26091bb 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -92,7 +92,7 @@ vzDomObjFromDomain(virDomainPtr domain)

[libvirt PATCH 16/20] vmware: refactor vmwareUpdateVMStatus

2021-12-13 Thread Ján Tomko
Use g_auto and get rid of the cleanup label, as well as the ret variable. Signed-off-by: Ján Tomko --- src/vmware/vmware_driver.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index

[libvirt PATCH 07/20] openvz: refactor openvzDomainSetNetwork

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 073de66611..cffdb20898 100644 --- a/src/openvz/openvz_driver.c +++

[libvirt PATCH 20/20] tests: storagevolxml2argvtest: do not reuse cmd

2021-12-13 Thread Ján Tomko
Reduce the scope of the variable to avoid mixing automatic and manual cleanup. Signed-off-by: Ján Tomko --- tests/storagevolxml2argvtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index

[libvirt PATCH 01/20] openvz: refactor openvzExtractVersionInfo

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_conf.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index 4fb18c03ee..53170a720b 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@

[libvirt PATCH 03/20] openvz: refactor openvzGetVEID

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_conf.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index 94c3baf87f..d2acbc2606 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@ -978,23

[libvirt PATCH 10/20] openvz: refactor openvzDomainGetBarrierLimit

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index f1ee540a8b..345c31304a 100644 --- a/src/openvz/openvz_driver.c +++

[libvirt PATCH 12/20] openvz: refactor openvzGetVEStatus

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 3cd655e5a7..d4c65dbc26 100644 --- a/src/openvz/openvz_driver.c +++

[libvirt PATCH 06/20] openvz: refactor openvzSetDiskQuota

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index c4fa83f4c6..073de66611 100644 --- a/src/openvz/openvz_driver.c +++

[libvirt PATCH 00/20] use g_auto for virCommand (Episode II: The Sequel)

2021-12-13 Thread Ján Tomko
TBD: docs/ and src/util Ján Tomko (20): openvz: refactor openvzExtractVersionInfo openvz: refactor openvzLoadDomains openvz: refactor openvzGetVEID openvz: refactor openvzDomainDefineCmd openvz: refactor openvzSetInitialConfig openvz: refactor openvzSetDiskQuota openvz: refactor

[libvirt PATCH 05/20] openvz: refactor openvzSetInitialConfig

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index efd334a235..c4fa83f4c6 100644 --- a/src/openvz/openvz_driver.c +++

[libvirt PATCH 09/20] openvz: refactor openvzConnectListDefinedDomains

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 38 ++ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index fa5ded54ec..f1ee540a8b 100644 --- a/src/openvz/openvz_driver.c +++

[libvirt PATCH 04/20] openvz: refactor openvzDomainDefineCmd

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index ce3262c0e2..efd334a235 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@

[libvirt PATCH 02/20] openvz: refactor openvzLoadDomains

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/openvz/openvz_conf.c | 32 +++- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index 53170a720b..94c3baf87f 100644 --- a/src/openvz/openvz_conf.c +++

Re: [PATCH v3 0/4] Introduce TCG domain features

2021-12-13 Thread Peter Krempa
On Thu, Dec 02, 2021 at 09:53:32 +0100, Michal Privoznik wrote: > v3 of: > > https://listman.redhat.com/archives/libvir-list/2021-November/msg00194.html > > Note, patches 1/4 and 2/4 from v2 were pushed already. > > diff to v2: > - Split feature validation into a separate patch > - Validate

Re: [PATCH v3 3/4] qemu: Generate command line for tb-cache feature

2021-12-13 Thread Peter Krempa
On Thu, Dec 02, 2021 at 09:53:35 +0100, Michal Privoznik wrote: > Generating command line is pretty easy - just put tb-size=XXX > onto -accel tcg part. Note, that QEMU expects the size in MiB. > > Resolves: https://gitlab.com/libvirt/libvirt/-/issues/229 > Signed-off-by: Michal Privoznik >

Re: [PATCH v3 2/4] qemu: Validate TCG feature is enabled only for TCG domains

2021-12-13 Thread Peter Krempa
On Thu, Dec 02, 2021 at 09:53:34 +0100, Michal Privoznik wrote: > After previous commit it's possible for domains to fine tune TCG > features (well, just one - tb-cache). Check that domain has TCG > enabled, otherwise the feature makes no sense. > > Signed-off-by: Michal Privoznik > --- >

Re: [PATCH v2 12/12] target/riscv: Support virtual time context synchronization

2021-12-13 Thread Richard Henderson
On 12/10/21 2:07 AM, Yifei Jiang via wrote: +static bool kvmtimer_needed(void *opaque) +{ +return kvm_enabled(); +} + + +static const VMStateDescription vmstate_kvmtimer = { +.name = "cpu/kvmtimer", +.version_id = 1, +.minimum_version_id = 1, +.needed = kvmtimer_needed, +

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

2021-12-13 Thread Richard Henderson
On 12/12/21 9:05 PM, Anup Patel wrote: +ret = kvm_get_one_reg(cs, RISCV_TIMER_REG(env, state), ); +if (ret) { +abort(); +} +env->kvm_timer_state = reg; Please read the timer frequency here. Yep. + +env->kvm_timer_dirty = true; +} + +static void

Re: [libvirt PATCH 00/14] use g_auto for virCommand (Episode I: The End)

2021-12-13 Thread Michal Prívozník
On 12/13/21 14:59, Ján Tomko wrote: > A partial cleanup. The rest is in progress (TM) > > Ján Tomko (14): > bhyve: refactor virBhyveProbeGrubCaps > bhyve: refactor bhyveProbeCapsDeviceHelper > bhyve: refactor bhyveProbeCapsFromHelp > bhyve: refactor bhyveConnectDomainXMLToNative >

[libvirt PATCH 1/2] qemu: Support enabling migration caps unless a flag is used

2021-12-13 Thread Jiri Denemark
So far we were enabling specific migration capabilities when a corresponding API flag is set. We need to generalize our code to be able to enable some migration capabilities unless a particular API flag is used. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 33

[libvirt PATCH 2/2] qemu: Add support for return-path migration capability

2021-12-13 Thread Jiri Denemark
When return-path is enabled, QEMU on the source host won't report completed migration until the destination QEMU sends a confirmation it successfully loaded all data. Libvirt would detect such situation in the Finish phase and report the error read from QEMU's stderr back to the source, but using

[libvirt PATCH 0/2] qemu: Add support for return-path migration capability

2021-12-13 Thread Jiri Denemark
See 2/2 for more details about the capability. Jiri Denemark (2): qemu: Support enabling migration caps unless a flag is used qemu: Add support for return-path migration capability src/qemu/qemu_migration_params.c | 39 src/qemu/qemu_migration_params.h | 1

[libvirt PATCH 07/14] bhyve: refactor virBhyveProcessBuildBhyveCmd

2021-12-13 Thread Ján Tomko
Use automatic cleanup for virCommand, steal it on success and remove the error label. Signed-off-by: Ján Tomko --- src/bhyve/bhyve_command.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/bhyve/bhyve_command.c

[libvirt PATCH 09/14] lxc: refactor virLXCProcessBuildControllerCmd

2021-12-13 Thread Ján Tomko
Use automatic cleanup and remove the labels. Signed-off-by: Ján Tomko --- src/lxc/lxc_process.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 625208c86b..118d9cbdcc 100644 --- a/src/lxc/lxc_process.c +++

[libvirt PATCH 12/14] storage: util: steal cmd in CreateQemuImgCmdFromVol

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/storage/storage_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index ce61f37172..bfc3edb1fd 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@

[libvirt PATCH 13/14] security: apparmor: use automatic cleanup in load_profile

2021-12-13 Thread Ján Tomko
Use g_auto for virCommand and char * and drop the cleanup label. Signed-off-by: Ján Tomko --- src/security/security_apparmor.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index

[libvirt PATCH 14/14] qemu: use automatic cleanup for virCommand

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/qemu/qemu_driver.c| 3 +-- src/qemu/qemu_interface.c | 3 +-- src/qemu/qemu_tpm.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e444ad2d45..db2b25adbd 100644 ---

[libvirt PATCH 08/14] lxc: use g_auto in lxcContainerChild

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/lxc/lxc_container.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 1d5b9bf429..3f38c55fc6 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -1927,7 +1927,7 @@

[libvirt PATCH 06/14] bhyve: use g_auto in virBhyveProcessStop

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/bhyve/bhyve_process.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index ead6b0e522..ee692d2ba3 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -285,7 +285,7

[libvirt PATCH 11/14] storage: logical: use two cmd vars in GetPoolSources

2021-12-13 Thread Ján Tomko
Do not mix manual and automatic freeing. Signed-off-by: Ján Tomko --- src/storage/storage_backend_logical.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index

[libvirt PATCH 10/14] lxc: use g_auto for virCommand in virLXCProcessEnsureRootFS

2021-12-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/lxc/lxc_process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 118d9cbdcc..db023630bd 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1187,7 +1187,7 @@ int

[libvirt PATCH 05/14] bhyve: use g_auto in virBhyveProcessStartImpl

2021-12-13 Thread Ján Tomko
Use g_auto and VIR_AUTOCLOSE where possible. Signed-off-by: Ján Tomko --- src/bhyve/bhyve_process.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index 8de5fe4838..ead6b0e522 100644 ---

[libvirt PATCH 03/14] bhyve: refactor bhyveProbeCapsFromHelp

2021-12-13 Thread Ján Tomko
Use g_auto and remove the 'ret' variable, as well as the out label. Signed-off-by: Ján Tomko --- src/bhyve/bhyve_capabilities.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index

[libvirt PATCH 04/14] bhyve: refactor bhyveConnectDomainXMLToNative

2021-12-13 Thread Ján Tomko
Use g_auto and remove the ret variable, as well as the cleanup label. Signed-off-by: Ján Tomko --- src/bhyve/bhyve_driver.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index

[libvirt PATCH 00/14] use g_auto for virCommand (Episode I: The End)

2021-12-13 Thread Ján Tomko
A partial cleanup. The rest is in progress (TM) Ján Tomko (14): bhyve: refactor virBhyveProbeGrubCaps bhyve: refactor bhyveProbeCapsDeviceHelper bhyve: refactor bhyveProbeCapsFromHelp bhyve: refactor bhyveConnectDomainXMLToNative bhyve: use g_auto in virBhyveProcessStartImpl bhyve:

[libvirt PATCH 02/14] bhyve: refactor bhyveProbeCapsDeviceHelper

2021-12-13 Thread Ján Tomko
Use g_auto and remove the 'ret' variable, as well as the cleanup label. Signed-off-by: Ján Tomko --- src/bhyve/bhyve_capabilities.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index

[libvirt PATCH 01/14] bhyve: refactor virBhyveProbeGrubCaps

2021-12-13 Thread Ján Tomko
Use g_auto and remove the 'ret' variable, as well as the cleanup label. Signed-off-by: Ján Tomko --- src/bhyve/bhyve_capabilities.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c

[libvirt PATCH v2 1/1] virt-ssh-helper: Add manual page

2021-12-13 Thread Andrea Bolognani
We don't usually provide manual pages for internal tools, but in the case of virt-ssh-helper the command is installed inside the default $PATH and so it's likely that the user will stumble upon it by using the shell's completion feature when invoking another virt-* command, which makes it a good

[libvirt PATCH v2 0/1] Improve usage information and manual pages

2021-12-13 Thread Andrea Bolognani
Changes from [v1]: * the commit message has been updated to include the rationale for adding a manual page for virt-ssh-helper. [v1] https://listman.redhat.com/archives/libvir-list/2021-December/msg00466.html Andrea Bolognani (1): virt-ssh-helper: Add manual page

Re: [PATCH v2 2/3] rpc: Introduce virNetClientStreamInData()

2021-12-13 Thread Martin Kletzander
On Thu, Dec 09, 2021 at 09:44:22AM +0100, Michal Privoznik wrote: The aim of this function is to look at a virNetClientStream and tell whether the incoming packet (if there's one) contains data (type VIR_NET_STREAM) or a hole (type VIR_NET_STREAM_HOLE) and how big the section is. This function

Re: [PATCH 3/3] remote_driver: Implement virStreamInData() callback

2021-12-13 Thread Martin Kletzander
On Wed, Dec 08, 2021 at 09:57:41PM +0100, Martin Kletzander wrote: On Tue, Dec 07, 2021 at 04:34:42PM +0100, Michal Privoznik wrote: When using the monolithic daemon the driver for virStream is always virFDStreamDrv and thus calling virStreamInData() results in calling virFDStreamInData(). But

Re: [libvirt PATCH 0/8] Use g_auto for virCaps and LXCDriverConfig (glib chronicles)

2021-12-13 Thread Michal Prívozník
On 12/10/21 17:06, Ján Tomko wrote: > Pipeline in progress: > https://gitlab.com/janotomko/libvirt/-/pipelines/427100328 > > Ján Tomko (8): > lxc: fix error value of lxcNodeGetSecurityModel > Use g_auto for freeing virCaps > Use g_auto for stealing virCaps > lxc: define cleanup function

Re: [libvirt PATCH 1/8] lxc: fix error value of lxcNodeGetSecurityModel

2021-12-13 Thread Michal Prívozník
On 12/10/21 17:06, Ján Tomko wrote: > When adding the ACL check and caps getter, we assumed that > the default return value is -1, not 0 as usual. > > Fix the return value on error by assigning them explicitly. > > Signed-off-by: Ján Tomko > --- > src/lxc/lxc_driver.c | 8 ++-- > 1 file

Re: [libvirt PATCH] qemu: qemuBuildChardevCommand: use chrSourcePriv unconditionally

2021-12-13 Thread Peter Krempa
On Mon, Dec 13, 2021 at 13:30:28 +0100, Ján Tomko wrote: > In the QEMU driver, we allocate private source data unconditionally > for every chardev and the rest of the function just assumes it's there. > > Signed-off-by: Ján Tomko > --- > Pointed out by Coverity. > > src/qemu/qemu_command.c | 2

[libvirt PATCH] qemu: qemuBuildChardevCommand: use chrSourcePriv unconditionally

2021-12-13 Thread Ján Tomko
In the QEMU driver, we allocate private source data unconditionally for every chardev and the rest of the function just assumes it's there. Signed-off-by: Ján Tomko --- Pointed out by Coverity. src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt PATCH v2 06/12] tools: add 'nodesevinfo' virsh command

2021-12-13 Thread Daniel P . Berrangé
On Fri, Dec 10, 2021 at 02:52:55PM +0100, Peter Krempa wrote: > On Fri, Dec 10, 2021 at 11:37:29 +, Daniel P. Berrangé wrote: > > While some SEV info is reported in the domain capabilities, > > for reasons of size, this excludes the certificates. The > > nodesevinfo command provides the full

Re: [PATCH] qemuProcessPrepareHost: Create domain private dirs as early as possible

2021-12-13 Thread Peter Krempa
On Mon, Dec 13, 2021 at 12:21:16 +0100, Michal Privoznik wrote: > As of ff024b60cc3 we are opening chardevs before starting QEMU. > However, we also doing that before domain private directories are > created. This leaves us impossible to create guest agent socket > which lives under

Re: [libvirt PATCH] nss: Use shared_library() for nss_libvirt_lib

2021-12-13 Thread Daniel P . Berrangé
On Mon, Dec 13, 2021 at 12:07:36PM +0100, Michal Prívozník wrote: > On 12/11/21 01:27, Andrea Bolognani wrote: > > shared_module() is intended for shared objects that are > > loaded at runtime using dlopen() whereas NSS plugins need to > > be full-fledged shared libraries with, among other things,

Re: [PATCH] qemuProcessPrepareHost: Create domain private dirs as early as possible

2021-12-13 Thread Martin Kletzander
On Mon, Dec 13, 2021 at 12:21:16PM +0100, Michal Privoznik wrote: As of ff024b60cc3 we are opening chardevs before starting QEMU. However, we also doing that before domain private directories are created. This leaves us impossible to create guest agent socket which lives under

Re: [PATCH] qemuProcessPrepareHost: Create domain private dirs as early as possible

2021-12-13 Thread Ján Tomko
On a Monday in 2021, Michal Privoznik wrote: As of ff024b60cc3 we are opening chardevs before starting QEMU. However, we also doing that before domain private directories are *we are created. This leaves us impossible to create guest agent socket leaves us unable or makes it impossible

[PATCH] qemuProcessPrepareHost: Create domain private dirs as early as possible

2021-12-13 Thread Michal Privoznik
As of ff024b60cc3 we are opening chardevs before starting QEMU. However, we also doing that before domain private directories are created. This leaves us impossible to create guest agent socket which lives under priv->channelTargetDir. While creating the dirs can be moved just before

Re: [libvirt PATCH] nss: Use shared_library() for nss_libvirt_lib

2021-12-13 Thread Michal Prívozník
On 12/11/21 01:27, Andrea Bolognani wrote: > shared_module() is intended for shared objects that are > loaded at runtime using dlopen() whereas NSS plugins need to > be full-fledged shared libraries with, among other things, a > proper SONAME. > > Meson seems to have become more strict about this

Re: [PATCH 03/24] qemu: Move creation and opening of chardev backend FDs to host prepare step

2021-12-13 Thread Michal Prívozník
On 12/9/21 13:30, Peter Krempa wrote: > The opening of files for FD passing for a chardev backend was > historically done in the function which is formatting the commandline. > > This has multiple problems. Firstly the function takes a lot of > parameters which need to be passed through the

Re: [libvirt PATCH 00/12] Clean up cruft in firewall/iptables code (in preparation for nftables)

2021-12-13 Thread Michal Prívozník
On 12/12/21 20:48, Laine Stump wrote: > These patches make no functional change, they just remove a bunch of > cruft that accumulated over the years and is no longer needed. > > This is all in advance of adding support for native nftable support, > but there is nothing nftables-specific being