Re: [libvirt] [RFC]Add new mdev interface for QoS

2017-08-01 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, August 2, 2017 6:26 AM > > On Tue, 1 Aug 2017 13:54:27 +0800 > "Gao, Ping A" wrote: > > > On 2017/7/28 0:00, Gao, Ping A wrote: > > > On 2017/7/27 0:43, Alex Williamson wrote: > > >> [cc

[libvirt] Release of libvirt-3.6.0

2017-08-01 Thread Daniel Veillard
As planned I tagged the release in git and generated signed tarball and rpms for the release, they can be found at the usual place: ftp://libvirt.org/libvirt/ I also cut a libvirt-python-3.6.0 release, it is virtually identical to 3.5.0 except for the version bump (i.e. no commits) available

Re: [libvirt] [PATCH v3] libxl: Add a test suite for libxl_domain_config generator

2017-08-01 Thread Jim Fehlig
On 08/01/2017 07:17 AM, Marek Marczykowski-Górecki wrote: From: Jim Fehlig The libxl library allows a libxl_domain_config object to be serialized from/to a JSON string. Use this to allow testing of the XML to libxl_domain_config conversion process. Test XML is converted to

Re: [libvirt] [RFC]Add new mdev interface for QoS

2017-08-01 Thread Alex Williamson
On Tue, 1 Aug 2017 13:54:27 +0800 "Gao, Ping A" wrote: > On 2017/7/28 0:00, Gao, Ping A wrote: > > On 2017/7/27 0:43, Alex Williamson wrote: > >> [cc +libvir-list] > >> > >> On Wed, 26 Jul 2017 21:16:59 +0800 > >> "Gao, Ping A" wrote: > >> > >>>

Re: [libvirt] [PATCH 8/8] Turn virDomainDeviceInfoFormat into void

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > The rombar attribute was already validated at the time of parsing > the XML. > --- > src/conf/domain_conf.c | 94 > -- > 1 file changed, 30 insertions(+), 64 deletions(-) > Reviewed-by: John Ferlan

[libvirt] [libvirt-php PATCH 08/13] Split up the bindings for libvirt network API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-network.c | 586 src/libvirt-network.h | 73 ++ src/libvirt-php.c | 610 +- src/libvirt-php.h | 24 +- 5 files changed, 664 insertions(+),

[libvirt] [libvirt-php PATCH 03/13] Do not reuse PHPFUNC macro definition

2017-08-01 Thread Dawid Zamirski
The sockets.c and vncfunc.c should have their own function macros as they are "helper" functions not directly related to PHP bindings themselves. This is simple s/PHPFUNC/SOCKETFUNC/ and s/PHPFUNC/VNCFUNC/ --- src/sockets.c | 44 +-- src/vncfunc.c | 138

Re: [libvirt] [libvirt-php PATCH 0/7] add bindings for NWFilter APIs

2017-08-01 Thread Dawid Zamirski
On Mon, 2017-07-31 at 11:31 -0400, Dawid Zamirski wrote: > On Mon, 2017-07-31 at 12:35 +0200, Michal Privoznik wrote: > > Hi Michal, > > I've been busy at work lately with little or no spare time for my OSS > work :-( I've started on this last week but have been dragged away. > I'll try to send

[libvirt] [libvirt-php PATCH 12/13] Split up the bindings for libvirt NWFilter API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am| 3 +- src/libvirt-nwfilter.c | 414 + src/libvirt-nwfilter.h | 66 src/libvirt-php.c | 445 + src/libvirt-php.h | 28 5 files changed, 486

[libvirt] [libvirt-php PATCH 10/13] Split up the bindings for libvirt snapshot API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am| 1 + src/libvirt-php.c | 257 + src/libvirt-php.h | 18 +--- src/libvirt-snapshot.c | 243 ++ src/libvirt-snapshot.h | 58 +++ 5 files changed, 305

[libvirt] [libvirt-php PATCH 04/13] Split up the bindings for libvirt connection API

2017-08-01 Thread Dawid Zamirski
* add libvirt-connection.h and libvirt-connection.c * move all libvirt_connect_* function declarations and definitions to above files * other minor adjusments to libvirt-php.h and util.h to keep the code compilable while the code is being moved around. --- src/Makefile.am | 3 +-

[libvirt] [libvirt-php PATCH 05/13] Split up the bindings for libvirt node API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am| 3 +- src/libvirt-node.c | 304 ++ src/libvirt-node.h | 25 + src/libvirt-php.c | 322 + src/libvirt-php.h | 6 - src/util.h | 25 + 6 files

[libvirt] [libvirt-php PATCH 00/13] Refactor into smaller components

2017-08-01 Thread Dawid Zamirski
As per [1], this patch series splits up the large libvirt-php.c into components that (attempts) to resemble the structure of the libvirt project. Each patch successive patch was compile-tested while the whole series was verified with "make check" and a simple custom written PHP script. Dawid

[libvirt] [libvirt-php PATCH 01/13] Move PHP version compat macros to utils.h

2017-08-01 Thread Dawid Zamirski
--- src/libvirt-php.h | 144 -- src/util.h| 154 ++ 2 files changed, 164 insertions(+), 134 deletions(-) diff --git a/src/libvirt-php.h b/src/libvirt-php.h index 7962e33..867eb60 100644

[libvirt] [libvirt-php PATCH 02/13] Update AUTHORS file

2017-08-01 Thread Dawid Zamirski
Since the project is about to get a bunch of new header files, it's much easier to maintain just the AUTHORS file. --- AUTHORS | 29 +++-- src/libvirt-php.c | 10 -- src/libvirt-php.h | 10 -- src/sockets.c | 3 --- src/sockets.h | 4

Re: [libvirt] [libvirt-php PATCH 00/13] Refactor into smaller components

2017-08-01 Thread Dawid Zamirski
On Tue, 2017-08-01 at 17:46 -0400, Dawid Zamirski wrote: > As per [1], this patch series splits up the large libvirt-php.c into > components that (attempts) to resemble the structure of the libvirt > project. Each patch successive patch was compile-tested while the > whole > series was verified

[libvirt] [libvirt-php PATCH 11/13] Split up the bindings for libvirt nodedev API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-nodedev.c | 339 src/libvirt-nodedev.h | 54 src/libvirt-php.c | 353 +- src/libvirt-php.h | 13 -- 5 files changed, 398

[libvirt] [libvirt-php PATCH 09/13] Split up the bindings for libvirt storage API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am |3 +- src/libvirt-php.c | 1188 + src/libvirt-php.h | 49 -- src/libvirt-storage.c | 1129 ++ src/libvirt-storage.h | 138 ++ 5 files changed, 1271

[libvirt] [libvirt-php PATCH 13/13] Fix is_local_connection implementation.

2017-08-01 Thread Dawid Zamirski
As it was failing when local host is using FQDN for hostnames. The logic to do so follows libvirt's implementation for the same thing. This fixes an issue where unit tests would falsely fail on workstations that have FQDN hostnames. --- src/libvirt-php.c | 38

[libvirt] [libvirt-php PATCH 06/13] Split up the bindings for libvirt stream API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-php.c| 231 +-- src/libvirt-php.h| 15 +--- src/libvirt-stream.c | 229 ++ src/libvirt-stream.h | 39 + 5 files changed, 273

Re: [libvirt] [PATCH 7/8] conf: check for buffer errors before virBufferUse

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > After an OOM error, virBuffer* APIs set buf->use to zero. > Adding a buffer to the parent buffer only if use is non-zero > would quitely drop data on error. s/quitely/quietly/ > > Check the error beforehand to make sure buf->use is zero > because we

Re: [libvirt] [PATCH 4/8] Use a separate buffer for subelements

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > Convert virDomainSoundDefFormat to use a separate buffer > for subelements. > --- > src/conf/domain_conf.c | 34 ++ > 1 file changed, 14 insertions(+), 20 deletions(-) > Reviewed-by: John Ferlan

Re: [libvirt] [PATCH 3/8] Use a separate buffer for subelements

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > Convert virDomainSmartcardDefFormat to use a separate buffer > for possible subelements, to avoid the need for duplicated > formatting logic in virDomainDeviceInfoNeedsFormat. > --- > src/conf/domain_conf.c | 39 +++

Re: [libvirt] [PATCH 2/8] virDomainDeviceInfoFormat: delete outdated comments

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > This function has grown to format more than just the address. > Delete the comment completely to avoid failing to update it > in the future. > > Also, the indentation is now handled by the virBuffer APIs, > so the comment about indentation no longer

Re: [libvirt] [PATCH 1/8] Remove superfluous usage of virDomainDeviceInfoNeedsFormat

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > This function returns false if virDomainDeviceInfoFormat > would not format anything. > > Using it as the sole condition to decide whether to call > virDomainDeviceInfoFormat or not is pointless, since > the conditions are repeated in

Re: [libvirt] [PATCH 6/8] Use a separate buffer for subelements

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > Switch virDomainHubDefFormat to use a separate buffer for subelements. Could also mention the removal of the InfoNeedsFormat > --- > src/conf/domain_conf.c | 34 +++--- > 1 file changed, 11 insertions(+), 23 deletions(-) >

Re: [libvirt] [PATCH 5/8] Use a separate buffer for subelements

2017-08-01 Thread John Ferlan
On 07/26/2017 09:29 AM, Ján Tomko wrote: > Convert virDomainWatchdogDefFormat to use a separate > buffer for subelements. > --- > src/conf/domain_conf.c | 16 +++- > 1 file changed, 11 insertions(+), 5 deletions(-) > Reviewed-by: John Ferlan John --

Re: [libvirt] [PATCH] activate and refresh logical volumes while refreshing logical pool

2017-08-01 Thread Vasiliy Tolstov
2017-08-01 17:36 GMT+03:00 Ján Tomko : > On Tue, Aug 01, 2017 at 04:26:07PM +0300, Vasiliy Tolstov wrote: >> >> Signed-off-by: Vasiliy Tolstov >> --- >> src/storage/storage_backend_logical.c | 19 +++ >> 1 file changed, 19 insertions(+) >> >>

Re: [libvirt] [PATCH 5/5] nodedev: Protect every access to udev_monitor by locking the driver

2017-08-01 Thread John Ferlan
On 07/26/2017 02:44 AM, Erik Skultety wrote: > Since @udev_monitor isn't immutable within the driver, we need to > protect every access to it by locking the driver, so that no spurious > action changing the pointer while one thread is actively using it might > occur. This patch just takes some

Re: [libvirt] [PATCH 4/5] nodedev: Introduce udevHandleOneDevice

2017-08-01 Thread John Ferlan
On 07/26/2017 02:44 AM, Erik Skultety wrote: > Let this new method handle the device object we obtained from the > monitor in order to enhance readability. > > Signed-off-by: Erik Skultety > --- > src/node_device/node_device_udev.c | 31 ++- >

Re: [libvirt] [PATCH 3/5] nodedev: Clear the udev_monitor reference once unref'd

2017-08-01 Thread John Ferlan
On 07/26/2017 02:44 AM, Erik Skultety wrote: > Since we only have one udev_monitor reference throughout libvirt, we > should either clear the pointer we copy around to prevent invalid memory > access once we unref this single reference, or start using reference > counting provided by libudev.

Re: [libvirt] [PATCH 2/5] nodedev: udev: Remove the udevEventHandleCallback on fatal error

2017-08-01 Thread John Ferlan
On 07/26/2017 02:44 AM, Erik Skultety wrote: > So we have a sanity check for the udev monitor fd. Theoretically, it > could happen that the udev monitor fd changes (due to our own wrongdoing, > hence the 'sanity' here) and if that happens it means we are handling an > event from a different

Re: [libvirt] [PATCH 1/5] nodedev: mdev: Report an error when virFileResolveLink fails

2017-08-01 Thread John Ferlan
On 07/26/2017 02:44 AM, Erik Skultety wrote: > It might happen that virFileResolveLinkHelper fails on the lstat system > call. virFileResolveLink expects the caller to report an error when it > fails, however this wasn't the case for udevProcessMediatedDevice. > > Signed-off-by: Erik Skultety

Re: [libvirt] [PATCH v2 1/8] util: Rename virObjectLockRead to virObjectRWLockRead

2017-08-01 Thread John Ferlan
On 08/01/2017 09:24 AM, Michal Privoznik wrote: > On 08/01/2017 02:05 AM, John Ferlan wrote: >> Since the class it represents is based on virObjectRWLockableClass >> and in order to make sure we diffentiate lest anyone somehow > > ^^ couple of typos > Just differentiate from my dictionary.

Re: [libvirt] [PATCH] activate and refresh logical volumes while refreshing logical pool

2017-08-01 Thread Ján Tomko
On Tue, Aug 01, 2017 at 04:26:07PM +0300, Vasiliy Tolstov wrote: Signed-off-by: Vasiliy Tolstov --- src/storage/storage_backend_logical.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/storage/storage_backend_logical.c

Re: [libvirt] [PATCH] activate and refresh logical volumes while refreshing logical pool

2017-08-01 Thread Peter Krempa
On Tue, Aug 01, 2017 at 16:26:07 +0300, Vasiliy Tolstov wrote: Please provide a commit message with justification. > Signed-off-by: Vasiliy Tolstov > --- > src/storage/storage_backend_logical.c | 19 +++ > 1 file changed, 19 insertions(+) signature.asc

[libvirt] [PATCH] activate and refresh logical volumes while refreshing logical pool

2017-08-01 Thread Vasiliy Tolstov
Signed-off-by: Vasiliy Tolstov --- src/storage/storage_backend_logical.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index 67f70e551729..0c34476de38e 100644 ---

[libvirt] [PATCH] activate and refresh logical volumes while refreshing logical pool

2017-08-01 Thread Vasiliy Tolstov
When using remote attached disks like srp/iser its useful to auto activate volumes list and refresh its metadata because volume may be created outside of libvirt and on different node. Vasiliy Tolstov (1): activate and refresh logical volumes while refreshing logical pool

Re: [libvirt] [dbus PATCH 0/9] code cleanup

2017-08-01 Thread John Ferlan
On 07/24/2017 09:38 AM, Pavel Hrdina wrote: > Pavel Hrdina (9): > util: move bus_path_for_domain and domain_from_bus_path > util: move and rename virDomainsFreep > domain: split domain code into separate file > events: split event code into separate file > util: rename function to

Re: [libvirt] [dbus PATCH 5/9] util: rename function to follow libvirt naming rules

2017-08-01 Thread John Ferlan
On 07/24/2017 09:38 AM, Pavel Hrdina wrote: > All libvirt-dbus function should use virtDBus preffix and use only one > coding style, camelCase. > s/preffix/prefix In general... Should "bus_path" just be Path - seems redundant to have "virtDBusBus"... It's not wrong, but mainly curious

[libvirt] [PATCH v3] libxl: Add a test suite for libxl_domain_config generator

2017-08-01 Thread Marek Marczykowski-Górecki
From: Jim Fehlig The libxl library allows a libxl_domain_config object to be serialized from/to a JSON string. Use this to allow testing of the XML to libxl_domain_config conversion process. Test XML is converted to libxl_domain_config, which is then serialized to json. A json

Re: [libvirt] [PATCH v2 1/8] util: Rename virObjectLockRead to virObjectRWLockRead

2017-08-01 Thread Michal Privoznik
On 08/01/2017 02:05 AM, John Ferlan wrote: > Since the class it represents is based on virObjectRWLockableClass > and in order to make sure we diffentiate lest anyone somehow ^^ couple of typos > believes they could use virObjectLockRead for a virObjectLockableClass, > let's rename the API to

[libvirt] [PATCH python] include usable memory in virDomainMemoryStats

2017-08-01 Thread Tomáš Golembiovský
Signed-off-by: Tomáš Golembiovský --- libvirt-override.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libvirt-override.c b/libvirt-override.c index 0abfc37..832e05c 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -398,6 +398,9 @@

Re: [libvirt] [PATCH] docs: bhyve: document autoport support

2017-08-01 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 08/01/2017 11:46 AM, Michal Privoznik wrote: > > On 07/30/2017 12:07 PM, Roman Bogorodskiy wrote: > >> - Update the driver page with the information about using > >>autport for VNC ports > >> - Add a news entry > >> --- > >> docs/drvbhyve.html.in | 8

Re: [libvirt] [PATCH] docs: bhyve: document autoport support

2017-08-01 Thread Michal Privoznik
On 08/01/2017 11:46 AM, Michal Privoznik wrote: > On 07/30/2017 12:07 PM, Roman Bogorodskiy wrote: >> - Update the driver page with the information about using >>autport for VNC ports >> - Add a news entry >> --- >> docs/drvbhyve.html.in | 8 >> docs/news.xml | 10

Re: [libvirt] [PATCH v2] tools: virsh: Adding unix socket support to 'domdisplay' command.

2017-08-01 Thread Julio Faracco
Thanks, Michal! 2017-07-31 5:48 GMT-03:00 Michal Privoznik : > On 07/28/2017 11:49 PM, Julio Faracco wrote: >> This commit adds the unix socket URL support to 'domdisplay' command. >> Before, even if an user was using unix socket to define a spice graphics, >> the command

Re: [libvirt] [PATCH 0/2] Fix two valgrind problems

2017-08-01 Thread Ján Tomko
On Tue, Aug 01, 2017 at 11:41:24AM +0200, Michal Privoznik wrote: Ideally, these would go into the release (at least 1/2 as it's a double free). The second one is just a leak so that one can wait if needed. Michal Privoznik (2): virCgroupValidateMachineGroup: Don't free @machinename

Re: [libvirt] [PATCH] docs: bhyve: document autoport support

2017-08-01 Thread Ján Tomko
On Sun, Jul 30, 2017 at 02:07:31PM +0400, Roman Bogorodskiy wrote: - Update the driver page with the information about using autport for VNC ports - Add a news entry --- docs/drvbhyve.html.in | 8 docs/news.xml | 10 ++ 2 files changed, 18 insertions(+) It's a freeze

Re: [libvirt] [PATCH] docs: bhyve: document autoport support

2017-08-01 Thread Michal Privoznik
On 07/30/2017 12:07 PM, Roman Bogorodskiy wrote: > - Update the driver page with the information about using >autport for VNC ports > - Add a news entry > --- > docs/drvbhyve.html.in | 8 > docs/news.xml | 10 ++ > 2 files changed, 18 insertions(+) ACK and safe

[libvirt] [PATCH 2/2] virNetDaemonCallInhibit: Call virNetDaemonGotInhibitReply properly

2017-08-01 Thread Michal Privoznik
So there are couple of issues here. Firstly, we never unref the @pendingReply and thus it leaks. ==13279== 144 (72 direct, 72 indirect) bytes in 1 blocks are definitely lost in loss record 1,095 of 1,259 ==13279==at 0x4C2E080: calloc (vg_replace_malloc.c:711) ==13279==by 0x781FA97:

[libvirt] [PATCH 1/2] virCgroupValidateMachineGroup: Don't free @machinename

2017-08-01 Thread Michal Privoznik
We are given a string in @machinename, we never allocate it, just merely use it for reading. We should not free it otherwise it leads to double free: ==32191== Thread 17: ==32191== Invalid free() / delete / delete[] / realloc() ==32191==at 0x4C2D1A0: free (vg_replace_malloc.c:530) ==32191==

[libvirt] [PATCH 0/2] Fix two valgrind problems

2017-08-01 Thread Michal Privoznik
Ideally, these would go into the release (at least 1/2 as it's a double free). The second one is just a leak so that one can wait if needed. Michal Privoznik (2): virCgroupValidateMachineGroup: Don't free @machinename virNetDaemonCallInhibit: Call virNetDaemonGotInhibitReply properly

[libvirt] [PATCH] news: Fix typo

2017-08-01 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. docs/news.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/news.xml b/docs/news.xml index caa0363..b25a42f 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -130,7 +130,7 @@

Re: [libvirt] [RFC]Add new mdev interface for QoS

2017-08-01 Thread Gao, Ping A
On 2017/7/28 0:00, Gao, Ping A wrote: > On 2017/7/27 0:43, Alex Williamson wrote: >> [cc +libvir-list] >> >> On Wed, 26 Jul 2017 21:16:59 +0800 >> "Gao, Ping A" wrote: >> >>> The vfio-mdev provide the capability to let different guest share the >>> same physical device