[libvirt] [PATCH 2/3] storage: Introduce iscsi_direct pool type

2018-07-13 Thread clem
From: Clementine Hayat Signed-off-by: Clementine Hayat --- configure.ac | 6 ++- m4/virt-storage-iscsi-direct.m4| 41 + src/conf/domain_conf.c | 1 + src/conf/storage_conf.c| 31

[libvirt] [PATCH 1/3] configure: Introduce libiscsi in build system

2018-07-13 Thread clem
From: Clementine Hayat The minimal required version is 1.18.0 because the synchrounous function needed were introduced here. Signed-off-by: Clementine Hayat --- configure.ac| 3 +++ m4/virt-libiscsi.m4 | 30 ++ 2 files changed, 33 insertions(+) create

[libvirt] [PATCH 3/3] storage: Implement iscsi_direct pool backend

2018-07-13 Thread clem
From: Clementine Hayat We need here libiscsi for the storgae pool backend. For the iscsi-direct storage pool, only checkPool and refreshPool should be necessary. The pool is state-less and just need the informations within the volume to work. Signed-off-by: Clementine Hayat ---

[libvirt] [PATCH 0/3] iscsi-direct: first part

2018-07-13 Thread clem
From: Clementine Hayat Hello, This is the implementation of the iscsi-direct backend storage pool. The documentation, some API calls and tests are still missing and will be comming in a second part. Best Regards, -- Clementine Hayat Clementine Hayat (3): configure: Introduce libiscsi in

[libvirt] [PATCH v4 23/31] util: bitmap: remove redundant include directive

2018-07-13 Thread Sukrit Bhatnagar
viralloc.h is pulled in by virbitmap.h Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety --- src/util/virbitmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 0cc5292..ef18dad 100644 --- a/src/util/virbitmap.c +++

[libvirt] [PATCH v4 24/31] util: bitmap: use VIR_AUTOPTR for aggregate types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v4 25/31] util: iohelper: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 19/31] util: json: remove redundant include directive

2018-07-13 Thread Sukrit Bhatnagar
viralloc.h is pulled in by virjson.h Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety --- src/util/virjson.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index 0559d40..92f3994 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@

[libvirt] [PATCH v4 18/31] util: json: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-13 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. When a variable of type virJSONValuePtr is declared using VIR_AUTOPTR, the

[libvirt] [PATCH v4 31/31] util: identity: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 20/31] util: json: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 15/31] util: auth: remove redundant include directive

2018-07-13 Thread Sukrit Bhatnagar
viralloc.h is pulled in by virauthconfig.h Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety --- src/util/virauth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virauth.c b/src/util/virauth.c index adb093e..c6a2ce7 100644 --- a/src/util/virauth.c +++

[libvirt] [PATCH v4 28/31] util: fcp: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 26/31] util: arptable: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 29/31] util: eventpoll: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 27/31] util: audit: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 30/31] util: filecache: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 07/31] util: command: use VIR_AUTOPTR for aggregate types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v4 09/31] util: file: remove redundant include directive

2018-07-13 Thread Sukrit Bhatnagar
viralloc.h is pulled in by virfile.h Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety --- src/util/virfile.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 378d03e..2690e2d 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@

[libvirt] [PATCH v4 11/31] util: file: use VIR_AUTOPTR for aggregate types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v4 21/31] util: json: use VIR_AUTOPTR for aggregate types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v4 22/31] util: bitmap: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-13 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. When a variable of type virBitmapPtr is declared using VIR_AUTOPTR, the

[libvirt] [PATCH v4 10/31] util: file: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 08/31] util: file: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-13 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. When a variable of type virFileWrapperFdPtr is declared using VIR_AUTOPTR,

[libvirt] [PATCH v4 17/31] util: auth: use VIR_AUTOPTR for aggregate types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v4 16/31] util: auth: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 14/31] util: authconfig: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 13/31] util: authconfig: remove redundant include directive

2018-07-13 Thread Sukrit Bhatnagar
viralloc.h is pulled in by virauthconfig.h Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety --- src/util/virauthconfig.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c index 91c9c0c..3487cc2 100644 --- a/src/util/virauthconfig.c

[libvirt] [PATCH v4 04/31] util: command: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-13 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. When a variable of type virCommandPtr is declared using VIR_AUTOPTR, the

[libvirt] [PATCH v4 12/31] util: authconfig: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-13 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. When a variable of type virAuthConfigPtr is declared using VIR_AUTOPTR, the

[libvirt] [PATCH v4 06/31] util: command: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-13 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 05/31] util: command: remove redundant include directive

2018-07-13 Thread Sukrit Bhatnagar
viralloc.h is pulled in by vircommand.h Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety --- src/util/vircommand.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 6dab105..8681e7b 100644 --- a/src/util/vircommand.c +++

[libvirt] [PATCH v4 03/31] util: string: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-13 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Alias virString to (char *) so that the new cleanup macros can be used for a

[libvirt] [PATCH v4 01/31] util: alloc: add macros for implementing automatic cleanup functionality

2018-07-13 Thread Sukrit Bhatnagar
New macros are introduced which help in adding GNU C's cleanup attribute to variable declarations. Variables declared with these macros will have their allocated memory freed automatically when they go out of scope. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v4 00/31] use GNU C's cleanup attribute in src/util (batch I)

2018-07-13 Thread Sukrit Bhatnagar
This series of patches first introduces a new set of macros which help in using GNU C's __attribute__((cleanup)) in the code. Then a few syntax-check rules are added which help in ensuring correct usage of the newly introduced cleanup macros. Then the patches modify a few files in src/util to

[libvirt] [PATCH v4 02/31] cfg.mk: variable initialization when declared with cleanup macro

2018-07-13 Thread Sukrit Bhatnagar
A variable, which is never assigned a value in the function, might get passed into the cleanup function which may or may not raise any errors. To maintain the correct usage, the variable must be initialized, either with a value or with NULL. This syntax-check rule takes care of that.

Re: [libvirt] [PATCHv2 00/11] BaselineHypervisorCPU using QEMU QMP exchanges

2018-07-13 Thread Jiri Denemark
On Mon, Jul 09, 2018 at 22:56:44 -0500, Chris Venteicher wrote: > Some architectures (S390) depend on QEMU to compute baseline CPU model and > expand a models feature set. > > Interacting with QEMU requires starting the QEMU process and completing one or > more query-cpu-model-baseline QMP

Re: [libvirt] [PATCHv2 11/11] qemu_driver: BaselineHypervisorCPU supports S390 using QEMU/QMP

2018-07-13 Thread Jiri Denemark
On Mon, Jul 09, 2018 at 22:56:55 -0500, Chris Venteicher wrote: > Transient S390 configurations require using QEMU to compute CPU Model > Baseline and to do CPU Feature Expansion. > > Start and use a single QEMU instance to do both the baseline and > expansion transactions required by

Re: [libvirt] [PATCHv2 10/11] qemu_capabilities: Introduce virQEMUCapsQMPBaselineCPUModel (baseline using QEMU)

2018-07-13 Thread Jiri Denemark
Drop "(baseline using QEMU)" from Subject to make it shorter. On Mon, Jul 09, 2018 at 22:56:54 -0500, Chris Venteicher wrote: > Baseline cpu model using QEMU/QMP query-cpu-model-baseline > > query-cpu-model-baseline only compares two CPUModels so multiple > exchanges are needed to evaluate more

[libvirt] [PATCH] qemu: hotplug: don't overwrite error message in qemuDomainAttachNetDevice

2018-07-13 Thread Katerina Koukiou
Since commit f14c37, virDomainConfVMNWFilterTeardown is reporting errors thus any previously reported error gets overwritten. We need to save the errors in qemuDomainAttachNetDevice before calling this function when we are in cleanup code. https://bugzilla.redhat.com/show_bug.cgi?id=1598311

Re: [libvirt] [PATCHv2 09/11] qemu_capabilities: Persist QEMU instance over multiple QMP Cmds

2018-07-13 Thread Jiri Denemark
On Mon, Jul 09, 2018 at 22:56:53 -0500, Chris Venteicher wrote: > Commit makes starting a single persistent QEMU instance possible for use > over multiple independent QMP commands without starting and stopping > QEMU for each QMP command or command type. > > Commit allows functions outside

Re: [libvirt] [PATCH 2/4] conf: Move hugepage XML validation check out of qemu_command

2018-07-13 Thread Michal Privoznik
On 07/13/2018 02:02 PM, Pavel Hrdina wrote: > On Wed, Jul 11, 2018 at 06:03:08PM +0200, Pavel Hrdina wrote: >> To make it clear I'll summarize all the possible combinations and how it >> should work so we are on the same page. > > originally: before commit [1] > now: after commit [1] (current

Re: [libvirt] [PATCHv2 08/11] qemu_capabilities: QMPCommandPtr without maintaining shadow qmperr

2018-07-13 Thread Jiri Denemark
On Mon, Jul 09, 2018 at 22:56:52 -0500, Chris Venteicher wrote: > Previously QMPCommandPtr (handle for issuing QMP commands) required an > external char * qmperr to persist over the lifespan of QMPCommand to > expose a QMP error string outside of QMPCommand. > > Before this change, an external

Re: [libvirt] [REPOST PATCHv2 1/2] qemu: Check for existing hostdev address for cold attach device

2018-07-13 Thread Michal Privoznik
On 07/13/2018 02:50 PM, John Ferlan wrote: > > > On 07/09/2018 10:32 AM, Michal Privoznik wrote: >> On 07/06/2018 08:50 PM, John Ferlan wrote: >>> Prior to the hostdev being inserted in the hostdevs list, >>> add a check during qemuDomainAttachDeviceConfig to determine >>> whether the

Re: [libvirt] [REPOST PATCHv2 2/2] qemu: Use the correct vm def on cold attach

2018-07-13 Thread Michal Privoznik
On 07/13/2018 02:50 PM, John Ferlan wrote: > > > On 07/09/2018 10:32 AM, Michal Privoznik wrote: >> On 07/06/2018 08:50 PM, John Ferlan wrote: >>> https://bugzilla.redhat.com/show_bug.cgi?id=1559867 >>> >>> When attaching a device to the domain we need to be sure >>> to use the correct domain

Re: [libvirt] [PATCH] qemu: hotplug: report error when changing rom enabled attr for net iface

2018-07-13 Thread Ján Tomko
On Fri, Jul 13, 2018 at 03:57:04PM +0200, Katerina Koukiou wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1599513 The 'Resolves: ' prefix is still pointless, but Andrea might try to disagree Signed-off-by: Katerina Koukiou --- src/qemu/qemu_hotplug.c | 5 + 1 file changed,

Re: [libvirt] [PATCH 0/2] Fix libvirt for kernels without DM support

2018-07-13 Thread Ján Tomko
On Fri, Jul 13, 2018 at 03:48:25PM +0200, Michal Privoznik wrote: *** BLURB HERE *** Michal Prívozník (2): virDevMapperGetTargetsImpl: Be tolerant to kernels without DM support qemu_cgroup: Allow/disallow devmapper control iff available src/qemu/qemu_cgroup.c | 36

[libvirt] [PATCH] qemu: hotplug: report error when changing rom enabled attr for net iface

2018-07-13 Thread Katerina Koukiou
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1599513 Signed-off-by: Katerina Koukiou --- src/qemu/qemu_hotplug.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 3dfa51b0a0..bb50d19c85 100644 --- a/src/qemu/qemu_hotplug.c

Re: [libvirt] [PATCHv2 07/11] qemu_capabilities: Introduce virCPUDef / qemuMonitorCPUModelInfo conversions

2018-07-13 Thread Jiri Denemark
On Mon, Jul 09, 2018 at 22:56:51 -0500, Chris Venteicher wrote: > Bi-directional conversion functions. > Converts model / name and features / properties between the two structures. > > Created reusable functions to bridge the internal (virCpuDef) and s/virCpuDef/virCPUDef/ > QEMU/QMP specific

[libvirt] [PATCH 2/2] qemu_cgroup: Allow/disallow devmapper control iff available

2018-07-13 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1591732 On kernels without device mapper support there won't be /dev/mapper/control. Therefore it doesn't make much sense to put it into devices CGroup. Signed-off-by: Michal Privoznik --- src/qemu/qemu_cgroup.c | 36

[libvirt] [PATCH 1/2] virDevMapperGetTargetsImpl: Be tolerant to kernels without DM support

2018-07-13 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1591732 If kernel is compiled without CONFIG_BLK_DEV_DM enabled, there is no /dev/mapper/control device and since dm_task_create() actually does some ioctl() over it creating a task may fail. To cope with this handle ENOENT and ENODEV gracefully.

[libvirt] [PATCH 0/2] Fix libvirt for kernels without DM support

2018-07-13 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): virDevMapperGetTargetsImpl: Be tolerant to kernels without DM support qemu_cgroup: Allow/disallow devmapper control iff available src/qemu/qemu_cgroup.c | 36 +++- src/util/virdevmapper.c | 8 +++- 2 files

Re: [libvirt] [PATCH v2] virnetdevtap: Don't crash on !ifname in virNetDevTapInterfaceStats

2018-07-13 Thread Andrea Bolognani
On Fri, 2018-07-13 at 13:59 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1595184 > > Some domain do not have a name (because they are > not TAP devices). Therefore, if > virNetDevTapInterfaceStats(net->ifname, ...) is called an instant > crash occurs. In Linux

[libvirt] [RFC PATCH 10/17] qemu: add qemuSecurityStartVhostUserGPU helper

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau See function documentation, used in following patch. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_security.c | 48 src/qemu/qemu_security.h | 6 + 2 files changed, 54 insertions(+) diff --git

[libvirt] [RFC PATCH 09/17] qemu: validate vhost-user video model

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Check qemu capability, and accept 3d acceleration. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_process.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index c903a8e5c8..ee4c3445fb

[libvirt] [RFC PATCH 17/17] tests: add vhost-user-gpu xml2argv tests

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../vhost-user-gpu-secondary.args | 34 + .../vhost-user-gpu-secondary.xml | 38 +++ tests/qemuxml2argvdata/vhost-user-vga.args| 31 +++

[libvirt] [RFC PATCH 11/17] qemu: add vhost-user-gpu helper unit

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Similar to the qemu_tpm.c, add a unit with a few functions to start/stop and setup the cgroup of the external vhost-user-gpu process. See function documentation. Signed-off-by: Marc-André Lureau --- src/conf/device_conf.h | 1 + src/qemu/Makefile.inc.am

[libvirt] [RFC PATCH 16/17] qemu: build vhost-user-gpu video device arguments

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Change the model name to "vhost-user-gpu-pci" if running on PCI. Set the "max_outputs" property. Associate the device with the "vhost-user" backend. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 6 +- 1 file changed, 5 insertions(+), 1

[libvirt] [RFC PATCH 13/17] qemu: set default address type on vhost-user video model

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau It's a virtio device, like virtio-gpu. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain_address.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index df98d7384f..476ee2d4a5

[libvirt] [RFC PATCH 14/17] qemu: start/stop the vhost-user-gpu external device

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Each vhost-user-gpu needs its own helper gpu process. Start/stop them, and apply the emulator cgroup controller. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 47 ++- 1 file changed, 42 insertions(+), 5

[libvirt] [RFC PATCH 15/17] qemu: build vhost-user-backend for vhost-user-gpu

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Pass the vhost-user socket to a chardev, and associate a vhost-user-backend with it for each vhost-user-gpu. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 50 + 1 file changed, 50 insertions(+) diff --git

[libvirt] [RFC PATCH 08/17] qemu: vhost-user is valid as non-primary video device

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 20da58d978..59c63fa2a4 100644 --- a/src/qemu/qemu_domain.c +++

[libvirt] [RFC PATCH 05/17] domain: add "vhost-user" video type

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Learn to accept "vhost-user" model type: (fill the required enum and switches to compile successfully) Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in | 5 +++-- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c

[libvirt] [RFC PATCH 07/17] qemu: check that qemu is vhost-user-vga capable

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau To support VGA, we need vhost-user-vga device, for "vhost-user" model. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b8b5919795..20da58d978

[libvirt] [RFC PATCH 12/17] qemu: restrict 'virgl=' option to 'virtio' video type

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau vhost-user doesn't have a virgl option, it's given to the vhost-user-gpu helper process instead. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [RFC PATCH 06/17] qemu: fill the vhost-user video type capability

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau If vhost-user-gpu is supported, vhost-user video type is. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a6c00308a2..b517477709

[libvirt] [RFC PATCH 01/17] qemu: setup shared memory without explicit numa configuration

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau When a domain is configured with 'shared' memory backing: But no explicit NUMA configuration, let's configure a shared memory backend associated with default -numa. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 100

[libvirt] [RFC PATCH 04/17] qemu: add vhost-user-gpu capabilities

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabilities.h | 4 2 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4ffd2d6257..a6c00308a2 100644 ---

[libvirt] [RFC PATCH 03/17] qemu: use memory-backend-memfd if possible

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau When the memory is shared and the source isn't specified to be a file, we can make use of memory-backend-memfd. Sealing is enabled by default in qemu, hugepage is easier to setup, which makes it a better choice than memory-backend-file. Signed-off-by: Marc-André Lureau

[libvirt] [RFC PATCH 00/17] Add vhost-user-gpu support

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series of patches add support for running a virtio GPU in a seperate process, using vhost-user. The QEMU series "[PATCH v4 00/29] vhost-user for input & GPU" is still under review, and will hopefully land in 3.1. There are several benefits of running the GPU

[libvirt] [RFC PATCH 02/17] qemu: add memory-backend-memfd capability check

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +

Re: [libvirt] [PATCH v3 7/8] qemu: command: Enable formatting vfio-pci.display option onto cmdline

2018-07-13 Thread Ján Tomko
On Wed, Jul 11, 2018 at 03:58:27PM +0200, Erik Skultety wrote: Since QEMU 2.12, QEMU understands a new vfio-pci device option 'display' which can be used to turn on display capabilities on vgpu-enabled mediated devices, IOW emulated GPU devices like QXL will no longer be needed with vgpu-enable

Re: [libvirt] [PATCH v3 6/8] conf: Introduce new attribute 'display'

2018-07-13 Thread Ján Tomko
On Wed, Jul 11, 2018 at 03:58:26PM +0200, Erik Skultety wrote: QEMU 2.12 introduced a new type of display for mediated devices using vfio-pci backend which allows a mediated device to be used as a VGA compatible device as an alternative to an emulated video device. QEMU exposes this feature via

Re: [libvirt] [PATCH v3 5/8] conf: Replace 'error' with 'cleanup' in virDomainHostdevDefParseXMLSubsys

2018-07-13 Thread Ján Tomko
On Wed, Jul 11, 2018 at 03:58:25PM +0200, Erik Skultety wrote: The exit path is the same for both success and failure, so the label should be called cleanup. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 38 +++--- 1 file changed, 19 insertions(+), 19

Re: [libvirt] [PATCH v3 4/8] conf: Introduce virDomainGraphicsDefHasOpenGL helper

2018-07-13 Thread Ján Tomko
On Wed, Jul 11, 2018 at 03:58:24PM +0200, Erik Skultety wrote: A simple helper which will loop through all the graphics elements and checks whether at least one of them enables OpenGL support, either by containing or being of type 'egl-headless'. Signed-off-by: Erik Skultety Acked-by: Michal

Re: [libvirt] [REPOST PATCHv2 2/2] qemu: Use the correct vm def on cold attach

2018-07-13 Thread John Ferlan
On 07/09/2018 10:32 AM, Michal Privoznik wrote: > On 07/06/2018 08:50 PM, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1559867 >> >> When attaching a device to the domain we need to be sure >> to use the correct domain definition (vm->def or vm->newDef) >> when calling

Re: [libvirt] [REPOST PATCHv2 1/2] qemu: Check for existing hostdev address for cold attach device

2018-07-13 Thread John Ferlan
On 07/09/2018 10:32 AM, Michal Privoznik wrote: > On 07/06/2018 08:50 PM, John Ferlan wrote: >> Prior to the hostdev being inserted in the hostdevs list, >> add a check during qemuDomainAttachDeviceConfig to determine >> whether the new/incoming device is providing >> the same as some

Re: [libvirt] [PATCH v3 3/8] qemu: caps: Add vfio-pci.display capability

2018-07-13 Thread Ján Tomko
On Wed, Jul 11, 2018 at 03:58:23PM +0200, Erik Skultety wrote: QEMU 2.12 introduced a new vfio-pci device option 'display=on/off/auto'. This patch introduces the necessary capability. Signed-off-by: Erik Skultety Reviewed-by: John Ferlan --- src/qemu/qemu_capabilities.c

Re: [libvirt] [PATCH v3 2/8] conf: Introduce a new graphics display type 'headless'

2018-07-13 Thread Ján Tomko
s/conf/qemu/ in the commit summary, since you chose to group the XML parser and the QEMU driver changes in one commit. On Wed, Jul 11, 2018 at 03:58:22PM +0200, Erik Skultety wrote: Since 2.10 QEMU supports a new display type egl-headless which uses the drm nodes for OpenGL rendering copying

Re: [libvirt] [PATCH v3 1/8] qemu: caps: Introduce a capability for egl-headless

2018-07-13 Thread Ján Tomko
On Wed, Jul 11, 2018 at 03:58:21PM +0200, Erik Skultety wrote: Since QEMU 2.10, it's possible to use a new type of display - egl-headless which uses drm nodes to provide OpenGL support. This patch adds a capability for that. However, since QEMU doesn't provide a QMP command to probe it, we have

Re: [libvirt] [PATCH 0/6] tests: qemu: Fix testing QMP commands against the schema

2018-07-13 Thread Ján Tomko
On Thu, Jul 12, 2018 at 01:58:38PM +0200, Peter Krempa wrote: I was trying to add some new commands and made a typo. The tests did not catch it. I must have messed up something when sending the original schema validation impl. Peter Krempa (6): tests: qemuschema: Fix copy-paste error in

Re: [libvirt] [PATCH 4/6] tests: qemumonitorjson: Raise the necessary debug level for QAPI schema checks

2018-07-13 Thread Ján Tomko
On Thu, Jul 12, 2018 at 01:58:42PM +0200, Peter Krempa wrote: The debug output of the schema validator on success is not so interresting that it should be printed when basic debugging is enabled. *interesting Print it only when test debugging is set to 3 and more. Signed-off-by: Peter

Re: [libvirt] [jenkins-ci PATCH v2 02/12] lcitool: Stub out Python implementation

2018-07-13 Thread Ján Tomko
On Thu, Jul 12, 2018 at 05:19:19PM +0200, Andrea Bolognani wrote: Doesn't do much right now, but it's a start :) Signed-off-by: Andrea Bolognani --- guests/lcitool | 69 ++ 1 file changed, 69 insertions(+) create mode 100755 guests/lcitool diff

Re: [libvirt] [PATCH 2/4] conf: Move hugepage XML validation check out of qemu_command

2018-07-13 Thread Pavel Hrdina
On Wed, Jul 11, 2018 at 06:03:08PM +0200, Pavel Hrdina wrote: > To make it clear I'll summarize all the possible combinations and how it > should work so we are on the same page. originally: before commit [1] now: after commit [1] (current master) expect: what this patch series should fix

Re: [libvirt] [PATCH v2 3/3] docs: news: Provide an update about the video type 'none'

2018-07-13 Thread Ján Tomko
On Thu, Jul 12, 2018 at 05:08:48PM +0200, Erik Skultety wrote: Signed-off-by: Erik Skultety --- docs/news.xml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 773c95b0da..93832acc4c 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -46,6

[libvirt] [PATCH v2] virnetdevtap: Don't crash on !ifname in virNetDevTapInterfaceStats

2018-07-13 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1595184 Some domain do not have a name (because they are not TAP devices). Therefore, if virNetDevTapInterfaceStats(net->ifname, ...) is called an instant crash occurs. In Linux version of the function strlen() is called over the name and in BSD

Re: [libvirt] [PATCH v2 2/3] conf: Introduce new video type 'none'

2018-07-13 Thread Ján Tomko
On Thu, Jul 12, 2018 at 05:08:47PM +0200, Erik Skultety wrote: Historically, we've always enabled an emulated video device every time we see that graphics should be supported with a guest. With the appearance of mediated devices which can support QEMU's vfio-display capability, users might want

Re: [libvirt] [PATCH v2 1/3] docs: Rephrase the mediated devices hostdev section a bit

2018-07-13 Thread Ján Tomko
On Thu, Jul 12, 2018 at 05:08:46PM +0200, Erik Skultety wrote: Currently it reads: Refer MDEV to create a mediated device on the host ...even though it resembles English, it's not a proper English. Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 10 ++ 1 file changed, 6

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-13 Thread Cornelia Huck
On Thu, 12 Jul 2018 17:47:00 +0200 Thomas Huth wrote: > On 12.07.2018 08:32, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > [...] > >> For libvirt, I think whenever something is proposed for deprecation > >> we could just CC libvir-list, or ask one of the libvirt people to > >>

Re: [libvirt] [PATCH] virnetdevtap: Don't crash on !ifname in virNetDevTapInterfaceStats

2018-07-13 Thread Andrea Bolognani
On Fri, 2018-07-13 at 11:24 +0200, Michal Privoznik wrote: [...] > +if (!ifname) { > +virReportError(VIR_ERR_INTERNAL_ERROR, "%s", > + _("Interface not found")); > +return -1; > +} I would use something like "Interface name not provided" here, as it

Re: [libvirt] [jenkins-ci PATCH] guests: Stop using search() as a filter

2018-07-13 Thread Erik Skultety
On Fri, Jul 13, 2018 at 10:56:56AM +0200, Andrea Bolognani wrote: > Recent versions of Ansible complain about this, and suggest > to replace 'result|search' with 'result is search'. > > Since f17097c7af59, however, we've been including operating > system information in the inventory: this allows

Re: [libvirt] [PATCHv2 06/11] qemu_monitor: Introduce qemuMonitorCPUModelInfoRemovePropByBoolValue

2018-07-13 Thread Jiri Denemark
On Mon, Jul 09, 2018 at 22:56:50 -0500, Chris Venteicher wrote: > Filter out cpu properties in qemuMonitorCPUModelInfo structure based on > boolean value of true or false. > > Goal is to form a list of "enabled" or "disabled" properties. > > Required to convert between cpu model feature /

Re: [libvirt] [PATCH v2 0/2] test: Implement virConnectListAllNodeDevices

2018-07-13 Thread Erik Skultety
On Tue, Jul 10, 2018 at 05:46:00PM -0400, Cole Robinson wrote: > v1: https://www.redhat.com/archives/libvir-list/2018-February/msg01135.html > > virnodedeviceobj.c generic ListAll infrastructure is not stateless > and will try to refresh nodedev scsi/pci/etc. config. Understandable > this doesn't

Re: [libvirt] [PATCH v2 1/2] conf: nodedev: Don't refresh host caps in testdriver

2018-07-13 Thread Erik Skultety
On Tue, Jul 10, 2018 at 05:46:01PM -0400, Cole Robinson wrote: > Add a 'skipUpdateCaps' bool that we set for test_driver.c nodedevs > which will skip accessing host resources via virNodeDeviceUpdateCaps > > Signed-off-by: Cole Robinson > ... > @@ -5565,6 +5566,7 @@

[libvirt] [PATCH] virnetdevtap: Don't crash on !ifname in virNetDevTapInterfaceStats

2018-07-13 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1595184 Some domain do not have a name (because they are not TAP devices). Therefore, if virNetDevTapInterfaceStats(net->ifname, ...) is called an instant crash occurs. In Linux version of the function strlen() is called over the name and in BSD

Re: [libvirt] [jenkins-ci PATCH] guests: List all known guests in inventory

2018-07-13 Thread Andrea Bolognani
On Fri, 2018-07-13 at 11:14 +0200, Erik Skultety wrote: > > > > +libvirt-ubuntu-16 > > > > +libvirt-ubuntu-18 > > > > > > shouldn't ubuntu 14 be mentioned here too? > > > > We were able to drop Ubuntu 14.04 support, at long last, about a > > month ago with commit 19a3626d1bab :) > > If only I

Re: [libvirt] [jenkins-ci PATCH] guests: List all known guests in inventory

2018-07-13 Thread Erik Skultety
On Fri, Jul 13, 2018 at 11:07:23AM +0200, Andrea Bolognani wrote: > On Fri, 2018-07-13 at 10:55 +0200, Erik Skultety wrote: > > On Wed, Jul 11, 2018 at 12:59:13PM +0200, Andrea Bolognani wrote: > [...] > > > libvirt-freebsd-10 > > > libvirt-freebsd-11 > > > +libvirt-freebsd-current > > > > what

Re: [libvirt] [jenkins-ci PATCH] guests: List all known guests in inventory

2018-07-13 Thread Andrea Bolognani
On Fri, 2018-07-13 at 10:55 +0200, Erik Skultety wrote: > On Wed, Jul 11, 2018 at 12:59:13PM +0200, Andrea Bolognani wrote: [...] > > libvirt-freebsd-10 > > libvirt-freebsd-11 > > +libvirt-freebsd-current > > what does ^this map to? It doesn't map to any other FreeBSD version: -CURRENT it's

[libvirt] [jenkins-ci PATCH] guests: Stop using search() as a filter

2018-07-13 Thread Andrea Bolognani
Recent versions of Ansible complain about this, and suggest to replace 'result|search' with 'result is search'. Since f17097c7af59, however, we've been including operating system information in the inventory: this allows us to drop our use of search() entirely. Signed-off-by: Andrea Bolognani

Re: [libvirt] [jenkins-ci PATCH] guests: List all known guests in inventory

2018-07-13 Thread Erik Skultety
On Wed, Jul 11, 2018 at 12:59:13PM +0200, Andrea Bolognani wrote: > Users will probably want to only work with a subset of > guests but, like any other customization, that should be > handled with local tweaks. > > Signed-off-by: Andrea Bolognani > --- > guests/inventory | 4 > 1 file

  1   2   >