[libvirt] [PATCH 3/3] Use virschematest on qemuhotplugtest domain xmls

2016-07-07 Thread Tomasz Flendrich
--- tests/virschematest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/virschematest.c b/tests/virschematest.c index c372c43..a1901e7 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -166,7 +166,8 @@ mymain(void) "qemuxml2argvdata",

[libvirt] [PATCH 2/3] Move domain and device xmls to different directories

2016-07-07 Thread Tomasz Flendrich
--- tests/qemuhotplugtest.c | 6 +++--- .../qemuhotplug-console-virtio.xml | 0 .../qemuhotplug-disk-cdrom-nochange.xml | 0 .../qemuhotplug-disk-scsi-2.xml

[libvirt] [PATCH 0/3] Clean up qemuhotplugtest xml files

2016-07-07 Thread Tomasz Flendrich
I plan on doing bigger changes to qemuhotplugtest.c. It's going to test device attachment/detachment to both live (like now) and persistent (something that is missing now) domains. More files will be added, so I decided to clean up ones that are there now. Many files were not even connected to

[libvirt] [PATCH 1/3] Move all qemuhotplugtest XMLs to one directory

2016-07-07 Thread Tomasz Flendrich
--- tests/qemuhotplugtest.c| 48 ++-- xml => qemuhotplug-base+qemu-agent-detach.xml} | 0 ...u-agent.xml => qemuhotplug-base+qemu-agent.xml} | 0 ...csi.xml => qemuhotplug-base-live+disk-scsi.xml} | 0 ...-usb.xml => qemuhotplug-base-live+disk-usb.xml} |

Re: [libvirt] [libvirt-php PATCH 1/3] Define macros for looping php hash tables.

2016-07-07 Thread Michal Privoznik
On 06.07.2016 23:42, Dawid Zamirski wrote: > Since PHP5 and 7 differ slightly on how looping over php hash tables is > done, those macros were added to abstract away those differences and > avoid using ifdefs for each php version. > --- > src/libvirt-php.c | 31 +++ >

Re: [libvirt] [libvirt-php PATCH 0/3] Fix PHP5 compatibilty issues.

2016-07-07 Thread Michal Privoznik
On 06.07.2016 23:42, Dawid Zamirski wrote: > With the patches that landed support for PHP7 some API calls were not > behaving correctly when compiled against PHP5. The most obvious case > is where connection to e.g. esx host, libvirt_connect wasn't properly > reading out credentials from Zeng

[libvirt] [PATCH] libvirt.spec.in: soft-static allocation of qemu and kvm groups

2016-07-07 Thread Jaroslav Suchanek
Follow the same logic for adding qemu user also for kvm and qemu groups. As is described in https://fedoraproject.org/wiki/Packaging:UsersAndGroups document there should be preallocated UIDs and GIDs for libvirt. A check for required group id was added prior groupadd execution. Resolves:

Re: [libvirt] cpu_map data access for libxl driver

2016-07-07 Thread Jiri Denemark
On Thu, Jul 07, 2016 at 15:02:05 +0100, Daniel P. Berrange wrote: > On Thu, Jul 07, 2016 at 03:46:41PM +0200, Jiri Denemark wrote: > > On Thu, Jul 07, 2016 at 13:47:28 +0100, Daniel P. Berrange wrote: > > > On Thu, Jul 07, 2016 at 02:37:39PM +0200, Cedric Bosdonnat wrote: > > > > Hi Jiri, all, > >

Re: [libvirt] cpu_map data access for libxl driver

2016-07-07 Thread Joao Martins
On 07/07/2016 01:37 PM, Cedric Bosdonnat wrote: > Hi Jiri, all, Hey Cedric! > As I mentioned earlier today on IRC, I have started implementing CPU > configuration > support for libxl driver. FYI I too am working on guest config work and have an RFC wrt to libvirt host cpu detection. Perhaps we

Re: [libvirt] cpu_map data access for libxl driver

2016-07-07 Thread Daniel P. Berrange
On Thu, Jul 07, 2016 at 03:46:41PM +0200, Jiri Denemark wrote: > On Thu, Jul 07, 2016 at 13:47:28 +0100, Daniel P. Berrange wrote: > > On Thu, Jul 07, 2016 at 02:37:39PM +0200, Cedric Bosdonnat wrote: > > > Hi Jiri, all, > > > > > > As I mentioned earlier today on IRC, I have started implementing

Re: [libvirt] [PATCH v2 5/5] qemu: Check for thread <=> memory alignment

2016-07-07 Thread Daniel P. Berrange
On Thu, Jul 07, 2016 at 03:28:44PM +0200, Martin Kletzander wrote: > On Thu, Jul 07, 2016 at 01:43:32PM +0100, Daniel P. Berrange wrote: > > On Thu, Jul 07, 2016 at 01:42:33PM +0100, Daniel P. Berrange wrote: > > > On Thu, Jul 07, 2016 at 02:12:32PM +0200, Martin Kletzander wrote: > > > > Some

[libvirt] [PATCH 02/11] conf: Extract code formatting vCPU info

2016-07-07 Thread Peter Krempa
--- src/conf/domain_conf.c | 45 +++-- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cf5eb1d..74075f0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -22779,6

[libvirt] [PATCH 10/11] qemu: Add cpu ID to the vCPU pid list in the status XML

2016-07-07 Thread Peter Krempa
Note the vcpu ID so that once we allow non-contiguous vCPU topologies it will be possible to pair thread id's with the vcpus. --- src/qemu/qemu_domain.c | 13 - tests/qemuxml2xmltest.c | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH 06/11] conf: convert def->vcpus to a array of pointers

2016-07-07 Thread Peter Krempa
--- src/conf/domain_conf.c | 44 +++- src/conf/domain_conf.h | 2 +- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3aa83e..c2d7259 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCH 11/11] qemu: Store vCPU thread ids in vcpu private data objects

2016-07-07 Thread Peter Krempa
Rather than storing them in an external array store them directly. --- src/qemu/qemu_domain.c | 116 src/qemu/qemu_domain.h | 7 +-- src/qemu/qemu_process.c | 2 - 3 files changed, 71 insertions(+), 54 deletions(-) diff --git

Re: [libvirt] cpu_map data access for libxl driver

2016-07-07 Thread Jiri Denemark
On Thu, Jul 07, 2016 at 13:47:28 +0100, Daniel P. Berrange wrote: > On Thu, Jul 07, 2016 at 02:37:39PM +0200, Cedric Bosdonnat wrote: > > Hi Jiri, all, > > > > As I mentioned earlier today on IRC, I have started implementing CPU > > configuration > > support for libxl driver. > > > > libxl

[libvirt] [PATCH 09/11] qemu: domain: Extract formating and parsing of vCPU thread ids

2016-07-07 Thread Peter Krempa
Further patches will be adding index and modifying the source variables so this will make it more clear. --- src/qemu/qemu_domain.c | 80 +- 1 file changed, 53 insertions(+), 27 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH 08/11] qemu: domain: Add vcpu private data structure

2016-07-07 Thread Peter Krempa
Members will be added in follow-up patches. --- src/qemu/qemu_domain.c | 41 + src/qemu/qemu_domain.h | 13 + 2 files changed, 54 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 42b5511..4c3df04 100644 ---

[libvirt] [PATCH 04/11] conf: Don't report errors from virDomainDefGetVcpu

2016-07-07 Thread Peter Krempa
Most callers make sure that it's never called with an out of range vCPU. Every other caller reports a different error explicitly. Drop the error reporting and clean up some dead code paths. --- src/conf/domain_conf.c | 6 +- src/qemu/qemu_driver.c | 10 ++ 2 files changed, 3

[libvirt] [PATCH 05/11] tests: qemuxml2xml: Format status XML header dynamically

2016-07-07 Thread Peter Krempa
Status XML tests were done by prepending a constant string to an existing XML. With the planned changes the header will depend on data present in the definition rather than just on the data that was parsed. The first dynamic element in the header will be the vcpu thread list. Reuse and rename

[libvirt] [PATCH 07/11] conf: Add private data for virDomainVcpuDef

2016-07-07 Thread Peter Krempa
Allow to store driver specific data on a per-vcpu basis. Move of the virDomainDef*Vcpus* functions was necessary as virDomainXMLOptionPtr was declared below this block and I didn't want to split the function headers. --- src/conf/domain_conf.c| 28 +---

[libvirt] [PATCH 03/11] conf: Rename virDomainVcpuInfoPtr to virDomainVcpuDefPtr

2016-07-07 Thread Peter Krempa
--- src/conf/domain_conf.c | 22 +++--- src/conf/domain_conf.h | 10 +- src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_driver.c | 2 +- src/qemu/qemu_cgroup.c | 2 +- src/qemu/qemu_driver.c | 14 +++--- src/qemu/qemu_process.c | 4 ++--

[libvirt] [PATCH 01/11] conf: Annotate that private data for objects are not copied

2016-07-07 Thread Peter Krempa
Our copy functions format and parse XML thus are not able to copy data. Annotate the private data pointers that this is happening. --- src/conf/domain_conf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a1acebe..eb3a5f3 100644 ---

[libvirt] [PATCH 00/11] vCPU information storage improvements

2016-07-07 Thread Peter Krempa
Cleanups and improvements that will make adding the new vCPU hotplug that was recently added to qemu easier. Peter Krempa (11): conf: Annotate that private data for objects are not copied conf: Extract code formatting vCPU info conf: Rename virDomainVcpuInfoPtr to virDomainVcpuDefPtr

Re: [libvirt] [PATCH v2 5/5] qemu: Check for thread <=> memory alignment

2016-07-07 Thread Martin Kletzander
On Thu, Jul 07, 2016 at 01:43:32PM +0100, Daniel P. Berrange wrote: On Thu, Jul 07, 2016 at 01:42:33PM +0100, Daniel P. Berrange wrote: On Thu, Jul 07, 2016 at 02:12:32PM +0200, Martin Kletzander wrote: > Some settings may be confusing and in case users use numad placement in > combination with

[libvirt] [PATCH 1/3] qemu: Add qemuProcessSetupPid() and use it in qemuProcessSetupIOThread()

2016-07-07 Thread Martin Kletzander
Setting up cgroups and other things for all kinds of threads (the emulator thread, vCPU threads, I/O threads) was copy-pasted every time new thing was added. Over time each one of those functions changed a bit differently. So create one function that does all that setup and start using it,

[libvirt] [PATCH 2/3] qemu: Use qemuProcessSetupPid() in qemuProcessSetupEmulator()

2016-07-07 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_process.c | 69 - 1 file changed, 5 insertions(+), 64 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6fd6ee3d2d9a..0f8ef59c6fe5 100644 ---

[libvirt] [PATCH 0/3] Clean up some duplicated code in qemuProcessSetup* functions

2016-07-07 Thread Martin Kletzander
Initially posted in order to achieve something else, but that got rejected, so at least the cleanup part of it could make it in. The previous versions (whose goal was something completely idfferent) are here: - https://www.redhat.com/archives/libvir-list/2016-June/msg01537.html -

[libvirt] [PATCH 3/3] qemu: Use qemuProcessSetupPid() in qemuProcessSetupVcpu()

2016-07-07 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_process.c | 78 - 1 file changed, 5 insertions(+), 73 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 0f8ef59c6fe5..d329f6dd3ac6 100644 ---

Re: [libvirt] [PATCH] qemu: caps: Always assume QEMU_CAPS_SMP_TOPOLOGY

2016-07-07 Thread Andrea Bolognani
On Thu, 2016-07-07 at 13:15 +0200, Peter Krempa wrote: > Support for SMP topology was added by qemu commit dc6b1c09849484fbbc50 > prior to 0.12.0, our minimum supported qemu version. >  > $ git describe --tags dc6b1c09849484fbbc50803307e4c7a3d81eab62 > v0.11.0-rc0-449-gdc6b1c0 > $ git describe

Re: [libvirt] cpu_map data access for libxl driver

2016-07-07 Thread Daniel P. Berrange
On Thu, Jul 07, 2016 at 02:37:39PM +0200, Cedric Bosdonnat wrote: > Hi Jiri, all, > > As I mentioned earlier today on IRC, I have started implementing CPU > configuration > support for libxl driver. > > libxl expects a string definition the state of all the feature (easy to > create), but also

Re: [libvirt] [PATCH v2 5/5] qemu: Check for thread <=> memory alignment

2016-07-07 Thread Daniel P. Berrange
On Thu, Jul 07, 2016 at 01:42:33PM +0100, Daniel P. Berrange wrote: > On Thu, Jul 07, 2016 at 02:12:32PM +0200, Martin Kletzander wrote: > > Some settings may be confusing and in case users use numad placement in > > combination with static placement we could warn them as it might not be > >

Re: [libvirt] [PATCH v2 5/5] qemu: Check for thread <=> memory alignment

2016-07-07 Thread Daniel P. Berrange
On Thu, Jul 07, 2016 at 02:12:32PM +0200, Martin Kletzander wrote: > Some settings may be confusing and in case users use numad placement in > combination with static placement we could warn them as it might not be > wanted (but it's not forbidden). > > Resolves:

[libvirt] cpu_map data access for libxl driver

2016-07-07 Thread Cedric Bosdonnat
Hi Jiri, all, As I mentioned earlier today on IRC, I have started implementing CPU configuration support for libxl driver. libxl expects a string definition the state of all the feature (easy to create), but also the numeric values for the CPU family and model. virCPUDef holds the name as a

[libvirt] [PATCH v2 2/5] qemu: Use qemuProcessSetupPid() in qemuProcessSetupEmulator()

2016-07-07 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_process.c | 69 - 1 file changed, 5 insertions(+), 64 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6fd6ee3d2d9a..0f8ef59c6fe5 100644 ---

[libvirt] [PATCH v2 3/5] qemu: Use qemuProcessSetupPid() in qemuProcessSetupVcpu()

2016-07-07 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_process.c | 78 - 1 file changed, 5 insertions(+), 73 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 0f8ef59c6fe5..d329f6dd3ac6 100644 ---

[libvirt] [PATCH v2 1/5] qemu: Add qemuProcessSetupPid() and use it in qemuProcessSetupIOThread()

2016-07-07 Thread Martin Kletzander
Setting up cgroups and other things for all kinds of threads (the emulator thread, vCPU threads, I/O threads) was copy-pasted every time new thing was added. Over time each one of those functions changed a bit differently. So create one function that does all that setup and start using it,

[libvirt] [PATCH v2 4/5] qemu: Add driver parameter to qemuProcessSetupPid() and callers

2016-07-07 Thread Martin Kletzander
It will be used later. Signed-off-by: Martin Kletzander --- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_process.c | 34 -- src/qemu/qemu_process.h | 6 -- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git

[libvirt] [PATCH v2 0/5] Warn users with weird thread/memory alignment

2016-07-07 Thread Martin Kletzander
v2: - Split into more patches for easier review. I tried splitting it even more and found out this is just enough not to increase complexity. - Also worked in some review comments from Jan and John v1: - https://www.redhat.com/archives/libvir-list/2016-June/msg01537.html Martin

[libvirt] [PATCH v2 5/5] qemu: Check for thread <=> memory alignment

2016-07-07 Thread Martin Kletzander
Some settings may be confusing and in case users use numad placement in combination with static placement we could warn them as it might not be wanted (but it's not forbidden). Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1254402 Signed-off-by: Martin Kletzander

[libvirt] [PATCH] qemu: caps: Always assume QEMU_CAPS_SMP_TOPOLOGY

2016-07-07 Thread Peter Krempa
Support for SMP topology was added by qemu commit dc6b1c09849484fbbc50 prior to 0.12.0, our minimum supported qemu version. $ git describe --tags dc6b1c09849484fbbc50803307e4c7a3d81eab62 v0.11.0-rc0-449-gdc6b1c0 $ git describe --tags --contains dc6b1c09849484fbbc50803307e4c7a3d81eab

Re: [libvirt] [PATCH 0/2] qemu: use -display none instead of -nographic

2016-07-07 Thread Michal Privoznik
On 07.07.2016 11:59, Michal Privoznik wrote: > On 05.07.2016 14:35, Paolo Bonzini wrote: >> -display none is preferrable to -nographic which (in addition to >> disabling graphics output) redirects the serial port to stdio and on >> OpenBIOS enables the firmware's serial console. >> >> Paolo

Re: [libvirt] [PATCH 0/2] qemu: use -display none instead of -nographic

2016-07-07 Thread Michal Privoznik
On 05.07.2016 14:35, Paolo Bonzini wrote: > -display none is preferrable to -nographic which (in addition to > disabling graphics output) redirects the serial port to stdio and on > OpenBIOS enables the firmware's serial console. > > Paolo Bonzini (2): > qemu: detect -display > qemu: generate

Re: [libvirt] [PATCH] virDomainHostdevDefFree: Don't leak privateData

2016-07-07 Thread Erik Skultety
On 07/07/16 11:43, Michal Privoznik wrote: > After 27726d8c21 a privateData is allocated in > virDomainHostdevDefAlloc(). However, the counter part - freeing > them in Free() is missing which leads to the following memory > leak: > > ==6489== 24 bytes in 1 blocks are definitely lost in loss

[libvirt] [PATCHv2] qemu: agent: Fix QEMU guest agent is not available due to an error

2016-07-07 Thread Xiubo Li
These days, we experienced one qemu guest agent is not available error. Then the guest agent couldn't be used forever before rebooting the libvirtd daemon or reboot the qemu-guest-agent in the VM(you can also reboot the VM) to clear the priv->agentError. This is one bug for a long time in many

[libvirt] [PATCH] virDomainHostdevDefFree: Don't leak privateData

2016-07-07 Thread Michal Privoznik
After 27726d8c21 a privateData is allocated in virDomainHostdevDefAlloc(). However, the counter part - freeing them in Free() is missing which leads to the following memory leak: ==6489== 24 bytes in 1 blocks are definitely lost in loss record 684 of 1,003 ==6489==at 0x4C2C070: calloc

Re: [libvirt] [PATCH] qemu: agent: Fix QEMU guest agent is not available due to an error

2016-07-07 Thread Xiubo Li
Hi, For this bug, by checking the object's type is valid or not will always be true. We should check for the object's value type instead. I will send the V2 patch. Thanks, BRs Xiubo On 07/07/2016 09:12, Xiubo Li wrote: Hi All, This patch I have test for more than 3 days using 5

Re: [libvirt] [PATCH 0/2] Introduce libvirt-libs.rpm

2016-07-07 Thread Michal Privoznik
On 01.07.2016 12:04, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Privoznik (2): > spec: Split libvirt-client > spec: Move virt-admin into its own package > > libvirt.spec.in | 90 > +++-- > 1 file changed, 56 insertions(+), 34