Re: [libvirt PATCH] nodedev: switch to udev 'bind' events

2022-09-23 Thread Laine Stump
On 9/22/22 12:41 PM, Jonathon Jongsma wrote: On 9/22/22 3:59 AM, Erik Skultety wrote: On Tue, Sep 20, 2022 at 02:23:23PM -0500, Jonathon Jongsma wrote: Rather than listening to 'add' udev events, listen for 'bind' events instead. When we get an 'add' event, the sysfs tree for the device is

[PATCH 2/2] daemon: Introduce the possibility for users to register custom XML validator

2022-09-23 Thread Peter Krempa
Introduce a new config option 'xml_validator' into the daemon config file which will allow users to make libvirt daemons use a custom XML validator. The rationale is that validators such as 'jing'[1] provide drastically better error specification when compared to the native libxml2 validator we

[PATCH 1/2] util: xml: Introduce infrastructure to support custom XML validators

2022-09-23 Thread Peter Krempa
The XML from libxml2 we use in libvirt has in many cases very bad error messages, which make it very difficult to point to the specific problem with the validated XML. This patch adds infrastructure which will allow users to specify a custom XML validator program which will be used to validate

[PATCH 0/2] RFC: Allow using custom XML validator

2022-09-23 Thread Peter Krempa
Benefits described in patch 2/2 with an example of using 'jing' as validator. Peter Krempa (2): util: xml: Introduce infrastructure to support custom XML validators daemon: Introduce the possibility for users to register custom XML validator src/libvirt_private.syms | 1 +

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Laine Stump
On 9/23/22 10:00 AM, Daniel P. Berrangé wrote: On Fri, Sep 23, 2022 at 10:46:21AM -0300, Jason Gunthorpe wrote: On Fri, Sep 23, 2022 at 02:35:20PM +0100, Daniel P. Berrangé wrote: On Fri, Sep 23, 2022 at 10:29:41AM -0300, Jason Gunthorpe wrote: On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel

Re: [PATCH 4/4] qemu_process.c: Propagate hugetlbfs mounts on reconnect

2022-09-23 Thread Michal Prívozník
On 9/23/22 15:06, Martin Kletzander wrote: > On Mon, Sep 12, 2022 at 03:46:41PM +0200, Michal Privoznik wrote: >> When reconnecting to a running QEMU process, we construct the >> per-domain path in all hugetlbfs mounts. This is a relict from >> the past (v3.4.0-100-g5b24d25062) where we switched

[PATCH v2 RESEND] qemu: fix memory leak about virDomainEventTunableNew

2022-09-23 Thread luzhipeng
From: lu zhipeng For prevent memory leak and easier to use, So change virDomainEventTunableNew to get virTypedParameterPtr *params and set it = NULL. Signed-off-by: lu zhipeng --- v1: https://patchew.org/Libvirt/20220922130038.1616-1-luzhip...@cestc.cn/ src/conf/domain_event.c| 12

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Alex Williamson
On Fri, 23 Sep 2022 10:29:41 -0300 Jason Gunthorpe wrote: > On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel P. Berrangé wrote: > > > Yes, we use cgroups extensively already. > > Ok, I will try to see about this > > Can you also tell me if the selinux/seccomp will prevent qemu from >

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Daniel P . Berrangé
On Fri, Sep 23, 2022 at 10:46:21AM -0300, Jason Gunthorpe wrote: > On Fri, Sep 23, 2022 at 02:35:20PM +0100, Daniel P. Berrangé wrote: > > On Fri, Sep 23, 2022 at 10:29:41AM -0300, Jason Gunthorpe wrote: > > > On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel P. Berrangé wrote: > > > > > > > Yes,

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Jason Gunthorpe
On Fri, Sep 23, 2022 at 02:35:20PM +0100, Daniel P. Berrangé wrote: > On Fri, Sep 23, 2022 at 10:29:41AM -0300, Jason Gunthorpe wrote: > > On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel P. Berrangé wrote: > > > > > Yes, we use cgroups extensively already. > > > > Ok, I will try to see about

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Daniel P . Berrangé
On Fri, Sep 23, 2022 at 10:29:41AM -0300, Jason Gunthorpe wrote: > On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel P. Berrangé wrote: > > > Yes, we use cgroups extensively already. > > Ok, I will try to see about this > > Can you also tell me if the selinux/seccomp will prevent qemu from >

Re: [PATCH] libvirt-guests: Fix dependency ordering in service file

2022-09-23 Thread Martin Kletzander
On Tue, Aug 30, 2022 at 08:43:47AM +0200, Martin Kletzander wrote: After some debugging and discussion with systemd team it turns out we are misusing the ordering in libvirt-guests.service. That happened because we want to support both monolithic and modular daemon setups and on top of that we

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Jason Gunthorpe
On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel P. Berrangé wrote: > Yes, we use cgroups extensively already. Ok, I will try to see about this Can you also tell me if the selinux/seccomp will prevent qemu from opening more than one /dev/vfio/vfio ? I suppose the answer is no? Thanks, Jason

Re: [PATCH] qemu_domain: Ignore all but SCSI hostdevs in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias()

2022-09-23 Thread Martin Kletzander
On Fri, Sep 23, 2022 at 03:11:40PM +0200, Michal Privoznik wrote: When retiring QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI capability the commit removed a bit too much. Previously, all other devices than VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI were ignored in

Re: [PATCH] qemu_domain: Ignore all but SCSI hostdevs in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias()

2022-09-23 Thread Peter Krempa
On Fri, Sep 23, 2022 at 15:11:40 +0200, Michal Privoznik wrote: > When retiring QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI capability the > commit removed a bit too much. Previously, all other devices than > VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI were ignored in >

Re: [PATCH] cpu_map: Introduce Neoverse-N1

2022-09-23 Thread Martin Kletzander
On Fri, Sep 23, 2022 at 06:35:52PM +0800, Zhenyu Zhang wrote: Of course, you can check Neoverse N1 core "0xd0c" from the link below. Also do you think I should add the values for neoverse n2 and v1 at the same time? Might just as well.

[PATCH] qemu_domain: Ignore all but SCSI hostdevs in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias()

2022-09-23 Thread Michal Privoznik
When retiring QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI capability the commit removed a bit too much. Previously, all other devices than VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI were ignored in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias(). But the commit in question removed not only the capability

Re: [PATCH 4/4] qemu_process.c: Propagate hugetlbfs mounts on reconnect

2022-09-23 Thread Martin Kletzander
On Mon, Sep 12, 2022 at 03:46:41PM +0200, Michal Privoznik wrote: When reconnecting to a running QEMU process, we construct the per-domain path in all hugetlbfs mounts. This is a relict from the past (v3.4.0-100-g5b24d25062) where we switched to a per-domain path and we want to create those

Re: [PATCH 3/4] qemu_namespace: Introduce qemuDomainNamespaceSetupPath()

2022-09-23 Thread Martin Kletzander
On Mon, Sep 12, 2022 at 03:46:40PM +0200, Michal Privoznik wrote: Sometimes it may come handy to just bind mount a directory/file into domain's namespace. Implement a thin wrapper over qemuNamespaceMknodPaths() which has all the logic we need. Signed-off-by: Michal Privoznik Reviewed-by:

Re: [PATCH 2/4] qemu_namespace: Fix a corner case in qemuDomainGetPreservedMounts()

2022-09-23 Thread Martin Kletzander
On Mon, Sep 12, 2022 at 03:46:39PM +0200, Michal Privoznik wrote: When setting up namespace for QEMU we look at mount points under /dev (like /dev/pts, /dev/mqueue/, etc.) because we want to preserve those (which is done by moving them to a temp location, unshare(), and then moving them back).

Re: [PATCH 1/4] qemu_namespace: Tolerate missing ACLs when creating a path in namespace

2022-09-23 Thread Martin Kletzander
On Mon, Sep 12, 2022 at 03:46:38PM +0200, Michal Privoznik wrote: When creating a path in a domain's mount namespace we try to set ACLs on it, so that it's a verbatim copy of the path in parent's namespace. The ACLs are queried upfront (by qemuNamespaceMknodItemInit()) but this is fault tolerant

Re: [PATCH] cpu_map: Introduce Neoverse-N1

2022-09-23 Thread Zhenyu Zhang
Of course, you can check Neoverse N1 core "0xd0c" from the link below. Also do you think I should add the values for neoverse n2 and v1 at the same time? https://developer.arm.com/documentation/100616/0301/register-descriptions/aarch64-system-registers/midr-el1--main-id-register--el1 On Tue, Sep

Re: [PATCH v2] qemu: fix memory leak about virDomainEventTunableNew

2022-09-23 Thread Jiri Denemark
On Fri, Sep 23, 2022 at 10:23:38 +0800, luzhipeng wrote: > From: lu zhipeng > > For prevent memory leak and easier to use, So change > virDomainEventTunableNew to get virTypedParameterPtr *params > and set it = NULL. > > Signed-off-by: lu zhipeng > --- > v1:

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-23 Thread Daniel P . Berrangé
On Thu, Sep 22, 2022 at 12:31:20PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 22, 2022 at 04:00:00PM +0100, Daniel P. Berrangé wrote: > > On Thu, Sep 22, 2022 at 11:51:54AM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 22, 2022 at 03:49:02PM +0100, Daniel P. Berrangé wrote: > > > > On Thu, Sep