[PATCH 2/2] virfile: Fix build with glibc 2.36

2022-08-01 Thread Cole Robinson
With glibc 2.36, sys/mount.h and linux/mount.h conflict: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E virfile.c imports sys/mount.h and linux/fs.h, which pulls in linux/mount.h. Manually define the constants we need from linux/fs.h, like

[PATCH 0/2] Fix build with glibc 2.36

2022-08-01 Thread Cole Robinson
With glibc 2.36, sys/mount.h and linux/mount.h conflict: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E Easiest way to run this through CI? Submit MR to libvirt gitlab? Cole Robinson (2): lxc: containter: fix build with glibc 2.36

[PATCH 1/2] lxc: containter: fix build with glibc 2.36

2022-08-01 Thread Cole Robinson
With glibc 2.36, sys/mount.h and linux/mount.h conflict: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E lxc_container.c imports sys/mount.h and linux/fs.h, which pulls in linux/mount.h. linux/fs.h isn't required here though. glibc

[PATCH 3/3] domain_conf: add SCHED_DEADLINE support in the XML configuration

2022-08-01 Thread Sasha Algisi
Users can set SCHED_DEADLINE as a scheduling policy. For example, for setting runtime = 1000, deadline = 1500 and period = 2000 for vcpus 0-2: ... ... Update release notes accordingly. Signed-off-by: Sasha Algisi Signed-off-by: Dario Faggioli --- NEWS.rst

[PATCH 1/3] virprocess: define sched_attr and sched_setattr

2022-08-01 Thread Sasha Algisi
In order to use SCHED_DEADLINE we need sched_setattr(), as sched_setscheduler() does not support all the necessary parameters. Signed-off-by: Sasha Algisi Signed-off-by: Dario Faggioli --- src/util/virprocess.c | 39 +++ 1 file changed, 39 insertions(+)

[PATCH 0/3] qemu: add support for the SCHED_DEADLINE scheduling policy

2022-08-01 Thread Sasha Algisi
Hello everyone, This patchset aims at adding support for the SCHED_DEADLINE Linux scheduling policy for vcpus, io-threads and emulator processes. In fact, libvirt currently supports SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, SCHE_FIFO and SCHED_RR, but not SCHED_DEADLINE. SCHED_DEADLINE is a policy

[PATCH 2/3] virprocess: add the SCHED_DEADLINE scheduling policy

2022-08-01 Thread Sasha Algisi
Tasks associated to virtual CPUs, IO Threads and Emulator processes can be created with the SCHED_DEADLINE policy. The policy is described in details here: https://docs.kernel.org/scheduler/sched-deadline.html It requires the following parameters (all in nanoseconds): 1) runtime 2) deadline 3)

Re: [libvirt PATCH] libxl: Fix build with recent Xen that introduces new disk backend type

2022-08-01 Thread Julien Grall
Hi Michal, On 01/08/2022 11:08, Michal Prívozník wrote: On 8/1/22 10:51, Julien Grall wrote: On 01/08/2022 09:23, Michal Prívozník wrote: On 7/29/22 17:50, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Xen toolstack has gained basic Virtio support recently which becides adding

Re: [PATCH 3/3] testutilsqemu: Fake TPM versions

2022-08-01 Thread Andrea Bolognani
On Fri, Jul 29, 2022 at 09:42:13AM +0200, Michal Privoznik wrote: > +++ b/tests/testutilsqemu.c > @@ -150,12 +150,13 @@ bool > virTPMSwtpmSetupCapsGet(virTPMSwtpmSetupFeature cap) > { > switch (cap) { > +case VIR_TPM_SWTPM_SETUP_FEATURE_TPM_1_2: > +case

Re: [PATCH 2/3] testutilsqemu: Mock virTPMSwtpmSetupCapsGet()

2022-08-01 Thread Andrea Bolognani
On Fri, Jul 29, 2022 at 09:42:12AM +0200, Michal Privoznik wrote: > In a recent commit of v8.5.0-85-g430ab88ab1 I've made domaincaps > XML report supported TPM versions. This was done by calling > virTPMSwtpmSetupCapsGet(). But this function isn't mocked and > thus domaincapstest calls the real

Re: [PATCH 1/3] virtpm: Use corresponding type for argument for virTPM*CapsGet()

2022-08-01 Thread Andrea Bolognani
On Fri, Jul 29, 2022 at 09:42:11AM +0200, Michal Privoznik wrote: > In virtpm.h there are two functions exposed for querying swtpm > and swtpm_setup capabilieis: virTPMSwtpmCapsGet() and *capabilities Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Live migration support for Cloud-Hypervisor VMs

2022-08-01 Thread Praveen K Paladugu
Folks, We are implementing Live Migration support in "ch" driver of Libvirt. I'd like to confirm if the approach we have chosen would be accepted upstream once implemented. Our immediate goal is to implement "Hypervisor Native" + "Managed Direct" mode of migration. "Hypervisor Native" here

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-01 Thread Alex Williamson
On Mon, 1 Aug 2022 16:02:05 +0200 Erik Skultety wrote: > Putting Alex on CC since I don't see him there: > +alex.william...@redhat.com Hmm, Laine cc'd me on the initial post but it seems it got dropped somewhere. > On Mon, Aug 01, 2022 at 09:30:38AM -0400, Laine Stump wrote: > > On 8/1/22

Re: [PATCH] tpm: Refactor open-coded bitmap 'activePcrBanks' to virBitmap

2022-08-01 Thread Michal Prívozník
On 8/1/22 13:54, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > > Applies on top of Michal's series to fix 'activePcrBank' handling. > > src/conf/domain_conf.c | 17 + > src/conf/domain_conf.h | 2 +- > src/qemu/qemu_tpm.c| 21 + > 3 files

Re: [PATCH 1/8] conf: Report an error when default TPM model is provided

2022-08-01 Thread Peter Krempa
On Mon, Aug 01, 2022 at 16:59:26 +0200, Michal Prívozník wrote: > On 8/1/22 16:29, Peter Krempa wrote: > > On Mon, Aug 01, 2022 at 15:08:23 +0200, Michal Prívozník wrote: > >> On 8/1/22 13:10, Peter Krempa wrote: > >>> On Mon, Jul 18, 2022 at 11:30:43 +0200, Michal Privoznik wrote: > When

Re: [PATCH 1/8] conf: Report an error when default TPM model is provided

2022-08-01 Thread Michal Prívozník
On 8/1/22 16:29, Peter Krempa wrote: > On Mon, Aug 01, 2022 at 15:08:23 +0200, Michal Prívozník wrote: >> On 8/1/22 13:10, Peter Krempa wrote: >>> On Mon, Jul 18, 2022 at 11:30:43 +0200, Michal Privoznik wrote: When "default" model of a TPM was provided, our parses accepts it happily

Re: [PATCH 2/8] conf: Report error when default TPM version is provided

2022-08-01 Thread Peter Krempa
On Mon, Aug 01, 2022 at 15:08:27 +0200, Michal Prívozník wrote: > On 8/1/22 13:11, Peter Krempa wrote: > > On Mon, Jul 18, 2022 at 11:30:44 +0200, Michal Privoznik wrote: > >> When "default" version of TPM was provided, our parses accepts it > >> happily even though the value is forbidden by our

Re: [PATCH 1/8] conf: Report an error when default TPM model is provided

2022-08-01 Thread Peter Krempa
On Mon, Aug 01, 2022 at 15:08:23 +0200, Michal Prívozník wrote: > On 8/1/22 13:10, Peter Krempa wrote: > > On Mon, Jul 18, 2022 at 11:30:43 +0200, Michal Privoznik wrote: > >> When "default" model of a TPM was provided, our parses accepts it > >> happily even though the value is forbidden by our

Re: Can RHEL7 VM run remote libvirt commands to Fedora36 host?

2022-08-01 Thread Martin Kletzander
On Mon, Aug 01, 2022 at 07:11:20AM -0400, Carol Bouchard wrote: I've attached output from lsof & systemctl commands. I enabled virtproxyd.service Friday which got me past my problem but it is curious how I got into this if the default is for proxy to be enabled. Enabling virtproxyd.socket

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-01 Thread Erik Skultety
Putting Alex on CC since I don't see him there: +alex.william...@redhat.com On Mon, Aug 01, 2022 at 09:30:38AM -0400, Laine Stump wrote: > On 8/1/22 7:58 AM, Erik Skultety wrote: > > On Mon, Aug 01, 2022 at 12:02:22AM -0400, Laine Stump wrote: > > > Before a PCI device can be assigned to a guest

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-01 Thread Erik Skultety
On Mon, Aug 01, 2022 at 09:30:38AM -0400, Laine Stump wrote: > On 8/1/22 7:58 AM, Erik Skultety wrote: > > On Mon, Aug 01, 2022 at 12:02:22AM -0400, Laine Stump wrote: > > > Before a PCI device can be assigned to a guest with VFIO, that device > > > must be bound to the vfio-pci driver rather than

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-01 Thread Laine Stump
On 8/1/22 7:58 AM, Erik Skultety wrote: On Mon, Aug 01, 2022 at 12:02:22AM -0400, Laine Stump wrote: Before a PCI device can be assigned to a guest with VFIO, that device must be bound to the vfio-pci driver rather than to the device's normal driver. The vfio-pci driver provides APIs that

Re: [PATCH 2/8] conf: Report error when default TPM version is provided

2022-08-01 Thread Michal Prívozník
On 8/1/22 13:11, Peter Krempa wrote: > On Mon, Jul 18, 2022 at 11:30:44 +0200, Michal Privoznik wrote: >> When "default" version of TPM was provided, our parses accepts it >> happily even though the value is forbidden by our RNG and not >> documented as accepted value. This is because of < 0 vs <=

Re: [PATCH 1/8] conf: Report an error when default TPM model is provided

2022-08-01 Thread Michal Prívozník
On 8/1/22 13:10, Peter Krempa wrote: > On Mon, Jul 18, 2022 at 11:30:43 +0200, Michal Privoznik wrote: >> When "default" model of a TPM was provided, our parses accepts it >> happily even though the value is forbidden by our RNG and not >> documented as accepted value. This is because of < 0 vs <=

Re: [libvirt PATCH 1/2] ch: drop the check to have a single console/serial

2022-08-01 Thread Peter Krempa
On Fri, Jul 29, 2022 at 20:36:56 +, Praveen K Paladugu wrote: > Starting with version 18.0, cloud-hypervisor supports a console > and a serial device in parallel. > https://github.com/cloud-hypervisor/cloud-hypervisor/issues/3012 > > Signed-off-by: Praveen K Paladugu > --- >

Re: [libvirt PATCH 2/2] conf: set the default chr device type to pty

2022-08-01 Thread Peter Krempa
On Fri, Jul 29, 2022 at 20:36:57 +, Praveen K Paladugu wrote: > explicitly set the chr device type to pty to pass the > checks of ch driver. > https://gitlab.com/libvirt/libvirt/-/issues/344 This is not a persuading enough enough commit message ... > > Signed-off-by: Praveen K Paladugu >

Re: [PATCH] util: basic support for vendor-specific vfio drivers

2022-08-01 Thread Erik Skultety
On Mon, Aug 01, 2022 at 12:02:22AM -0400, Laine Stump wrote: > Before a PCI device can be assigned to a guest with VFIO, that device > must be bound to the vfio-pci driver rather than to the device's > normal driver. The vfio-pci driver provides APIs that permit QEMU to > perform all the necessary

[PATCH] tpm: Refactor open-coded bitmap 'activePcrBanks' to virBitmap

2022-08-01 Thread Peter Krempa
Signed-off-by: Peter Krempa --- Applies on top of Michal's series to fix 'activePcrBank' handling. src/conf/domain_conf.c | 17 + src/conf/domain_conf.h | 2 +- src/qemu/qemu_tpm.c| 21 + 3 files changed, 19 insertions(+), 21 deletions(-) diff --git

Re: [PATCH 8/8] conf: Don't lose when no TPM version is provided

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:50 +0200, Michal Privoznik wrote: > When no TPM version is provided in the input XML we may default > to version 2.0 (see qemuDomainTPMDefPostParse()). However, > are parsed iff a version 2.0 was specified. > This means that this piece of information might be lost. >

Re: [PATCH 7/8] qemu: Move TPMs validation out of PostParse

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:49 +0200, Michal Privoznik wrote: > After previous cleanup, the qemuDomainDefTPMsPostParse() function > does nothing more than validates TPM devices. Therefore, it > should live in qemu_validate.c instead of qemu_domain.c. Move it > there and rename to reflect the

Re: [PATCH 6/8] qemu_domain: Move TPM post parse code into qemuDomainTPMDefPostParse()

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:48 +0200, Michal Privoznik wrote: > In the qemuDomainDefPostParse() we aim to fill in top level > values, which require overall view of domain, or those parts of > configuration that are not a device in domain XML (e.g. vCPUs). > However, inside of

Re: [PATCH 5/8] conf: Use virXMLPropEnum more when parsing TPM

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:47 +0200, Michal Privoznik wrote: > When parsing a TPM device plenty of virXMLPropString() + > enum2int() combos are used. These can be replaced with > virXMLPropEnum(). > > Signed-off-by: Michal Privoznik > --- > src/conf/domain_conf.c | 39

Re: [PATCH 4/8] conf: Move _virDomainTPMDef::version into _virDomainTPMDef::data::emulator

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:46 +0200, Michal Privoznik wrote: > The _virDomainTPMDef structure has 'version' member, which is a > bit misplaced. It's only emulator type of TPM that can have a > version, even our documentation says so: > > ``version`` >The ``version`` attribute indicates the

Re: [PATCH 3/8] conf: Drop needless setting of VIR_DOMAIN_TPM_VERSION_DEFAULT

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:45 +0200, Michal Privoznik wrote: > In previous commit the VIR_DOMAIN_TPM_VERSION_DEFAULT value was > made just an alias to value of 0. This is true even now. > And since all newly allocated > memory is zeroed out (due to use of g_new0()), the def->version > inside

Re: [PATCH 2/8] conf: Report error when default TPM version is provided

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:44 +0200, Michal Privoznik wrote: > When "default" version of TPM was provided, our parses accepts it > happily even though the value is forbidden by our RNG and not > documented as accepted value. This is because of < 0 vs <= 0 > comparison of

Re: Can RHEL7 VM run remote libvirt commands to Fedora36 host?

2022-08-01 Thread Carol Bouchard
I've attached output from lsof & systemctl commands. I enabled virtproxyd.service Friday which got me past my problem but it is curious how I got into this if the default is for proxy to be enabled. On Mon, Aug 1, 2022 at 5:02 AM Martin Kletzander wrote: > On Thu, Jul 28, 2022 at 02:14:30PM

Re: [PATCH 1/8] conf: Report an error when default TPM model is provided

2022-08-01 Thread Peter Krempa
On Mon, Jul 18, 2022 at 11:30:43 +0200, Michal Privoznik wrote: > When "default" model of a TPM was provided, our parses accepts it > happily even though the value is forbidden by our RNG and not > documented as accepted value. This is because of < 0 vs <= 0 > comparison of

Re: [PATCH] spec: Remove duplicate check of libvirtd status

2022-08-01 Thread Michal Prívozník
On 7/20/22 16:12, Jim Fehlig wrote: > The %posttrans scriptlet checks if libvirtd is active within a > condition that is only executed if libvirtd is active. Remove the > duplicate check. > > Signed-off-by: Jim Fehlig > --- > > This patch contains an improvement Martin suggested while reviewing

Re: [libvirt PATCH] libxl: Fix build with recent Xen that introduces new disk backend type

2022-08-01 Thread Michal Prívozník
On 8/1/22 10:51, Julien Grall wrote: > Hi Michal, > > On 01/08/2022 09:23, Michal Prívozník wrote: >> On 7/29/22 17:50, Oleksandr Tyshchenko wrote: >>> From: Oleksandr Tyshchenko >>> >>> Xen toolstack has gained basic Virtio support recently which becides >>> adding various virtio related stuff

Re: [libvirt PATCH] libxl: Fix build with recent Xen that introduces new disk backend type

2022-08-01 Thread Daniel P . Berrangé
On Mon, Aug 01, 2022 at 09:51:11AM +0100, Julien Grall wrote: > Hi Michal, > > On 01/08/2022 09:23, Michal Prívozník wrote: > > On 7/29/22 17:50, Oleksandr Tyshchenko wrote: > > > From: Oleksandr Tyshchenko > > > > > > Xen toolstack has gained basic Virtio support recently which becides > > >

Re: [libvirt PATCH] libxl: Fix build with recent Xen that introduces new disk backend type

2022-08-01 Thread Julien Grall
Hi Michal, On 01/08/2022 09:23, Michal Prívozník wrote: On 7/29/22 17:50, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Xen toolstack has gained basic Virtio support recently which becides adding various virtio related stuff introduces new disk backend type

Re: Can RHEL7 VM run remote libvirt commands to Fedora36 host?

2022-08-01 Thread Martin Kletzander
On Thu, Jul 28, 2022 at 02:14:30PM -0400, Carol Bouchard wrote: I have a test environment that use to work but no longer does. My laptop is Fedora36 (libvirt version 8.1.0.2) while the VMs it spawns are RHEL7 (max libvirt version is 4.5.0). The source of my problem seems to be that RHEL7 libvirt

Re: [PATCH 0/8] conf: Don't lose when no TPM version is provided

2022-08-01 Thread Michal Prívozník
On 7/18/22 11:30, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Prívozník (8): > conf: Report an error when default TPM model is provided > conf: Report error when default TPM version is provided > conf: Drop needless setting of VIR_DOMAIN_TPM_VERSION_DEFAULT > conf: Move

Re: [libvirt PATCH] libxl: Fix build with recent Xen that introduces new disk backend type

2022-08-01 Thread Michal Prívozník
On 7/29/22 17:50, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Xen toolstack has gained basic Virtio support recently which becides > adding various virtio related stuff introduces new disk backend type > LIBXL_DISK_BACKEND_STANDALONE [1]. > > Unfortunately, this caused a

Release of libvirt-8.6.0

2022-08-01 Thread Jiri Denemark
The 8.6.0 release of both libvirt and libvirt-python is tagged and signed tarballs and source RPMs are available at https://libvirt.org/sources/ https://libvirt.org/sources/python/ Thanks everybody who helped with this release by sending patches, reviewing, testing, or providing

Re: [PATCH v14 11/15] conf: Introduce SGX EPC element into device memory xml

2022-08-01 Thread Yang, Lin A
> On Fri, Jul 29, 2022 at 09:38:35 +0200, Michal Prívozník wrote: > > On 7/28/22 14:41, Peter Krempa wrote: > > > On Wed, Jul 27, 2022 at 12:34:57 +0200, Michal Privoznik wrote: > > >> From: Lin Yang > > >> > > >> With NUMA config: > > >> > > >> > > >> ... > > >> > > >> > > >>