[PATCHv2 3/5] netdevmacvlan: Use helper function to create unique macvlan/macvtap name

2020-12-09 Thread Shi Lei
Simplify ReserveName/GenerateName for macvlan and macvtap by using common functions. Signed-off-by: Shi Lei --- src/libvirt_private.syms| 1 - src/lxc/lxc_process.c | 2 +- src/qemu/qemu_process.c | 2 +- src/util/virnetdevmacvlan.c | 177 +---

[PATCHv2 5/5] netdev: Prevent functions that call virNetDevTapCreate from adding 'vnet%d' into ifname

2020-12-09 Thread Shi Lei
Those functions that call virNetDevTapCreate don't need to adding 'vnet%d' into ifname when it is empty, since virNetDevGenerateName which is in virNetDevTapCreate can deal with it. Signed-off-by: Shi Lei --- src/bhyve/bhyve_command.c | 1 - src/qemu/qemu_interface.c | 12 2 files

[PATCHv2 1/5] netdev: Introduce several helper functions for generating unique netdev name

2020-12-09 Thread Shi Lei
Extract ReserveName/GenerateName from netdevtap and netdevmacvlan as common helper functions. Signed-off-by: Shi Lei --- src/bhyve/bhyve_command.c | 4 +- src/conf/domain_conf.c | 4 +- src/interface/interface_backend_udev.c | 2 +- src/libvirt_private.syms

[PATCHv2 2/5] netdevtap: Use common helper function to create unique tap name

2020-12-09 Thread Shi Lei
Simplify GenerateName/ReserveName for netdevtap by using common functions. Signed-off-by: Shi Lei --- src/libvirt_private.syms | 1 - src/qemu/qemu_process.c | 2 +- src/util/virnetdevtap.c | 100 ++- src/util/virnetdevtap.h | 4 -- 4 files changed, 5

[PATCHv2 0/5] netdev: Extract GenerateName/ReserveName as common functions

2020-12-09 Thread Shi Lei
V1 here: https://www.redhat.com/archives/libvir-list/2020-December/msg00308.html Since V1: (1) Remove virNetDev[Lock|Unlock]GenName. Only *lastID* needs to be protected. Now we lock *lastID* inside virNetDevReserveName and virNetDevGenerateName, then lock and unlock fun

[PATCHv2 4/5] netdevveth: Simplify virNetDevVethCreate by using virNetDevGenerateName

2020-12-09 Thread Shi Lei
Simplify virNetDevVethCreate by using common GenerateName/ReserveName functions. Signed-off-by: Shi Lei --- src/lxc/lxc_process.c| 3 + src/util/virnetdevveth.c | 140 +-- 2 files changed, 36 insertions(+), 107 deletions(-) diff --git a/src/lxc/lxc_proc

Re: [PATCH 5/7] util: change call sequence for virPCIDeviceFindCapabilityOffset()

2020-12-09 Thread Laine Stump
On 12/9/20 4:18 AM, Daniel P. Berrangé wrote: On Tue, Dec 08, 2020 at 08:37:43PM -0500, Laine Stump wrote: Previously there was no way to differentiate between this function 1) encountering an error while reading the pci config, and 2) determining that the device in question is a conventional PC

Re: [PATCH] tests: qemucapabilities: Update capabilities for qemu-5.2 release (x86_64)

2020-12-09 Thread Michal Privoznik
On 12/9/20 2:48 PM, Peter Krempa wrote: qemu-5.2 is out! Let's update the capabilities for the final version. Note that the 'enable-fips' feature vanishing in this update is expected as the removal was tied to a version check (see commit 7b1ed1cd733a0 ). Signed-off-by: Peter Krempa --- .../c

Re: [PATCH libvirt v4 00/12] Support AP card, AP queues and AP matrix

2020-12-09 Thread Shalini Chellathurai Saroja
On 12/9/20 2:03 PM, Erik Skultety wrote: On Fri, Dec 04, 2020 at 11:24:12AM +0100, Erik Skultety wrote: On Thu, Dec 03, 2020 at 06:59:32PM +0100, Shalini Chellathurai Saroja wrote: Add support for AP card devices, AP queues and AP matrix devices in libvirt node device driver. --- v4: - Adde

Re: [libvirt PATCH v3 09/10] cpu_map: Add support for split-lock-detect CPU feature

2020-12-09 Thread Jiri Denemark
On Wed, Dec 09, 2020 at 14:51:27 +0100, Tim Wiederhake wrote: > On Wed, 2020-12-09 at 14:43 +0100, Jiri Denemark wrote: > > On Mon, Nov 23, 2020 at 15:14:32 +0100, Tim Wiederhake wrote: > > > Signed-off-by: Tim Wiederhake > > > --- > > > src/cpu_map/x86_features.xml | 5 + > > > 1 file change

Re: [libvirt PATCH v3 00/10] Add missing feature detection to sync tool in cpu_map

2020-12-09 Thread Jiri Denemark
On Mon, Nov 23, 2020 at 15:14:23 +0100, Tim Wiederhake wrote: > sync_qemu_i386.py in src/cpu_map is a tool to sync CPU models from qemu > with libvirt. It currently has no provisions for detecting new features > that are not implemented in libvirt yet. This series changes that. > > Currently missi

Re: [libvirt PATCH v3 09/10] cpu_map: Add support for split-lock-detect CPU feature

2020-12-09 Thread Tim Wiederhake
On Wed, 2020-12-09 at 14:43 +0100, Jiri Denemark wrote: > On Mon, Nov 23, 2020 at 15:14:32 +0100, Tim Wiederhake wrote: > > Signed-off-by: Tim Wiederhake > > --- > > src/cpu_map/x86_features.xml | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/src/cpu_map/x86_features.xml > >

[PATCH] tests: qemucapabilities: Update capabilities for qemu-5.2 release (x86_64)

2020-12-09 Thread Peter Krempa
qemu-5.2 is out! Let's update the capabilities for the final version. Note that the 'enable-fips' feature vanishing in this update is expected as the removal was tied to a version check (see commit 7b1ed1cd733a0 ). Signed-off-by: Peter Krempa --- .../caps_5.2.0.x86_64.replies |

Re: [libvirt PATCH v3 09/10] cpu_map: Add support for split-lock-detect CPU feature

2020-12-09 Thread Jiri Denemark
On Mon, Nov 23, 2020 at 15:14:32 +0100, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/cpu_map/x86_features.xml | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml > index a5a987deba..4836595a8c 100644 > ---

Re: [libvirt PATCH v3 08/10] cpu_map: Add support for core-capability CPU feature

2020-12-09 Thread Jiri Denemark
On Mon, Nov 23, 2020 at 15:14:31 +0100, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/cpu_map/x86_features.xml | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml > index b0bf22d916..a5a987deba 100644 > --- a

Re: [libvirt PATCH v3 07/10] cpu_map: Add support for fsrm CPU feature

2020-12-09 Thread Jiri Denemark
On Mon, Nov 23, 2020 at 15:14:30 +0100, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/cpu_map/x86_features.xml | 3 +++ > tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 + > tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml | 1

Re: [PATCH 0/2] qemuDomainCheckpointLoad: Two fixes

2020-12-09 Thread Ján Tomko
On a Tuesday in 2020, Peter Krempa wrote: Peter Krempa (2): qemuDomainCheckpointLoad: Don't align disks when restoring config from disk qemuDomainCheckpointLoad: Remove stale comment src/qemu/qemu_driver.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) Revie

Re: [PATCH libvirt v4 00/12] Support AP card, AP queues and AP matrix

2020-12-09 Thread Erik Skultety
On Fri, Dec 04, 2020 at 11:24:12AM +0100, Erik Skultety wrote: > On Thu, Dec 03, 2020 at 06:59:32PM +0100, Shalini Chellathurai Saroja wrote: > > Add support for AP card devices, AP queues and AP matrix devices in > > libvirt node device driver. > > --- > > v4: > > - Added virNodeDevAPAdapterParse

Re: [PATCH v3 01/14] domain_conf: move boot timeouts check to domain_validate.c

2020-12-09 Thread Daniel Henrique Barboza
On 12/9/20 7:52 AM, Daniel P. Berrangé wrote: On Wed, Dec 09, 2020 at 07:35:09AM -0300, Daniel Henrique Barboza wrote: On 12/9/20 5:13 AM, Michal Privoznik wrote: On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote: This patch creates a new function, virDomainDefBootValidate(), to host the

Re: [PATCH v2] spec: don't touch existing nwfilters on update

2020-12-09 Thread Andrea Bolognani
On Mon, 2020-12-07 at 11:38 +0300, Nikolay Shirokovskiy wrote: > +++ b/libvirt.spec.in > +restart_daemon=0 > +for dfile in %{_datadir}/libvirt/nwfilter/*.xml; do > + sfile=%{_sysconfdir}/libvirt/nwfilter/`basename $dfile` Please use $() instead of ``. Some additional quoting would also be nice.

Re: [libvirt PATCH] qemu: Simplify size check for ppc64 NVDIMMs

2020-12-09 Thread Andrea Bolognani
On Mon, 2020-12-07 at 16:18 -0300, Daniel Henrique Barboza wrote: > On 12/7/20 2:07 PM, Andrea Bolognani wrote: > > +++ b/src/qemu/qemu_domain.c > > @@ -5363,7 +5363,7 @@ > > qemuDomainNVDimmAlignSizePseries(virDomainMemoryDefPtr mem) > > /* Align down guest_area. 256MiB is the minimum size.

Re: [PATCH v3 01/14] domain_conf: move boot timeouts check to domain_validate.c

2020-12-09 Thread Daniel P . Berrangé
On Wed, Dec 09, 2020 at 07:35:09AM -0300, Daniel Henrique Barboza wrote: > > > On 12/9/20 5:13 AM, Michal Privoznik wrote: > > On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote: > > > This patch creates a new function, virDomainDefBootValidate(), to host > > > the validation of boot menu timeout

Re: [PATCH v3 00/14] move checks from parse to validate callbacks

2020-12-09 Thread Daniel Henrique Barboza
On 12/9/20 5:13 AM, Michal Privoznik wrote: On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote: This is the v3 of https://www.redhat.com/archives/libvir-list/2020-December/msg00419.html Michal mentioned in his v2 review that we should move these validations out of domain_conf.c to a new file

Re: [PATCH v3 01/14] domain_conf: move boot timeouts check to domain_validate.c

2020-12-09 Thread Daniel Henrique Barboza
On 12/9/20 5:13 AM, Michal Privoznik wrote: On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote: This patch creates a new function, virDomainDefBootValidate(), to host the validation of boot menu timeout and rebootTimeout outside of parse time. The checks in virDomainDefParseBootXML() were cha

[PATCH] qemu_process: Release domain seclabel later in qemuProcessStop()

2020-12-09 Thread Michal Privoznik
Some secdrivers (typically SELinux driver) generate unique dynamic seclabel for each domain (unless a static one is requested in domain XML). This is achieved by calling qemuSecurityGenLabel() from qemuProcessPrepareDomain() which allocates unique seclabel and stores it in domain def->seclabels. Th

Re: [PATCH] qemu: Fix logic bug in inactive snapshot deletion

2020-12-09 Thread Erik Skultety
On Wed, Dec 09, 2020 at 10:15:54AM +0100, Peter Krempa wrote: > Commit 926563dc3a6 which refactored the function call deleting the > snapshot's on disk state introduced a logic bug, which skips over the > deletion of libvirt metadata after the disk state deletion is done. > > To fix it we must not

Re: [PATCH 5/7] util: change call sequence for virPCIDeviceFindCapabilityOffset()

2020-12-09 Thread Daniel P . Berrangé
On Tue, Dec 08, 2020 at 08:37:43PM -0500, Laine Stump wrote: > Previously there was no way to differentiate between this function 1) > encountering an error while reading the pci config, and 2) determining > that the device in question is a conventional PCI device, and so has > no Express Capabilit

[PATCH] qemu: Fix logic bug in inactive snapshot deletion

2020-12-09 Thread Peter Krempa
Commit 926563dc3a6 which refactored the function call deleting the snapshot's on disk state introduced a logic bug, which skips over the deletion of libvirt metadata after the disk state deletion is done. To fix it we must not return early. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/10

Re: [PATCH 0/7] fix PCI vs PCIe detection when running libvirtd as root, but unprivileged

2020-12-09 Thread Michal Privoznik
On 12/9/20 2:37 AM, Laine Stump wrote: I think there's an adequate description in patch 6 (and maybe in the bugzilla record: https://bugzilla.redhat.com/1901685). I already typed a long description once, and git send-email failed due to network problems and threw away everything I typed. I don't

Re: [PATCH v3 01/14] domain_conf: move boot timeouts check to domain_validate.c

2020-12-09 Thread Michal Privoznik
On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote: This patch creates a new function, virDomainDefBootValidate(), to host the validation of boot menu timeout and rebootTimeout outside of parse time. The checks in virDomainDefParseBootXML() were changed to throw VIR_ERR_XML_ERROR in case of parse

Re: [PATCH v3 00/14] move checks from parse to validate callbacks

2020-12-09 Thread Michal Privoznik
On 12/8/20 11:20 PM, Daniel Henrique Barboza wrote: This is the v3 of https://www.redhat.com/archives/libvir-list/2020-December/msg00419.html Michal mentioned in his v2 review that we should move these validations out of domain_conf.c to a new file. Let's create a new file called domain_validate