[libvirt] [PATCH] virbpf: Check if syscall() is available

2019-11-15 Thread Michal Privoznik
There are some OSes which don't have syscall() nor . We already check for the header file in configure phase, so we just need to add check for HAVE_SYS_SYSCALL_H to HAVE_DECL_BPF_PROG_QUERY. While I'm at it, some header files we are including are not needed, so their includes can be safely

Re: [libvirt] [PATCH v2 00/24] scripts: convert most perl scripts to python

2019-11-15 Thread Jim Fehlig
On 9/13/19 9:28 AM, Andrea Bolognani wrote: > On Fri, 2019-09-13 at 13:58 +, Jim Fehlig wrote: >> On 9/13/19 2:56 AM, Andrea Bolognani wrote: >>> Jim, does SLES 12 have >>> Python 3? >> >> Yes, python 3.4.6. And python 2.7.13. > > That's *amazing* news! \o/ > >>> And, as a side note: do you

Re: [libvirt] [PATCH v5 10/23] src: rewrite driver name checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-drivername.pl tool in Python. > > This was mostly a straight conversion, manually going line-by-line > to change the syntax from Perl to Python. Thus the overall

Re: [libvirt] [PATCH v5 09/23] src: rewrite systemtap function generator in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the gensystemtap.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure > of

Re: [libvirt] [PATCH v5 08/23] src: rewrite systemtap probe generator in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the dtrace2systemtap.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure

Re: [libvirt] [PATCH v5 07/23] src: rewrite symfile library checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-symfile.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure >

Re: [libvirt] [PATCH v5 06/23] src: rewrite symfile sorting checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-symsorting.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure

Re: [libvirt] [PATCH v5 05/23] src: rewrite ACL permissions checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-aclperms.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure >

Re: [libvirt] [PATCH v5 04/23] build-aux: rewrite header ifdef checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the header-ifdef.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure > of

Re: [libvirt] [PATCH v5 03/23] build-aux: rewrite mock inline checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the mock-noinline.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure >

Re: [libvirt] [PATCH v5 02/23] build-aux: rewrite whitespace checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-spacing.pl tool in Python. > > This was a straight conversion, manually going line-by-line to > change the syntax from Perl to Python. Thus the overall structure >

Re: [libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > This series is an effort to reduce the number of different > languages we use by eliminating most use of perl in favour > of python. I'm testing the series now. On fedora 31, make syntax-check is showing some flake8 errors, see attached. I also

Re: [libvirt] [PATCH v5 10/23] src: rewrite driver name checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-drivername.pl tool in Python. > > This was mostly a straight conversion, manually going line-by-line > to change the syntax from Perl to Python. Thus the overall

Re: [libvirt] [PATCH v3 0/4] Fix up some issues from x and y resolution patches

2019-11-15 Thread Cole Robinson
On 11/14/19 4:59 PM, Jonathon Jongsma wrote: > This is the third version of this patch series after a review from Cole. The > main changes to this version of the patch series are: > - several patches have been pushed upstream (and therefore dropped from this >series > - The iteration over

[libvirt] [PATCH v2] news: mention 'ramfb' mdev attribute

2019-11-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- v2: Made changes suggested by Andrea. I'll need somebody to push this for me ;) docs/news.xml | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index c362bf3a15..240d288c37 100644 --- a/docs/news.xml +++

[libvirt] [PATCH 0/6] qemu: Use -blockdev for pflash (blockdev-add saga)

2019-11-15 Thread Peter Krempa
To avoid using -drive as much as possible convert PFLASH to use -blockdev as well. Since -blockdev is not enabled yet use the following qemu namespace XML override to enable it for testing: ... Peter Krempa (6): qemu: command: Extract formatting of -drive for pflash

[libvirt] [PATCH 1/6] qemu: command: Extract formatting of -drive for pflash

2019-11-15 Thread Peter Krempa
Extract the old way to instantiate pflash devices to hold the firmware via -drive to a separate function so that it can later be conditionally disabled when -blockdev will be used. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 72 +++-- 1 file

[libvirt] [PATCH 6/6] qemu: Instantiate pflash via -machine when using blockdev

2019-11-15 Thread Peter Krempa
Install the convertor function which enables the internals that will use -blockdev to make qemu open the firmware image and stop using -drive. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 14 ++ src/qemu/qemu_process.c | 6 ++ 2 files changed, 16 insertions(+), 4

[libvirt] [PATCH 4/6] qemu: command: Build -blockdev-s for backing of pflash

2019-11-15 Thread Peter Krempa
As a first step we will build the blockdevs which will be supposed to back the pflash drives when moving away from -drive. This code is similar to the way we build the blockdevs for the disk, but skips the copy-on-read layer and doesn't implement any legacy approach. Signed-off-by: Peter Krempa

[libvirt] [PATCH 2/6] qemu: domain: Store virStorageSources representing pflash backing

2019-11-15 Thread Peter Krempa
To allow converting the pflash drives to blockdev we will need a virStorageSource to allow using our helpers. Temporarily prior to coverting loader data to a virStorageSoruce add private data which will house this. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 5 +

[libvirt] [PATCH 3/6] qemu: domain: Introduce helper to convert into virStorageSource

2019-11-15 Thread Peter Krempa
Add a helper which will covert the PFLASH code file and variable file into the virStorageSource objects stored in private data so that we can use them with -blockdev while keeping the infrastructure to determine the path to the loaders intact. This is a temporary solution until we will want to do

[libvirt] [PATCH 5/6] qemu: command: Build the 'pflash' drives via -machine

2019-11-15 Thread Peter Krempa
The old way to instantiate a pflash device via -drive was a hack since it's a platform device. The modern approach calls for configuring it via -machine and takes the node name as an argument. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 12 ++-- 1 file changed, 10

Re: [libvirt] [PATCH 6/7] conf: add hypervisor agnostic, domain start-time, validation function for NetDef

2019-11-15 Thread Laine Stump
On 11/14/19 5:20 PM, Cole Robinson wrote: On 10/22/19 9:24 PM, Laine Stump wrote: +int +virDomainNetDefRuntimeValidate(const virDomainNetDef *net G_GNUC_UNUSED) +{ +/* Unlike virDomainNetDefValidate(), which is a static function + * called internally to this file,

Re: [libvirt] [PATCH 0/4] qemu: Use host-model CPU on s390 by default

2019-11-15 Thread Jiri Denemark
On Fri, Nov 15, 2019 at 15:55:04 +0100, Christian Borntraeger wrote: > > > On 15.11.19 15:47, Jiri Denemark wrote: > > On Fri, Nov 15, 2019 at 15:12:18 +0100, Boris Fiuczynski wrote: > >> Just a heads up. > >> After installing libvirt rpms of this branch all my existing kvm s390 > >> domains

Re: [libvirt] [PATCH 0/4] qemu: Use host-model CPU on s390 by default

2019-11-15 Thread Christian Borntraeger
On 15.11.19 15:47, Jiri Denemark wrote: > On Fri, Nov 15, 2019 at 15:12:18 +0100, Boris Fiuczynski wrote: >> Just a heads up. >> After installing libvirt rpms of this branch all my existing kvm s390 >> domains ended up with >> >> >> qemu >> >> >> Newly defined domains without

Re: [libvirt] [PATCH 0/4] qemu: Use host-model CPU on s390 by default

2019-11-15 Thread Jiri Denemark
On Fri, Nov 15, 2019 at 15:12:18 +0100, Boris Fiuczynski wrote: > Just a heads up. > After installing libvirt rpms of this branch all my existing kvm s390 > domains ended up with > > > qemu > > > Newly defined domains without specified cpu do so as well. Unless the domains are all

Re: [libvirt] [PATCH 0/2] [Bug 1760233] Better support for non-systemd distributions

2019-11-15 Thread Michal Privoznik
On 11/4/19 3:55 PM, Miguel Ángel Arruga Vivas wrote: Hi everybody, The following patches try to enhance the support for non-systemd configurations. The first patch just removes the references to the cgroups created by systemd, only leaving the reference to /machine cgroup, created by libvirtd

Re: [libvirt] [PATCH] Allow a zfs pool or dataset as source for zfs storage backend

2019-11-15 Thread Michal Privoznik
On 11/7/19 5:03 AM, Gregor Kopka wrote: Enables hosting a pool on an existing zfs pool without affecting other datasets there. Specify dataset instead of pool as source to use. Parent of dataset must exist for pool-build to succeed. Beware that pool-delete destroys the source dataset and all

Re: [libvirt] [PATCH 0/4] qemu: Use host-model CPU on s390 by default

2019-11-15 Thread Boris Fiuczynski
Just a heads up. After installing libvirt rpms of this branch all my existing kvm s390 domains ended up with qemu Newly defined domains without specified cpu do so as well. On 11/14/19 4:44 PM, Jiri Denemark wrote: On s390 machines host-passthrough and host-model CPUs result in

Re: [libvirt] [PATCH] news: mention 'ramfb' mdev attribute

2019-11-15 Thread Andrea Bolognani
On Thu, 2019-11-14 at 16:29 -0600, Jonathon Jongsma wrote: > + > + > + qemu: support boot display for GPU mediated devices s/support/Support/ > + > + > + Until now, GPU mediated devices generally did not show any output > + until the guest

Re: [libvirt] [PATCH] spec: Remove build-time list of edk2 firmwares

2019-11-15 Thread Michal Privoznik
On 11/14/19 5:51 PM, Jim Fehlig wrote: Fedora now advertises supported firmwares via descriptor files. Since the upstream spec file assumes recent Fedora, remove the build-time list of firmwares, which can produce a warning after commit 75597f022a. Signed-off-by: Jim Fehlig ---

Re: [libvirt] [PATCHv2] conf: remove NULL check from virDomainQemuMonitorEventNew

2019-11-15 Thread Michal Privoznik
On 11/12/19 6:04 PM, Ján Tomko wrote: The qemu_domain_monitor_event_msg struct in qemu_protocol.x defines event as a nonnull_string and qemuMonitorJSONIOProcessEvent also errors out on a non-NULL event. Drop the check completely. This essentially reverts commit

[libvirt] [PATCH console-proxy 3/6] Adapt to API change for dom.Devices.{Serials, Console}

2019-11-15 Thread Philipp Hahn
Follow > commit d44fdf9badbb798949ab9f82ef516a2fd36d8b55 > Author: Daniel P. Berrange > Date: Tue Nov 28 11:50:06 2017 + > > Generalize protocol handling for chardev sources Signed-off-by: Philipp Hahn --- cmd/virtconsoleresolveradm/cmd/enable.go | 4 ++-- 1 file changed, 2

[libvirt] [PATCH console-proxy 6/6] virtconsoleresolveradm: Fix -c handling

2019-11-15 Thread Philipp Hahn
-c / --connect does not work: > $ build/virtconsoleresolveradm -c qemu:///session enable $VM > Error: unknown shorthand flag: 'c' in -c Signed-off-by: Philipp Hahn --- cmd/virtconsoleresolveradm/cmd/root.go | 2 +- 1 file changed, 1

[libvirt] [PATCH console-proxy 1/6] Adapt to API change for dom.Devices.Graphics

2019-11-15 Thread Philipp Hahn
Follow > commit 4772b681e87a8d0dcee011b8e43813e851e4f934 > Author: Daniel P. Berrange > Date: Fri Nov 24 16:15:30 2017 + > > Add remaining graphics configuration options Signed-off-by: Philipp Hahn --- cmd/virtconsoleresolveradm/cmd/enable.go | 6 ++ pkg/resolver/server.go

[libvirt] [PATCH console-proxy 4/6] virtconsoleresolveradm: Require sub-command

2019-11-15 Thread Philipp Hahn
Signed-off-by: Philipp Hahn --- cmd/virtconsoleresolveradm/cmd/root.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/virtconsoleresolveradm/cmd/root.go b/cmd/virtconsoleresolveradm/cmd/root.go index 76e1203..7aaca47 100644 --- a/cmd/virtconsoleresolveradm/cmd/root.go +++

[libvirt] [PATCH console-proxy 2/6] Adapt to uuid API change

2019-11-15 Thread Philipp Hahn
> commit 0ef6afb2f6cdd6cdaeee3885a95099c63f18fc8c > Author: Maxim Bublis > Date: Wed Jan 3 16:02:28 2018 + > > Return enthropy errors from UUID generation. > > This commit changes signature for `NewV1`, `NewV2` and `NewV4` functions > which from now will return `(UUID, error)`

[libvirt] [PATCH console-proxy 5/6] virtconsoleresolveradm: Simplify argument parsing

2019-11-15 Thread Philipp Hahn
Use ExactArgs(1) to check for exactly one positional argument. Signed-off-by: Philipp Hahn --- cmd/virtconsoleresolveradm/cmd/disable.go | 6 +- cmd/virtconsoleresolveradm/cmd/enable.go | 6 +- 2 files changed, 2

[libvirt] [PATCH console-proxy 0/6] libvirt-go-xml and libvirt-console-proxy ?

2019-11-15 Thread Philipp Hahn
Hello Daniel, I regularly visit your blog and stumbled over , which seems to contains some small errors - I'm a "go"-newby, so I had to spend some time to understand your example and to make it go: >

[libvirt] [PATCH v2 04/12] esx: implement connectListAllStoragePools

2019-11-15 Thread Pino Toscano
Implement the .connectListAllStoragePools storage API in the esx storage driver, and in all its subdrivers. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 72 + src/esx/esx_storage_backend_vmfs.c | 98 +

[libvirt] [PATCH v2 12/12] docs: document implemented APIs in esx

2019-11-15 Thread Pino Toscano
Signed-off-by: Pino Toscano --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index c362bf3a15..1718a686ce 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -55,6 +55,17 @@ + + + esx:

[libvirt] [PATCH v2 05/12] esx: split virtualswitchToNetwork helper

2019-11-15 Thread Pino Toscano
Move the creation of a virNetworkPtr object from the esxVI_HostVirtualSwitch object of a virtual switch out of esxNetworkLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_network_driver.c | 34

[libvirt] [PATCH v2 06/12] esx: implement connectListAllNetworks

2019-11-15 Thread Pino Toscano
Implement the .connectListAllNetworks networks API in the esx network driver. Signed-off-by: Pino Toscano --- src/esx/esx_network_driver.c | 66 1 file changed, 66 insertions(+) diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index

[libvirt] [PATCH v2 08/12] esx: set vmfs fs type for vmfs-based datastores

2019-11-15 Thread Pino Toscano
This way they are correctly represented: ... instead of 'auto'. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_vmfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c index 05b273aed7..1270c21e00

[libvirt] [PATCH v2 00/12] esx: various improvements

2019-11-15 Thread Pino Toscano
- implement connectListAllStoragePools, so virConnectListAllStoragePools() works - implement connectListAllNetworks, so virConnectListAllNetworks() works - implement storagePoolListAllVolumes, so virStoragePoolListAllVolumes() works - set the proper filesystem type for vmfs-based datastores

[libvirt] [PATCH v2 02/12] esx: split datastorePoolType helper

2019-11-15 Thread Pino Toscano
Move the detection of the type of a vmfs pool out of esxLookupVMFSStoragePoolType in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_vmfs.c | 49 -- 1 file changed, 33 insertions(+), 16

[libvirt] [PATCH v2 09/12] esx: split datastorePathToStorageVol helper

2019-11-15 Thread Pino Toscano
Move the creation of a virStorageVolPtr object by lookup out of esxStorageVolLookupByPath in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_vmfs.c | 28 ++-- 1 file changed, 18 insertions(+), 10

[libvirt] [PATCH v2 07/12] storage: add vmfs filesystem type

2019-11-15 Thread Pino Toscano
It will be used to represent the type of a filesystem pool in ESXi. Signed-off-by: Pino Toscano --- docs/schemas/storagepool.rng | 1 + docs/schemas/storagevol.rng | 1 + docs/storage.html.in | 3 +++

[libvirt] [PATCH v2 01/12] esx: split datastoreToStoragePoolPtr helper

2019-11-15 Thread Pino Toscano
Move the creation of a virStoragePtr object from the esxVI_ObjectContent object of a datastore out of esxStoragePoolLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_vmfs.c | 45

[libvirt] [PATCH v2 10/12] esx: split scsilunToStorageVol helper

2019-11-15 Thread Pino Toscano
Move the creation of a virStorageVolPtr object from the esxVI_ScsiLun object of a SCSI lun out of esxStorageVolLookupByName and esxStorageVolLookupByPath in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 60

[libvirt] [PATCH v2 11/12] esx: implement storagePoolListAllVolumes

2019-11-15 Thread Pino Toscano
Implement the .storagePoolListAllVolumes storage API in the esx storage driver, and in all its subdrivers. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 70 src/esx/esx_storage_backend_vmfs.c | 85 +

[libvirt] [PATCH v2 03/12] esx: split targetToStoragePool helper

2019-11-15 Thread Pino Toscano
Move the creation of a virStoragePtr object from the esxVI_HostInternetScsiHbaStaticTarget object of a target out of esxStoragePoolLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 32

Re: [libvirt] [PATCH 0/5] esx: implement virConnectListAllStoragePools

2019-11-15 Thread Pino Toscano
On Wednesday, 13 November 2019 13:46:06 CET Pino Toscano wrote: > Make the virConnectListAllStoragePools API work for esx storage pools by > implementing the internal connectListAllStoragePools storage API. > > Pino Toscano (5): > esx: split datastoreToStoragePoolPtr helper > esx: split

[libvirt] [PATCH] tests: Mock access to /dev/kvm

2019-11-15 Thread Michal Privoznik
Some of our tests try to validate domain XMLs they are working with (not intentionally, simply because they call top level domain XML parse function). Anyway, this implies that we build domain capabilities also - see virQEMUDriverGetDomainCapabilities(). And since some domain XMLs are type of

Re: [libvirt] [PATCH 0/6] VFIO mdev aggregated resources handling

2019-11-15 Thread Tian, Kevin
> From: Alex Williamson > Sent: Thursday, November 7, 2019 2:45 AM > > On Wed, 6 Nov 2019 12:20:31 +0800 > Zhenyu Wang wrote: > > > On 2019.11.05 14:10:42 -0700, Alex Williamson wrote: > > > On Thu, 24 Oct 2019 13:08:23 +0800 > > > Zhenyu Wang wrote: > > > > > > > Hi, > > > > > > > > This is a

Re: [libvirt] [ruby PATCH] Fix default values for node_cpu_stats() and node_memory_stats()

2019-11-15 Thread Stefano Garzarella
On Thu, Nov 14, 2019 at 04:57:49PM -0500, Cole Robinson wrote: > On 10/22/19 11:47 AM, Stefano Garzarella wrote: > > ruby_libvirt_value_to_int() returns 0 if the optional value is > > not defined, but in node_cpu_stats() and node_memory_stats() > > the default value of cpuNum and cellNum is -1. >

[libvirt] [PATCH] virsh: Fix typo in the man page

2019-11-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Pushed as trivial. tools/virsh.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index c261d403d8..2dce4493cb 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1827,7 +1827,7 @@ agent commands block