Re: [libvirt] [v7 00/10] Support cache tune in libvirt

2017-02-20 Thread Eli Qiao
-- Best regards Eli 天涯无处不重逢 a leaf duckweed belongs to the sea, where not to meet in life Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, 21 February 2017 at 4:54 AM, Marcelo Tosatti wrote: > Can you explain how the resource leak can happen? > 1. libvirtd creates a

Re: [libvirt] [v7 00/10] Support cache tune in libvirt

2017-02-20 Thread Marcelo Tosatti
On Mon, Feb 20, 2017 at 04:32:19PM +0800, Eli Qiao wrote: > > > -- > Best regards > Eli > > 天涯无处不重逢 > a leaf duckweed belongs to the sea, where not to meet in life > > Sent with Sparrow (http://www.sparrowmailapp.com/?sig) > > > On Sunday, 19 February 2017 at 10:51 PM, Marcelo Tosatti w

Re: [libvirt] [PATCH] rpc: fix use-after-free when sending event message

2017-02-20 Thread John Ferlan
On 02/09/2017 08:12 PM, Wang King wrote: > If there is a process with a client which registers event callbacks, > and it calls libvirt's API which uses the same virConnectPtr in that > callback function. When this process exit abnormally lead to client > disconnect, there is a possibility that th

Re: [libvirt] [PATCH] conf: fix use-after-free when sending event message

2017-02-20 Thread John Ferlan
On 02/08/2017 09:32 PM, Wang King wrote: > If there is a process with a client which registers event callbacks, > and it calls libvirt's API which uses the same virConnectPtr in that > callback function. When this process exit abnormally lead to client > disconnect, there is a possibility that th

Re: [libvirt] [PATCH 04/13] qemu: Introduce qemuDomainSecretMigrate{Prepare|Destroy}

2017-02-20 Thread John Ferlan
On 02/20/2017 10:43 AM, Jiri Denemark wrote: > On Fri, Feb 17, 2017 at 14:39:21 -0500, John Ferlan wrote: >> Introduce API's to Prepare/Destroy a qemuDomainSecretInfoPtr to be >> used with a migrate or nbd TLS object >> >> Signed-off-by: John Ferlan >> --- >> src/qemu/qemu_domain.c | 73 +++

Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-20 Thread John Ferlan
On 02/20/2017 11:03 AM, Jiri Denemark wrote: > On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: >> Add a new TLS X.509 certificate type - "migrate". This will handle the >> creation of a TLS certificate capability (and possibly repository) to >> be used for migrations. Similar to charde

[libvirt] [PATCH] Format printf format specifier used with niothreadids

2017-02-20 Thread Daniel P. Berrange
The niothreadids struct field is size_t, so must use %zu not %lu with printf. While they're identical on some platforms, on others they are different, causing warnings conf/domain_conf.c: In function 'virDomainDefCheckABIStabilityFlags': conf/domain_conf.c:19575:26: error: format '%lu' expects arg

[libvirt] [PATCH 0/2] Couple of cleanup patches

2017-02-20 Thread John Ferlan
Fix a couple of things seen while continuing work in the area... John Ferlan (2): conf: Cleanup matchFCHostToSCSIHost conf: Fix leak in virNodeDeviceObjListExport src/conf/node_device_conf.c | 1 + src/conf/storage_conf.c | 26 +- 2 files changed, 14 insertions(+

[libvirt] [PATCH 1/2] conf: Cleanup matchFCHostToSCSIHost

2017-02-20 Thread John Ferlan
Rather than the inlined VIR_FREE's, use a cleanup: label... Fixes an issue introduced by 03346def where @name was free'd before usage in a virAsprintf to format scsi_host_name. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 26 +- 1 file changed, 13 insertions(+

[libvirt] [PATCH 2/2] conf: Fix leak in virNodeDeviceObjListExport

2017-02-20 Thread John Ferlan
Fix a leak introduced by 4337bc57b when VIR_STRDUP'g the parent. Signed-off-by: John Ferlan --- src/conf/node_device_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 1c81b48..c802840 100644 --- a/src/conf/node_device_conf.

Re: [libvirt] [PATCH v2 05/13] conf: display all iothread ids in the XML if one of them is not generated

2017-02-20 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 06:15:08PM +0100, Peter Krempa wrote: > On Mon, Feb 20, 2017 at 18:11:57 +0100, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/conf/domain_conf.c | 23 > > ++ > > .../qemuxml2xmlout-iothreads-ids-partial

Re: [libvirt] [PATCH 04/13] conf: store iothreads in order by iothread_id

2017-02-20 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 11:05:13AM +0100, Peter Krempa wrote: > On Fri, Feb 17, 2017 at 15:49:08 +0100, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/conf/domain_conf.c | 46 > > -- > > .../qemuxml2argv-iothreads-ids-partial.a

Re: [libvirt] [PATCH v2 05/13] conf: display all iothread ids in the XML if one of them is not generated

2017-02-20 Thread Peter Krempa
On Mon, Feb 20, 2017 at 18:11:57 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c | 23 > ++ > .../qemuxml2xmlout-iothreads-ids-partial.xml | 2 ++ > 2 files changed, 17 insertions(+), 8 deletions(-) >

[libvirt] [PATCH v2 05/13] conf: display all iothread ids in the XML if one of them is not generated

2017-02-20 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 23 ++ .../qemuxml2xmlout-iothreads-ids-partial.xml | 2 ++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7612185

Re: [libvirt] [PATCH 05/13] conf: always display iothread ids in the XML

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:09 +0100, Pavel Hrdina wrote: > There was at first only iothreads element in the XML. Because > iothreads are used by theirs ids we should always print them in > the XML even if they are auto-generated. > > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c

Re: [libvirt] [PATCH 11/13] qemu_driver: move iothread existence check into one place

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:15 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_driver.c | 32 +++- > 1 file changed, 7 insertions(+), 25 deletions(-) ACK signature.asc Description: PGP signature -- libvir-list mailing list libvir-lis

Re: [libvirt] [PATCH 13/13] qemu_driver: move iothread duplicate check into one place

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:17 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c | 7 --- > src/qemu/qemu_driver.c | 29 ++--- > 2 files changed, 22 insertions(+), 14 deletions(-) > ACK signature.asc Description: PGP signatu

Re: [libvirt] [PATCH 12/13] qemu_driver: check whether iothread is used by controller

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:16 +0100, Pavel Hrdina wrote: > This follows the same check for disk, because we cannot remove iothread > if it's used by disk or by controller. It could lead to crashing QEMU. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_driver.c | 11 +++ > 1 fil

Re: [libvirt] [PATCH 10/13] qemu_driver: always check whether iothread is used by disk or not

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:14 +0100, Pavel Hrdina wrote: > If virDomainDelIOThread API was called with VIR_DOMAIN_AFFECT_LIVE > and VIR_DOMAIN_AFFECT_CONFIG and both XML were already a different > it could result in removing iothread from config XML even if there > was a disk using that iothread

Re: [libvirt] [PATCH 09/13] conf: move iothread XML validation from qemu_command

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:13 +0100, Pavel Hrdina wrote: > This will ensure that IOThreads are properly validated while > a domain is defined. > > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c | 62 ++-- > src/qemu/qemu_command.c | 96 > -

Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-20 Thread Jiri Denemark
On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: > Add a new TLS X.509 certificate type - "migrate". This will handle the > creation of a TLS certificate capability (and possibly repository) to > be used for migrations. Similar to chardev's, credentials will be handled > via a libvirt sec

Re: [libvirt] [PATCH 04/13] qemu: Introduce qemuDomainSecretMigrate{Prepare|Destroy}

2017-02-20 Thread Jiri Denemark
On Mon, Feb 20, 2017 at 16:43:54 +0100, Jiri Denemark wrote: > On Fri, Feb 17, 2017 at 14:39:21 -0500, John Ferlan wrote: > > Introduce API's to Prepare/Destroy a qemuDomainSecretInfoPtr to be > > used with a migrate or nbd TLS object ... > > +qemuDomainSecretMigratePrepare(virConnectPtr conn, > >

Re: [libvirt] [PATCH 04/13] qemu: Introduce qemuDomainSecretMigrate{Prepare|Destroy}

2017-02-20 Thread Jiri Denemark
On Fri, Feb 17, 2017 at 14:39:21 -0500, John Ferlan wrote: > Introduce API's to Prepare/Destroy a qemuDomainSecretInfoPtr to be > used with a migrate or nbd TLS object > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_domain.c | 73 + > src/qemu/qemu_do

Re: [libvirt] [PATCH v2] node_device: Check return value for udev_new()

2017-02-20 Thread Marc Hartmayer
On Mon, Feb 20, 2017 at 02:48 PM +0100, Martin Kletzander wrote: > On Fri, Feb 10, 2017 at 10:44:44AM +0100, Marc Hartmayer wrote: >>The comment was actually wrong as >>https://www.freedesktop.org/software/systemd/man/udev_new.html# >>mentions that on failure NULL is returned. >> >>Signed-off-by:

Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-20 Thread Daniel P. Berrange
On Mon, Feb 20, 2017 at 03:30:26PM +, Daniel P. Berrange wrote: > On Mon, Feb 20, 2017 at 10:26:16AM -0500, John Ferlan wrote: > > > > > > On 02/20/2017 10:13 AM, Jiri Denemark wrote: > > > On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: > > >> Add a new TLS X.509 certificate type

Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-20 Thread Daniel P. Berrange
On Mon, Feb 20, 2017 at 10:26:16AM -0500, John Ferlan wrote: > > > On 02/20/2017 10:13 AM, Jiri Denemark wrote: > > On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: > >> Add a new TLS X.509 certificate type - "migrate". This will handle the > >> creation of a TLS certificate capability

Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-20 Thread John Ferlan
On 02/20/2017 10:13 AM, Jiri Denemark wrote: > On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: >> Add a new TLS X.509 certificate type - "migrate". This will handle the >> creation of a TLS certificate capability (and possibly repository) to >> be used for migrations. Similar to charde

Re: [libvirt] [PATCH] nwfilter_gentech_driver: Fix indentation and typo

2017-02-20 Thread Laine Stump
On 02/20/2017 05:27 AM, Martin Kletzander wrote: On Fri, Feb 17, 2017 at 07:39:41PM +0530, Nitesh Konkar wrote: Signed-off-by: Nitesh Konkar --- src/nwfilter/nwfilter_gentech_driver.c | 4 ++-- src/nwfilter/nwfilter_gentech_driver.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) You

Re: [libvirt] [PATCH 03/13] qemu: Rename qemuAliasTLSObjFromChardevAlias

2017-02-20 Thread Jiri Denemark
On Fri, Feb 17, 2017 at 14:39:20 -0500, John Ferlan wrote: > It's not really 'Chardev' specific - we can reuse this for other objects. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_alias.c| 8 > src/qemu/qemu_alias.h| 2 +- > src/qemu/qemu_command.c | 4 ++--

Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-20 Thread Jiri Denemark
On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: > Add a new TLS X.509 certificate type - "migrate". This will handle the > creation of a TLS certificate capability (and possibly repository) to > be used for migrations. Similar to chardev's, credentials will be handled > via a libvirt sec

Re: [libvirt] [PATCH 01/13] qemu: Create #define for TLS configuration setup.

2017-02-20 Thread Jiri Denemark
On Fri, Feb 17, 2017 at 14:39:18 -0500, John Ferlan wrote: > Create GET_CONFIG_TLS_CERT to set up the TLS for 'chardev' TLS setting. > Soon to be reused. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_conf.c | 41 + > 1 file changed, 25 insertions(+)

Re: [libvirt] [PATCH 07/13] qemu_process: move capabilities check for iothreads

2017-02-20 Thread Peter Krempa
On Mon, Feb 20, 2017 at 15:57:21 +0100, Peter Krempa wrote: > On Fri, Feb 17, 2017 at 15:49:11 +0100, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/qemu/qemu_command.c | 31 +-- > > src/qemu/qemu_process.c | 34 ++ >

Re: [libvirt] [PATCH 07/13] qemu_process: move capabilities check for iothreads

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:11 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_command.c | 31 +-- > src/qemu/qemu_process.c | 34 ++ > 2 files changed, 39 insertions(+), 26 deletions(-) > > diff --git a

Re: [libvirt] [PATCH 08/13] qemu_process: remove unnecessary iothread check

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:12 +0100, Pavel Hrdina wrote: > The situation covered by the removed code will not ever happen. > This code is called only while starting a new QEMU process where > the capabilities where already checked and while attaching to > existing QEMU process where we don't eve

Re: [libvirt] [PATCH 06/13] qemu_driver: check invalid iothread_id before we do anything else

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:10 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_driver.c | 18 -- > 1 file changed, 12 insertions(+), 6 deletions(-) ACK signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com h

[libvirt] [RFC PATCH v2 REBASE 04/18] conf: Update XML parser, formatter, and RNG schema to support mdev

2017-02-20 Thread Erik Skultety
To keep the domain XML as much platform agnostic as possible, do not expose an element/attribute which would contain path directly to the syfs filesystem which the mediated devices are build upon. Instead, identify each mediated device by a UUID attribute as well as specifying the device API (e.g.

[libvirt] [RFC PATCH v2 REBASE 14/18] qemu: Bump the memory locking limit for mdevs as well

2017-02-20 Thread Erik Skultety
Since mdevs are just another type of VFIO devices, we should increase the memory locking limit the same way we do for VFIO PCI devices. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain.c b/sr

[libvirt] [RFC PATCH v2 REBASE 00/18] Introduce vGPU mdev framework to libvirt

2017-02-20 Thread Erik Skultety
since the original v2 [1]: - resolved a few merge conflicts caused by @9d92f533 which refactored out some duplicate code which eventually lead to dropping patch 14/18 from the original series due to being unnecessary - rebased onto fresh HEAD [1] https://www.redhat.com/archives/libvir-list/2017-Fe

[libvirt] [RFC PATCH v2 REBASE 16/18] test: Add some test cases for our test suite regarding the mdevs

2017-02-20 Thread Erik Skultety
For now, these only cover the unmanaged, i.e. user pre-created devices. Signed-off-by: Erik Skultety --- .../qemuxml2argv-hostdev-mdev-unmanaged.args | 25 ++ .../qemuxml2argv-hostdev-mdev-unmanaged.xml| 37 tests/qemuxml2argvtest.c

[libvirt] [RFC PATCH v2 REBASE 18/18] news: Update the NEWS.xml about the new mdev feature

2017-02-20 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 8d53e07..5523f29 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -62,6 +62,15 @@ strong encryption and doesn't require any extra network con

[libvirt] [RFC PATCH v2 REBASE 01/18] util: Introduce new module virmdev

2017-02-20 Thread Erik Skultety
Beside creation, disposal, getter, and setter methods the module exports methods to work with lists of mediated devices. Signed-off-by: Erik Skultety --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms | 18 +++ src/util/virmdev.c | 358 +++

[libvirt] [RFC PATCH v2 REBASE 10/18] qemu: Assign PCI addresses for mediated devices as well

2017-02-20 Thread Erik Skultety
So far, the official support is for x86_64 arch guests so unless a different device API than vfio-pci is available let's only turn on support for PCI address assignment. Once a different device API is introduced, we can enable another address type easily. Signed-off-by: Erik Skultety --- src/qem

[libvirt] [RFC PATCH v2 REBASE 17/18] docs: Document the new hostdev and address type 'mdev'

2017-02-20 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 48 +++ 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index b69bd4c..13cb767 100644 --- a/docs/formatdomain.html.in +++ b

[libvirt] [RFC PATCH v2 REBASE 03/18] conf: Introduce new address type mdev

2017-02-20 Thread Erik Skultety
Since the address element is much easier extendible by attributes adding more and more elements, starting with , to the element once we find out we need more data to identify a mediated device. By introducing a new address type rather than using plain elements, we also remain consistent with all o

[libvirt] [RFC PATCH v2 REBASE 11/18] hostdev: Maintain a driver list of active mediated devices

2017-02-20 Thread Erik Skultety
Keep track of the assigned mediated devices the same way we do it for the rest of hostdevs. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/qemu/qemu_hostdev.c | 22 ++ src/qemu/qemu_hostdev.h | 4 ++ src/util/virhostdev.c| 176

[libvirt] [RFC PATCH v2 REBASE 09/18] conf: Enable cold-plug of a mediated device

2017-02-20 Thread Erik Skultety
This merely introduces virDomainHostdevMatchSubsysMediatedDev method that is supposed to check whether device being cold-plugged does not already exist in the domain configuration. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 14 ++ 1 file changed, 14 insertions(+) diff

[libvirt] [RFC PATCH v2 REBASE 05/18] conf: Introduce virDomainHostdevDefPostParse

2017-02-20 Thread Erik Skultety
Just to make the code a bit cleaner, move hostdev specific post parse code to its own function just in case it grows in the future. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 76 +++--- 1 file changed, 48 insertions(+), 28 deletions(-)

[libvirt] [RFC PATCH v2 REBASE 12/18] hostdev: Introduce a reattach method for mediated devices

2017-02-20 Thread Erik Skultety
The name "reattach" does not really reflect the truth behind mediated devices, since these are purely software devices that do not need to be plugged back into the host in any way, however this patch pushes for naming consistency for methods where the logic behind the underlying operation stays the

[libvirt] [RFC PATCH v2 REBASE 15/18] qemu: Format mdevs on qemu command line

2017-02-20 Thread Erik Skultety
Format the mediated devices on the qemu command line as -device vfio-pci,sysfsdev='/path/to/device/in/syfs'. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 49 + src/qemu/qemu_command.h | 5 + 2 files changed, 54 insertions(+) dif

[libvirt] [RFC PATCH v2 REBASE 02/18] conf: Introduce new hostdev device type mdev

2017-02-20 Thread Erik Skultety
A mediated device will be identified by a UUID of the user pre-created mediated device. The data necessary to identify a mediated device can be easily extended in the future, e.g. when auto-creation of mediated devices should be enabled. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c

[libvirt] [RFC PATCH v2 REBASE 13/18] qemu: cgroup: Adjust cgroups' logic to allow mediated devices

2017-02-20 Thread Erik Skultety
As goes for all the other hostdev device types, grant the qemu process access to /dev/vfio/. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b905f9a..86db8b7 100644 --

[libvirt] [RFC PATCH v2 REBASE 07/18] security: dac: Enable labeling of vfio mediated devices

2017-02-20 Thread Erik Skultety
Label the VFIO IOMMU devices under /dev/vfio/ referenced by the symlinks in the sysfs (e.g. /sys/class/mdev_bus//iommu_group) which what qemu actually gets formatted on the command line. Signed-off-by: Erik Skultety --- src/security/security_dac.c | 57 +++

[libvirt] [RFC PATCH v2 REBASE 08/18] security: selinux: Enable labeling of vfio mediated devices

2017-02-20 Thread Erik Skultety
Label the VFIO IOMMU devices under /dev/vfio/ referenced by the symlinks in the sysfs (e.g. /sys/class/mdev_bus//iommu_group) which what qemu actually gets formatted on the command line. Signed-off-by: Erik Skultety --- src/security/security_selinux.c | 56 +++

[libvirt] [RFC PATCH v2 REBASE 06/18] conf: Add post parse code for mdevs to virDomainHostdevDefPostParse

2017-02-20 Thread Erik Skultety
We need to make sure that if user explicitly provides a guest address for a mdev device, the address type will be matching the device API supported on that specific mediated device and error out with an incorrect XML message. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 18 +

Re: [libvirt] [PATCH] Disallow inclusion of files from src/conf into src/utils

2017-02-20 Thread Martin Kletzander
On Mon, Feb 20, 2017 at 03:11:37PM +0100, Peter Krempa wrote: On Mon, Feb 20, 2017 at 15:05:33 +0100, Martin Kletzander wrote: On Mon, Feb 20, 2017 at 02:58:49PM +0100, Peter Krempa wrote: > The utils code should stay separated from other code (except for very > well justified cases). Unfortunat

Re: [libvirt] [PATCH] Disallow inclusion of files from src/conf into src/utils

2017-02-20 Thread Peter Krempa
On Mon, Feb 20, 2017 at 15:05:33 +0100, Martin Kletzander wrote: > On Mon, Feb 20, 2017 at 02:58:49PM +0100, Peter Krempa wrote: > > The utils code should stay separated from other code (except for very > > well justified cases). Unfortunately commit 272769beccd7479c75e700a6cb > > I honestly don't

Re: [libvirt] [PATCH] Disallow inclusion of files from src/conf into src/utils

2017-02-20 Thread Martin Kletzander
On Mon, Feb 20, 2017 at 02:58:49PM +0100, Peter Krempa wrote: The utils code should stay separated from other code (except for very well justified cases). Unfortunately commit 272769beccd7479c75e700a6cb I honestly don't see the justification for any of these, but ACK for this, hopefully someone

Re: [libvirt] [PATCH] Disallow inclusion of files from src/conf into src/utils

2017-02-20 Thread Jiri Denemark
On Mon, Feb 20, 2017 at 14:58:49 +0100, Peter Krempa wrote: > The utils code should stay separated from other code (except for very > well justified cases). Unfortunately commit 272769beccd7479c75e700a6cb > made it trivial to break the separation (and not get slapped by the > syntax-check rule) by

[libvirt] [PATCH] Disallow inclusion of files from src/conf into src/utils

2017-02-20 Thread Peter Krempa
The utils code should stay separated from other code (except for very well justified cases). Unfortunately commit 272769beccd7479c75e700a6cb made it trivial to break the separation (and not get slapped by the syntax-check rule) by adding -I src/conf to the CFLAGS for utils. Remove this shortcut an

Re: [libvirt] [PATCH] qemu: Forbid slashes in shmem name

2017-02-20 Thread Martin Kletzander
On Fri, Feb 10, 2017 at 02:10:17PM +, Daniel P. Berrange wrote: On Fri, Feb 10, 2017 at 09:07:36AM -0500, John Ferlan wrote: On 02/02/2017 08:14 AM, Martin Kletzander wrote: > With that users could access files outside /dev/shm. That itself > isn't a security problem, but might cause some

Re: [libvirt] [PATCH v2] node_device: Check return value for udev_new()

2017-02-20 Thread Martin Kletzander
On Fri, Feb 10, 2017 at 10:44:44AM +0100, Marc Hartmayer wrote: The comment was actually wrong as https://www.freedesktop.org/software/systemd/man/udev_new.html# mentions that on failure NULL is returned. Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 11 +-- 1 fi

[libvirt] [PATCH 8/8] conf: Add vHBA controller definition to domain

2017-02-20 Thread John Ferlan
Add the parsing of a vHBA controller to a domain XML. The concept of a vHBA is somewhere between a scsi_host and , so rather than invent a new type, use the existing syntax and add an element to mimic the existing storage pool 'fc_host' element. The new element can be parsed, but is unusable

[libvirt] [PATCH 7/8] tests: Add more storage pool vHBA tests

2017-02-20 Thread John Ferlan
Add the parent wwnn/wwpn and fabric_wwn tests for the storage pool now that we have the capability to use the node device driver to handle the searches via a connection. Signed-off-by: John Ferlan --- tests/fchosttest.c | 32 1 file changed, 32 insertions(+) dif

[libvirt] [PATCH 3/8] util: Convert virStoragePoolSourceAdapter to virStorageAdapter

2017-02-20 Thread John Ferlan
Introduce src/util/virstoragedevice.{c,h}. Rather than have virstoragefile be a repository for more things - create a new module to share the adapter definitions between the storage pool and eventually the domain. The devices will need device address functions (no need to pollute more code for that

[libvirt] [PATCH 5/8] storage: Move/rename createVport and deleteVport

2017-02-20 Thread John Ferlan
Move the bulk of the code to the node_device_conf and rename to virNodeDevice{Create|Delete}Vport. Alter the create algorithm slightly in order to return the name of the scsi_host vHBA that was created. The existing code would fetch the name and if it exists would start a thread looking for the LU

[libvirt] [PATCH 1/8] conf: Fix leak in virNodeDeviceDefParseXML

2017-02-20 Thread John Ferlan
The 'nodes' is overwritten after the first usage and possibly leaked if any code in the first set of parsing goes to error. Found by Coverity. Signed-off-by: John Ferlan --- src/conf/node_device_conf.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/conf/node_

[libvirt] [PATCH 6/8] util: Alter virNodeDevice{Create|Delete}Vport to use nodedev APIs

2017-02-20 Thread John Ferlan
If we have a connection pointer there's no sense walking through the sysfs in order to create/destroy the vHBA. Instead, let's make use of the node device create/destroy API's. Since we don't have to rewrite all the various parent options for the test driver in order to test whether the storage po

[libvirt] [PATCH 2/8] tests: Add createVHBAByStoragePool-by-parent to fchosttest

2017-02-20 Thread John Ferlan
Add a new test to fchosttest in order to test creation of our vHBA via the Storage Pool logic. Unlike the real code, we cannot yet use the virVHBA* API's because they (currently) traverse the file system in order to get the parent vport capable scsi_host. Besides there's no "real" NPIV device here

[libvirt] [PATCH 4/8] util: Rename virFileWaitForDevices

2017-02-20 Thread John Ferlan
The function is actually in virutil.c, but prototyped in virfile.h. This patch fixes that by renaming the function to virWaitForDevices, adding the prototype in virutil.h and libvirt_private.syms, and then changing the callers to use the new name. Signed-off-by: John Ferlan --- src/libvirt_priva

[libvirt] [PATCH 0/8] Converge Storage Pool vHBA logic with Node Device

2017-02-20 Thread John Ferlan
Similar to the recent node device focused vHBA patches, but these focus more on adjustments to the Storage Pool vHBA logic and finally the mechanism to define a vHBA for a domain. The first patch fixes a leak found by coverity that showed up because node_device_conf had enough changes so that cove

Re: [libvirt] ARMv7 guest PCI support broken in 3.0.0 onwards

2017-02-20 Thread Auger Eric
Hi, On 18/02/2017 15:09, Andrea Bolognani wrote: > On Fri, 2017-02-17 at 15:56 +0100, Andrea Bolognani wrote: >> libvirt is picking GICv3 here because QEMU reports it as a >> viable emulated GIC; however, as I understand it the >> emulated GICv3 doesn't have MSI support, and without that >> PCIe c

Re: [libvirt] [PATCH] qemu: Check for maximum vcpus exceeding cpu topology

2017-02-20 Thread Peter Krempa
On Mon, Feb 20, 2017 at 17:54:48 +0530, Madhu Pavan wrote: > > > On 02/07/2017 06:41 PM, Peter Krempa wrote: > > On Tue, Feb 07, 2017 at 07:56:29 -0500, Kothapally Madhu Pavan wrote: > > > This patch will prevent guest to start when the maximum > > > vcpus are greater than cpu topology limit. Cur

Re: [libvirt] [PATCH] qemu: Enforce qemuSecurity wrappers

2017-02-20 Thread Michal Privoznik
On 20.02.2017 12:55, Daniel P. Berrange wrote: > On Mon, Feb 20, 2017 at 12:50:23PM +0100, Peter Krempa wrote: >> On Tue, Feb 14, 2017 at 15:30:44 +0100, Michal Privoznik wrote: >>> Now that we have some qemuSecurity wrappers over >>> virSecurityManager APIs, lets make sure everybody sticks with >>

Re: [libvirt] [PATCH] qemu: Check for maximum vcpus exceeding cpu topology

2017-02-20 Thread Madhu Pavan
On 02/07/2017 06:41 PM, Peter Krempa wrote: On Tue, Feb 07, 2017 at 07:56:29 -0500, Kothapally Madhu Pavan wrote: This patch will prevent guest to start when the maximum vcpus are greater than cpu topology limit. Currently similar checks do exist only during setvcpus. The patch adds the missin

[libvirt] [PATCH] vz: correct error message

2017-02-20 Thread Mikhail Feoktistov
--- src/vz/vz_sdk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index e16bb0c..84e89a5 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2601,8 +2601,10 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)

Re: [libvirt] [PATCH] qemu: Enforce qemuSecurity wrappers

2017-02-20 Thread Martin Kletzander
On Mon, Feb 20, 2017 at 11:55:06AM +, Daniel P. Berrange wrote: On Mon, Feb 20, 2017 at 12:50:23PM +0100, Peter Krempa wrote: On Tue, Feb 14, 2017 at 15:30:44 +0100, Michal Privoznik wrote: > Now that we have some qemuSecurity wrappers over > virSecurityManager APIs, lets make sure everybody

Re: [libvirt] [PATCH 2/2] tests: add QEMU 2.9.0 caps data

2017-02-20 Thread Jiri Denemark
On Mon, Feb 20, 2017 at 12:51:13 +0100, Pavel Hrdina wrote: > QEMU 2.9.0 is not released yet but it's close to its releas and Typo in "releas". > we need this data to implement new features that will be in > that release. > > Signed-off-by: Pavel Hrdina ACK Jirka -- libvir-list mailing list

Re: [libvirt] [PATCH 1/2] tests: update QEMU 2.8.0 caps data

2017-02-20 Thread Jiri Denemark
On Mon, Feb 20, 2017 at 12:51:12 +0100, Pavel Hrdina wrote: > The old data was generated from not released QEMU. > > Signed-off-by: Pavel Hrdina > --- > .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 107 > ++--- > tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 7 +

Re: [libvirt] [PATCH 01/13] qemu: Create #define for TLS configuration setup.

2017-02-20 Thread John Ferlan
On 02/20/2017 04:17 AM, Peter Krempa wrote: > On Mon, Feb 20, 2017 at 08:54:26 +0100, Peter Krempa wrote: >> On Fri, Feb 17, 2017 at 14:39:18 -0500, John Ferlan wrote: >>> Create GET_CONFIG_TLS_CERT to set up the TLS for 'chardev' TLS setting. >>> Soon to be reused. >>> >>> Signed-off-by: John Fe

Re: [libvirt] [PATCH] qemu: Enforce qemuSecurity wrappers

2017-02-20 Thread Daniel P. Berrange
On Mon, Feb 20, 2017 at 12:50:23PM +0100, Peter Krempa wrote: > On Tue, Feb 14, 2017 at 15:30:44 +0100, Michal Privoznik wrote: > > Now that we have some qemuSecurity wrappers over > > virSecurityManager APIs, lets make sure everybody sticks with > > them. We have them for a reason and calling virS

[libvirt] [PATCH 0/2] QEMU caps data

2017-02-20 Thread Pavel Hrdina
Pavel Hrdina (2): tests: update QEMU 2.8.0 caps data tests: add QEMU 2.9.0 caps data .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 107 +- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 7 +- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 14671 +++ te

[libvirt] [PATCH 1/2] tests: update QEMU 2.8.0 caps data

2017-02-20 Thread Pavel Hrdina
The old data was generated from not released QEMU. Signed-off-by: Pavel Hrdina --- .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 107 ++--- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 7 +- 2 files changed, 75 insertions(+), 39 deletions(-) diff --git a/tests/q

Re: [libvirt] [PATCH] qemu: Enforce qemuSecurity wrappers

2017-02-20 Thread Peter Krempa
On Tue, Feb 14, 2017 at 15:30:44 +0100, Michal Privoznik wrote: > Now that we have some qemuSecurity wrappers over > virSecurityManager APIs, lets make sure everybody sticks with > them. We have them for a reason and calling virSecurityManager > API directly instead of wrapper may lead into acciden

Re: [libvirt] [PATCH] nwfilter_gentech_driver: Fix indentation and typo

2017-02-20 Thread Martin Kletzander
On Fri, Feb 17, 2017 at 07:39:41PM +0530, Nitesh Konkar wrote: Signed-off-by: Nitesh Konkar --- src/nwfilter/nwfilter_gentech_driver.c | 4 ++-- src/nwfilter/nwfilter_gentech_driver.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) You are sending quite some amount of patches that do n

Re: [libvirt] [PATCH 04/13] conf: store iothreads in order by iothread_id

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:08 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c | 46 > -- > .../qemuxml2argv-iothreads-ids-partial.args| 4 +- > 2 files changed, 44 insertions(+), 6 deletions(-) I

Re: [libvirt] [PATCH v2] Don't print extra newline in virsh domstats output

2017-02-20 Thread Nitesh Konkar
Polite PIng. On Fri, Feb 10, 2017 at 8:34 PM, Nitesh Konkar < niteshkonkar.libv...@gmail.com> wrote: > Signed-off-by: Nitesh Konkar > --- > virsh domstats --perf > Domain: 'Fedora123' > perf.cache_misses=394986 > > Domain: 'Fedora' > perf.cache_misses=447017 > > virsh domstats > Domain: 'Fed

Re: [libvirt] [PATCH v2] qemu: Allow @rednernode for virgl domains

2017-02-20 Thread Michal Privoznik
On 20.02.2017 09:49, Marc-André Lureau wrote: > - Original Message - >> When enabling virgl, qemu opens /dev/dri/render*. So far, we are >> not allowing that in devices cgroup nor creating the file in >> domain's namespace and thus requiring users to set the paths in >> qemu.conf. This, how

Re: [libvirt] [PATCH 03/13] conf: move iothread parse code into its own function

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:07 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c | 93 > ++ > 1 file changed, 56 insertions(+), 37 deletions(-) This fixes the bug from the previous patch. ACK signature.as

Re: [libvirt] [PATCH 02/13] conf: remove redundant iothreads variable

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:06 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c | 32 +--- > src/conf/domain_conf.h | 1 - > src/qemu/qemu_driver.c | 6 -- > src/qemu/qemu_process.c | 1 - > 4 files changed, 17 inserti

Re: [libvirt] [PATCH 01/13] qemu: Create #define for TLS configuration setup.

2017-02-20 Thread Peter Krempa
On Mon, Feb 20, 2017 at 08:54:26 +0100, Peter Krempa wrote: > On Fri, Feb 17, 2017 at 14:39:18 -0500, John Ferlan wrote: > > Create GET_CONFIG_TLS_CERT to set up the TLS for 'chardev' TLS setting. > > Soon to be reused. > > > > Signed-off-by: John Ferlan > > --- > > src/qemu/qemu_conf.c | 41 +++

Re: [libvirt] ARMv7 guest PCI support broken in 3.0.0 onwards

2017-02-20 Thread Andrea Bolognani
On Sun, 2017-02-19 at 18:54 +0100, Auger Eric wrote: > > > We should find a way to detect whether the interrupt > > > controller will support PCIe, and fall back to using > > > virtio-mmio when it doesn't. Eric, any ideas about how we > > > could achieve that? > >  > > Actually, we will probably wa

Re: [libvirt] [v7 00/10] Support cache tune in libvirt

2017-02-20 Thread Eli Qiao
-- Best regards Eli 天涯无处不重逢 a leaf duckweed belongs to the sea, where not to meet in life Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Monday, 20 February 2017 at 5:07 PM, Martin Kletzander wrote: > On Mon, Feb 20, 2017 at 04:32:19PM +0800, Eli Qiao wrote: > > > > > >

Re: [libvirt] [v7 00/10] Support cache tune in libvirt

2017-02-20 Thread Martin Kletzander
On Mon, Feb 20, 2017 at 04:32:19PM +0800, Eli Qiao wrote: -- Best regards Eli 天涯无处不重逢 a leaf duckweed belongs to the sea, where not to meet in life Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Sunday, 19 February 2017 at 10:51 PM, Marcelo Tosatti wrote: Hi Eli Qiao, Questio

Re: [libvirt] [PATCH 01/13] conf: fix indentation

2017-02-20 Thread Peter Krempa
On Fri, Feb 17, 2017 at 15:49:05 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/conf/domain_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) ACK signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.co

Re: [libvirt] [PATCH] news: add entries for recent nodedev driver improvements

2017-02-20 Thread Erik Skultety
On Fri, Feb 17, 2017 at 04:53:37PM +0100, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > docs/news.xml | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index 54337f782..8d53e0797 100644 > --- a/docs/news.xml > +++ b/do

Re: [libvirt] [PATCH v2] qemu: Allow @rednernode for virgl domains

2017-02-20 Thread Marc-André Lureau
Hi Fix the title @rednernode -> @rendernode - Original Message - > When enabling virgl, qemu opens /dev/dri/render*. So far, we are > not allowing that in devices cgroup nor creating the file in > domain's namespace and thus requiring users to set the paths in > qemu.conf. This, however,

[libvirt] [PATCH v2] qemu: Allow @rednernode for virgl domains

2017-02-20 Thread Michal Privoznik
When enabling virgl, qemu opens /dev/dri/render*. So far, we are not allowing that in devices cgroup nor creating the file in domain's namespace and thus requiring users to set the paths in qemu.conf. This, however, is suboptimal as it allows access to ALL qemu processes even those which don't have

Re: [libvirt] [v7 00/10] Support cache tune in libvirt

2017-02-20 Thread Eli Qiao
-- Best regards Eli 天涯无处不重逢 a leaf duckweed belongs to the sea, where not to meet in life Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Monday, 20 February 2017 at 3:59 PM, Martin Kletzander wrote: > On Sun, Feb 19, 2017 at 12:20:55PM -0300, Marcelo Tosatti wrote: > > On S

Re: [libvirt] [v7 00/10] Support cache tune in libvirt

2017-02-20 Thread Eli Qiao
-- Best regards Eli 天涯无处不重逢 a leaf duckweed belongs to the sea, where not to meet in life Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Sunday, 19 February 2017 at 10:51 PM, Marcelo Tosatti wrote: > > Hi Eli Qiao, > > Question about removing resctrlfs directories with e

Re: [libvirt] [v7 00/10] Support cache tune in libvirt

2017-02-20 Thread Martin Kletzander
On Sun, Feb 19, 2017 at 12:20:55PM -0300, Marcelo Tosatti wrote: On Sun, Feb 19, 2017 at 12:01:57PM -0300, Marcelo Tosatti wrote: How does the management software query the amount of allocatable cache again? Section from another discussion: > The second case is necessary to get updated free s

  1   2   >