Re: [libvirt] [PATCH 3/3] libxl: implement virDomainInterfaceStats

2015-11-20 Thread Joao Martins
On 11/20/2015 07:25 PM, Jim Fehlig wrote: > On 11/19/2015 04:45 PM, Joao Martins wrote: >> Introduce support for domainInterfaceStats API call for querying >> network interface statistics. Consequently it also enables the >> use of `virsh domifstat ` command plus >> seeing the interfaces names i

Re: [libvirt] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-20 Thread Joao Martins
On 11/20/2015 07:05 PM, Jim Fehlig wrote: > On 11/19/2015 04:45 PM, Joao Martins wrote: > > You're not going to be happy with me... > >> This new field in libxlDomainObjPrivate is named "config" >> and is kept while the domain is active. > > While this sounded like a good idea when I mentioned

Re: [libvirt] [PATCH 3/3] qemu: MIPS{, 64} malta has a default IDE controller

2015-11-20 Thread Laine Stump
On 11/20/2015 03:20 PM, Guido Günther wrote: so handle it like I440FX --- src/qemu/qemu_command.c | 13 - src/qemu/qemu_domain.c | 8 src/qemu/qemu_domain.h | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu

Re: [libvirt] [PATCH 2/3] qemu: sparc64s sun4u has a default IDE controller

2015-11-20 Thread Laine Stump
On 11/20/2015 03:20 PM, Guido Günther wrote: --- src/qemu/qemu_command.c | 24 ++-- src/qemu/qemu_domain.c | 6 ++ src/qemu/qemu_domain.h | 1 + 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c inde

Re: [libvirt] [PATCH 1/3] qemu: PPCs G3Beige has a default IDE controller

2015-11-20 Thread Laine Stump
On 11/20/2015 03:20 PM, Guido Günther wrote: so handle it like I440FX --- src/qemu/qemu_command.c | 17 - src/qemu/qemu_domain.c | 7 +++ src/qemu/qemu_domain.h | 1 + 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/q

Re: [libvirt] [PATCH] qemu_agent: fix deadlock in qemuProcessHandleAgentEOF

2015-11-20 Thread John Ferlan
On 10/27/2015 05:45 PM, John Ferlan wrote: > > > On 10/02/2015 08:17 AM, John Ferlan wrote: >> >> >> On 09/26/2015 08:18 AM, Wang Yufei wrote: >>> We shutdown a VM A by qemu agent,meanwhile an agent EOF >>> of VM A happened, there's a chance that deadlock occurred: >>> >>> qemuProcessHandleAgen

Re: [libvirt] adding tests to qemu_driver

2015-11-20 Thread noxdafox
On 20/11/15 19:18, Jiri Denemark wrote: On Fri, Nov 20, 2015 at 14:10:49 +0200, NoxDaFox wrote: 2015-11-19 14:25 GMT+02:00 Jiri Denemark : On Fri, Nov 13, 2015 at 10:44:01 +0200, NoxDaFox wrote: 2015-11-13 0:30 GMT+02:00 Jiri Denemark : On Thu, Nov 12, 2015 at 23:47:54 +0200, noxdafox wrote

Re: [libvirt] [Xen-devel] [PATCH RFC] libxl: use libxl_event_wait to process libxl events

2015-11-20 Thread Jim Fehlig
On 11/20/2015 08:31 AM, Ian Campbell wrote: > On Fri, 2015-11-13 at 14:36 -0700, Jim Fehlig wrote: >> Prior to this patch, libxl events were delivered to libvirt via >> the libxlDomainEventHandler callback registered with libxl. >> Documenation in $xensrc/tools/libxl/libxl_event.h states that the >

[libvirt] [libvirt-glib v2 3/3] gobject: Port to GTask API

2015-11-20 Thread Zeeshan Ali (Khattak)
Drop usage of deprecated GSimpleAsyncResult API. --- libvirt-gobject/libvirt-gobject-domain.c| 273 +++ libvirt-gobject/libvirt-gobject-input-stream.c | 77 +++ libvirt-gobject/libvirt-gobject-output-stream.c | 75 +++ libvirt-gobject/libvirt-gobject-storage-

[libvirt] [libvirt-glib v2 1/3] gobject: Drop redundant glib compatibility code

2015-11-20 Thread Zeeshan Ali (Khattak)
We already require and use glib >= 2.36 so there is no reason to keep around code to ensure compatibility with glib older than that. --- libvirt-gobject/libvirt-gobject-compat.c | 87 libvirt-gobject/libvirt-gobject-compat.h | 73 --- 2 file

[libvirt] [libvirt-glib v2 2/3] gconfig: Drop redundant glib compatibility code

2015-11-20 Thread Zeeshan Ali (Khattak)
We already require and use glib >= 2.36 so there is no reason to keep around code to ensure compatibility with glib older than that. --- libvirt-gconfig/libvirt-gconfig-compat.h | 20 1 file changed, 20 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-compat.h b/lib

[libvirt] [libvirt-glib 2/3] gconfig: Drop redundant glib compatibility code

2015-11-20 Thread Zeeshan Ali (Khattak)
We already require and use glib >= 2.36 so there is no reason to keep around code to ensure compatibility with glib older than that. --- libvirt-gconfig/libvirt-gconfig-compat.h | 20 1 file changed, 20 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-compat.h b/lib

Re: [libvirt] [libvirt-glib 3/3] gobject: Port to GTask API

2015-11-20 Thread Zeeshan Ali (Khattak)
Hi, >> /** >> @@ -583,21 +588,22 @@ void gvir_domain_wakeup_async(GVirDomain *dom, >>GAsyncReadyCallback callback, >>gpointer user_data) >> { >> -GSimpleAsyncResult *res; >> +GTask *task; >> +DomainWakeupData *data; >> >

[libvirt] [PATCH 3/3] qemu: MIPS{, 64} malta has a default IDE controller

2015-11-20 Thread Guido Günther
so handle it like I440FX --- src/qemu/qemu_command.c | 13 - src/qemu/qemu_domain.c | 8 src/qemu/qemu_domain.h | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e467f9c..589aff5 100644 --- a/src/

[libvirt] [PATCH 0/3] qemu: Fix machines with built in IDE

2015-11-20 Thread Guido Günther
Hi, eadd757ccee0e72156a5345e6c25477aa057a9f1 introduced an error for machines with an unsupported IDE controller but missed some machine types. The attached three pathes fix this. Reference: http://bugs.debian.org/805189 Guido Günther (3): qemu: PPCs G3Beige has a default IDE controller qemu:

[libvirt] [PATCH 2/3] qemu: sparc64s sun4u has a default IDE controller

2015-11-20 Thread Guido Günther
--- src/qemu/qemu_command.c | 24 ++-- src/qemu/qemu_domain.c | 6 ++ src/qemu/qemu_domain.h | 1 + 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d6b7f09..e467f9c 100644 --- a/src/qemu/qemu_comma

[libvirt] [PATCH 1/3] qemu: PPCs G3Beige has a default IDE controller

2015-11-20 Thread Guido Günther
so handle it like I440FX --- src/qemu/qemu_command.c | 17 - src/qemu/qemu_domain.c | 7 +++ src/qemu/qemu_domain.h | 1 + 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ef5ef93..d6b7f09 100644 --- a/s

Re: [libvirt] [PATCH v4 08/10] Add iommu info for pci on mocked sysfs

2015-11-20 Thread Laine Stump
I'm responding to this only to say that is someone with prior experience with virpcimock.c could review it instead, that would be *much* better. (If not, I can come back and do it). On 11/14/2015 03:38 AM, Shivaprasad G Bhat wrote: The iommu group info can be used to check if the devices are b

Re: [libvirt] [PATCH 3/3] libxl: implement virDomainInterfaceStats

2015-11-20 Thread Jim Fehlig
On 11/19/2015 04:45 PM, Joao Martins wrote: > Introduce support for domainInterfaceStats API call for querying > network interface statistics. Consequently it also enables the > use of `virsh domifstat ` command plus > seeing the interfaces names instead of "-" when doing > `virsh domiflist `. > >

Re: [libvirt] [PATCH 1/3] libxl: add libxl_domain_config to libxlDomainObjPrivate

2015-11-20 Thread Jim Fehlig
On 11/19/2015 04:45 PM, Joao Martins wrote: You're not going to be happy with me... > This new field in libxlDomainObjPrivate is named "config" > and is kept while the domain is active. While this sounded like a good idea when I mentioned it, I'm now worried that the config will quickly become s

Re: [libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-20 Thread Shivaprasad G Bhat
On 11/20/2015 11:30 PM, Alex Williamson wrote: On Fri, 2015-11-20 at 12:24 -0500, Laine Stump wrote: On 11/20/2015 11:58 AM, Andrea Bolognani wrote: On Fri, 2015-11-20 at 11:33 -0500, Laine Stump wrote: Seems safe, but is this really what we want to do? I haven't read/understood the remaining

Re: [libvirt] [PATCH v4 07/10] Change the negative test case to try pciback instead of vfio-pci

2015-11-20 Thread Shivaprasad G Bhat
On 11/20/2015 10:35 PM, Laine Stump wrote: On 11/14/2015 03:37 AM, Shivaprasad G Bhat wrote: The next few patches implement the vfio-pci tests. So, change the test case to test the negative test case on pciback instead. Signed-off-by: Shivaprasad G Bhat --- tests/virpcimock.c |2 +- tes

Re: [libvirt] [PATCH v4 03/10] Refuse to reattach from vfio if the iommu group is in use by any domain

2015-11-20 Thread Shivaprasad G Bhat
On 11/20/2015 08:51 PM, Laine Stump wrote: On 11/14/2015 03:36 AM, Shivaprasad G Bhat wrote: > Refuse to reattach from vfio if the iommu group is in use by any domain util: refuse to reattach device if any device in the same group is in use by any domain It is incorrect to attempt the devic

[libvirt] ANNOUNCE: ruby-libvirt 0.6.0

2015-11-20 Thread Chris Lalancette
All, I'm pleased to release ruby-libvirt 0.6.0. ruby-libvirt is a ruby wrapper around the libvirt API. The changelog between 0.5.2 and 0.6.0 is: * Fix possible buffer overflow * Fix storage volume creation error messages * Add additional storage pool defines * Implement Network dhcp_

Re: [libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-20 Thread Alex Williamson
On Fri, 2015-11-20 at 12:24 -0500, Laine Stump wrote: > On 11/20/2015 11:58 AM, Andrea Bolognani wrote: > > On Fri, 2015-11-20 at 11:33 -0500, Laine Stump wrote: > >> Seems safe, but is this really what we want to do? I haven't > >> read/understood the remaining patches yet, but this makes it sound

Re: [libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-20 Thread Alex Williamson
On Fri, 2015-11-20 at 11:33 -0500, Laine Stump wrote: > On 11/14/2015 03:36 AM, Shivaprasad G Bhat wrote: > > The reprobe needs to be called multiple times for vfio devices for each > > device in the iommu group in future patch. So split the reprobe into a > > new function. No functional change. >

Re: [libvirt] [PATCH v4 04/10] Wait for vfio-pci device cleanups before reassinging the device to host driver

2015-11-20 Thread Alex Williamson
On Fri, 2015-11-20 at 12:26 +0530, Shivaprasad bhat wrote: > On Fri, Nov 20, 2015 at 4:54 AM, Alex Williamson > wrote: > > On Sat, 2015-11-14 at 14:06 +0530, Shivaprasad G Bhat wrote: > >> Before unbind from stub driver libvirt should be sure the guest is not > >> using > >> the device anymore. T

Re: [libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-20 Thread Laine Stump
On 11/20/2015 11:58 AM, Andrea Bolognani wrote: On Fri, 2015-11-20 at 11:33 -0500, Laine Stump wrote: Seems safe, but is this really what we want to do? I haven't read/understood the remaining patches yet, but this makes it sound like what is going to happen is that all of the devices will be un

Re: [libvirt] adding tests to qemu_driver

2015-11-20 Thread Jiri Denemark
On Fri, Nov 20, 2015 at 14:10:49 +0200, NoxDaFox wrote: > 2015-11-19 14:25 GMT+02:00 Jiri Denemark : > > > On Fri, Nov 13, 2015 at 10:44:01 +0200, NoxDaFox wrote: > > > 2015-11-13 0:30 GMT+02:00 Jiri Denemark : > > > > > > > On Thu, Nov 12, 2015 at 23:47:54 +0200, noxdafox wrote: > > > > > Greetin

Re: [libvirt] [PATCH v4 07/10] Change the negative test case to try pciback instead of vfio-pci

2015-11-20 Thread Laine Stump
On 11/14/2015 03:37 AM, Shivaprasad G Bhat wrote: The next few patches implement the vfio-pci tests. So, change the test case to test the negative test case on pciback instead. Signed-off-by: Shivaprasad G Bhat --- tests/virpcimock.c |2 +- tests/virpcitest.c |2 +- 2 files changed,

Re: [libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-20 Thread Andrea Bolognani
On Fri, 2015-11-20 at 11:33 -0500, Laine Stump wrote: > Seems safe, but is this really what we want to do? I haven't > read/understood the remaining patches yet, but this makes it sound like > what is going to happen is that all of the devices will be unbound from > vfio-pci immediately, so they ar

Re: [libvirt] [PATCH v4 05/10] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-20 Thread Laine Stump
On 11/14/2015 03:36 AM, Shivaprasad G Bhat wrote: The reprobe needs to be called multiple times for vfio devices for each device in the iommu group in future patch. So split the reprobe into a new function. No functional change. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 47 +

Re: [libvirt] [PATCH] Allow building lxc without virt-login-shell

2015-11-20 Thread Michal Privoznik
On 20.11.2015 17:09, Daniel P. Berrange wrote: > On Fri, Nov 20, 2015 at 04:42:56PM +0100, Cedric Bosdonnat wrote: >> On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote: >>> On 10.11.2015 00:28, Cédric Bosdonnat wrote: Add a configure option to disable virt-login-shell build even if lxc

Re: [libvirt] [PATCH 0/2] Address more nfs root-squash issues

2015-11-20 Thread Michal Privoznik
On 17.11.2015 16:50, John Ferlan wrote: > Fix a couple of more issues with an NFS root-squash environment. The > details are in the commit messages and bugzilla comments. > > NB: While using virFileOpenAs in the virStorageBackendVolOpen path and > checking for EACESS/EPERM afterwards may seem a bi

Re: [libvirt] [PATCH] Allow building lxc without virt-login-shell

2015-11-20 Thread Daniel P. Berrange
On Fri, Nov 20, 2015 at 04:42:56PM +0100, Cedric Bosdonnat wrote: > On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote: > > On 10.11.2015 00:28, Cédric Bosdonnat wrote: > > > Add a configure option to disable virt-login-shell build even if lxc is > > > enabled. > > > --- > > > configure.ac

Re: [libvirt] [PATCH] Use correct pci addresses during device-detach

2015-11-20 Thread Michal Privoznik
On 09.10.2015 07:58, Nitesh_Konkar wrote: > From: Nitesh_Konkar > > The attach-device on live and persistent copies can be done independently. > Thus devices can end up having different pci addresses in live and persistent > copies. The detach device should try to detach the device from their >

Re: [libvirt] [PATCH] Allow building lxc without virt-login-shell

2015-11-20 Thread Michal Privoznik
On 20.11.2015 16:42, Cedric Bosdonnat wrote: > On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote: >> On 10.11.2015 00:28, Cédric Bosdonnat wrote: >>> Add a configure option to disable virt-login-shell build even if lxc is >>> enabled. >>> --- >>> configure.ac | 14 ++ >>>

Re: [libvirt] [PATCH] Allow building lxc without virt-login-shell

2015-11-20 Thread Cedric Bosdonnat
On Fri, 2015-11-20 at 16:29 +0100, Michal Privoznik wrote: > On 10.11.2015 00:28, Cédric Bosdonnat wrote: > > Add a configure option to disable virt-login-shell build even if lxc is > > enabled. > > --- > > configure.ac | 14 ++ > > tools/Makefile.am | 12 ++-- > > 2 files

Re: [libvirt] [PATCH v4 10/10] Wait for iommmu device to go away before reprobing the host driver

2015-11-20 Thread Laine Stump
On 11/14/2015 03:39 AM, Shivaprasad G Bhat wrote: There could be a delay of 1 or 2 seconds before the vfio-pci driver is unbound and the device file /dev/vfio/ is actually removed. If the file exists, the host driver probing the device can lead to crash. So, wait and avoid the crash. If this is

Re: [libvirt] [PATCH] Allow building lxc without virt-login-shell

2015-11-20 Thread Michal Privoznik
On 10.11.2015 00:28, Cédric Bosdonnat wrote: > Add a configure option to disable virt-login-shell build even if lxc is > enabled. > --- > configure.ac | 14 ++ > tools/Makefile.am | 12 ++-- > 2 files changed, 20 insertions(+), 6 deletions(-) > > diff --git a/configure.ac

[libvirt] [PATCH 28/34] conf: Add helper to get pointer to a certain vCPU definition

2015-11-20 Thread Peter Krempa
Once more stuff will be moved into the vCPU data structure it will be necessary to get a specific one in some ocasions. Add a helper that will simplify this task. --- src/conf/domain_conf.c | 15 +++ src/conf/domain_conf.h | 4 src/libvirt_private.syms | 1 + 3 files changed

[libvirt] [PATCH 0/6] Add virtio-gpu & virgl support

2015-11-20 Thread Marc-André Lureau
The following series allow using virtio-gpu and virgl if qemu support it. Ths Spice bits are not yet in qemu 2.5, but should make it in 2.6 and I added the RFC patches that are expected to not change much. Marc-André Lureau (6): qemu: add virtio video device qemu: query virtio-gpu for virgl su

Re: [libvirt] [Xen-devel] [PATCH RFC] libxl: use libxl_event_wait to process libxl events

2015-11-20 Thread Ian Campbell
On Fri, 2015-11-13 at 14:36 -0700, Jim Fehlig wrote: > Prior to this patch, libxl events were delivered to libvirt via > the libxlDomainEventHandler callback registered with libxl. > Documenation in $xensrc/tools/libxl/libxl_event.h states that the > callback "may occur on any thread in which the a

[libvirt] [PATCH 3/6] tests: add qemu 2.5 caps test

2015-11-20 Thread Marc-André Lureau
Add check for virtio-gpu caps. Signed-off-by: Marc-André Lureau --- tests/qemucapabilitiesdata/caps_2.5.0-1.caps| 169 + tests/qemucapabilitiesdata/caps_2.5.0-1.replies | 4039 +++ tests/qemucapabilitiestest.c|1 + 3 files changed, 4209 insertions

[libvirt] [PATCH 1/6] qemu: add virtio video device

2015-11-20 Thread Marc-André Lureau
qemu 2.5 provides virtio video device. Similarly to other devices, it can be used with -vga virtio or -device virtio-vga for primary devices, or -device virtio-gpu for non-vga devices. Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in| 5 +++-- docs/schemas/doma

[libvirt] [PATCH 2/6] qemu: query virtio-gpu for virgl support

2015-11-20 Thread Marc-André Lureau
Check if virtio-gpu provides virgl option. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 8 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 15 +++- tests/qemucapabilitiesdata/caps_1.2.2-1.r

[libvirt] [PATCH 6/6] RFC tests: add virgl/spice qemuxml2argv test

2015-11-20 Thread Marc-André Lureau
Add a qemuxml2argv test for virtio-gpu + spice with virgl. Signed-off-by: Marc-André Lureau --- .../qemuxml2argv-video-virtio-gpu-virgl.args | 23 .../qemuxml2argv-video-virtio-gpu-virgl.xml| 32 ++ tests/qemuxml2argvtest.c

[libvirt] [PATCH 4/6] tests: add a few qemuxml2argv virtio-gpu tests

2015-11-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- .../qemuxml2argv-video-virtio-gpu-device.args | 23 + .../qemuxml2argv-video-virtio-gpu-device.xml | 29 ++ .../qemuxml2argv-video-virtio-gpu-nodevice.args| 24 ++ .../qemuxml2argv-video-virtio

[libvirt] [PATCH 5/6] RFC qemu: add spice opengl support

2015-11-20 Thread Marc-André Lureau
Add Spice graphics gl attribute. qemu 2.6 should have -spice gl=on argument to enable opengl rendering context. This is necessary to actually enable virgl rendering. Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in | 6 ++ docs/schemas/domaincommon.rng

[libvirt] [PATCH 09/34] conf: Add helper to check whether domain has offline vCPUs

2015-11-20 Thread Peter Krempa
The new helper will simplify checking whether the domain config contains inactive vCPUs. --- src/conf/domain_conf.c | 9 - src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + src/openvz/openvz_driver.c | 2 +- src/qemu/qemu_command.c| 4 ++-- src/vbox/vbox_common.c

[libvirt] [PATCH 04/34] xenapi: Refactor extraction of vcpu count

2015-11-20 Thread Peter Krempa
To simplify further refactors change the way the vcpu count is extracted to use a temp variable rather than juggling with def->maxvcpus. --- src/xenapi/xenapi_driver.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c

[libvirt] [PATCH 20/34] qemu: cpu hotplug: Fix error handling logic

2015-11-20 Thread Peter Krempa
The cpu hotplug helper functions used negative error handling in a part of them, although some code that was added later didn't properly set the error codes in some cases. This would cause improper error messages in cases where we couldn't modify the numa cpu mask and a few other cases. Fix the lo

[libvirt] [PATCH 30/34] qemu: Drop checking vcpu threads in emulator bandwidth getter/setter

2015-11-20 Thread Peter Krempa
The vCPU threads make sense in the counterparts that set the vCPU bandwidth/quota, not in the emulator one. The emulator tunables are set all the time anyways. Drop the extra check and remove the now unneeded vm argument. --- src/qemu/qemu_driver.c | 33 ++--- 1 file c

[libvirt] [v3] gobject: Add wrapper virDomainSetTime()

2015-11-20 Thread Zeeshan Ali (Khattak)
--- libvirt-gobject/libvirt-gobject-domain.c | 134 +++ libvirt-gobject/libvirt-gobject-domain.h | 15 +++- libvirt-gobject/libvirt-gobject.sym | 9 +++ 3 files changed, 157 insertions(+), 1 deletion(-) diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/l

[libvirt] [PATCH 24/34] qemu: Refactor qemuDomainHotplugVcpus

2015-11-20 Thread Peter Krempa
Refactor the code flow so that 'exit_monitor:' can be removed. This patch also moves the auditing and setting of the new vCPU count right to the place where the hotplug happens, since it's possible that the hotplug succeeds and adds a cpu while other stuff fails. Lastly, failures of qemuMonitorGe

[libvirt] [PATCH 16/34] qemu: domain: Add helper to access vm->privateData->agent

2015-11-20 Thread Peter Krempa
As in commit 88dc7e0c2fb, the helper can be used in cases where the function actually does not access anyting in the private data besides the agent. --- src/qemu/qemu_domain.c | 12 src/qemu/qemu_domain.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/qemu/qemu_domain.c b

[libvirt] [PATCH 31/34] qemu: Replace checking for vcpu<->pid mapping availability with a helper

2015-11-20 Thread Peter Krempa
Add qemuDomainHasVCpuPids to do the checking and replace in place checks with it. --- src/qemu/qemu_cgroup.c | 7 ++- src/qemu/qemu_domain.c | 15 +++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c | 29 + src/qemu/qemu_process.c | 7 --

[libvirt] [PATCH 26/34] conf: turn def->vcpus into a structure

2015-11-20 Thread Peter Krempa
To allow collecting all relevant data at one place let's make def->vcpus a structure and then we can start moving stuff into it. --- src/conf/domain_conf.c | 55 -- src/conf/domain_conf.h | 10 - 2 files changed, 58 insertions(+), 7 deletions

[libvirt] [PATCH 22/34] qemu: monitor: Remove weird return values from qemuMonitorSetCPU

2015-11-20 Thread Peter Krempa
Let the function report errors internally and change it to return standard return codes. --- src/qemu/qemu_driver.c | 22 -- src/qemu/qemu_monitor_json.c | 4 src/qemu/qemu_monitor_text.c | 22 +++--- 3 files changed, 15 insertions(+), 33 deletions(-

[libvirt] [PATCH 32/34] qemu: Add helper to retrieve vCPU pid

2015-11-20 Thread Peter Krempa
Instead of directly accessing the array add a helper to do this. --- src/qemu/qemu_cgroup.c | 3 ++- src/qemu/qemu_domain.c | 20 src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 7 --- src/qemu/qemu_process.c | 5 ++--- 5 files changed, 29 insertions(+), 7 d

[libvirt] [PATCH 12/34] conf: Replace writes to def->vcpus with accessor

2015-11-20 Thread Peter Krempa
--- src/conf/domain_conf.c | 25 +++-- src/conf/domain_conf.h | 1 + src/hyperv/hyperv_driver.c | 5 - src/libvirt_private.syms | 1 + src/libxl/libxl_driver.c | 14 +- src/openvz/openvz_conf.c | 3 ++- src/openvz/openvz_driver.c | 4 +++- src

[libvirt] [PATCH 18/34] qemu: qemuDomainSetVcpusAgent: re-check agent before calling it the again

2015-11-20 Thread Peter Krempa
With a very unfortunate timing, the agent might vanish before we do the second call while the locks were down. Re-check that the agent is available before attempting it again. --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_d

[libvirt] [PATCH 29/34] qemu: cgroup: Remove now unreachable check

2015-11-20 Thread Peter Krempa
Since commit 0c04906fa the check for priv->cgroup doesn't make sense as the calls to virCgroupHasController return the same information. Remove it and move it's comment partially to the new check. The already spurious check was also later copied to the iothreads code. --- src/qemu/qemu_cgroup.c |

[libvirt] [PATCH 15/34] conf: Turn def->maxvcpus into size_t

2015-11-20 Thread Peter Krempa
Later on this will also be used to track size of the vcpu data array. Use size_t so that we can utilize the memory allocation helpers. --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/

[libvirt] [PATCH 03/34] phyp: Refactor extraction of vcpu count

2015-11-20 Thread Peter Krempa
To simplify further refactors change the way the vcpu count is extracted to use a temp variable rather than juggling with def.maxvcpus. --- src/phyp/phyp_driver.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 2912fc

[libvirt] [PATCH 08/34] conf: Extract update of vcpu count if maxvcpus is decreased

2015-11-20 Thread Peter Krempa
The code can be unified into the new accessor rather than being scattered accross the drivers. --- src/conf/domain_conf.c | 3 +++ src/libxl/libxl_driver.c | 3 --- src/qemu/qemu_driver.c | 3 --- src/test/test_driver.c | 3 --- src/xen/xm_internal.c| 3 --- 5 files changed, 3 insertions

[libvirt] [PATCH 25/34] qemu: refactor qemuDomainHotunplugVcpus

2015-11-20 Thread Peter Krempa
Refactor the code flow so that 'exit_monitor:' can be removed. This patch moves the auditing functions into places where it's certain that hotunplug was or was not successful and reports errors from qemuMonitorGetCPUInfo properly. --- src/qemu/qemu_driver.c | 50 +++---

[libvirt] [PATCH 17/34] qemu: Extract vCPU onlining/offlining via agent into a separate function

2015-11-20 Thread Peter Krempa
Separate the code so that qemuDomainSetVcpusFlags contains only code relevant to hardware hotplug/unplug. --- src/qemu/qemu_driver.c | 137 +++-- 1 file changed, 77 insertions(+), 60 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_drive

[libvirt] [PATCH 19/34] qemu: Split up vCPU hotplug and hotunplug

2015-11-20 Thread Peter Krempa
There's only very little common code among the two operations. Split the functions so that the internals are easier to understand and refactor later. --- src/qemu/qemu_driver.c | 210 - 1 file changed, 136 insertions(+), 74 deletions(-) diff --git a

[libvirt] [PATCH 14/34] conf: Replace read accesses to def->vcpus with accessor

2015-11-20 Thread Peter Krempa
--- src/conf/domain_audit.c| 2 +- src/conf/domain_conf.c | 19 +-- src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + src/libxl/libxl_conf.c | 2 +- src/libxl/libxl_driver.c | 8 src/lxc/lxc_controller.c | 2 +- src/lxc/lxc_driver.c

[libvirt] [PATCH 07/34] conf: Replace writes to def->maxvcpus with accessor

2015-11-20 Thread Peter Krempa
To support further refactors replace all write access to def->maxvcpus with a accessor function. --- src/conf/domain_conf.c | 18 -- src/conf/domain_conf.h | 2 ++ src/hyperv/hyperv_driver.c | 5 - src/libvirt_private.syms | 1 + src/libxl/libxl_driver.c | 8 +++

[libvirt] [PATCH 21/34] qemu: monitor: Explain logic of qemuMonitorGetCPUInfo

2015-11-20 Thread Peter Krempa
The return value has non-obvious semantics. Document it. --- src/qemu/qemu_monitor.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 50c6549..cf7ecb6 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1606,6 +

[libvirt] [PATCH 34/34] qemu: cgroup: Don't use priv->ncpupids to iterate domain vCPUs

2015-11-20 Thread Peter Krempa
Use the proper data structures for the iteration since ncpupids will be made private later. --- src/qemu/qemu_cgroup.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index d8a2b03..06c20c1 100644 --- a/src/qemu/qe

[libvirt] [PATCH 23/34] qemu: cpu hotplug: Move loops to qemuDomainSetVcpusFlags

2015-11-20 Thread Peter Krempa
qemuDomainHotplugVcpus/qemuDomainHotunplugVcpus are complex enough in regards of adding one CPU. Additionally it will be desired to reuse those functions later with specific vCPU hotplug. Move the loops for adding vCPUs into qemuDomainSetVcpusFlags so that the helpers can be made simpler and more

[libvirt] [PATCH 05/34] conf: Use local copy of maxvcpus in virDomainVcpuParse

2015-11-20 Thread Peter Krempa
Use the local variable rather than getting it all the time from the struct. This will simplify further refactors. --- src/conf/domain_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0ac7dbf..3c8a926 100644 --- a

[libvirt] [PATCH 11/34] conf: Replace read access to def->maxvcpus with accessor

2015-11-20 Thread Peter Krempa
Finalize the refactor by adding the 'virDomainDefGetVCpusMax' getter and reusing it accross libvirt. --- src/conf/domain_conf.c | 22 +++--- src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + src/libxl/libxl_conf.c | 4 ++-- src/libxl/libxl_driver.c |

[libvirt] [PATCH 33/34] qemu: driver: Refactor qemuDomainHelperGetVcpus

2015-11-20 Thread Peter Krempa
Change some of the control structures and switch to using the new vcpu structure. --- src/qemu/qemu_driver.c | 77 -- 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c659328..b9f8e

[libvirt] [PATCH 27/34] conf: ABI: Split up and improve vcpu info ABI checking

2015-11-20 Thread Peter Krempa
Extract the checking code into a separate function and prepare the infrastructure for checking the new structure type. --- src/conf/domain_conf.c | 41 ++--- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain

[libvirt] [PATCH 13/34] conf: Move vcpu count check into helper

2015-11-20 Thread Peter Krempa
--- src/conf/domain_conf.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d8c1068..3062b3a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1461,6 +1461,13 @@ int virDomainDefSetVCpus(vir

[libvirt] [PATCH 10/34] conf: Assume at least 1 maximum and current vCPU for every conf

2015-11-20 Thread Peter Krempa
Set new domain configs to contain at least 1 vCPU add a check that maximum vCPU count isn't set to 0 and remove unnecesary checks. The openvz test suite change is necessary since the test case generates the config via virDomainDefNew but does not set the vCPU info. With the change to virDomainDefN

[libvirt] [PATCH 06/34] conf: Drop useless check when parsing cpu scheduler info

2015-11-20 Thread Peter Krempa
The checked predicate is a deduction from the following checks: 1) maximum cpu id is checked for every parsed element 2) the resulting bitmaps are checked for overlaps 3) there has to be at least one cpu per >From the above checks we can indeed deduce that if we have one element per CPU we wil

[libvirt] [PATCH 02/34] openvz: Refactor extraction of vcpu count

2015-11-20 Thread Peter Krempa
To simplify further refactors change the way the vcpu count is extracted to use a temp variable rather than juggling with def->maxvcpus. --- src/openvz/openvz_conf.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c

Re: [libvirt] [PATCH v4 03/10] Refuse to reattach from vfio if the iommu group is in use by any domain

2015-11-20 Thread Laine Stump
On 11/14/2015 03:36 AM, Shivaprasad G Bhat wrote: > Refuse to reattach from vfio if the iommu group is in use by any domain util: refuse to reattach device if any device in the same group is in use by any domain It is incorrect to attempt the device reattach of a function, s/function/devic

[libvirt] [PATCH 01/34] hyperv: Allocate 'def' via virDomainDefNew

2015-11-20 Thread Peter Krempa
Use the helper that is necessary to fill out some values rather than allocating it directly. --- src/hyperv/hyperv_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 1958bbe..72261df 100644 --- a/src/hyperv/hyp

[libvirt] [PATCH 00/34] Prepare for specific vcpu hot(un)plug - part 1

2015-11-20 Thread Peter Krempa
This series is getting rather big. The target is to refactor the way libvirt stores info about vCPUs into a single structure (okay, two structures for the qemu driver. Part 1 is not yet completely there, well, not even halfway. Future work will involve fully allocating priv->vcpupids to the maxcpu

Re: [libvirt] [PATCH v4 01/10] Implement virPCIIsKnownStub function

2015-11-20 Thread Laine Stump
On 11/14/2015 03:34 AM, Shivaprasad G Bhat wrote: The checks to known stubs can be easily done having this implementation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/util/vir

Re: [libvirt] [PATCH v4 02/10] Add iommu group number info to virPCIDevice

2015-11-20 Thread Laine Stump
On 11/14/2015 03:35 AM, Shivaprasad G Bhat wrote: The iommu group number need not be fetched from the sysfs everytime as it remains constant. Fetch it once during allocation. Signed-off-by: Shivaprasad G Bhat --- src/util/virpci.c |5 + 1 file changed, 5 insertions(+) diff --git a/s

Re: [libvirt] [PATCH 2/3] Simplify qemuSetupChrSourceCgroup and its callers

2015-11-20 Thread John Ferlan
On 11/20/2015 05:04 AM, Ján Tomko wrote: > The domain definition is not needed in any of these functions. > Only pass it to qemuSetupChardevCgroup, which is used as a callback > for virDomainChrDefForeach. > > Use the right type for passing virDomainObjPtr instead of > void* where possible. > --

Re: [libvirt] [PATCH 3/3] qemuSetupChrSourceCgroup: rename dev to source

2015-11-20 Thread John Ferlan
On 11/20/2015 05:04 AM, Ján Tomko wrote: > We do not have a pointer to the device here, just its source. > --- > src/qemu/qemu_cgroup.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > ACK John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mail

Re: [libvirt] [PATCH 1/3] rename qemuSetupHostdevCGroup to qemuSetupHostdevCgroup

2015-11-20 Thread John Ferlan
On 11/20/2015 05:04 AM, Ján Tomko wrote: > Change CGroup to Cgroup to match other functions in the file. > --- > src/qemu/qemu_cgroup.c | 4 ++-- > src/qemu/qemu_cgroup.h | 2 +- > src/qemu/qemu_hotplug.c | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) > ACK (although qemu_hot

Re: [libvirt] [PATCH 3/3] security_selinux: fix indentation

2015-11-20 Thread John Ferlan
On 11/20/2015 05:00 AM, Ján Tomko wrote: > --- > src/security/security_selinux.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > ACK John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/3] security: remove extra security from function names

2015-11-20 Thread John Ferlan
On 11/20/2015 05:00 AM, Ján Tomko wrote: > Many of the functions follow the pattern: > virSecurity.*Security.*Label > > Remove the second 'Security' from the names, it should be obvious > that the virSecurity* functions deal with security labels even > without it. > --- > src/security/security_

[libvirt] [PATCH] vz: implementation of domainCreateXML callback

2015-11-20 Thread Mikhail Feoktistov
--- src/vz/vz_driver.c | 33 + 1 file changed, 33 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 39f58a4..31dfb6a 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -979,6 +979,38 @@ vzDomainUndefine(virDomainPtr domain) retu

Re: [libvirt] [PATCH 1/3] security_dac: check if virSecurityDACGetIds returns negative

2015-11-20 Thread John Ferlan
On 11/20/2015 05:00 AM, Ján Tomko wrote: > Use the customary check '< 0' instead of checking for non-zero. > > No functional change. > --- > src/security/security_dac.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/security/security_dac.c b/src/security/security_

[libvirt] [PATCH v2] conf: Split virDomainObjList into a separate file

2015-11-20 Thread Michal Privoznik
Our domain_conf.* files are big enough. Not only they contain XML parsing code, but they served as a storage of all functions whose name is virDomain prefixed. This is just wrong as it gathers not related functions (and modules) into one big file which is then harder to maintain. Split virDomainObj

Re: [libvirt] [PATCH 2/2] vbox: Resolve Coverity CHECKED_RETURN

2015-11-20 Thread John Ferlan
On 11/20/2015 05:30 AM, Ján Tomko wrote: > On Thu, Nov 19, 2015 at 06:15:39PM +0100, Peter Krempa wrote: >> On Thu, Nov 19, 2015 at 09:43:25 -0500, John Ferlan wrote: >>> >>> >>> On 11/19/2015 09:20 AM, Ján Tomko wrote: On Thu, Nov 19, 2015 at 09:06:05AM -0500, John Ferlan wrote: > Other

Re: [libvirt] adding tests to qemu_driver

2015-11-20 Thread NoxDaFox
2015-11-19 14:25 GMT+02:00 Jiri Denemark : > On Fri, Nov 13, 2015 at 10:44:01 +0200, NoxDaFox wrote: > > 2015-11-13 0:30 GMT+02:00 Jiri Denemark : > > > > > On Thu, Nov 12, 2015 at 23:47:54 +0200, noxdafox wrote: > > > > Greetings, > > > > > > > > I was investigating on an issue in which QEMU's dy

[libvirt] [PATCH] vz: allow to boot VM from cdrom

2015-11-20 Thread Mikhail Feoktistov
--- src/vz/vz_sdk.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 750133d..9bdf7aa9a 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2023,8 +2023,9 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDo

Re: [libvirt] [PATCH 0/8] qemu: add support for virtio-input devices

2015-11-20 Thread Ján Tomko
On Fri, Nov 20, 2015 at 11:23:01AM +0100, Gerd Hoffmann wrote: > On Fr, 2015-11-20 at 09:59 +0100, Ján Tomko wrote: > > Support virtio-keyboard, virtio-mouse, virtio-tablet and virtio-input-host. > > > > Requires kernel 4.1+ in the guest. > > Looks good to me. > > One question: Does this work w

Re: [libvirt] Found mem leak in livirt, need help to debug

2015-11-20 Thread Piotr Rybicki
I've seen some of theese already. The bug is actually not in libvirt but in gluster's libgfapi library, so any change in libvirt won't help. This was tracked in gluster as: https://bugzilla.redhat.com/show_bug.cgi?id=1093594 I suggest you update the gluster library to resolve this issue. P

  1   2   >