[libvirt] [PATCH 4/9] Add newDomain parameter to qemuDomainAssignAddresses

2015-08-12 Thread Ján Tomko
To differentiate a new domain from an existing one. --- src/qemu/qemu_command.c | 5 - src/qemu/qemu_command.h | 3 ++- src/qemu/qemu_driver.c | 22 +++--- src/qemu/qemu_process.c | 6 +++--- tests/qemuhotplugtest.c | 2 +- tests/qemuxml2argvtest.c | 2 +-

[libvirt] [PATCH 2/9] Remove unused virDomainVirtioSerialAddrSetRemoveController

2015-08-12 Thread Ján Tomko
This function was never used. Also mark virDomainVirtioSerialAddrSetAddController as static. --- src/conf/domain_addr.c | 23 +-- src/conf/domain_addr.h | 8 src/libvirt_private.syms | 2 -- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git

[libvirt] [PATCH 3/9] Store USB port path as an array of integers

2015-08-12 Thread Ján Tomko
In preparation to tracking which USB addresses are occupied. Introduce two helper functions for printing the port path as a string and appending it to a virBuffer. --- src/conf/domain_addr.c | 25 + src/conf/domain_addr.h | 8 src/conf/domain_conf.c | 29

[libvirt] [PATCH 0/9] qemu: assign addresses to USB devices

2015-08-12 Thread Ján Tomko
For https://bugzilla.redhat.com/show_bug.cgi?id=1215968 For domains started without the addresses specified on the command line, QEMU makes up the addresses and adds USB hubs if the device is added to the second-to-last USB port. A domain started with these exact ports and hubs specified on the

[libvirt] [PATCH 6/9] Add functions for adding usb controllers to addrs

2015-08-12 Thread Ján Tomko
--- src/conf/domain_addr.c | 88 src/conf/domain_addr.h | 4 +++ src/libvirt_private.syms | 1 + 3 files changed, 93 insertions(+) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 3962357..024d47b 100644 ---

Re: [libvirt] [PATCH] util: Remove empty resource partition created by libvirt

2015-08-12 Thread Michal Privoznik
On 12.08.2015 07:39, Nikunj A Dadhania wrote: Hi Daniel, Daniel P. Berrange berra...@redhat.com writes: On Tue, Aug 11, 2015 at 04:57:15PM +0530, Nikunj A Dadhania wrote: The default resource partition is created in the domain start path if it is not existing. Even when libvirtd is

[libvirt] [PATCH 8/9] Assign addresses to USB devices

2015-08-12 Thread Ján Tomko
Automatically assign addresses to USB devices. Just like reserving, this is only done for newly defined domains. https://bugzilla.redhat.com/show_bug.cgi?id=1215968 --- src/conf/domain_addr.c | 88 +- src/conf/domain_addr.h

[libvirt] [PATCH 7/9] Reserve existing USB addresses

2015-08-12 Thread Ján Tomko
If USB addresses have been provided for all USB devices, or we are defining a new domain, reserve the addresses. Check if they fit on the USB controllers the domain has, and error out if two devices try to use the same address. Do not error out on missing hubs. The input-usbmouse test used

[libvirt] [PATCH 1/9] Remove dead code from qemuDomainAttachControllerDevice

2015-08-12 Thread Ján Tomko
We only support hotplugging SCSI controllers, USB and virtio-serial related code is useless here. --- src/qemu/qemu_hotplug.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index aabdb78..8e38153 100644 ---

[libvirt] [PATCH 9/9] Assign addresses on USB device hotplug

2015-08-12 Thread Ján Tomko
USB disks, redirected devices, host devices and serial devices are supported. --- src/conf/domain_addr.c | 34 +++ src/conf/domain_addr.h | 4 +++ src/libvirt_private.syms | 1 +

[libvirt] [PATCH 5/9] Introduce virDomainUSBAddressSet

2015-08-12 Thread Ján Tomko
A new type to track USB addresses. The buses in virDomainUSBAddressSet correspond to USB controllers. They are represented by the virDomainUSBAddressHub type, having nports USB ports. These can contain nested hubs (nports != 0), or they can be occupied by other USB devices (with nports = 0). ---

Re: [libvirt] [PATCH] util: Remove empty resource partition created by libvirt

2015-08-12 Thread Daniel P. Berrange
On Wed, Aug 12, 2015 at 11:09:12AM +0530, Nikunj A Dadhania wrote: Hi Daniel, Daniel P. Berrange berra...@redhat.com writes: On Tue, Aug 11, 2015 at 04:57:15PM +0530, Nikunj A Dadhania wrote: The default resource partition is created in the domain start path if it is not existing. Even

Re: [libvirt] [PATCH] Revert qemu: Allow to plug virtio-net-pci into PCIe slot

2015-08-12 Thread Laine Stump
On 08/12/2015 03:54 AM, Pavel Fedin wrote: This reverts commit ede34470fde19c0f326cdb0dfca39fa86fd9ec16, which was apparently written based on testing performed before commits 1e15be1 and 9a12b6 were pushed upstream. Once those two patches are in place, commit ede34470 is redundant, Tested

Re: [libvirt] [PATCH] conf: Remove 'vmdef' from virDomainHostdevDefParseXML

2015-08-12 Thread Laine Stump
On 08/12/2015 04:35 PM, John Ferlan wrote: Since it's not used, let's remove it to avoid any future usage. I came in prepared to say let's save it for the sake of consistency with other similar functions. But then I looked at all the device parsing functions called by virDomainDeviceDefParse(),

[libvirt] [PATCH] conf: Remove 'vmdef' from virDomainHostdevDefParseXML

2015-08-12 Thread John Ferlan
Since it's not used, let's remove it to avoid any future usage. Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b743bdd..f66fccd 100644 ---

Re: [libvirt] [PATCH v2 12/12] conf: Check for hostdev conflicts when assign default disk address

2015-08-12 Thread John Ferlan
... After looking through the code and thinking more about this - using virDomainDefPostParse won't work for the hotplug case since it's only going through virDomainDeviceDefParse and virDomainDeviceDefPostParse code in order to validate whether the address (whether provided or generated)

[libvirt] [PATCH] conf: Check for attach disk usage of iothread=0

2015-08-12 Thread John Ferlan
Since iothreadid = 0 is invalid, we need to check for it when attempting to add a disk; otherwise, someone would think/believe their attempt to add an IOThread to the disk would succeed. Luckily other code ignored things when -iothread == 0... Signed-off-by: John Ferlan jfer...@redhat.com ---

Re: [libvirt] [PATCH 6/9] Add functions for adding usb controllers to addrs

2015-08-12 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: --- src/conf/domain_addr.c | 88 src/conf/domain_addr.h | 4 +++ src/libvirt_private.syms | 1 + 3 files changed, 93 insertions(+) Ran the series through Coverity as a first pass...

Re: [libvirt] [PATCH 9/9] Assign addresses on USB device hotplug

2015-08-12 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: USB disks, redirected devices, host devices and serial devices are supported. --- src/conf/domain_addr.c | 34 +++ src/conf/domain_addr.h | 4 +++ src/libvirt_private.syms

[libvirt] [PATCH] qemu: fix not update weight in def after success

2015-08-12 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1253107 Update the weight in vm def to fix this. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a984a8..0b984dc

[libvirt] [libvirt-test-api][PATCH 3/3] Add a new test case for ioThreadInfo

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 repos/domain/info_iothread.py | 80 +++ 2 files changed, 86 insertions(+) create mode 100644 repos/domain/info_iothread.py diff --git a/cases/linux_domain.conf

[libvirt] [libvirt-test-api][PATCH 2/3] Add new test case for API pinIOThread

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 ++ repos/domain/pin_iothread.py | 158 +++ 2 files changed, 164 insertions(+) create mode 100644 repos/domain/pin_iothread.py diff --git a/cases/linux_domain.conf

[libvirt] [libvirt-test-api][PATCH 1/3] Introduce new test case for add/del IOthread

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 +++ repos/domain/add_del_iothread.py | 82 2 files changed, 88 insertions(+) create mode 100644 repos/domain/add_del_iothread.py diff --git a/cases/linux_domain.conf

Re: [libvirt] [PATCH v5 0/4] qemu: Allow PCI virtio on ARM virt machine

2015-08-12 Thread Pavel Fedin
Hello! I was a bit confused about the patches that landed; I see now that they only add a PCI controller for modern -M virt, but don't change the virtio defaults to use it. Yes, because in first versions i changed the default and was criticized for it, because it broke backwards

Re: [libvirt] [PATCH] domain: Fix crash if trying to live update disk serial

2015-08-12 Thread Martin Kletzander
On Tue, Aug 11, 2015 at 05:37:30PM -0400, Cole Robinson wrote: On 08/11/2015 05:32 PM, John Ferlan wrote: On 08/11/2015 05:28 PM, Cole Robinson wrote: On 08/11/2015 05:25 PM, John Ferlan wrote: On 08/10/2015 07:33 PM, Cole Robinson wrote: If you pass diskserial XML to UpdateDevice, and

Re: [libvirt] [PATCH 1/2] virsh: Refactor parseRateStr to avoid false-positive uninitialized variable

2015-08-12 Thread Peter Krempa
On Wed, Aug 12, 2015 at 10:21:39 +0200, Michal Privoznik wrote: On 12.08.2015 07:45, Peter Krempa wrote: Commit 6983d6d2 tried to improve parseRateStr but broke the build instead for compilers that were not able to properly introspect the for loop indexed by the enum resulting into the

Re: [libvirt] [PATCH] Revert qemu: Allow to plug virtio-net-pci into PCIe slot

2015-08-12 Thread Pavel Fedin
Hello! This reverts commit ede34470fde19c0f326cdb0dfca39fa86fd9ec16, which was apparently written based on testing performed before commits 1e15be1 and 9a12b6 were pushed upstream. Once those two patches are in place, commit ede34470 is redundant, and can even cause incorrect/unexpected

Re: [libvirt] [PATCH 1/2] virsh: Refactor parseRateStr to avoid false-positive uninitialized variable

2015-08-12 Thread Michal Privoznik
On 12.08.2015 07:45, Peter Krempa wrote: Commit 6983d6d2 tried to improve parseRateStr but broke the build instead for compilers that were not able to properly introspect the for loop indexed by the enum resulting into the following error: virsh-domain.c: In function 'parseRateStr':

Re: [libvirt] [PATCH 2/2] virsh: Properly reject 'floor' settings in cmdAttachInterface

2015-08-12 Thread Michal Privoznik
On 12.08.2015 07:45, Peter Krempa wrote: cmdAttachInterface doesn't support the 'floor' field that was added in d7f5c88961b52 but that commit didn't properly reject it from cmdAttachInterface where it's unused. --- tools/virsh-domain.c | 8 ++-- 1 file changed, 6 insertions(+), 2

Re: [libvirt] [RFC] libvirt-admin: Mark symbols as local

2015-08-12 Thread Martin Kletzander
On Tue, Aug 11, 2015 at 09:24:59PM +0200, Guido Günther wrote: Otherwise we're leaking some 30+ symbols like virAdmConnectClass virAdmConnectNew == virConnectClass virConnectCloseCallbackDataClass virDomainClass These three are not related to libvirt-admin, they are

Re: [libvirt] virnetsockettest test binary failed while building libvirt

2015-08-12 Thread Guido Günther
On Tue, Aug 11, 2015 at 06:38:32PM +0600, Dmitriy Slachshyov wrote: [..snip..] 9) SSH test 1... libvirt: XML-RPC error : End of file while reading data: libvirt: error : cannot execute binary ssh: Permission denied: Input/output error

Re: [libvirt] [PATCH] Revert qemu: Allow to plug virtio-net-pci into PCIe slot

2015-08-12 Thread Pavel Fedin
This reverts commit ede34470fde19c0f326cdb0dfca39fa86fd9ec16, which was apparently written based on testing performed before commits 1e15be1 and 9a12b6 were pushed upstream. Once those two patches are in place, commit ede34470 is redundant, Tested and confirm. ACK. Indeed i was unaware of

Re: [libvirt] [PATCH 2/2] virsh: Properly reject 'floor' settings in cmdAttachInterface

2015-08-12 Thread Peter Krempa
On Wed, Aug 12, 2015 at 09:59:08 +0200, Michal Privoznik wrote: On 12.08.2015 07:45, Peter Krempa wrote: cmdAttachInterface doesn't support the 'floor' field that was added in d7f5c88961b52 but that commit didn't properly reject it from cmdAttachInterface where it's unused. ---

Re: [libvirt] [RFC] libvirt-admin: Mark symbols as local

2015-08-12 Thread Guido Günther
On Wed, Aug 12, 2015 at 10:37:30AM +0200, Martin Kletzander wrote: On Tue, Aug 11, 2015 at 09:24:59PM +0200, Guido Günther wrote: Otherwise we're leaking some 30+ symbols like virAdmConnectClass virAdmConnectNew == virConnectClass virConnectCloseCallbackDataClass

[libvirt] [PATCH 2/3] networkBandwidthGenericChecks: Drop useless check

2015-08-12 Thread Michal Privoznik
There's a check right at the beginning of the function that shortcuts if the function was called over all NULL arguments. However, this was meant just as a fool-proof check so that we don't crash if function is used in a bad manner. Anyway, it makes Coverity unhappy as it then thinks any of the

[libvirt] [PATCH 3/3] cmdAttachInterface: Fully implement @floor support

2015-08-12 Thread Michal Privoznik
In my previous commit d7f5c88961b52 I tried to introduce support for inbound.floor. But the code change was incomplete. This is the change needed to fully enable the feature. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/virsh-domain.c | 8 ++-- 1 file changed, 6

[libvirt] [PATCH 1/3] networkBandwidthUpdate: Don't blindly dereference pointers

2015-08-12 Thread Michal Privoznik
It may happen that an interface don't have any bandwidth set and a new one is to be set. In that case, @ifaceBand will be NULL. This will cause troubles later in the code when deciding what to do. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/network/bridge_driver.c | 4 ++-- 1

[libvirt] [PATCH 0/3] Follow up patches for QoS

2015-08-12 Thread Michal Privoznik
Thanks to Peter who made me test this more and find some corner cases. And even take a look on Coverity output. Michal Privoznik (3): networkBandwidthUpdate: Don't blindly dereference pointers networkBandwidthGenericChecks: Drop useless check cmdAttachInterface: Fully implement @floor

Re: [libvirt] [PATCH 2/3] networkBandwidthGenericChecks: Drop useless check

2015-08-12 Thread John Ferlan
On 08/12/2015 05:13 AM, Michal Privoznik wrote: There's a check right at the beginning of the function that shortcuts if the function was called over all NULL arguments. However, this was meant just as a fool-proof check so that we don't crash if function is used in a bad manner. Anyway, it

Re: [libvirt] [PATCH 0/3] Follow up patches for QoS

2015-08-12 Thread John Ferlan
On 08/12/2015 05:13 AM, Michal Privoznik wrote: Thanks to Peter who made me test this more and find some corner cases. And even take a look on Coverity output. Michal Privoznik (3): networkBandwidthUpdate: Don't blindly dereference pointers networkBandwidthGenericChecks: Drop useless

Re: [libvirt] [RFC] libvirt-admin: Mark symbols as local

2015-08-12 Thread Daniel P. Berrange
On Tue, Aug 11, 2015 at 09:24:59PM +0200, Guido Günther wrote: Otherwise we're leaking some 30+ symbols like virAdmConnectClass virAdmConnectNew virConnectClass virConnectCloseCallbackDataClass virDomainClass ... I marked the one symbol needed by the deamon as

Re: [libvirt] [PATCH] Revert qemu: Allow to plug virtio-net-pci into PCIe slot

2015-08-12 Thread Ján Tomko
On Tue, Aug 11, 2015 at 07:24:15PM -0400, Laine Stump wrote: This reverts commit ede34470fde19c0f326cdb0dfca39fa86fd9ec16, which was apparently written based on testing performed before commits 1e15be1 and 9a12b6 were pushed upstream. Once those two patches are in place, commit ede34470 is

Re: [libvirt] [RFC] libvirt-admin: Mark symbols as local

2015-08-12 Thread Guido Günther
On Wed, Aug 12, 2015 at 01:07:46PM +0100, Daniel P. Berrange wrote: On Wed, Aug 12, 2015 at 01:49:46PM +0200, Guido Günther wrote: On Wed, Aug 12, 2015 at 11:15:58AM +0100, Daniel P. Berrange wrote: On Tue, Aug 11, 2015 at 09:24:59PM +0200, Guido Günther wrote: Otherwise we're leaking

[libvirt] [patch] Add support for OVMF in virt-aa-helper [Was: [apparmor] virt-aa-helper: does not support OVMF?]

2015-08-12 Thread intrigeri
Hi, [please Cc me any reply, I'm not subscribed to libvir-list.] it was reported [1] to Ubuntu that virt-aa-helper blocks access to the OVMF files needed to boot UEFI virtual machines in QEMU. After I've confirmed that on Debian sid, Jamie Strandboge suggested a fix. I've successfully tested in

Re: [libvirt] [PATCH] Drive hot-unplug: reliable parsing of HMP results

2015-08-12 Thread Ján Tomko
On Mon, Aug 10, 2015 at 05:37:30PM +0200, Frank Schreuder wrote: Hot-unplugging a disk from a guest that supports hot-unplugging generates an error in the libvirt log when running QEMU with the -msg timestamp=on flag. 2015-08-06 10:48:59.945+: 11662: error : qemuMonitorTextDriveDel:2594

Re: [libvirt] [patch] Add support for OVMF in virt-aa-helper [Was: [apparmor] virt-aa-helper: does not support OVMF?]

2015-08-12 Thread Jamie Strandboge
On 08/12/2015 10:59 AM, intrig...@debian.org wrote: Hi, [please Cc me any reply, I'm not subscribed to libvir-list.] it was reported [1] to Ubuntu that virt-aa-helper blocks access to the OVMF files needed to boot UEFI virtual machines in QEMU. After I've confirmed that on Debian sid,

Re: [libvirt] [PATCH libvirt master] interface type: add udp socket support

2015-08-12 Thread Ján Tomko
On Tue, Aug 11, 2015 at 12:30:03PM -0400, Jonathan Toppins wrote: On 8/10/15 11:06 AM, Ján Tomko wrote: Signed-off-by: Jonathan Toppins jtopp...@cumulusnetworks.com --- docs/formatdomain.html.in| 17 src/conf/domain_conf.c | 56

Re: [libvirt] [PATCH] util: Remove empty resource partition created by libvirt

2015-08-12 Thread Nikunj A Dadhania
Michal Privoznik mpriv...@redhat.com writes: On 12.08.2015 07:39, Nikunj A Dadhania wrote: Hi Daniel, Daniel P. Berrange berra...@redhat.com writes: On Tue, Aug 11, 2015 at 04:57:15PM +0530, Nikunj A Dadhania wrote: The default resource partition is created in the domain start path if it

Re: [libvirt] [PATCH v2 12/12] conf: Check for hostdev conflicts when assign default disk address

2015-08-12 Thread Ján Tomko
On Tue, Aug 04, 2015 at 10:21:29AM -0400, John Ferlan wrote: On 08/03/2015 09:57 AM, Ján Tomko wrote: On Wed, Jul 22, 2015 at 10:54:34AM -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1210587 (completed) When generating the default drive address for a SCSI disk

Re: [libvirt] [PATCH] util: Remove empty resource partition created by libvirt

2015-08-12 Thread Nikunj A Dadhania
Daniel P. Berrange berra...@redhat.com writes: On Wed, Aug 12, 2015 at 11:09:12AM +0530, Nikunj A Dadhania wrote: Hi Daniel, Daniel P. Berrange berra...@redhat.com writes: On Tue, Aug 11, 2015 at 04:57:15PM +0530, Nikunj A Dadhania wrote: The default resource partition is created in

Re: [libvirt] [RFC] libvirt-admin: Mark symbols as local

2015-08-12 Thread Daniel P. Berrange
On Wed, Aug 12, 2015 at 01:49:46PM +0200, Guido Günther wrote: On Wed, Aug 12, 2015 at 11:15:58AM +0100, Daniel P. Berrange wrote: On Tue, Aug 11, 2015 at 09:24:59PM +0200, Guido Günther wrote: Otherwise we're leaking some 30+ symbols like virAdmConnectClass virAdmConnectNew

Re: [libvirt] [RFC] libvirt-admin: Mark symbols as local

2015-08-12 Thread Guido Günther
On Wed, Aug 12, 2015 at 11:15:58AM +0100, Daniel P. Berrange wrote: On Tue, Aug 11, 2015 at 09:24:59PM +0200, Guido Günther wrote: Otherwise we're leaking some 30+ symbols like virAdmConnectClass virAdmConnectNew virConnectClass virConnectCloseCallbackDataClass

Re: [libvirt] [PATCH v3 5/5] qemu: Implement virDomainRename

2015-08-12 Thread Michal Privoznik
On 10.08.2015 21:59, Tomas Meszaros wrote: Currently supports only renaming inactive domains without snapshots. Signed-off-by: Tomas Meszaros e...@tty.sk --- src/qemu/qemu_driver.c | 145 + 1 file changed, 145 insertions(+) diff --git

Re: [libvirt] [PATCH v3 0/5] domainRename API implementation

2015-08-12 Thread Michal Privoznik
On 10.08.2015 21:59, Tomas Meszaros wrote: This is an effort to implement domain rename API. Presented patch series consists of the following: virDomainRename API implementation for qemu, implementation of the virsh command domrename and the additional support code. The idea behind this

Re: [libvirt] Buffer overflow error when starting libvirtd

2015-08-12 Thread Willard Dennis
Hi Laine, I can confirm that the v2 patch worked to resolve my problem. Thanks all for your kind assistance! Will On Tue, Aug 11, 2015 at 2:48 AM, Laine Stump la...@laine.org wrote: On 08/11/2015 02:13 AM, Laine Stump wrote: On 08/11/2015 02:06 AM, Laine Stump wrote: On 08/11/2015 01:30

Re: [libvirt] [PATCH v3 1/5] Introduce virDomainRename API

2015-08-12 Thread Michal Privoznik
On 10.08.2015 21:59, Tomas Meszaros wrote: Also, among with this new API new ACL that restricts rename capability is invented too. Signed-off-by: Tomas Meszaros e...@tty.sk --- include/libvirt/libvirt-domain.h | 4 src/driver-hypervisor.h | 6 ++ src/libvirt-domain.c