Re: [libvirt PATCH] apparmor: Enable passt support

2023-03-07 Thread Andrea Bolognani
On Tue, Mar 07, 2023 at 07:04:25PM +, Daniel P. Berrangé wrote: > On Tue, Mar 07, 2023 at 08:02:37PM +0100, Andrea Bolognani wrote: > > + # support for passt network back-end > > + /usr/bin/passt Cx -> passt, > > + > > + profile passt { > > +/usr/bin/passt r, > > + > > +signal (recei

Re: [libvirt PATCH v2] remote: add mutex when freeing private callbacks

2023-03-07 Thread Martin Kletzander
On Tue, Mar 07, 2023 at 05:57:56PM +, Mike Pontillo wrote: This commit resolves illegal memory accesses observed via: remoteClientFreePrivateCallbacks() remoteClientCloseFunc() virNetServerClientCloseLocked() virNetServerProcessClients() daemonServerProcessClients() virHashForEach() v

Re: [libvirt PATCH 0/6] do not report errors in virPidFileForceCleanupPathFull

2023-03-07 Thread Martin Kletzander
On Tue, Mar 07, 2023 at 05:15:56PM +0100, Ján Tomko wrote: https://bugzilla.redhat.com/show_bug.cgi?id=2171973 Ján Tomko (6): util: remove waitForLock from virPidFileAcquire util: introduce virPidFileAcquirePathFull leaseshelper: use virPidFileAcquirePathFull util: virPidFileAcquirePath: rem

Re: [libvirt PATCH] remote: add mutex when freeing private callbacks

2023-03-07 Thread Martin Kletzander
On Tue, Mar 07, 2023 at 08:22:25AM -0800, Mike Pontillo wrote: On Tue, Mar 7, 2023, 00:59 Martin Kletzander wrote: Good catch, we can make it even slicker with: VIR_LOCK_GUARD lock = virLockGuardLock(&priv->lock); and rely on automatic unlock at the return. Either way (let me know if you'

Re: [libvirt PATCH] apparmor: Enable passt support

2023-03-07 Thread Daniel P . Berrangé
On Tue, Mar 07, 2023 at 08:02:37PM +0100, Andrea Bolognani wrote: > passt provides an AppArmor abstraction that covers all the > inner details of its operation, so we can simply import that > and add the libvirt-specific parts on top: namely, passt > needs to be able to create a socket and pid file

[libvirt PATCH] apparmor: Enable passt support

2023-03-07 Thread Andrea Bolognani
passt provides an AppArmor abstraction that covers all the inner details of its operation, so we can simply import that and add the libvirt-specific parts on top: namely, passt needs to be able to create a socket and pid file, while the libvirt daemon needs to be able to kill passt. Signed-off-by:

[libvirt PATCH v2] remote: add mutex when freeing private callbacks

2023-03-07 Thread Mike Pontillo
This commit resolves illegal memory accesses observed via: remoteClientFreePrivateCallbacks() remoteClientCloseFunc() virNetServerClientCloseLocked() virNetServerProcessClients() daemonServerProcessClients() virHashForEach() virNetDaemonRun() main() Signed-off-by: Mike Pontillo -

Re: [libvirt PATCH] remote: add mutex when freeing private callbacks

2023-03-07 Thread Mike Pontillo
On Tue, Mar 7, 2023, 00:59 Martin Kletzander wrote: > Good catch, we can make it even slicker with: > >VIR_LOCK_GUARD lock = virLockGuardLock(&priv->lock); > > and rely on automatic unlock at the return. Either way (let me know if > you're OK with the proposed change): Thanks for the review;

[libvirt PATCH 6/6] util: do not report errors in virPidFileForceCleanupPathFull

2023-03-07 Thread Ján Tomko
Use the quiet version of virPidFileAcquirePath and remove the error reset, since there's nothing to reset anymore. https://bugzilla.redhat.com/show_bug.cgi?id=2171973 Signed-off-by: Ján Tomko --- src/util/virpidfile.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ut

[libvirt PATCH 4/6] util: virPidFileAcquirePath: remove waitForLock argument

2023-03-07 Thread Ján Tomko
None of the callers need it anymore. Signed-off-by: Ján Tomko --- src/locking/lock_daemon.c | 4 ++-- src/logging/log_daemon.c | 4 ++-- src/remote/remote_daemon.c | 2 +- src/util/vircommand.c | 2 +- src/util/virpidfile.c | 7 +++ src/util/virpidfile.h | 1 - 6 files chan

[libvirt PATCH 5/6] util: add quiet parameter to virPidFileAcquirePathFull

2023-03-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/network/leaseshelper.c | 2 +- src/util/virpidfile.c | 51 -- src/util/virpidfile.h | 1 + 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c inde

[libvirt PATCH 3/6] leaseshelper: use virPidFileAcquirePathFull

2023-03-07 Thread Ján Tomko
The only caller that actually wants to wait for the lock. Signed-off-by: Ján Tomko --- src/network/leaseshelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index ed1bc49346..b1ce313e6a 100644 --- a/src/network/leas

[libvirt PATCH 1/6] util: remove waitForLock from virPidFileAcquire

2023-03-07 Thread Ján Tomko
The parameter was added for consistency with virPidFileAcquirePath. However, all callers of virPidFileAcquire pass false. Remove the argument. Partially-reverts: 2250a2b5d21c3b3529727f38a99cba22f84024f7 Signed-off-by: Ján Tomko --- src/bhyve/bhyve_driver.c| 2 +- src/interface/i

[libvirt PATCH 0/6] do not report errors in virPidFileForceCleanupPathFull

2023-03-07 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=2171973 Ján Tomko (6): util: remove waitForLock from virPidFileAcquire util: introduce virPidFileAcquirePathFull leaseshelper: use virPidFileAcquirePathFull util: virPidFileAcquirePath: remove waitForLock argument util: add quiet parameter to v

[libvirt PATCH 2/6] util: introduce virPidFileAcquirePathFull

2023-03-07 Thread Ján Tomko
For now, add the 'Full' suffix to virPidFileAcquirePath and make virPidFileAcquirePath a 'wrapper' around it. Signed-off-by: Ján Tomko --- src/libvirt_private.syms | 1 + src/util/virpidfile.c| 14 +++--- src/util/virpidfile.h| 3 +++ 3 files changed, 15 insertions(+), 3 deleti

[PATCH v2 4/8] migration/migration-pin: Implement qemuDomainPinMigrationThread

2023-03-07 Thread Jiang Jiacheng
Add cgroup for migation thread and implement qemuDomainPinMigrationThread to pin migraiton thread to given cpumap. Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- src/conf/domain_conf.c | 9 ++ src/conf/domain_conf.h | 10 +++ src/conf/virconftypes.h | 2 ++ src/libvir

[PATCH v2 7/8] migration/migration-pin: pin migration thread immediately after get thread info

2023-03-07 Thread Jiang Jiacheng
If pcpumap is set before migration, pin migration thread to expected cpulist immediately after get thread info during migration. Add 'qemuProcessGetPcpumap' to get pcpumap, try get the result of 'virsh migratepin' first, and if it's not set, try to get the pcpumap from migration parameter. Signed-

[PATCH v2 6/8] migration/migration-pin: add migrationpin for migration parameters

2023-03-07 Thread Jiang Jiacheng
Add 'migrationpin' to migration parameters to provide another method to set the cpulist required for migration thread pin. 'migrationpin' can only be set before migration and won't effect if 'virsh migrationpin' is set. Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- include/libvirt/

[PATCH v2 8/8] migration/migration-pin/multifd-pin: add migration pin status handle

2023-03-07 Thread Jiang Jiacheng
Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_process.c | 56 + 1 file changed, 56 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e787db8b24..85a22c7e51 100644 --- a/src/qemu/qemu_process.c ++

[PATCH v2 3/8] migration/migration-pin: Introduce virDomainPinMigrationThread API

2023-03-07 Thread Jiang Jiacheng
Then, pin migration thread with given cpumap. Introduce virDomainPinMigrationThread API, and it will be implement in next patch. Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- include/libvirt/libvirt-domain.h | 5 +++ src/driver-hypervisor.h | 6 +++ src/libvirt-domain.c

[PATCH v2 1/8] migration/migration-pin: Implemente the interface of obtaining migration thread information

2023-03-07 Thread Jiang Jiacheng
First, we need get migration thread info, implement the related interface to obtain migration threadinfo from qemu using qmp command. Implementation of the Interface for Obtaining Thread Information Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_domain.c | 24 ++

[PATCH v2 5/8] migration/migration-pin: support migration pin by virsh command

2023-03-07 Thread Jiang Jiacheng
Add virsh command 'virsh migrationpin', its usage is like 'virsh migrationpin [vm] [cpulist]'. After using this command, if migration thread infomation have been got, pin it to given cpumap immediately, else wait for next migraion operation and pin migration thread after getting information. Signe

[PATCH v2 2/8] migration/migration-pin: get migration pid for migration pin

2023-03-07 Thread Jiang Jiacheng
Second, query migration thread information during migration process proactively. Migration should start after all thread be created, so querying the migration thread infomation before wating for completion and terminate the query in any abnormal situation. Signed-off-by: zhengchuan Signed-off-by:

[PATCH v2 0/8] migration/migrationpin:support migration pin

2023-03-07 Thread Jiang Jiacheng
Support set the CPU affinity of the live migration threads to improve the migration performance in specific cases. By default, the migration thread shares CPU resources with the VM process. With those API, support pin migration thread to expected CPU list to avoid preempting CPU resources of VM pro

Re: query-command-line-options (was: [PATCH 1/7] qemu: capabilities: Introduce QEMU_CAPS_MACHINE_ACPI)

2023-03-07 Thread Peter Krempa
On Tue, Mar 07, 2023 at 10:40:23 +0100, Markus Armbruster wrote: > [Resent with cc: qemu-devel and adjusted subject, sorry for the noise] > > abologna at redhat.com (Andrea Bolognani) writes: > > > On Mon, Feb 27, 2023 at 06:25:23PM +0100, Peter Krempa wrote: > >> On Mon, Feb 27, 2023 at 08:44:57

query-command-line-options (was: [PATCH 1/7] qemu: capabilities: Introduce QEMU_CAPS_MACHINE_ACPI)

2023-03-07 Thread Markus Armbruster
[Resent with cc: qemu-devel and adjusted subject, sorry for the noise] abologna at redhat.com (Andrea Bolognani) writes: > On Mon, Feb 27, 2023 at 06:25:23PM +0100, Peter Krempa wrote: >> On Mon, Feb 27, 2023 at 08:44:57 -0800, Andrea Bolognani wrote: >> > This looks like you're checking whether

Re: [PATCH 1/7] qemu: capabilities: Introduce QEMU_CAPS_MACHINE_ACPI

2023-03-07 Thread Markus Armbruster
abologna at redhat.com (Andrea Bolognani) writes: > On Mon, Feb 27, 2023 at 06:25:23PM +0100, Peter Krempa wrote: >> On Mon, Feb 27, 2023 at 08:44:57 -0800, Andrea Bolognani wrote: >> > This looks like you're checking whether -acpi itself exists as a >> > top-level option. Which it doesn't, but -n

Re: [PATCH 00/15] qemu: Fix HPET timer validation and remove always-present architecture dependent capabilities

2023-03-07 Thread Ján Tomko
On a Monday in 2023, Peter Krempa wrote: Remove everything out of virQEMUCapsInitQMPBasicArch and in the process fix a bug. Peter Krempa (15): qemu: validate: Fix logic for validating precence of the HPET timer NEWS: Mention bug in validation of HPET timer qemu: command: Replace check using Q

Re: [PATCH 01/15] qemu: validate: Fix logic for validating precence of the HPET timer

2023-03-07 Thread Ján Tomko
In the commit summary: s/precence/presence/ On a Monday in 2023, Peter Krempa wrote: Commit 24cc9cda826 switched over to use -machine hpet, but one of the steps it did was to clear the QEMU_CAPS_NO_HPET capability. The validation check still uses the old capability though which means that for

Re: [PATCH 02/15] NEWS: Mention bug in validation of HPET timer

2023-03-07 Thread Ján Tomko
On a Monday in 2023, Peter Krempa wrote: Signed-off-by: Peter Krempa --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2ccbf0a62a..a5788417f3 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -37,6 +37,12 @@ v9.2.0 (unreleased) * **Bug fixes** + * qemu: Fix

Re: [libvirt PATCH] remote: add mutex when freeing private callbacks

2023-03-07 Thread Martin Kletzander
On Mon, Mar 06, 2023 at 06:35:44PM +, Mike Pontillo wrote: This commit resolves illegal memory accesses observed via: remoteClientFreePrivateCallbacks() remoteClientCloseFunc() virNetServerClientCloseLocked() virNetServerProcessClients() daemonServerProcessClients() virHashForEach() v