[PATCH V2 2/3] conf: Add channel devices to domain capabilities

2022-10-12 Thread Jim Fehlig
As qemu becomes more modularized, it is important for libvirt to advertise availability of the modularized functionality through capabilities. This change adds channel devices to domain capabilities, allowing clients such as virt-install to avoid using spicevmc channel devices when not supported

[PATCH V2 1/3] conf: Add USB redirect devices to domain capabilities

2022-10-12 Thread Jim Fehlig
As qemu becomes more modularized, it is important for libvirt to advertise availability of the modularized functionality through capabilities. This change adds USB redirect devices to domain capabilities, allowing clients such as virt-install to avoid using redirdev devices when not supported by

[PATCH V2 3/3] qemu: Use command line to properly check for spice support

2022-10-12 Thread Jim Fehlig
domcapabilities reports spice graphics support even against a minimal qemu installation without spice modules. Checking for 'query-spice' in the list of qmp commands supported by qemu is not sufficient to determine spice support. Checking the command line produces acurrate results. Signed-off-by:

[PATCH V2 0/3] domain capabilites improvements

2022-10-12 Thread Jim Fehlig
A V2 of https://listman.redhat.com/archives/libvir-list/2022-September/234189.html Although not much has changed beyond a rebase to current master Jim Fehlig (3): conf: Add USB redirect devices to domain capabilities conf: Add channel devices to domain capabilities qemu: Use command line

Re: [libvirt RFC 20/24] qemu_snapshot: prepare data for external snapshot deletion

2022-10-12 Thread Pavel Hrdina
On Tue, Sep 06, 2022 at 12:19:38PM +0200, Peter Krempa wrote: > On Tue, Aug 23, 2022 at 18:32:23 +0200, Pavel Hrdina wrote: > > In order to save some CPU cycles we will collect all the necessary data > > to delete external snapshot before we even start. They will be later > > used by code that

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

2022-10-12 Thread Jason Gunthorpe
On Wed, Oct 12, 2022 at 10:55:57AM -0400, Steven Sistare wrote: > On 10/12/2022 10:40 AM, Jason Gunthorpe wrote: > > On Wed, Oct 12, 2022 at 09:50:53AM -0400, Steven Sistare wrote: > > > >>> Anyhow, I think this conversation has convinced me there is no way to > >>> fix VFIO_DMA_UNMAP_FLAG_VADDR.

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

2022-10-12 Thread Steven Sistare
On 10/12/2022 10:40 AM, Jason Gunthorpe wrote: > On Wed, Oct 12, 2022 at 09:50:53AM -0400, Steven Sistare wrote: > >>> Anyhow, I think this conversation has convinced me there is no way to >>> fix VFIO_DMA_UNMAP_FLAG_VADDR. I'll send a patch reverting it due to >>> it being a security bug,

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

2022-10-12 Thread Jason Gunthorpe
On Wed, Oct 12, 2022 at 09:50:53AM -0400, Steven Sistare wrote: > > Anyhow, I think this conversation has convinced me there is no way to > > fix VFIO_DMA_UNMAP_FLAG_VADDR. I'll send a patch reverting it due to > > it being a security bug, basically. > > Please do not. Please give me the

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

2022-10-12 Thread Steven Sistare
On 10/12/2022 8:32 AM, Jason Gunthorpe wrote: > On Tue, Oct 11, 2022 at 04:30:58PM -0400, Steven Sistare wrote: >> On 10/11/2022 8:30 AM, Jason Gunthorpe wrote: >>> On Mon, Oct 10, 2022 at 04:54:50PM -0400, Steven Sistare wrote: > Do we have a solution to this? > > If not I would like

Re: [PATCH 1/7] qemu: Introduce qemuDomainChangeBootIndex API

2022-10-12 Thread Peter Krempa
On Tue, Oct 11, 2022 at 21:38:27 +0800, Jiang Jiacheng wrote: > Introduce qemuDomainChangeBootIndex api to support update device's bootindex. > These function will be used in following patches to support change device's > (support cdrom, disk and net) bootindex with virsh command like > 'virsh

Re: [PATCH 5/7] qemu: Support set bootindex to -1

2022-10-12 Thread Peter Krempa
On Tue, Oct 11, 2022 at 21:38:31 +0800, Jiang Jiacheng wrote: > Enable bootindex can be set to -1, it means cancel the device's bootindex. > Change bootindex's type from unsigned int to int and modify other related > codes concered with type. > > Signed-off-by: Jiang Jiacheng > --- >

Re: [PATCH 0/7] qemu: support updating device's bootindex

2022-10-12 Thread Peter Krempa
On Tue, Oct 11, 2022 at 21:38:26 +0800, Jiang Jiacheng wrote: > Support updating device's(support cdrom, disk and network) bootindex > online in virDomainUpdateDeviceFlags. The new bootindex will take effect > after guest rebooting. Enable bootindex can be set to -1, it means cancel > the device's

Re: [PATCH v4 RESEND 0/8] qemu: Enable SCHED_CORE for domains and helper processes

2022-10-12 Thread Michal Prívozník
On 10/6/22 15:49, Michal Privoznik wrote: > Polite ping. Michal

Re: [PATCH] spec: change gettext requires to gettext-runtime for F37

2022-10-12 Thread Michal Prívozník
On 10/11/22 19:06, Cole Robinson wrote: > From: Jens Petersen > > See https://fedoraproject.org/wiki/Changes/GettextRuntimeSubpackage > > Signed-off-by: Cole Robinson > --- > libvirt.spec.in | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Michal Privoznik Michal

Re: [PATCH 3/3] qemu: back up the path in qemuMonitorOpen

2022-10-12 Thread Michal Prívozník
On 9/28/22 15:53, Jiang Jiacheng wrote: > In the case of concurrent VM operations, it is possible to have a null pointer > reference in qemuMonitorOpen. In the case of concurrent VM shutdown, the > priv->monconf will be changed in qemuProcessStop. qemuMonitorOpen releases the > lock before calling

Re: [PATCH 1/3] qemu: Init address before qemuProcessShutdownOrReboot during reconnect process

2022-10-12 Thread Michal Prívozník
On 9/28/22 15:53, Jiang Jiacheng wrote: > When libvirt is restarted, the qemuProcessShutdownReboot command is > executed to restore the VM that is being restarted. In this case, a > coredump may occur when we hotplug a pci device since the PCI address > hasn't be inited yet. Moving the

Re: [PATCH 2/3] qemu: get the stackManager lock before getting nested lock

2022-10-12 Thread Michal Prívozník
On 9/28/22 15:53, Jiang Jiacheng wrote: > When creating a VM by forking, there is a logic that get the lock of > StacksecurityManager before get other nested lock to avoid deadlock > between child process and thread of the parent. While in > `virQEMUDriverCreateCapabilities` and

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

2022-10-12 Thread Jason Gunthorpe
On Tue, Oct 11, 2022 at 04:30:58PM -0400, Steven Sistare wrote: > On 10/11/2022 8:30 AM, Jason Gunthorpe wrote: > > On Mon, Oct 10, 2022 at 04:54:50PM -0400, Steven Sistare wrote: > >>> Do we have a solution to this? > >>> > >>> If not I would like to make a patch removing

Re: [PATCH] Fix race condition when detaching a device

2022-10-12 Thread Michal Prívozník
On 8/31/22 14:22, Pierre LIBEAU wrote: > Qemu reply to libvirt "DeviceNotFound" and libvirt didn't clean on the > side the live configuration. > > qemuMonitorDelDevice() return -2 to qemuDomainDeleteDevice() and during > this action in qemuDomainDetachDeviceLive() the remove is never call. > >

[PATCH 2/2] qemu: Create base hugepages path on memory hotplug

2022-10-12 Thread Michal Privoznik
Users can play all sorts of games with mount points. For instance, they can unmount and mount back a hugetlbfs and only after that attempt to hotplug memory. This has an unfortunate consequence though. During memory hotplug, when qemuProcessBuildDestroyMemoryPaths() is called the path is created

[PATCH 0/2] qemu: Create base hugepages path on memory hotplug

2022-10-12 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): qemu: Separate out hugepages basedir making qemu: Create base hugepages path on memory hotplug src/qemu/qemu_conf.c| 27 +++ src/qemu/qemu_conf.h| 3 +++ src/qemu/qemu_driver.c | 17 +

[PATCH 1/2] qemu: Separate out hugepages basedir making

2022-10-12 Thread Michal Privoznik
During its initialization, the QEMU driver iterates over hugetlbfs mount points, creating the driver specific path in each of them ($prefix/libvirt/qemu). This path is created with very wide mode (0777) because per-domain directories are then created under it. Separate this code into a function

Re: [PATCH v3] cpu_map: Introduce Neoverse N1/N2/V1

2022-10-12 Thread Martin Kletzander
On Wed, Sep 28, 2022 at 10:27:38PM -0400, Zhenyu Zhang wrote: Add Neoverse N1/N2/V1 as a supported cpu model. Signed-off-by: Zhenyu Zhang All of the below can be put under the --- line, that way it does not end up in the commit message. I fixed that before pushing. Thanks for the patch