Re: Patches on libvirt patchew are outdated

2023-12-18 Thread Han Han
The data of libvirt patchew has been synced. Thanks On Mon, Dec 18, 2023 at 9:57 PM Paolo Bonzini wrote: > On Mon, Dec 18, 2023 at 2:14 PM Peter Krempa wrote: > > The patches are now picked up, but I've noticed that all series' are > > marked as "does not apply to master". > > > > Unfortunately

Re: [libvirt PATCH 3/5] Config some capabilities for loongarch virt machine

2023-12-18 Thread lixianglai
Hi Andrea : On Thu, Dec 14, 2023 at 02:08:47PM +0800, xianglai li wrote: +++ b/src/qemu/qemu_domain.c @@ -5635,6 +5635,11 @@ qemuDomainControllerDefPostParse(virDomainControllerDef *cont, cont->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QEMU_XHCI; else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NEC_U

Re: [libvirt PATCH 3/5] Config some capabilities for loongarch virt machine

2023-12-18 Thread lixianglai
Hi Andrea : On Thu, Dec 14, 2023 at 02:08:47PM +0800, xianglai li wrote: +++ b/src/qemu/qemu_domain.c @@ -5635,6 +5635,11 @@ qemuDomainControllerDefPostParse(virDomainControllerDef *cont, cont->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QEMU_XHCI; else if (v

[PATCH] apparmor: Add capabilities for PCI passthrough to virtxend profile

2023-12-18 Thread Jim Fehlig
When splitting out the apparmor modular daemon profiles from the libvirtd profile, the net_admin and sys_admin capabilities were dropped from the virtxend profile. It was not known at the time that these capabilities were needed for PCI passthrough. Without the capabilities, the following messages

[vf-token 7/8] test: add tests for the vf-token flag

2023-12-18 Thread Vivek Kashyap
Add tests for the vf-token flag to the qemuxml2argv and qemuxml2xml test suites Signed-off-by: Vivek Kashyap Signed-off-by: Ciara Loftus --- .../hostdev-vfio-vf-token.x86_64-latest.args | 34 .../hostdev-vfio-vf-token.xml | 22 ++ tests/qemuxml2argvtest

[vf-token 8/8] NEWS: Update news about vf-token

2023-12-18 Thread Vivek Kashyap
Update news about vf-token Signed-off-by: Vivek Kashyap --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index dc40602c72..5e6a7c3147 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,14 @@ v10.0.0 (unreleased) * **New features** + * qemu: suppor

[vf-token 6/8] docs: Update documentation and vf-token schema

2023-12-18 Thread Vivek Kashyap
Provide information about the vf-token flag Signed-off-by: Vivek Kashyap --- docs/formatdomain.rst | 3 +++ src/conf/schemas/basictypes.rng | 7 +++ 2 files changed, 10 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 310d2bc427..29a7b3145e 100644 ---

[vf-token 5/8] qemu: Introduce validation for vf-token

2023-12-18 Thread Vivek Kashyap
Introduce a validation function for vf-token support in qemu and generate vf-token device attribute in qemu command line Signed-off-by: Vivek Kashyap --- src/qemu/qemu_command.c | 8 src/qemu/qemu_validate.c | 20 2 files changed, 28 insertions(+) diff --git a/sr

[vf-token 4/8] conf: XML parsing and formatting of vf-token

2023-12-18 Thread Vivek Kashyap
This patch introduces new XML parser/formatter functions for parsing the vf-token Signed-off-by: Vivek Kashyap Signed-off-by: Ciara Loftus --- src/conf/device_conf.c | 49 ++-- src/conf/domain_conf.c | 8 +++ src/libvirt_private.syms | 1 + src/util

[vf-token 3/8] conf: Define PCI address vf-token extension

2023-12-18 Thread Vivek Kashyap
This patch introduces the PCI address extension flag for vf-token Signed-off-by: Vivek Kashyap --- src/conf/domain_addr.h | 1 + src/qemu/qemu_domain_address.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index e72fb48847..29e725

[vf-token 2/8] qemu: capabilities: Introduce QEMU_CAPS_VFIO_VFTOKEN

2023-12-18 Thread Vivek Kashyap
Introduce the vf-token qemu capability Signed-off-by: Vivek Kashyap --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml | 1 + tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml | 1 +

[vf-token 0/8] Introduce vf-token when using userspace PF

2023-12-18 Thread Vivek Kashyap
The VFIO PCI ABI has been extended to require userspace PF driver to set a VF token to a known value. The VF drivers are then required to provide this token to access the VF device. The vf-token is set by the PF driver before VF drivers can access the device. The kernel provides no means to retrie

[vf-token 1/8] virpci: Define the vf-token extension for PCI device

2023-12-18 Thread Vivek Kashyap
Define the vf-token extension for PCI device Signed-off-by: Vivek Kashyap --- src/util/virpci.h | 8 1 file changed, 8 insertions(+) diff --git a/src/util/virpci.h b/src/util/virpci.h index bc7cb2329f..da32c2f4d2 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -50,6 +50,13 @@

Re: [PATCH] rpc: fix race in waking up client event loop

2023-12-18 Thread Denis V. Lunev
On 12/18/23 13:23, Daniel P. Berrangé wrote: The first thread to issue a client RPC request will own the event loop execution, sitting in the virNetClientIOEventLoop function. It releases the client lock while running: virNetClientUnlock() g_main_loop_run() virNetClientLock() If a

Re: [PATCH 2/2] qemuxml2argvmock: Poison virCommandRun and virFork from test context

2023-12-18 Thread Michal Prívozník
On 12/18/23 15:26, Peter Krempa wrote: > On Mon, Dec 18, 2023 at 15:17:01 +0100, Michal Prívozník wrote: >> On 12/18/23 12:02, Peter Krempa wrote: >>> We don't want to ever run an actuall command in qemuxml2argvtest poison >>> the helper functions we have for running commands. >>> >>> Signed-off-by

Re: [PATCH] rpc: fix race in waking up client event loop

2023-12-18 Thread Efim Shevrin
Hello, Your patch works on our stand without any freezing. Tested by: Fima Shevrin From: Daniel P. Berrangé Sent: Monday, December 18, 2023 20:23 To: devel@lists.libvirt.org Cc: Efim Shevrin ; Denis V. Lunev ; Daniel P. Berrangé Subject: [PATCH] rpc: fix race

Re: [PATCH] rpc: fix race in waking up client event loop

2023-12-18 Thread Michal Prívozník
On 12/18/23 13:23, Daniel P. Berrangé wrote: > The first thread to issue a client RPC request will own the event > loop execution, sitting in the virNetClientIOEventLoop function. > > It releases the client lock while running: > >virNetClientUnlock() >g_main_loop_run() >virNetClientLo

Re: [PATCH 2/2] qemuxml2argvmock: Poison virCommandRun and virFork from test context

2023-12-18 Thread Peter Krempa
On Mon, Dec 18, 2023 at 15:17:01 +0100, Michal Prívozník wrote: > On 12/18/23 12:02, Peter Krempa wrote: > > We don't want to ever run an actuall command in qemuxml2argvtest poison > > the helper functions we have for running commands. > > > > Signed-off-by: Peter Krempa > > --- > > src/util/vir

Re: [PATCH 0/2] qemuxml2argvtest: Don't exec '/usr/libexec/qemu/vhost-user/test-vhost-user-gpu'

2023-12-18 Thread Michal Prívozník
On 12/18/23 12:02, Peter Krempa wrote: > 'qemuExtVhostUserGPUPrepareDomain' breaks our design assumptions about > the 'PrepareDomain' step which should not touch anything on the host. > > This patchset for now fixes the symptom by mocking the function and > poisons virFork and virCommandRun so tha

Re: [PATCH 2/2] qemuxml2argvmock: Poison virCommandRun and virFork from test context

2023-12-18 Thread Michal Prívozník
On 12/18/23 12:02, Peter Krempa wrote: > We don't want to ever run an actuall command in qemuxml2argvtest poison > the helper functions we have for running commands. > > Signed-off-by: Peter Krempa > --- > src/util/vircommand.h| 4 ++-- > tests/qemuxml2argvmock.c | 19 +++ >

Re: Patches on libvirt patchew are outdated

2023-12-18 Thread Paolo Bonzini
On Mon, Dec 18, 2023 at 2:14 PM Peter Krempa wrote: > The patches are now picked up, but I've noticed that all series' are > marked as "does not apply to master". > > Unfortunately the new mailing list (mailman3 + hyperkitty) has a bad > habit of touching all the patches. Very specifically it reco

Re: Patches on libvirt patchew are outdated

2023-12-18 Thread Peter Krempa
On Mon, Dec 18, 2023 at 10:27:54 +0100, Paolo Bonzini wrote: > On Mon, Dec 18, 2023 at 9:33 AM Paolo Bonzini wrote: > > > > On Mon, Dec 18, 2023 at 9:32 AM Peter Krempa wrote: > > > > > > On Mon, Dec 18, 2023 at 14:42:57 +0800, Han Han wrote: > > > > Hi, > > > > The libvirt patchew https://patche

[PATCH] rpc: fix race in waking up client event loop

2023-12-18 Thread Daniel P . Berrangé
The first thread to issue a client RPC request will own the event loop execution, sitting in the virNetClientIOEventLoop function. It releases the client lock while running: virNetClientUnlock() g_main_loop_run() virNetClientLock() If a second thread arrives with an RPC request, it will

[PATCH 1/3] rpc: create virNetClientIOWakeup helper

2023-12-18 Thread Denis V. Lunev
This functionality is to be extended, simple call to g_main_loop_quit() is not enough. In order to make changes convinient, the helper is required. Signed-off-by: Denis V. Lunev --- src/rpc/virnetclient.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src

[PATCH 2/3] rpc: mark GSourceFuncs functions in vireventglibwatch.c as static

2023-12-18 Thread Denis V. Lunev
They are not exported from the module and thus should be static. Signed-off-by: Denis V. Lunev --- src/util/vireventglibwatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/vireventglibwatch.c b/src/util/vireventglibwatch.c index b7f3a8786a..b21e505731 100644

[PATCH 3/3] rpc: handle notifications properly

2023-12-18 Thread Denis V. Lunev
RPC client implementation uses the following paradigm. The critical section is organized via virObjectLock(client)/virObjectUnlock(client) braces. Though this is potentially problematic as main thread:side thread: virObjectUnlock(client);

[PATCH v-pipe 0/3] alternative approach to the fix

2023-12-18 Thread Denis V. Lunev
This is a dirty working code using pipes. Sent for discussion of the approach. Made against our downstream based on libvirt 8.5. Signed-off-by: Denis V. Lunev ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le..

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-18 Thread Denis V. Lunev
On 12/18/23 12:03, Daniel P. Berrangé wrote: On Mon, Dec 18, 2023 at 10:32:07AM +, Daniel P. Berrangé wrote: On Fri, Dec 15, 2023 at 02:32:19AM +0800, Fima Shevrin wrote: RPC client implementation uses the following paradigm. The critical section is organized via virObjectLock(client)/virOb

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-18 Thread Daniel P . Berrangé
On Mon, Dec 18, 2023 at 10:32:07AM +, Daniel P. Berrangé wrote: > On Fri, Dec 15, 2023 at 02:32:19AM +0800, Fima Shevrin wrote: > > RPC client implementation uses the following paradigm. The critical > > section is organized via virObjectLock(client)/virObjectUnlock(client) > > braces. Though t

[PATCH 2/2] qemuxml2argvmock: Poison virCommandRun and virFork from test context

2023-12-18 Thread Peter Krempa
We don't want to ever run an actuall command in qemuxml2argvtest poison the helper functions we have for running commands. Signed-off-by: Peter Krempa --- src/util/vircommand.h| 4 ++-- tests/qemuxml2argvmock.c | 19 +++ 2 files changed, 21 insertions(+), 2 deletions(-) dif

[PATCH 1/2] qemuxml2argvmock: Mock qemuExtVhostUserGPUPrepareDomain

2023-12-18 Thread Peter Krempa
Noticed when breaking on 'fork()' in qemuxml2argvtest (output slihtly trimmed, of unimportant file locations: #0 0x775abf18 in fork () at /lib64/libc.so.6 #1 0x77b88387 in virFork () at ../../../libvirt/src/util/vircommand.c:282 #2 0x77b8a7d2 in virExec (cmd=0x555

[PATCH 0/2] qemuxml2argvtest: Don't exec '/usr/libexec/qemu/vhost-user/test-vhost-user-gpu'

2023-12-18 Thread Peter Krempa
'qemuExtVhostUserGPUPrepareDomain' breaks our design assumptions about the 'PrepareDomain' step which should not touch anything on the host. This patchset for now fixes the symptom by mocking the function and poisons virFork and virCommandRun so that this doesn't happen in the future. Proper fix

Re: [PATCH 3/3] rpc: Rework rpc notifications in main and side thread

2023-12-18 Thread Daniel P . Berrangé
On Fri, Dec 15, 2023 at 02:32:19AM +0800, Fima Shevrin wrote: > RPC client implementation uses the following paradigm. The critical > section is organized via virObjectLock(client)/virObjectUnlock(client) > braces. Though this is potentially problematic as > main thread:

Re: Patches on libvirt patchew are outdated

2023-12-18 Thread Paolo Bonzini
On Mon, Dec 18, 2023 at 9:33 AM Paolo Bonzini wrote: > > On Mon, Dec 18, 2023 at 9:32 AM Peter Krempa wrote: > > > > On Mon, Dec 18, 2023 at 14:42:57 +0800, Han Han wrote: > > > Hi, > > > The libvirt patchew https://patchew.org/Libvirt/ has no update for more > > > than one month. Is it dropped?

Re: [libvirt PATCH v2 12/15] conf: support manually specifying VFIO variant driver in XML

2023-12-18 Thread Peter Krempa
On Mon, Dec 18, 2023 at 01:25:02 -0500, Laine Stump wrote: > On 11/28/23 9:58 AM, Peter Krempa wrote: > > On Mon, Nov 06, 2023 at 02:38:57 -0500, Laine Stump wrote: > > > This patch makes it possible to manually specify which VFIO variant > > > driver to use for PCI hostdev device assignment, so th

Re: [libvirt PATCH v2 10/15] xen: explicitly set hostdev driver.type at runtime, not in postparse

2023-12-18 Thread Peter Krempa
On Mon, Dec 18, 2023 at 01:14:55 -0500, Laine Stump wrote: > On 11/27/23 10:12 AM, Peter Krempa wrote: > > On Mon, Nov 06, 2023 at 02:38:55 -0500, Laine Stump wrote: > > > Xen only supports a single type of PCI hostdev assignment, so it is > > > superfluous to have peppered throughout the > > > co

Re: [libvirt PATCH v2 05/15] conf: put hostdev PCI backend into a struct

2023-12-18 Thread Peter Krempa
On Sun, Dec 17, 2023 at 21:28:46 -0500, Laine Stump wrote: > On 11/27/23 9:53 AM, Peter Krempa wrote: > > > @@ -29973,14 +29973,10 @@ virDomainNetDefActualToNetworkPort(virDomainDef > > > *dom, > > > break; > > > case VIR_DEVICE_HOSTDEV_PCI_DRIVER_TYPE_XEN: > > > -

Re: Patches on libvirt patchew are outdated

2023-12-18 Thread Paolo Bonzini
On Mon, Dec 18, 2023 at 9:32 AM Peter Krempa wrote: > > On Mon, Dec 18, 2023 at 14:42:57 +0800, Han Han wrote: > > Hi, > > The libvirt patchew https://patchew.org/Libvirt/ has no update for more > > than one month. Is it dropped? If not, please sync the patches to it~ > > The problem is likely cau

Re: Patches on libvirt patchew are outdated

2023-12-18 Thread Peter Krempa
On Mon, Dec 18, 2023 at 14:42:57 +0800, Han Han wrote: > Hi, > The libvirt patchew https://patchew.org/Libvirt/ has no update for more > than one month. Is it dropped? If not, please sync the patches to it~ The problem is likely caused by the switch to the new mailing list. The patch importer of p