[libvirt PATCH v2 07/14] cpu_ppc64: Implement virCPUGetVendorForModel

2022-10-07 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/cpu/cpu_ppc64.c | 20 tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 6 +++--- tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 8 tests/domaincapsdat

[libvirt PATCH v2 08/14] cpu_arm: Don't implement virCPUGetVendorForModel

2022-10-07 Thread Jiri Denemark
This patch is effectively a no-op, but I wanted to initialize .getVendorForModel explicitly as implementing this function does not even make sense on ARM. The CPU models in our CPU map are only used for describing host CPU in capabilities XML and cannot be used for guest CPU definition in domain XM

[libvirt PATCH v2 10/14] Document specifics of virConnectBaselineHypervisorCPU

2022-10-07 Thread Jiri Denemark
The API can be used to get usability blockers for an unusable CPU model, which is not obvious. Let's explicitly document this behavior as it is now mentioned in the documentation of domain capabilities XML. Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch src/libvirt-host

[libvirt PATCH v2 11/14] qemu_capabilities: Translate CPU blockers

2022-10-07 Thread Jiri Denemark
Since commit "cpu_x86: Disable blockers from unusable CPU models" (v3.8.0-99-g9c9620af1d) we explicitly disable CPU features reported by QEMU as usability blockers for a particular CPU model when creating baseline or host-model CPU definition. When QEMU changed canonical names for some features (mo

[libvirt PATCH v2 14/14] NEWS: Document CPU reporting improvements

2022-10-07 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - patch 10/11 from v1 and the corresponding section in NEWS dropped - mention --model for virsh hypervisor-cpu-baseline - mention CPU blockers translation bug - mention docs improvements NEWS.rst | 22 ++

[libvirt PATCH v2 12/14] virsh: Add --model option for hypervisor-cpu-baseline

2022-10-07 Thread Jiri Denemark
This option can be used as a shortcut for creating a single XML with just a CPU model name and no features: $ virsh hypervisor-cpu-baseline --model Skylake-Server Skylake-Server Signed-off-by: Jiri Denemark --- Notes: Vers

[libvirt PATCH v2 02/14] cpu_ppc64: Avoid repeated loading of CPU map

2022-10-07 Thread Jiri Denemark
The ppc64 CPU code still has to load and parse the CPU map everytime it needs to look at it, which can make some operations pretty slow. Other archs already switched to loading the CPU map once and keeping the parsed structure in memory. Let's switch ppc64 as well. Signed-off-by: Jiri Denemark Re

[libvirt PATCH v2 05/14] Introduce virCPUGetVendorForModel and use it in QEMU driver

2022-10-07 Thread Jiri Denemark
So far QEMU driver does not get CPU model vendor from QEMU directly and it has to ask the CPU driver for the info stored in CPU map. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/cpu/cpu.c| 25 + src/c

[libvirt PATCH v2 06/14] cpu_x86: Implement virCPUGetVendorForModel

2022-10-07 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/cpu/cpu_x86.c | 19 .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 88 - .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 88 - tes

[libvirt PATCH v2 09/14] docs: Enhance documentation of CPU models in domain caps

2022-10-07 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch docs/formatdomaincaps.rst | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst index 6ce780fb69..afade16bc0 100644 --- a/docs/formatdom

[libvirt PATCH v2 01/14] conf: virDomainCapsCPUModelsAdd never fails

2022-10-07 Thread Jiri Denemark
Since the function always returns 0, we can just return void and make callers simpler. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/conf/domain_capabilities.c | 24 +--- src/conf/domain_capabilities.h | 11 ++- s

[libvirt PATCH v2 04/14] domain_capabilities: Add vendor attribute for CPU models

2022-10-07 Thread Jiri Denemark
Even though several CPU models from various vendors are reported as usable on a given host, user may still want to use only those that match the host vendor. Currently the only place where users can check the vendor of each CPU model is our CPU map, which is considered internal and users should not

[libvirt PATCH v2 03/14] qemu: Do not pass qemuCaps to virQEMUCapsCPUFeature{To, From}QEMU

2022-10-07 Thread Jiri Denemark
The only part of qemuCaps both functions are interested in is the CPU architecture. Changing them to expect just virArch makes the functions more reusable. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 18 +

[libvirt PATCH v2 00/14] Improve CPU model reporting in domain capabilities

2022-10-07 Thread Jiri Denemark
See individual patches for details. Patches 4 and 6 were truncated as they include a lot of boring changes in tests, complete patches are available in my gitlab repo: git fetch g...@gitlab.com:jirkade/libvirt.git domaincaps Version 2: - original patch 10/11 was replaced by several new patche

Re: [libvirt PATCH v2] src: warn if client hits the max requests limit

2022-10-07 Thread Peter Krempa
On Fri, Oct 07, 2022 at 13:56:27 +0100, Daniel P. Berrangé wrote: > Since they are simply normal RPC messages, the keep alive packets are > subject to the "max_client_requests" limit just like any API calls. > > Thus, if a client hits the 'max_client_requests' limit and all the > pending API calls

[libvirt PATCH v2] src: warn if client hits the max requests limit

2022-10-07 Thread Daniel P . Berrangé
Since they are simply normal RPC messages, the keep alive packets are subject to the "max_client_requests" limit just like any API calls. Thus, if a client hits the 'max_client_requests' limit and all the pending API calls take a long time to complete, it may result in keep-alives firing and dropp

Re: [libvirt PATCH v2 02/16] qemu: Add qemuNbdkitCaps to qemu driver

2022-10-04 Thread Peter Krempa
On Wed, Sep 28, 2022 at 10:51:12 -0500, Jonathon Jongsma wrote: > On 9/19/22 9:09 AM, Peter Krempa wrote: > > > > +{ > > > +qemuNbdkitCaps *nbdkit = QEMU_NBDKIT_CAPS(object); > > > + > > > +g_clear_pointer(&nbdkit->path, g_free); > > > +g_clear_pointer(&nbdkit->version, g_free); > > >

Re: [libvirt] [PATCH v2] qemu: Remove host-passthrough validation check for host-phys-bits=on

2022-09-29 Thread Michal Prívozník
On 9/28/22 19:07, Jim Fehlig wrote: > On 9/8/22 01:07, Lin Ma wrote: >> Besides the -cpu host, The host-phys-bits=on applies to custom or max >> cpu model, So the host-passthrough validation check is unnecessary for >> maxphysaddr with mode='passthrough'. >> >> Signed-off-by: Lin Ma >> --- >>   sr

Re: [libvirt] [PATCH v2] qemu: Remove host-passthrough validation check for host-phys-bits=on

2022-09-28 Thread Jim Fehlig
On 9/8/22 01:07, Lin Ma wrote: Besides the -cpu host, The host-phys-bits=on applies to custom or max cpu model, So the host-passthrough validation check is unnecessary for maxphysaddr with mode='passthrough'. Signed-off-by: Lin Ma --- src/qemu/qemu_validate.c | 7 ---

Re: [libvirt PATCH v2 06/16] qemu: implement persistent file cache for nbdkit caps

2022-09-28 Thread Jonathon Jongsma
On 9/27/22 6:49 AM, Peter Krempa wrote: + +if (virXPathLongLong("string(./selfctime)", ctxt, &l) < 0) { +virReportError(VIR_ERR_XML_ERROR, "%s", + _("missing selfctime in nbdkit capabilities XML")); +return -1; +} +nbdkitCaps->libvirtCtime = (time

Re: [libvirt PATCH v2 02/16] qemu: Add qemuNbdkitCaps to qemu driver

2022-09-28 Thread Jonathon Jongsma
On 9/19/22 9:09 AM, Peter Krempa wrote: +{ +qemuNbdkitCaps *nbdkit = QEMU_NBDKIT_CAPS(object); + +g_clear_pointer(&nbdkit->path, g_free); +g_clear_pointer(&nbdkit->version, g_free); +g_clear_pointer(&nbdkit->flags, virBitmapFree); + +G_OBJECT_CLASS(qemu_nbdkit_caps_parent_cla

[libvirt PATCH v2] Add basically RISC-V support

2022-09-28 Thread Yu Gu
This patch provides basic support for the RISC-V architecture, so libvirt can run in RISC-V machine. Signed-off-by: Yu Gu --- po/POTFILES | 1 + src/cpu/cpu.c | 2 + src/cpu/cpu.h | 2 + src/cpu/cpu_riscv64.c | 118 +

Re: [libvirt PATCH v2 15/16] qemu: pass sensitive data to nbdkit via pipe

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:41:00 -0500, Jonathon Jongsma wrote: > Rather than passing passwords and cookies (which could contain > passwords) to nbdkit via commandline arguments, use the alternate format > that nbdkit supports where we can specify a file descriptor which nbdkit > will read to get t

Re: [libvirt PATCH v2 14/16] tests: add tests for nbdkit invocation

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:59 -0500, Jonathon Jongsma wrote: > We were testing the arguments that were being passed to qemu when a disk > was being served by nbdkit, but the arguments used to start nbdkit > itself were not testable. This adds a test to ensure that we're invoking > nbdkit correct

Re: [libvirt PATCH v2 13/16] qemu: include nbdkit state in private xml

2022-09-27 Thread Peter Krempa
On Tue, Sep 27, 2022 at 15:26:26 +0200, Peter Krempa wrote: > On Wed, Aug 31, 2022 at 13:40:58 -0500, Jonathon Jongsma wrote: > > Add xml to the private data for a disk source to represent the nbdkit > > process so that the state can be re-created if the libvirt daemon is > > restarted. Format: > >

Re: [libvirt PATCH v2 13/16] qemu: include nbdkit state in private xml

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:58 -0500, Jonathon Jongsma wrote: > Add xml to the private data for a disk source to represent the nbdkit > process so that the state can be re-created if the libvirt daemon is > restarted. Format: > > > /path/to/nbdkit.pid > /path/to/nbdkit.socket >

Re: [libvirt PATCH v2 12/16] qemu: use nbdkit to serve network disks if available

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:57 -0500, Jonathon Jongsma wrote: > For virStorageSource objects that contain an nbdkitProcess, start that > nbdkit process to serve that network drive and then pass the nbdkit > socket to qemu rather than sending the network url to qemu directly. > > Signed-off-by: J

Re: [libvirt PATCH v2 11/16] qemu: split qemuDomainSecretStorageSourcePrepare

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:56 -0500, Jonathon Jongsma wrote: > This prepares encryption secrets and authentication secrets. When we add > nbdkit-backed network storage sources, we will not need to send > authentication secrets to qemu, since they will be sent to nbdkit > instead. So split this i

Re: [libvirt PATCH v2 09/16] qemu: add functions to start and stop nbdkit

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:54 -0500, Jonathon Jongsma wrote: > Add some helper functions to build a virCommand object and run the > nbdkit process for a given virStorageSource. > > Signed-off-by: Jonathon Jongsma > --- > src/qemu/qemu_nbdkit.c | 208 + >

Re: [libvirt PATCH v2 08/16] qemu: Add qemuNbdkitProcess

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:53 -0500, Jonathon Jongsma wrote: > An object for storing information about a nbdkit process that is serving > a specific virStorageSource. At the moment, this information is just > stored in the private data of virStorageSource and not used at all. > Future commits wi

Re: [libvirt PATCH v2 07/16] qemu: use file cache for nbdkit caps

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:52 -0500, Jonathon Jongsma wrote: > Switch to using the virFileCache implementation for nbdkit capabilities > so that we have persistent caching and re-load capabilities whenever > something changes. IMO it would be better to simply start with the proper implementatio

Re: [libvirt PATCH v2 06/16] qemu: implement persistent file cache for nbdkit caps

2022-09-27 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:51 -0500, Jonathon Jongsma wrote: > Implement the loadFile and saveFile virFileCacheHandlers callbacks so > that nbdkit capabilities are cached perstistently across daemon > restarts. The format and implementation is modeled on the qemu > capabilities, but simplified s

Re: [libvirt PATCH v2 00/16] Use nbdkit for http/ftp/ssh network drives in libvirt

2022-09-22 Thread Jonathon Jongsma
On 9/21/22 1:44 PM, Jonathon Jongsma wrote: On 9/19/22 8:48 AM, Peter Krempa wrote: On Wed, Aug 31, 2022 at 13:40:45 -0500, Jonathon Jongsma wrote: After a bit of a lengthy delay, this is the second version of this patch series. See https://bugzilla.redhat.com/show_bug.cgi?id=2016527 for more i

Re: [libvirt PATCH v2 00/16] Use nbdkit for http/ftp/ssh network drives in libvirt

2022-09-21 Thread Jonathon Jongsma
On 9/19/22 8:48 AM, Peter Krempa wrote: On Wed, Aug 31, 2022 at 13:40:45 -0500, Jonathon Jongsma wrote: After a bit of a lengthy delay, this is the second version of this patch series. See https://bugzilla.redhat.com/show_bug.cgi?id=2016527 for more information about the goal, but the summary is

Re: [libvirt PATCH v2 04/16] util: Allow virFileCache data to be any GObject

2022-09-19 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:49 -0500, Jonathon Jongsma wrote: > Since the libvirt documentation suggests to prefer GObject over > virObject, and since virObject is a GObject, change virFileCache to > allow GObjects as data. > > Signed-off-by: Jonathon Jongsma > --- > src/util/virfilecache.c |

Re: [libvirt PATCH v2 03/16] qemu: expand nbdkit capabilities

2022-09-19 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:48 -0500, Jonathon Jongsma wrote: > In order to add caching of the nbdkit capabilities, we will need to > compare against file modification times, etc. So look up this > information when creating the nbdkit caps. > > Add a nbdkit_moddir build option to allow the build

Re: [libvirt PATCH v2 02/16] qemu: Add qemuNbdkitCaps to qemu driver

2022-09-19 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:47 -0500, Jonathon Jongsma wrote: > In future commits, we will optionally use nbdkit to serve some remote > disk sources. This patch queries to see whether nbdkit is installed on > the host and queries it for capabilities. These capabilities are stored > in the qemu dr

Re: [libvirt PATCH v2 01/16] schema: allow 'ssh' as a protocol for network disks

2022-09-19 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:46 -0500, Jonathon Jongsma wrote: > There was support in the code for parsing protocol='ssh' on network disk > sources, but it was not present in the xml schema. Add this to the > schema and mention it in the documentation. The problem here is that it doesn't really w

Re: [libvirt PATCH v2 00/16] Use nbdkit for http/ftp/ssh network drives in libvirt

2022-09-19 Thread Peter Krempa
On Wed, Aug 31, 2022 at 13:40:45 -0500, Jonathon Jongsma wrote: > After a bit of a lengthy delay, this is the second version of this patch > series. See https://bugzilla.redhat.com/show_bug.cgi?id=2016527 for more > information about the goal, but the summary is that RHEL does not want to ship > th

[libvirt PATCH v2 03/16] qemu: expand nbdkit capabilities

2022-08-31 Thread Jonathon Jongsma
In order to add caching of the nbdkit capabilities, we will need to compare against file modification times, etc. So look up this information when creating the nbdkit caps. Add a nbdkit_moddir build option to allow the builder to specify the location to look for nbdkit plugins and filters. Signed

[libvirt PATCH v2 04/16] util: Allow virFileCache data to be any GObject

2022-08-31 Thread Jonathon Jongsma
Since the libvirt documentation suggests to prefer GObject over virObject, and since virObject is a GObject, change virFileCache to allow GObjects as data. Signed-off-by: Jonathon Jongsma --- src/util/virfilecache.c | 15 +-- src/util/virfilecache.h | 2 +- 2 files changed, 10 inser

[libvirt PATCH v2 16/16] qemu: add test for authenticating a https network disk

2022-08-31 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- tests/qemunbdkitdata/disk-network-source-curl.args.1.pipe.1 | 1 + tests/qemunbdkitdata/disk-network-source-curl.args.disk1 | 4 +++- .../disk-network-source-curl.args.disk1.pipe.47 | 2 +- .../disk-network-source-curl.args.disk1.pipe.49

[libvirt PATCH v2 11/16] qemu: split qemuDomainSecretStorageSourcePrepare

2022-08-31 Thread Jonathon Jongsma
This prepares encryption secrets and authentication secrets. When we add nbdkit-backed network storage sources, we will not need to send authentication secrets to qemu, since they will be sent to nbdkit instead. So split this into two different functions. Signed-off-by: Jonathon Jongsma --- src/

[libvirt PATCH v2 00/16] Use nbdkit for http/ftp/ssh network drives in libvirt

2022-08-31 Thread Jonathon Jongsma
After a bit of a lengthy delay, this is the second version of this patch series. See https://bugzilla.redhat.com/show_bug.cgi?id=2016527 for more information about the goal, but the summary is that RHEL does not want to ship the qemu storage plugins for curl and ssh. Handling them outside of the q

[libvirt PATCH v2 06/16] qemu: implement persistent file cache for nbdkit caps

2022-08-31 Thread Jonathon Jongsma
Implement the loadFile and saveFile virFileCacheHandlers callbacks so that nbdkit capabilities are cached perstistently across daemon restarts. The format and implementation is modeled on the qemu capabilities, but simplified slightly. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_nbdkit.c |

[libvirt PATCH v2 15/16] qemu: pass sensitive data to nbdkit via pipe

2022-08-31 Thread Jonathon Jongsma
Rather than passing passwords and cookies (which could contain passwords) to nbdkit via commandline arguments, use the alternate format that nbdkit supports where we can specify a file descriptor which nbdkit will read to get the password or cookies. Signed-off-by: Jonathon Jongsma --- build-aux

[libvirt PATCH v2 14/16] tests: add tests for nbdkit invocation

2022-08-31 Thread Jonathon Jongsma
We were testing the arguments that were being passed to qemu when a disk was being served by nbdkit, but the arguments used to start nbdkit itself were not testable. This adds a test to ensure that we're invoking nbdkit correctly for various disk source definitions. Signed-off-by: Jonathon Jongsma

[libvirt PATCH v2 02/16] qemu: Add qemuNbdkitCaps to qemu driver

2022-08-31 Thread Jonathon Jongsma
In future commits, we will optionally use nbdkit to serve some remote disk sources. This patch queries to see whether nbdkit is installed on the host and queries it for capabilities. These capabilities are stored in the qemu driver. Signed-off-by: Jonathon Jongsma --- po/POTFILES|

[libvirt PATCH v2 10/16] tests: add ability to test various nbdkit capabilities

2022-08-31 Thread Jonathon Jongsma
Add new DO_TEST_CAPS_LATEST_NBDKIT macro to test xml2argv for various nbdkit capability scenarios. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_nbdkit.c | 20 +--- tests/qemuxml2argvtest.c | 11 +++ tests/testutilsqemu.c| 27 +++ tests/t

[libvirt PATCH v2 09/16] qemu: add functions to start and stop nbdkit

2022-08-31 Thread Jonathon Jongsma
Add some helper functions to build a virCommand object and run the nbdkit process for a given virStorageSource. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_nbdkit.c | 208 + src/qemu/qemu_nbdkit.h | 8 ++ 2 files changed, 216 insertions(+) diff --

[libvirt PATCH v2 12/16] qemu: use nbdkit to serve network disks if available

2022-08-31 Thread Jonathon Jongsma
For virStorageSource objects that contain an nbdkitProcess, start that nbdkit process to serve that network drive and then pass the nbdkit socket to qemu rather than sending the network url to qemu directly. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_block.c | 168

[libvirt PATCH v2 05/16] qemu: implement basic virFileCache for nbdkit caps

2022-08-31 Thread Jonathon Jongsma
Preparatory step for caching nbdkit capabilities. This patch implements the newData and isValid virFileCacheHandlers callback functions. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_nbdkit.c | 91 ++ src/qemu/qemu_nbdkit.h | 3 ++ 2 files changed, 94

[libvirt PATCH v2 13/16] qemu: include nbdkit state in private xml

2022-08-31 Thread Jonathon Jongsma
Add xml to the private data for a disk source to represent the nbdkit process so that the state can be re-created if the libvirt daemon is restarted. Format: /path/to/nbdkit.pid /path/to/nbdkit.socket Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_domain.c | 51

[libvirt PATCH v2 07/16] qemu: use file cache for nbdkit caps

2022-08-31 Thread Jonathon Jongsma
Switch to using the virFileCache implementation for nbdkit capabilities so that we have persistent caching and re-load capabilities whenever something changes. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_conf.h | 2 +- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_nbdkit.c | 24

[libvirt PATCH v2 01/16] schema: allow 'ssh' as a protocol for network disks

2022-08-31 Thread Jonathon Jongsma
There was support in the code for parsing protocol='ssh' on network disk sources, but it was not present in the xml schema. Add this to the schema and mention it in the documentation. Signed-off-by: Jonathon Jongsma --- docs/formatdomain.rst | 2 +- src/conf/schemas/doma

[libvirt PATCH v2 08/16] qemu: Add qemuNbdkitProcess

2022-08-31 Thread Jonathon Jongsma
An object for storing information about a nbdkit process that is serving a specific virStorageSource. At the moment, this information is just stored in the private data of virStorageSource and not used at all. Future commits will use this data to actually start a nbdkit process. Signed-off-by: Jon

Re: [libvirt PATCH v2 2/2] nwfilter: Fix timeout data type reported by coverity

2022-08-25 Thread Peter Krempa
On Wed, Aug 24, 2022 at 09:00:00 +0200, Erik Skultety wrote: > On Tue, Aug 23, 2022 at 06:43:26PM +0200, Peter Krempa wrote: > > On Tue, Aug 23, 2022 at 18:22:37 +0200, Erik Skultety wrote: > > > Coverity reports: > > > virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, > > >

Re: [libvirt PATCH v2 2/2] nwfilter: Fix timeout data type reported by coverity

2022-08-24 Thread Erik Skultety
On Tue, Aug 23, 2022 at 06:43:26PM +0200, Peter Krempa wrote: > On Tue, Aug 23, 2022 at 18:22:37 +0200, Erik Skultety wrote: > > Coverity reports: > > virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, > > time_t timeout) > > { > > if (time

Re: [libvirt PATCH v2 2/2] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Peter Krempa
On Tue, Aug 23, 2022 at 18:22:37 +0200, Erik Skultety wrote: > Coverity reports: > virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, > time_t timeout) > { > if (timeout < ipl->timeout) > return; /* no take-backs */ > >

Re: [libvirt PATCH v2 1/2] nwfilter: Replace a redundant 'now' variable with a direct time(0) call

2022-08-23 Thread Peter Krempa
On Tue, Aug 23, 2022 at 18:22:36 +0200, Erik Skultety wrote: > In this very instance having a variable is pointless since there is > only a single time(0) call in the whole function. > > Signed-off-by: Erik Skultety > --- > src/nwfilter/nwfilter_dhcpsnoop.c | 4 +--- > 1 file changed, 1 insertio

[libvirt PATCH v2 2/2] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Erik Skultety
Coverity reports: virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, time_t timeout) { if (timeout < ipl->timeout) return; /* no take-backs */ virNWFilterSnoopIPLeaseTimerDel(ipl); >>> CID 396747: High impact quality

[libvirt PATCH v2 1/2] nwfilter: Replace a redundant 'now' variable with a direct time(0) call

2022-08-23 Thread Erik Skultety
In this very instance having a variable is pointless since there is only a single time(0) call in the whole function. Signed-off-by: Erik Skultety --- src/nwfilter/nwfilter_dhcpsnoop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src

[libvirt PATCH v2 0/2] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Erik Skultety
Since v1: - instead of time_t, store the timeout as unsigned long long and typecast any affected time_t variables on relevant places here's a successfull CI build: https://gitlab.com/eskultety/libvirt/-/pipelines/620752689 Erik Skultety (2): nwfilter: Replace a redundant 'now' variable with a

Re: [libvirt PATCH v2 0/2] ci: Fix paths shown in the website

2022-08-11 Thread Pavel Hrdina
On Wed, Aug 10, 2022 at 06:17:11PM +0200, Andrea Bolognani wrote: > Compare > > > https://abologna.gitlab.io/-/libvirt/-/jobs/2840280594/artifacts/website/manpages/virtqemud.html#files > > with > > https://libvirt.org/manpages/virtqemud.html#files > > Changes from [v1]: > > * don't use

[libvirt PATCH v2 0/2] ci: Fix paths shown in the website

2022-08-10 Thread Andrea Bolognani
Compare https://abologna.gitlab.io/-/libvirt/-/jobs/2840280594/artifacts/website/manpages/virtqemud.html#files with https://libvirt.org/manpages/virtqemud.html#files Changes from [v1]: * don't use pathlib; * don't check whether DESTDIR is absolute. [v1] https://listman.redhat.com/arc

[libvirt PATCH v2 1/2] scripts: Add $DESTDIR support to meson-install-web.py

2022-08-10 Thread Andrea Bolognani
meson already supports $DESTDIR natively, but in this case we're using a custom script and so we have to do some extra work ourselves. Signed-off-by: Andrea Bolognani --- scripts/meson-install-web.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/meson-instal

[libvirt PATCH v2 2/2] ci: Fix paths shown in the website

2022-08-10 Thread Andrea Bolognani
Right now we're setting the prefix to a custom path, which results in paths like /builds/libvirt/libvirt/vroot/etc/libvirt/virtqemud.conf ending up in the generated HTML. In order to avoid that, set the prefix and other installation paths to reasonable default values by passing -Dsystem=true

Re: [libvirt PATCH v2 2/2] kbase: Document how to disable Secure Boot entirely

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 12:16:42PM +0200, Andrea Bolognani wrote: > In most cases, disabling the secure-boot or the enrolled-keys > firmware feature will achieve the same result: allowing an > unsigned operating system to run. > > Right now we're only documenting the latter configuration. Add > th

Re: [libvirt PATCH v2 1/2] kbase: Always explicitly enable secure-boot firmware feature

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 12:16:41PM +0200, Andrea Bolognani wrote: > It should be enough to enable or disable the enrolled-keys feature > to control whether Secure Boot is enforced, but there's a slight > complication: many distro packages for edk2 include, in addition > to general purpose firmware

[libvirt PATCH v2 2/2] kbase: Document how to disable Secure Boot entirely

2022-08-04 Thread Andrea Bolognani
In most cases, disabling the secure-boot or the enrolled-keys firmware feature will achieve the same result: allowing an unsigned operating system to run. Right now we're only documenting the latter configuration. Add the former as well, and explain the difference between the two. Signed-off-by:

[libvirt PATCH v2 0/2] kbase: Improve secureboot page

2022-08-04 Thread Andrea Bolognani
Changes from [v1]: * document configuration where Secure Boot support is completely absent, not just inactive; * explain in more detail how the various firmware features interact with one another. [v1] https://listman.redhat.com/archives/libvir-list/2022-August/233449.html Andrea Bol

[libvirt PATCH v2 1/2] kbase: Always explicitly enable secure-boot firmware feature

2022-08-04 Thread Andrea Bolognani
It should be enough to enable or disable the enrolled-keys feature to control whether Secure Boot is enforced, but there's a slight complication: many distro packages for edk2 include, in addition to general purpose firmware images, builds that are targeting the Confidential Computing use case. Fo

Re: [libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 13:25:45 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:31 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:53 +0200, Eugenio Pérez wrote: > > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > > > will return an array

Re: [libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:31 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:53 +0200, Eugenio Pérez wrote: > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > > will return an array of error strings describing the migration blockers. > > This can be used to c

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 13:11:57 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > vDPA devices will be migratable soon. Since they are not migratable > > > before qemu 6.0, and qemu

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 1:13 PM Peter Krempa wrote: > > On Wed, Jul 20, 2022 at 13:11:57 +0200, Eugenio Perez Martin wrote: > > On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > > > > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > > vDPA devices will be migratable so

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 1:13 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 12:43:44 +0200, Eugenio Perez Martin wrote: > > On Wed, Jul 20, 2022 at 12:14 PM Jiri Denemark wrote: > > > > > > On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > > > > This will allow qemuMigrationSrcI

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Peter Krempa
On Wed, Jul 20, 2022 at 13:11:57 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > vDPA devices will be migratable soon. Since they are not migratable > > > before qemu 6.0, and qemu

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 12:43:44 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:14 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > > > This will allow qemuMigrationSrcIsAllowed to dynamically ask for > > > migration blockers, reducing

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > vDPA devices will be migratable soon. Since they are not migratable > > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > > for migration blockers, let

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:37 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 12:36:16 +0200, Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > vDPA devices will be migratable soon. Since they are not migratable > > > before qemu 6.0, and qemu pre-6.0

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:14 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > > This will allow qemuMigrationSrcIsAllowed to dynamically ask for > > migration blockers, reducing duplication. > > > > Signed-off-by: Eugenio Pérez > > --- > > src/qemu/qemu

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 12:36:16 +0200, Jiri Denemark wrote: > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > vDPA devices will be migratable soon. Since they are not migratable > > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > > for migration blockers,

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > vDPA devices will be migratable soon. Since they are not migratable > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > for migration blockers, let it hardcoded in that case. > > Otherwise, ask qemu about the exp

Re: [libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:53 +0200, Eugenio Pérez wrote: > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices blocking > migration, etc. >

Re: [libvirt PATCH v2 3/5] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:52 +0200, Eugenio Pérez wrote: > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices blocking > migration, etc. >

Re: [libvirt PATCH v2 1/5] qemu: introduce capability QEMU_MIGRATION_BLOCKED_REASONS

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:50 +0200, Eugenio Pérez wrote: > From: Jonathon Jongsma > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices b

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > This will allow qemuMigrationSrcIsAllowed to dynamically ask for > migration blockers, reducing duplication. > > Signed-off-by: Eugenio Pérez > --- > src/qemu/qemu_monitor_json.c | 35 +++ > src/qemu/q

[libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemuMigrationSrcIsAllowed to query it. Signed-off-by: Eugenio P

[libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Eugenio Pérez
This will allow qemuMigrationSrcIsAllowed to dynamically ask for migration blockers, reducing duplication. Signed-off-by: Eugenio Pérez --- src/qemu/qemu_monitor_json.c | 35 +++ src/qemu/qemu_monitor_json.h | 3 +++ 2 files changed, 38 insertions(+) diff --git

[libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Pérez
vDPA devices will be migratable soon. Since they are not migratable before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking for migration blockers, let it hardcoded in that case. Otherwise, ask qemu about the explicit blocker. Signed-off-by: Eugenio Pérez --- src/qemu/qemu_migrat

[libvirt PATCH v2 3/5] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemu monitor to send this query. Signed-off-by: Eugenio Pérez

[libvirt PATCH v2 0/5] Ask qemu about migration blockers

2022-07-20 Thread Eugenio Pérez
There are some hardcoded migration blockers in libvirt, like having a net vhost-vdpa device. While it's true that they cannot be migrated at the moment, there are plans to be able to migrate them soon. They'll put a migration blockers in the cases where you cannot migrate them. Ask qemu about then

[libvirt PATCH v2 1/5] qemu: introduce capability QEMU_MIGRATION_BLOCKED_REASONS

2022-07-20 Thread Eugenio Pérez
From: Jonathon Jongsma since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Signed-off-by: Jonathon Jongsma Signed-off-by

Re: [libvirt PATCH v2 09/10] docs: ci: Add a section on how to add a new platform to libvirt CI

2022-07-14 Thread Daniel P . Berrangé
On Thu, Jul 14, 2022 at 05:34:34PM +0200, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > docs/ci.rst | 9 + > 1 file changed, 9 insertions(+) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberran

Re: [libvirt PATCH v2 08/10] docs: ci: Add info about the two major types of jobs our CI runs

2022-07-14 Thread Daniel P . Berrangé
On Thu, Jul 14, 2022 at 05:34:33PM +0200, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > docs/ci.rst | 39 --- > 1 file changed, 20 insertions(+), 19 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com

Re: [libvirt PATCH v2 07/10] docs: Change the CI headline from "CI Testing" to "CI"

2022-07-14 Thread Daniel P . Berrangé
On Thu, Jul 14, 2022 at 05:34:32PM +0200, Erik Skultety wrote: > It's not just strategy the master CI article talks (or will talk in the > future) about. > > Signed-off-by: Erik Skultety > --- > docs/docs.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Daniel P. Ber

Re: [libvirt PATCH v2 04/10] docs: Provide an article on testing

2022-07-14 Thread Daniel P . Berrangé
On Thu, Jul 14, 2022 at 05:34:29PM +0200, Erik Skultety wrote: > Currently we don't have much information on how testing is done in > libvirt and the little we have is scattered among multiple files. This > patch creates a common landing page containing all important bits about > testing in libvirt

[libvirt PATCH v2 09/10] docs: ci: Add a section on how to add a new platform to libvirt CI

2022-07-14 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/ci.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/ci.rst b/docs/ci.rst index 566bc42db7..efb1ea295e 100644 --- a/docs/ci.rst +++ b/docs/ci.rst @@ -40,3 +40,12 @@ Retrieving test logs In case the integration test suite fails in our CI p

[libvirt PATCH v2 10/10] docs: ci: Add a brief section on how to run the CI workload locally

2022-07-14 Thread Erik Skultety
This is just a glue to the testing article introduced in previous commits. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé --- docs/ci.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/docs/ci.rst b/docs/ci.rst index efb1ea295e..ee85018c49 100644 --- a/docs/ci.rst +++

<    1   2   3   4   5   6   7   8   9   10   >