Re: [libvirt] [PATCH 1/2] check scripts: handle unintialized driver vars in check-driverimpls.pl

2018-04-19 Thread Nikolay Shirokovskiy
On 18.04.2018 20:25, Daniel P. Berrangé wrote: > On Wed, Apr 18, 2018 at 05:31:12PM +0300, Nikolay Shirokovskiy wrote: >> Current script does not recognize uninitialized driver vars and >> interprets next lines as if there is initialization section. > > IIUC, the problem is the line > >

Re: [libvirt] [PATCH sandbox-image 1/9] pylint: Remove unused import statements

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > Signed-off-by: Radostin Stoyanov > --- > libvirt_sandbox_image/cli.py| 3 --- > libvirt_sandbox_image/sources/docker.py | 1 - > setup.py| 3 --- > 3 files changed, 7

Re: [libvirt] [PATCH sandbox-image 5/9] pylint: Fix white-space around keywords

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > This changes aim to resolve Pylint C0326. > > http://pylint-messages.wikidot.com/messages:c0326 > > Signed-off-by: Radostin Stoyanov > --- > libvirt_sandbox_image/cli.py | 26

Re: [libvirt] [PATCH sandbox-image 4/9] py3: Use 'builtins' instead of '__builtin__'

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > In Python3, the __builtin__ module is renamed to builtins. > > https://docs.python.org/3/library/builtins.html#module-builtins > > Signed-off-by: Radostin Stoyanov > --- > libvirt_sandbox_image/cli.py | 4 ++--

Re: [libvirt] [PATCH sandbox-image 3/9] pylint: Use consistent indentation of 4 spaces

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > Pylint warning W0311 - Bad indentation > > http://pylint-messages.wikidot.com/messages:w0311 > > Signed-off-by: Radostin Stoyanov > --- > libvirt_sandbox_image/sources/docker.py | 4 ++-- >

Re: [libvirt] [PATCH v2 3/7] tests: qemuxml2argv: Add infrastructure for testing with real qemuCaps

2018-04-19 Thread Andrea Bolognani
On Wed, 2018-04-18 at 17:22 +0200, Peter Krempa wrote: > On Wed, Apr 18, 2018 at 14:43:55 +0200, Andrea Bolognani wrote: > > I think using real-life capabilities instead of the syntetic data > > we use now is a step in the right direction. > > > > I'm still a bit uneasy about the "moving target"

Re: [libvirt] [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Laszlo Ersek
On 04/19/18 09:56, Daniel P. Berrangé wrote: > On Thu, Apr 19, 2018 at 09:48:36AM +0200, Markus Armbruster wrote: >> Laszlo Ersek writes: >> >>> On 04/18/18 10:47, Markus Armbruster wrote: Laszlo Ersek writes: >>> > +## > +#

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-19 Thread Gerd Hoffmann
Hi, > Erik Skultety brought up a good question today regarding how libvirt is > meant to handle these different flavors of display interfaces and > knowing whether a given mdev device has display support at all. It > seems that we cannot simply use the default display=auto because > libvirt

[libvirt] [PATCH v2 1/2] tools: fix check_guests_shutdown loop

2018-04-19 Thread Christian Ehrhardt
The recent fix to libvirt-guests.sh.in works for what it intended to fix (variable scope) but failed to adapt the loop in check_guests_shutdown correctly. Due to that it currently might detect all guests as "Failed to determine state of guest" by bad var content or just assumes they are shut down

[libvirt] [PATCH v2 2/2] tools: do not report unknown guests in print_guests_shutdown

2018-04-19 Thread Christian Ehrhardt
If another event in background while running libvirt-guests.sh completely undefines a guest it will no more be available for proper reporting of its shutdown. This appears in the log as: Failed to determint state of guest: . Not tracking it anymore Shutdown of guest complete The first

[libvirt] [PATCH v2 0/2] fix parallel shutdown in libvirt-guests.sh

2018-04-19 Thread Christian Ehrhardt
Working on a few issues in parallel shutdown. The first is fixing a real issue, while the latter avoids printing a message with an empty variable. *Updates since V1* - added Reviewed-by to patch #1 - added second patch to skip the message without a guest nama Christian Ehrhardt (2): tools:

Re: [libvirt] [dbus PATCH 3/6] Implement SetUserPassword method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:47:28PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 7 +++ > src/domain.c| 27 +++ > 2 files changed, 34 insertions(+) Reviewed-by: Pavel

Re: [libvirt] [dbus PATCH 4/6] Implement SetTime method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:47:29PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 7 +++ > src/domain.c| 27 +++ > 2 files changed, 34 insertions(+) > > diff --git

Re: [libvirt] [PATCH v3 7/7] qemu: Format 'write-cache' parameter for disk frontends

2018-04-19 Thread Ján Tomko
On Wed, Apr 18, 2018 at 05:33:38PM +0200, Peter Krempa wrote: The disk cache mode translates to various frontend and backend attributes for the qemu block layer. For the frontend device the 'writeback' parameter is used and provided as 'write-cache'. Implement this so that we can later switch to

Re: [libvirt] [PATCH v3 5/7] tests: qemuxml2argv: Test formatting of 'write-cache' parameter

2018-04-19 Thread Ján Tomko
On Wed, Apr 18, 2018 at 05:33:36PM +0200, Peter Krempa wrote: Prepare the tests for adding the new parameter. The parameter was introduced in qemu-2.7.0, so add a forked version of the test case to see that it is formatted properly. This test is also an example how the new testing macros should

Re: [libvirt] [dbus PATCH v2] Implement GetDHCPLeases method for Network Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:25:52PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Network.xml | 9 ++ > src/network.c| 74 > > 2 files changed, 83 insertions(+) > >

Re: [libvirt] [PATCH 5/5] po: minimize & canonicalize translations stored in git

2018-04-19 Thread Ján Tomko
On Thu, Apr 12, 2018 at 02:28:22PM +0100, Daniel P. Berrangé wrote: Similar to the libvirt.pot, .po files contain line numbers and file names identifying where in the source a translatable string comes from. The source locations in the .po files are thrown away and replaced with content from the

Re: [libvirt] [PATCH sandbox 1/1] Delete virt-sandbox-image tool now in separate repo

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 17:10 +0100, Daniel P. Berrangé wrote: > The virt-sandbox-image tool and its supporting code has been split into > a separate libvirt-sandbox-image GIT repository. This allows its build > system and distribution to work in the normal python way, and have a > release lifecycle

Re: [libvirt] [PATCH] git: add config file telling git-publish how to send patches

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 10:55:01AM +0200, Peter Krempa wrote: > On Wed, Apr 18, 2018 at 18:35:18 +0100, Daniel Berrange wrote: > > The "git-publish" tool is a useful git extension for sending patch > > series for code review. It automatically creates versioned tags > > each time code on a branch

Re: [libvirt] [PATCH sandbox-image 6/9] setup: Add shebang

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > Signed-off-by: Radostin Stoyanov > --- > setup.py | 2 ++ > 1 file changed, 2 insertions(+) > mode change 100644 => 100755 setup.py > > diff --git a/setup.py b/setup.py > old mode 100644 > new mode 100755 >

Re: [libvirt] [PATCH sandbox-image 7/9] cli: Remove unused constants

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > Signed-off-by: Radostin Stoyanov > --- > libvirt_sandbox_image/cli.py | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/libvirt_sandbox_image/cli.py b/libvirt_sandbox_image/cli.py > index

Re: [libvirt] [PATCH sandbox-image 2/9] pylint: Move standard library imports on top

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > Following PEP8 [1], imports should be grouped in the following order: > > standard library imports > related third party imports > local application/library specific imports > > With a blank line between each group of

Re: [libvirt] [PATCH sandbox-image 8/9] cli: Remove redundant global statements

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > The global statement is needed for assignment of variables in global > scope [1]. In this case, we only read the value of those variables, > therefore we do not need to explicitly use the global statement. > > [1]

Re: [libvirt] [PATCH 1/5] po: provide custom make rules for po file management

2018-04-19 Thread Ján Tomko
On Thu, Apr 12, 2018 at 02:28:18PM +0100, Daniel P. Berrangé wrote: Historically we have relied on autopoint/gettextize to install a standard po/Makefile.in.in. There is very limited scope for customizing this and it also causes a bunch of extra stuff to be pulled into configure.ac which

Re: [libvirt] [PATCH 2/5] po: remove language list from zanata configuration

2018-04-19 Thread Ján Tomko
On Thu, Apr 12, 2018 at 02:28:19PM +0100, Daniel P. Berrangé wrote: The element in zanata.xml is no longer relevant as this info is recorded server side. Signed-off-by: Daniel P. Berrangé --- po/zanata.xml | 99 --- 1

Re: [libvirt] [PATCH 4/5] po: stop storing libvirt.pot in git

2018-04-19 Thread Ján Tomko
On Thu, Apr 12, 2018 at 02:28:21PM +0100, Daniel P. Berrangé wrote: Storing the libvirt.pot file is a bad idea because it is an automatically generated file. Most patches will invalidate the stored libvirt.pot file by changing line numbers or introducing/removing files with translatable content.

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Thomas Huth
On 18.04.2018 08:02, Gerd Hoffmann wrote: > On Wed, Apr 18, 2018 at 12:40:54AM +0200, Laszlo Ersek wrote: >> Add a schema that describes the different uses and properties of virtual >> machine firmware. > > Looks good to me overall. > >> +{ 'enum' : 'FirmwareType', >> + 'data' : [ 'bios',

Re: [libvirt] [dbus PATCH 2/6] Implement MigrateSetCompressionCache method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:47:27PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 6 ++ > src/domain.c| 25 + > 2 files changed, 31 insertions(+) Reviewed-by: Pavel Hrdina

Re: [libvirt] [dbus PATCH 1/6] Implement BlockJobSetSpeed for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:47:26PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 7 +++ > src/domain.c| 26 ++ > 2 files changed, 33 insertions(+) Reviewed-by: Pavel Hrdina

Re: [libvirt] [PATCH v3 1/7] tests: qemu: Add helper code to lookup latest capability file

2018-04-19 Thread Ján Tomko
On Wed, Apr 18, 2018 at 05:33:32PM +0200, Peter Krempa wrote: The helper iterates the directory with files for the capability test and looks up the most recent one for the given architecture. This will allow testing against the newest qemu capabilities so that we can catch regressions in

Re: [libvirt] [dbus PATCH v2 2/3] Implement FSThaw method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:14:17PM +0200, Ján Tomko wrote: > On Wed, Apr 18, 2018 at 01:52:18PM +0200, Katerina Koukiou wrote: > > Signed-off-by: Katerina Koukiou > > --- > > data/org.libvirt.Domain.xml | 7 +++ > > src/domain.c| 41

Re: [libvirt] [not libvirt PATCH] rcc - resolve capabilities conflicts

2018-04-19 Thread Ján Tomko
On Wed, Apr 18, 2018 at 05:52:26PM +0200, Peter Krempa wrote: On Thu, Apr 12, 2018 at 09:45:32 +0200, Ján Tomko wrote: my tool for naively resolving qemu capabilities conflicts after a rebase, that used to contain my latest syntax-check addition --- rcc | 62

Re: [libvirt] [PATCH sandbox-image] Add manual pages to describe virt-sandbox-image

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 17:12 +0100, Daniel P. Berrangé wrote: > There's little point releasing a new tool if we don't provide any docs > describing how it is used. > > Signed-off-by: Daniel P. Berrangé > --- > .gitignore | 1 + > MANIFEST.in

Re: [libvirt] [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Markus Armbruster
Laszlo Ersek writes: > On 04/18/18 10:47, Markus Armbruster wrote: >> Laszlo Ersek writes: > >>> +## >>> +# @FirmwareArchitecture: >>> +# >>> +# Defines the target architectures (emulator binaries) that firmware may >>> +# execute on. >>> +# >>> +#

Re: [libvirt] [PATCH 1/2] check scripts: handle unintialized driver vars in check-driverimpls.pl

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 09:56:07AM +0300, Nikolay Shirokovskiy wrote: > > > On 18.04.2018 20:25, Daniel P. Berrangé wrote: > > On Wed, Apr 18, 2018 at 05:31:12PM +0300, Nikolay Shirokovskiy wrote: > >> Current script does not recognize uninitialized driver vars and > >> interprets next lines as

Re: [libvirt] [PATCH 1/2] check scripts: handle unintialized driver vars in check-driverimpls.pl

2018-04-19 Thread Nikolay Shirokovskiy
On 19.04.2018 10:49, Daniel P. Berrangé wrote: > On Thu, Apr 19, 2018 at 09:56:07AM +0300, Nikolay Shirokovskiy wrote: >> >> >> On 18.04.2018 20:25, Daniel P. Berrangé wrote: >>> On Wed, Apr 18, 2018 at 05:31:12PM +0300, Nikolay Shirokovskiy wrote: Current script does not recognize

Re: [libvirt] [PATCH sandbox-image 0/9] Tweaks

2018-04-19 Thread Daniel P . Berrangé
On Wed, Apr 18, 2018 at 09:57:38PM +0100, Radostin Stoyanov wrote: > This patch series introduces a few small changes towards making the code of > virt-sandbox-image compatible with PEP8. > > Radostin Stoyanov (9): > pylint: Remove unused import statements > pylint: Move standard library

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Thomas Huth
On 18.04.2018 00:40, Laszlo Ersek wrote: > Add a schema that describes the different uses and properties of virtual > machine firmware. > > Each firmware executable installed on a host system should come with at > least one JSON file that conforms to this schema. Each file informs the >

Re: [libvirt] [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 10:39:32AM +0200, Laszlo Ersek wrote: > On 04/19/18 09:56, Daniel P. Berrangé wrote: > > On Thu, Apr 19, 2018 at 09:48:36AM +0200, Markus Armbruster wrote: > >> Laszlo Ersek writes: > >> > >>> On 04/18/18 10:47, Markus Armbruster wrote: > Laszlo

Re: [libvirt] [dbus PATCH v2 1/3] Implement FSFreeze method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:12:23PM +0200, Ján Tomko wrote: > On Wed, Apr 18, 2018 at 01:52:17PM +0200, Katerina Koukiou wrote: > > Signed-off-by: Katerina Koukiou > > --- > > data/org.libvirt.Domain.xml | 7 +++ > > src/domain.c| 41

Re: [libvirt] [PATCH sandbox-image 9/9] docker: Add missing import base64

2018-04-19 Thread Cedric Bosdonnat
On Wed, 2018-04-18 at 21:57 +0100, Radostin Stoyanov wrote: > Signed-off-by: Radostin Stoyanov > --- > libvirt_sandbox_image/sources/docker.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libvirt_sandbox_image/sources/docker.py >

Re: [libvirt] [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 09:48:36AM +0200, Markus Armbruster wrote: > Laszlo Ersek writes: > > > On 04/18/18 10:47, Markus Armbruster wrote: > >> Laszlo Ersek writes: > > > >>> +## > >>> +# @FirmwareArchitecture: > >>> +# > >>> +# Defines the target

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Laszlo Ersek
On 04/19/18 02:09, David Gibson wrote: > On Wed, 18 Apr 2018 10:32:06 +0200 > Laszlo Ersek wrote: > >> On 04/18/18 08:02, Gerd Hoffmann wrote: >> [...] >> [...] >>> >>> Looks good to me overall. >>> +{ 'enum' : 'FirmwareType', + 'data' : [ 'bios', 'slof',

Re: [libvirt] [PATCH v3 3/7] tests: qemuxml2argv: Add infrastructure for testing with real qemuCaps

2018-04-19 Thread Ján Tomko
On Wed, Apr 18, 2018 at 05:33:34PM +0200, Peter Krempa wrote: Allow testing of XML->argv conversion with using a real capability map as used in the qemucapabilitiestest. This allows specifying the required qemu version with the test rather than having to enumerate all the required capabilities

Re: [libvirt] [dbus PATCH 5/6] Implement SetMetadata method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:47:30PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 10 ++ > src/domain.c| 47 > + > 2 files changed, 57 insertions(+)

Re: [libvirt] [PATCH v2 3/7] tests: qemuxml2argv: Add infrastructure for testing with real qemuCaps

2018-04-19 Thread Peter Krempa
On Thu, Apr 19, 2018 at 09:29:55 +0200, Andrea Bolognani wrote: > On Wed, 2018-04-18 at 17:22 +0200, Peter Krempa wrote: > > On Wed, Apr 18, 2018 at 14:43:55 +0200, Andrea Bolognani wrote: > > > I think using real-life capabilities instead of the syntetic data > > > we use now is a step in the

Re: [libvirt] [PATCH v2 3/5] uml: Create accessors to virDomainObjListFindByUUID

2018-04-19 Thread Daniel P . Berrangé
On Mon, Apr 02, 2018 at 09:06:14AM -0400, John Ferlan wrote: > Rather than repeat code throughout, create and use a couple of > accessors in order to lookup by UUID. This will also generate > a common error message including the failed uuidstr for lookup > rather than just returning nothing in

Re: [libvirt] [PATCH v2 4/5] uml: Add more specific error message on failed FindBy call

2018-04-19 Thread Daniel P . Berrangé
On Mon, Apr 02, 2018 at 09:06:15AM -0400, John Ferlan wrote: > Rather than an empty failed to find, let's provide a bit more > knowledge about what we failed to find by using the name string > or the id value. > > Signed-off-by: John Ferlan > --- > src/uml/uml_driver.c | 6

Re: [libvirt] [PATCH v2 5/5] uml: Use virDomainObjListFindBy{UUID|ID}Ref

2018-04-19 Thread Daniel P . Berrangé
On Mon, Apr 02, 2018 at 09:06:16AM -0400, John Ferlan wrote: > For umlDomObjFromDomainLocked and umlDomainLookupByID let's > return a locked and referenced @vm object so that callers > can then use the common and more consistent virDomainObjEndAPI > in order to handle cleanup rather than needing

[libvirt] [PATCH v2 1/2] tests: Create full host NUMA topology in more cases

2018-04-19 Thread Andrea Bolognani
vircapstest has code to add a full host NUMA topology, that is, one that includes all information about nodes and CPUs including IDs; testQemuCapsInit(), which is used to create a mock virCapsPtr for QEMU tests, however, just fakes it by setting nnumaCell_max to some number. While the latter

[libvirt] [PATCH v2 0/2] Don't choke on valid NUMA nodesets on daemon restart

2018-04-19 Thread Andrea Bolognani
Changes from [v1]: * make sure the tests pass even when compiling --without-qemu; * actually run syntax-check before sending out patches. [v1] https://www.redhat.com/archives/libvir-list/2018-April/msg00937.html Andrea Bolognani (2): tests: Create full host NUMA topology in more cases

[libvirt] [PATCH v2 REBASE] lib: provide error message in new blockjob event

2018-04-19 Thread Nikolay Shirokovskiy
If block job is completed with error qemu additionally provides error message. This patch introduces new event VIR_DOMAIN_EVENT_ID_BLOCK_JOB_ERROR to pass error message to client. This error message has no semantics and should not be interpreted. API and RPC layer also have reserved 'code' field

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-19 Thread Alex Williamson
On Thu, 19 Apr 2018 10:40:18 +0200 Gerd Hoffmann wrote: > > So I was ready to return and suggest that maybe libvirt should probe > > the device to know about these ancillary configuration details, but > > then I remembered that both mdev vGPU vendors had external dependencies >

Re: [libvirt] [dbus PATCH 1/8] Implement BaselineCPU method for Connect Interface

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 03:58:00PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Connect.xml | 7 +++ > src/connect.c| 38 ++ > 2 files changed, 45 insertions(+)

Re: [libvirt] [dbus PATCH 3/8] Implement FindStoragePoolSources for Domain Interface

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:02PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 9 + src/connect.c| 30 ++ tests/test_connect.py| 5 + 3 files changed, 44

Re: [libvirt] [PATCH v2 1/5] uml: Fix umlProcessAutoDestroyDom dom processing

2018-04-19 Thread Daniel P . Berrangé
On Mon, Apr 02, 2018 at 09:06:12AM -0400, John Ferlan wrote: > There's no need to check if @dom exists before trying to > call virDomainObjListRemove since it must exist due to > prior checks. > > Additionally, if we do remove the @dom, then set it to NULL > so that the virObjectUnlock isn't

[libvirt] [dbus PATCH 7/8] Implement GetCPUModelNames method for Connect Interface

2018-04-19 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 7 +++ src/connect.c| 35 +++ tests/test_connect.py| 4 3 files changed, 46 insertions(+) diff --git a/data/org.libvirt.Connect.xml

[libvirt] [dbus PATCH 5/8] Implement GetAllDomainStats method for Connect Interface

2018-04-19 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 7 +++ src/connect.c| 40 2 files changed, 47 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index

[libvirt] [dbus PATCH 3/8] Implement FindStoragePoolSources for Domain Interface

2018-04-19 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 9 + src/connect.c| 30 ++ tests/test_connect.py| 5 + 3 files changed, 44 insertions(+) diff --git a/data/org.libvirt.Connect.xml

[libvirt] [dbus PATCH 8/8] Implement GetDomainCapabilties method for Connect Interface

2018-04-19 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 10 ++ src/connect.c| 34 ++ 2 files changed, 44 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index

[libvirt] [PATCH v2] qemuDomainObjPrivateDataClear: Don't leak @migParams

2018-04-19 Thread Michal Privoznik
Allocated in qemuMigrationParamsNew() we need to free priv->job.migParams when no longer needed. ==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost in loss record 112 of 123 ==8061==at 0x4C2CF26: calloc (vg_replace_malloc.c:711) ==8061==by 0x5325D05: virAlloc

Re: [libvirt] [PATCH v2 0/5] uml: Clean/fix test driver usage of FindBy{UUID|ID}

2018-04-19 Thread John Ferlan
ping? Beyond patch 1 which was reviewed. These are not uml specific, but rather more how domain objects are handled Tks - John On 04/02/2018 09:06 AM, John Ferlan wrote: > Patches 9-11 of larger series: > v1: https://www.redhat.com/archives/libvir-list/2018-March/msg00489.html > > Changes

Re: [libvirt] [PATCH v2 2/5] uml: Fix umlInotifyEvent dom object handling

2018-04-19 Thread Daniel P . Berrangé
On Mon, Apr 02, 2018 at 09:06:13AM -0400, John Ferlan wrote: > The virDomainObjListFindByName will return a locked and reffed > object. If we call virDomainObjListRemove that will unlock the > object upon return, thus we need to relock the object before > making the call to virDomainObjEndAPI. >

[libvirt] [dbus PATCH 2/8] Implement CompareCPU method for Connect Interface

2018-04-19 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 7 +++ src/connect.c| 43 +++ 2 files changed, 50 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index

[libvirt] [dbus PATCH 0/8] Last APIs for Connect Interface

2018-04-19 Thread Katerina Koukiou
Notes: - I am not confident about the dummy test on StoragePoolSources. - In GetAllDomainStats I was not able to find a way to create output (aa{sv}) as we need. So I created simple (av), hiding the inner array type. Katerina Koukiou (8): Implement BaselineCPU method for Connect Interface

[libvirt] [dbus PATCH 4/8] Move definition for g_autoptr virDomainStatsRecordPtr to util.h

2018-04-19 Thread Katerina Koukiou
We be reused in connect.c Signed-off-by: Katerina Koukiou --- src/domain.c | 2 -- src/util.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain.c b/src/domain.c index 6c44377..010758b 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1017,8

[libvirt] [dbus PATCH 6/8] Introduce virtDBusUtilStringListFree

2018-04-19 Thread Katerina Koukiou
virtDBusUtilStringListFree is an autoptr cleanup function for gchar ** type. Signed-off-by: Katerina Koukiou --- src/util.c | 9 + src/util.h | 7 +++ 2 files changed, 16 insertions(+) diff --git a/src/util.c b/src/util.c index b21f2c5..75f77e3 100644 ---

[libvirt] [dbus PATCH 1/8] Implement BaselineCPU method for Connect Interface

2018-04-19 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 7 +++ src/connect.c| 38 ++ 2 files changed, 45 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index

[libvirt] [PATCH v3 3/5] qemu_monitor: Introduce qemuMonitorGetObjectProps

2018-04-19 Thread Michal Privoznik
Now that we've gotten rid of misleading names we can introduce qemuMonitorGetObjectProps() function which queries -object properties. Again, some parts of code can be reused. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 13 ++

[libvirt] [PATCH v3 5/5] qemu: Introduce memoryBacking/discard

2018-04-19 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1480668 QEMU has this new feature memory-backend-file.discard-data=yes which is a nifty optimization. Basically, when qemu is quitting or on memory hotplug it calls munmap() and close() on the file that is backing the memory. However, this does not mean

[libvirt] [PATCH v3 2/5] qemu_capabilities: Separate out device props fetching

2018-04-19 Thread Michal Privoznik
The code is written generic enough to be reused. Move it into a separate function. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 62 ++-- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git

[libvirt] [PATCH v3 0/5] Enable memory-backend-file.discard-data

2018-04-19 Thread Michal Privoznik
v3 of: https://www.redhat.com/archives/libvir-list/2018-April/msg01437.html diff to v2: - patches 1-4 are the same as in v2, - patch 5 introduces XML knobs to enable the feature in contrast to v2 where the decision was made by libvirt without any user input. Michal Privoznik (5):

[libvirt] [PATCH v3 1/5] qemu_capabilities: s/ObjectProps/DeviceProps/g

2018-04-19 Thread Michal Privoznik
So far all the properties we are trying to fetch are device properties, i.e. -device $dev on qemu command line. Change misleading variable names to express what's queried for better. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 202

Re: [libvirt] [PATCH v2 2/5] uml: Fix umlInotifyEvent dom object handling

2018-04-19 Thread John Ferlan
On 04/19/2018 09:51 AM, Daniel P. Berrangé wrote: > On Mon, Apr 02, 2018 at 09:06:13AM -0400, John Ferlan wrote: >> The virDomainObjListFindByName will return a locked and reffed >> object. If we call virDomainObjListRemove that will unlock the >> object upon return, thus we need to relock the

Re: [libvirt] [PATCH v2] qemuDomainObjPrivateDataClear: Don't leak @migParams

2018-04-19 Thread Michal Privoznik
On 04/19/2018 04:16 PM, Michal Privoznik wrote: > Allocated in qemuMigrationParamsNew() we need to free > priv->job.migParams when no longer needed. > > ==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost > in loss record 112 of 123 > ==8061==at 0x4C2CF26: calloc

Re: [libvirt] [PATCH v2] qemuDomainObjPrivateDataClear: Don't leak @migParams

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:16:56PM +0200, Michal Privoznik wrote: Allocated in qemuMigrationParamsNew() we need to free priv->job.migParams when no longer needed. ==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost in loss record 112 of 123 ==8061==at 0x4C2CF26:

Re: [libvirt] [dbus PATCH] Fix memory leaks introduced by commits 40dc3b and 408a25

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 04:09:38PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > src/domain.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Pavel Hrdina signature.asc Description: PGP

Re: [libvirt] [PATCH 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Andrea Bolognani
On Thu, 2018-04-19 at 14:11 +0200, Peter Krempa wrote: > On Thu, Apr 12, 2018 at 08:47:58 +0200, Andrea Bolognani wrote: > > The current private XML parsing code relies on the assumption > > that NUMA node IDs start from 0 and are densely allocated, > > neither of which is necessarily the case. >

[libvirt] [dbus PATCH] Fix memory leaks introduced by commits 40dc3b and 408a25

2018-04-19 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- src/domain.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/domain.c b/src/domain.c index 6c44377..ae1b68f 100644 --- a/src/domain.c +++ b/src/domain.c @@ -506,7 +506,7 @@

Re: [libvirt] [PATCH 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Peter Krempa
On Thu, Apr 19, 2018 at 15:45:52 +0200, Andrea Bolognani wrote: > On Thu, 2018-04-19 at 14:11 +0200, Peter Krempa wrote: > > On Thu, Apr 12, 2018 at 08:47:58 +0200, Andrea Bolognani wrote: > > > The current private XML parsing code relies on the assumption > > > that NUMA node IDs start from 0 and

[libvirt] [PATCH v2 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Andrea Bolognani
The current private XML parsing code relies on the assumption that NUMA node IDs start from 0 and are densely allocated, neither of which is necessarily the case. Change it so that the bitmap size is dynamically calculated by looking at NUMA node IDs instead, which ensures all nodes will be able

Re: [libvirt] [dbus PATCH 1/8] Implement BaselineCPU method for Connect Interface

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:00PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 7 +++ src/connect.c| 38 ++ 2 files changed, 45 insertions(+) Reviewed-by: Ján

[libvirt] [PATCH python] Fix build with older libvirt versions

2018-04-19 Thread Daniel P . Berrangé
The libvirt python module is supposed to build with historical versions of the API back to 0.9.1, which means all constants / methods must be commit 314b2346df2d8e2d7d705b003c693b4fa0189bdf Author: Edgar Kaziakhmedov Date: Wed Feb 7 17:49:30 2018 +0300

Re: [libvirt] [dbus PATCH 4/8] Move definition for g_autoptr virDomainStatsRecordPtr to util.h

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:03PM +0200, Katerina Koukiou wrote: We be reused in connect.c s/We/Will/ Signed-off-by: Katerina Koukiou --- src/domain.c | 2 -- src/util.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko

Re: [libvirt] [PATCH 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Peter Krempa
On Thu, Apr 19, 2018 at 16:37:23 +0200, Andrea Bolognani wrote: > On Thu, 2018-04-19 at 16:15 +0200, Peter Krempa wrote: > > On Thu, Apr 19, 2018 at 15:45:52 +0200, Andrea Bolognani wrote: > > > Mh, that's trickier than I initially though, because > > > virBitmapParseSeparator() calls

Re: [libvirt] [PATCH 1/2] tests: Create full host NUMA topology by default

2018-04-19 Thread Peter Krempa
On Thu, Apr 12, 2018 at 08:47:57 +0200, Andrea Bolognani wrote: > vircapstest has code to add a full host NUMA topology, that > is, one that includes all information about nodes and CPUs > including IDs; the function used to create a mock virCapsPtr > by most of the test suite, however, just fakes

Re: [libvirt] [PATCH 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Peter Krempa
On Thu, Apr 12, 2018 at 08:47:58 +0200, Andrea Bolognani wrote: > The current private XML parsing code relies on the assumption > that NUMA node IDs start from 0 and are densely allocated, > neither of which is necessarily the case. > > Change it so that the bitmap size is dynamically calculated

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-19 Thread Zhenyu Wang
On 2018.04.19 10:40:18 +0200, Gerd Hoffmann wrote: > Hi, > > > Erik Skultety brought up a good question today regarding how libvirt is > > meant to handle these different flavors of display interfaces and > > knowing whether a given mdev device has display support at all. It > > seems that we

[libvirt] [PATCH 2/2] vmx: write cpuid.coresPerSocket back from CPU topology

2018-04-19 Thread Pino Toscano
When writing the VMX file from the domain XML, write cpuid.coresPerSocket if there is a specified CPU topology in the guest. Use the domain XML of esx-in-the-wild-9 in vmx2xml as testcase for xml2vmxtest. Signed-off-by: Pino Toscano --- src/vmx/vmx.c

[libvirt] [PATCH 1/2] vmx: convert cpuid.coresPerSocket for CPU topology

2018-04-19 Thread Pino Toscano
Convert the cpuid.coresPerSocket key as both number of CPU sockets, and cores per socket. Add the VMX file attached to RHBZ#1568148 as testcase esx-in-the-wild-9; adapt the resulting XML of testcase esx-in-the-wild-8 to the CPU topology present in that VMX.

[libvirt] [PATCH 0/2] vmx: start reading/writing CPU topology

2018-04-19 Thread Pino Toscano
Read/write only cpuid.coresPerSocket for now. Pino Toscano (2): vmx: convert cpuid.coresPerSocket for CPU topology vmx: write cpuid.coresPerSocket back from CPU topology src/vmx/vmx.c | 57

Re: [libvirt] [PATCH 3/5] po: add rules for integration with zanata

2018-04-19 Thread Ján Tomko
On Thu, Apr 12, 2018 at 02:28:20PM +0100, Daniel P. Berrangé wrote: Add rules to handle pushing libvirt.pot to zanata, and refreshing .po files with new content from zanata. Signed-off-by: Daniel P. Berrangé --- po/Makefile.am | 8 1 file changed, 8 insertions(+)

Re: [libvirt] [PATCH 5/5] po: minimize & canonicalize translations stored in git

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 09:53:01AM +0200, Ján Tomko wrote: > On Thu, Apr 12, 2018 at 02:28:22PM +0100, Daniel P. Berrangé wrote: > > Similar to the libvirt.pot, .po files contain line numbers and file > > names identifying where in the source a translatable string comes from. > > The source

Re: [libvirt] [dbus PATCH 6/6] Implement SetMemoryStatsPeriod method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:47:31PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 6 ++ > src/domain.c| 26 ++ > 2 files changed, 32 insertions(+) Reviewed-by: Pavel Hrdina

Re: [libvirt] [dbus PATCH 5/6] Implement SetMetadata method for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Wed, Apr 18, 2018 at 05:47:30PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 10 ++ > src/domain.c| 47 > + > 2 files changed, 57 insertions(+) >

Re: [libvirt] [PATCH] git: add config file telling git-publish how to send patches

2018-04-19 Thread Peter Krempa
On Wed, Apr 18, 2018 at 18:35:18 +0100, Daniel Berrange wrote: > The "git-publish" tool is a useful git extension for sending patch > series for code review. It automatically creates versioned tags > each time code on a branch is sent, so that there is a record of > each version. It also remembers

Re: [libvirt] [PATCH v2] qemuDomainObjPrivateDataClear: Don't leak @migParams

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:28:36PM +0200, Michal Privoznik wrote: On 04/19/2018 04:16 PM, Michal Privoznik wrote: Allocated in qemuMigrationParamsNew() we need to free priv->job.migParams when no longer needed. ==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost in

Re: [libvirt] [PATCH python] Fix build with older libvirt versions

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 05:03:37PM +0200, Ján Tomko wrote: > On Thu, Apr 19, 2018 at 03:35:33PM +0100, Daniel P. Berrangé wrote: > > The libvirt python module is supposed to build with historical versions > > of the API back to 0.9.1, which means all constants / methods must be The incomplete

Re: [libvirt] [PATCH v2 1/2] tests: Create full host NUMA topology in more cases

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:19:38PM +0200, Andrea Bolognani wrote: vircapstest has code to add a full host NUMA topology, that is, one that includes all information about nodes and CPUs including IDs; testQemuCapsInit(), which is used to create a mock virCapsPtr for QEMU tests, however, just

Re: [libvirt] [PATCH v2 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:19:39PM +0200, Andrea Bolognani wrote: The current private XML parsing code relies on the assumption that NUMA node IDs start from 0 and are densely allocated, neither of which is necessarily the case. Change it so that the bitmap size is dynamically calculated by

  1   2   >