Re: [libvirt] [PATCH 02/10] qemu: always build id when generate shared memory device CLI

2015-07-03 Thread Martin Kletzander
On Wed, Jun 17, 2015 at 11:56:13AM +0800, Luyao Huang wrote: When hot-unplug the device, qmp command device_del require a device id. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c| 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 16

Re: [libvirt] [PATCH 2/2] qemu_driver: remove duplicate code

2015-07-03 Thread Pavel Hrdina
On Fri, Jul 03, 2015 at 02:01:46PM +0200, Erik Skultety wrote: On 01/07/15 12:05, Pavel Hrdina wrote: The copy of persistent definition is already done in virDomainLiveConfigHelperMethod few lines above. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/qemu/qemu_driver.c |

Re: [libvirt] [PATCH v3 2/2] Storage : Fix cloning of raw, sparse volumes

2015-07-03 Thread Ján Tomko
On Fri, Jun 26, 2015 at 05:13:26PM +0530, Prerna Saxena wrote: When virsh vol-clone is attempted on a raw file where capacity allocation, the resulting cloned volume has a size that matches the virtual-size of the parent; in place of matching its actual, disk size. This patch fixes the cloned

[libvirt] [PATCHv4 0/2] Fix cloning of sparse raw volumes

2015-07-03 Thread Ján Tomko
v3: https://www.redhat.com/archives/libvir-list/2015-June/msg01422.html v4: * introduces a new no-op patch changing the calculation of remaining allocation * allows partial allocation of new volumes on systems without fallocate Ján Tomko (1): Rewrite allocation tracking when cloning volumes

[libvirt] [libvirt-glib] gobject: Remove redundant virtual functions

2015-07-03 Thread Zeeshan Ali (Khattak)
These virtual functions were most likely a result of copypaste error. --- libvirt-gobject/libvirt-gobject-network.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject-network.h b/libvirt-gobject/libvirt-gobject-network.h index 5617ed6..8c31af4

Re: [libvirt] [libvirt-glib] gobject: Remove redundant virtual functions

2015-07-03 Thread Daniel P. Berrange
On Fri, Jul 03, 2015 at 03:17:42PM +0100, Zeeshan Ali (Khattak) wrote: These virtual functions were most likely a result of copypaste error. --- libvirt-gobject/libvirt-gobject-network.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[libvirt] [PATCHv4 1/2] Rewrite allocation tracking when cloning volumes

2015-07-03 Thread Ján Tomko
Instead of storing the remaining bytes, store the position of the first unallocated byte. This will allow changing the amount of bytes copied by virStorageBackendCopyToFD without changing the safezero call. No functional impact. --- src/storage/storage_backend.c | 10 ++ 1 file changed,

Re: [libvirt] [PATCH] Fix nodeinfo output on PPC64 KVM hosts

2015-07-03 Thread Andrea Bolognani
On Wed, 2015-07-01 at 19:26 +0530, Shivaprasad bhat wrote: I have posted the v2 as per your suggestions. Also added test case to test the nodeinfo. I moved the ioctl to a new function to help mocking it for testing. Hi Shivaprasad, I've just posted a reworked patch set; the changes are

Re: [libvirt] [PATCH 01/10] qemu: auto assign pci address for shared memory device

2015-07-03 Thread Martin Kletzander
On Wed, Jun 17, 2015 at 11:56:12AM +0800, Luyao Huang wrote: Shared memory device is base on PCI address, even we do not pass the pci address to qemu, qemu will auto assign a pci address for it. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c| 11

[libvirt] Avoid XSS vulnerability on the search engine

2015-07-03 Thread Daniel Veillard
Raised by https://www.xssposed.org/incidents/69566/ Need to escape the user provided query before displaying it back I pushed immediately as this was made public, Daniel diff --git a/docs/search.php.code.in b/docs/search.php.code.in index df25cd6..84f8759 100644 --- a/docs/search.php.code.in

Re: [libvirt] [PATCH 0/7] Address some Coverity found issues

2015-07-03 Thread John Ferlan
On 07/02/2015 05:30 AM, Michal Privoznik wrote: On 01.07.2015 16:03, John Ferlan wrote: I'm picking a random Coverity thread to express my latest thoughts on this. I'm not trying to say the problems I'm raising are necessarily introduced here in this patch set. We've seen quite a lot

[libvirt] [PATCH v3 0/2] Fix nodeinfo output on PPC64 KVM hosts

2015-07-03 Thread Andrea Bolognani
I have reworked the original code quite a bit, while maintaining the same logic and hopefully introducing no bugs of my own :) Notable changes from v2 to v3: * the function to get the number of threads per subcore has been moved to the from virarch.c, which deals with architecture

[libvirt] [PATCH v3 1/2] Fix nodeinfo output on PPC64 KVM hosts

2015-07-03 Thread Andrea Bolognani
From: Shivaprasad G Bhat sb...@linux.vnet.ibm.com The nodeinfo is reporting incorrect number of cpus and incorrect host topology on PPC64 KVM hosts. The KVM hypervisor on PPC64 needs only the primary thread in a core to be online, and the secondaries offlined. While scheduling a guest in, the kvm

Re: [libvirt] [PATCH v2 4/4] qemu_hotplug: try harder to eject media

2015-07-03 Thread Pavel Hrdina
On Wed, Jul 01, 2015 at 05:39:49PM -0400, John Ferlan wrote: On 06/29/2015 11:17 AM, Pavel Hrdina wrote: Some guests lock the tray and QEMU eject command will simply fail to eject the media. But the guest OS can handle this attempt to eject the media and can unlock the tray and open

[libvirt] [RFC] Design: Tunnelled NBD block disk migration

2015-07-03 Thread Pavel Boldin
Dear All, I continue my work on the tunnelled selective block disks migration and the next step is to implement Tunnelled NBD block disk migration. As far as I see libvirt uses the following algorithm for tunnelling the QEMU migration stream that is unidirectional: 1. The

Re: [libvirt] [PATCH 03/10] qemu: Refactor creation of shared memory device commandline

2015-07-03 Thread Martin Kletzander
On Wed, Jun 17, 2015 at 11:56:14AM +0800, Luyao Huang wrote: Rename qemuBuildShmemDevCmd to qemuBuildShmemDevStr and change the return type so that it can be reused in the device hotplug code later. And split the chardev creation part in a new function qemuBuildShmemBackendStr for reused in the

[libvirt] [PATCHv4 2/2] Fix cloning of raw, sparse volumes

2015-07-03 Thread Ján Tomko
From: Prerna Saxena pre...@linux.vnet.ibm.com When virsh vol-clone is attempted on a raw file where capacity allocation, the resulting cloned volume has a size that matches the virtual-size of the parent; in place of matching its actual, disk size. This patch fixes the cloned disk to have same

Re: [libvirt] [libvirt-glib] gobject: Remove redundant virtual functions

2015-07-03 Thread Daniel P. Berrange
On Fri, Jul 03, 2015 at 04:43:15PM +0100, Zeeshan Ali (Khattak) wrote: On Fri, Jul 3, 2015 at 3:35 PM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Jul 03, 2015 at 03:17:42PM +0100, Zeeshan Ali (Khattak) wrote: These virtual functions were most likely a result of copypaste error.

Re: [libvirt] [PATCH] vz: fix building capabilities

2015-07-03 Thread Maxim Nestratov
03.07.2015 19:00, Dmitry Guryanov пишет: There should be at least one domain for each guest in cababilities. And in current code we don't add domain for this guest for example. if ((guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM,

[libvirt] [PATCH] virt-aa-helper: add unix channels for nserials as well

2015-07-03 Thread Serge Hallyn
Commit 03d7462d added it for channels, but it is also needed for serials. Add it for serials, parallels, and consoles as well. This solves https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1015154 Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/security/virt-aa-helper.c | 12

Re: [libvirt] [libvirt-glib] gobject: Remove redundant virtual functions

2015-07-03 Thread Zeeshan Ali (Khattak)
On Fri, Jul 3, 2015 at 3:35 PM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Jul 03, 2015 at 03:17:42PM +0100, Zeeshan Ali (Khattak) wrote: These virtual functions were most likely a result of copypaste error. --- libvirt-gobject/libvirt-gobject-network.h | 5 + 1 file changed,

[libvirt] [PATCH v2] vz: fix building capabilities

2015-07-03 Thread Dmitry Guryanov
There should be at least one domain for each guest in cababilities. And in current code we don't add domain for this guest for example. if ((guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,

Re: [libvirt] [PATCH] vz: fix building capabilities

2015-07-03 Thread Dmitry Guryanov
On 07/03/2015 08:22 PM, Maxim Nestratov wrote: 03.07.2015 19:00, Dmitry Guryanov пишет: There should be at least one domain for each guest in cababilities. And in current code we don't add domain for this guest for example. if ((guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM,

[libvirt] [PATCH] rpc: ensure daemon is spawn even if dead socket exists

2015-07-03 Thread Daniel P. Berrange
The auto-spawn code would originally attempt to spawn the daemon for both ENOENT and ECONNREFUSED errors from connect(). The various refactorings eventually lost this so we only spawn the daemon on ENOENT. The result is if the daemon exits uncleanly, so that the socket is left in the filesystem,

[libvirt] [PATCH] vz: fix building capabilities

2015-07-03 Thread Dmitry Guryanov
There should be at least one domain for each guest in cababilities. And in current code we don't add domain for this guest for example. if ((guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_X86_64,

Re: [libvirt] [PATCH 1/2] qemu_driver: live/config checks cleanup

2015-07-03 Thread Erik Skultety
On 01/07/15 12:05, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/qemu/qemu_driver.c | 79 ++ 1 file changed, 9 insertions(+), 70 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH] qemu: move the guest status check before agent config and status check

2015-07-03 Thread Luyao Huang
When use setvcpus command with --guest option to a offline vm, we will get error: # virsh setvcpus test3 1 --guest error: Guest agent is not responding: QEMU guest agent is not connected However guest is not running, agent status could not be connected. In this case, report domain is not

Re: [libvirt] [PATCH] lxc: Bind mount container TTYs

2015-07-03 Thread Martin Kletzander
On Tue, Jun 23, 2015 at 04:38:57PM +0200, Richard Weinberger wrote: Instead of creating symlinks, bind mount the devices to /dev/pts/XY. Using bind mounts it is no longer needed to add pts devices to files like /dev/securetty. Signed-off-by: Richard Weinberger rich...@nod.at ---

Re: [libvirt] [PATCH 2/2] qemu_driver: remove duplicate code

2015-07-03 Thread Erik Skultety
On 01/07/15 12:05, Pavel Hrdina wrote: The copy of persistent definition is already done in virDomainLiveConfigHelperMethod few lines above. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/qemu/qemu_driver.c | 6 -- 1 file changed, 6 deletions(-) diff --git