Re: [libvirt] [PATCH 0/2] target-i386: Haswell-noTSX and Broadwell-noTSX CPU models

2015-03-13 Thread Andreas Färber
Am 13.03.2015 um 20:09 schrieb Eduardo Habkost: With the Intel microcode update that removed HLE and RTM, there will be different kinds of Haswell and Broadwell CPUs out there: some that still have the HLE and RTM features, and some that don't have the HLE and RTM features. On both cases

[libvirt] [PATCH 1/2] Revert target-i386: Disable HLE and RTM on Haswell Broadwell

2015-03-13 Thread Eduardo Habkost
This reverts commit 13704e4c455770d500d6b87b117e32f0d01252c9. With the Intel microcode update that removed HLE and RTM, there will be different kinds of Haswell and Broadwell CPUs out there: some that still have the HLE and RTM features, and some that don't have the HLE and RTM features. On both

[libvirt] [PATCH 0/2] target-i386: Haswell-noTSX and Broadwell-noTSX CPU models

2015-03-13 Thread Eduardo Habkost
With the Intel microcode update that removed HLE and RTM, there will be different kinds of Haswell and Broadwell CPUs out there: some that still have the HLE and RTM features, and some that don't have the HLE and RTM features. On both cases people may be willing to use the pc-*-2.3 machine-types.

Re: [libvirt] [PATCH 1/3] qemu: process: Export qemuProcessFindDomainDiskByAlias

2015-03-13 Thread Eric Blake
On 03/13/2015 10:25 AM, Peter Krempa wrote: --- src/qemu/qemu_process.c | 2 +- src/qemu/qemu_process.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc

Re: [libvirt] [PATCH 4/9] conf: add virDomainHasNet

2015-03-13 Thread Jim Fehlig
Marek Marczykowski-Górecki wrote: virDomainNetFindIdx no longer returns info whether device was not found, or there was multiple matches. Additionally it already handle error reporting. Introduce virDomainHasNet which does a simple task, without implicit error reporting. Signed-off-by: Marek

Re: [libvirt] [PATCH 5/9] libxl: prevent attaching multiple netdevs with the same MAC

2015-03-13 Thread Jim Fehlig
Marek Marczykowski-Górecki wrote: It will not be possible to detach such device later. Also improve logging in such cases. Signed-off-by: Marek Marczykowski-Górecki marma...@invisiblethingslab.com --- src/libxl/libxl_driver.c | 15 +++ 1 file changed, 15 insertions(+) Changes

Re: [libvirt] [PATCH 6/9] libxl: support domain config modification in virDomainRestoreFlags

2015-03-13 Thread Jim Fehlig
Marek Marczykowski-Górecki wrote: Signed-off-by: Marek Marczykowski-Górecki marma...@invisiblethingslab.com --- src/libxl/libxl_driver.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index

[libvirt] [PATCH 2/2] target-i386: Haswell-noTSX and Broadwell-noTSX

2015-03-13 Thread Eduardo Habkost
With the Intel microcode update that removed HLE and RTM, there will be different kinds of Haswell and Broadwell CPUs out there: some that still have the HLE and RTM features, and some that don't have the HLE and RTM features. On both cases people may be willing to use the pc-*-2.3 machine-types.

Re: [libvirt] [PATCH 2/9] xenconfig: add support for multiple USB devices syntax

2015-03-13 Thread Jim Fehlig
Marek Marczykowski-Górecki wrote: In Xen=4.3, libxl supports new syntax for USB devices: usbdevice=[ DEVICE, DEVICE, ... ] Add support for that in xenconfig driver. When only one device is defined, keep using old syntax for backward compatibility. Adjust tests for changed options order.

Re: [libvirt] [PATCH 0/3] qemu: fix broken block job handling

2015-03-13 Thread Eric Blake
On 03/13/2015 10:25 AM, Peter Krempa wrote: Block job handling violates our usage of domain jobs and changes disk source definition behind our back. Peter Krempa (3): qemu: process: Export qemuProcessFindDomainDiskByAlias qemu: event: Don't fiddle with disk backing trees without a job

Re: [libvirt] [PATCH 5/9] libxl: prevent attaching multiple netdevs with the same MAC

2015-03-13 Thread Jim Fehlig
Jim Fehlig wrote: Marek Marczykowski-Górecki wrote: It will not be possible to detach such device later. Also improve logging in such cases. Signed-off-by: Marek Marczykowski-Górecki marma...@invisiblethingslab.com --- src/libxl/libxl_driver.c | 15 +++ 1 file changed, 15

Re: [libvirt] [PATCH 2/3] qemu: event: Don't fiddle with disk backing trees without a job

2015-03-13 Thread Eric Blake
On 03/13/2015 10:25 AM, Peter Krempa wrote: Surprisingly we did not grab a VM job when a block job finished and we'd happily rewrite the backing chain data. This made it possible to crash libvirt when queueing two backing chains tightly and other badness. My fault for violating the rule of 'no

[libvirt] [PATCH] netdev: silence valgrind warning about ioctl use

2015-03-13 Thread Eric Blake
Valgrind complained: ==3770== Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s) ==3770==at 0x919D407: ioctl (syscall-template.S:81) ==3770==by 0x530FE7E: rpl_ioctl (ioctl.c:42) ==3770==by 0x50CB433: virNetDevFeatureAvailable (virnetdev.c:2764) ==3770==by 0x50CB6A7:

Re: [libvirt] [PATCH 0/2] target-i386: Haswell-noTSX and Broadwell-noTSX CPU models

2015-03-13 Thread Eduardo Habkost
On Fri, Mar 13, 2015 at 08:25:19PM +0100, Andreas Färber wrote: Am 13.03.2015 um 20:09 schrieb Eduardo Habkost: With the Intel microcode update that removed HLE and RTM, there will be different kinds of Haswell and Broadwell CPUs out there: some that still have the HLE and RTM features, and

Re: [libvirt] [PATCH 7/9] libxl: Stubdom emulator type

2015-03-13 Thread Jim Fehlig
Marek Marczykowski-Górecki wrote: Xen have feature of having device model in separate domain (called stub domain). Add stubdomain element to allow selecting such configuration. Emulator path is still used for qemu running in dom0 (if any). Libxl currently do not allow to select stubdomain

Re: [libvirt] [PATCH 3/3] qemu: Disallow concurrent block jobs on a single disk

2015-03-13 Thread Eric Blake
On 03/13/2015 10:25 AM, Peter Krempa wrote: While qemu may be prepared to do this libvirt is not. Forbid the block ops until we fix our code. --- src/conf/domain_conf.h | 1 + src/qemu/qemu_domain.c | 23 +++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c | 28

[libvirt] [PATCH] network: avoid memory leak of dnsmasq capabilities

2015-03-13 Thread Eric Blake
Valgrind detected a leak: ==17820== 102 (56 direct, 46 indirect) bytes in 1 blocks are definitely lost in loss record 479 of 646 ==17820==at 0x4A08946: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17820==by 0x508521A: virAllocVar (viralloc.c:560) ==17820==by

Re: [libvirt] [PATCH] netdev: silence valgrind warning about ioctl use

2015-03-13 Thread John Ferlan
On 03/13/2015 04:38 PM, Eric Blake wrote: Valgrind complained: ==3770== Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s) ==3770==at 0x919D407: ioctl (syscall-template.S:81) ==3770==by 0x530FE7E: rpl_ioctl (ioctl.c:42) ==3770==by 0x50CB433:

Re: [libvirt] [PATCH v3] util: don't fail if no PortData is found while getting migrateData

2015-03-13 Thread John Ferlan
On 03/04/2015 09:01 PM, zhang bo wrote: Introduced by f6a2f97e Problem Description: After multiple times of migrating a domain, which has an ovs interface with no portData set, with non-shared disk, nbd ports got overflowed. The steps to reproduce the problem: 1 define and start a

[libvirt] [PATCH 09/12] Replace virDomainVcpuPinAdd with virDomainPinAdd

2015-03-13 Thread John Ferlan
Make common between Vcpu and IOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 42 -- src/conf/domain_conf.h | 10 +- src/libvirt_private.syms | 2 +- src/libxl/libxl_driver.c | 10 +-

[libvirt] [PATCH 01/12] qemu: Fix possible memory leak in qemuDomainPinVcpuFlags

2015-03-13 Thread John Ferlan
During his review of the iothreads pin setting code, Pavel noted that there was a potential memory leak with respect to how the newVcpuPin is handled and the goto endjob's in failure paths which would not free the memory. For reference, See:

[libvirt] [PATCH 05/12] Convert virDomainVcpuPinDefArrayFree to virDomainPinDefArrayFree

2015-03-13 Thread John Ferlan
Make common between Vcpu and IOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 10 +- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 2 +- src/qemu/qemu_driver.c | 16 4 files changed, 15 insertions(+), 15

[libvirt] [PATCH 06/12] Convert virDomainVcpuPinDefCopy into virDomainPinDefCopy

2015-03-13 Thread John Ferlan
Make common between Vcpu and IOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 8 src/conf/domain_conf.h | 4 ++-- src/libvirt_private.syms | 2 +- src/qemu/qemu_driver.c | 9 - 4 files changed, 11 insertions(+), 12 deletions(-) diff

[libvirt] [PATCH 03/12] Convert virDomainPinDefPtr-vcpuid to virDomainPinDefPtr-id

2015-03-13 Thread John Ferlan
Since we're not specifically a vcpu related structure anymore... Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 39 +++ src/conf/domain_conf.h | 2 +- src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_driver.c | 2 +-

[libvirt] [PATCH 02/12] Convert virDomainVcpuPinDefPtr to virDomainPinDefPtr

2015-03-13 Thread John Ferlan
As pointed out by jtomko in his review of the IOThreads pinning code: http://www.redhat.com/archives/libvir-list/2015-March/msg00495.html there are some comments sprinkled in indicating IOThreads were using the same structure as the VcpuPin code... This is the first patch of a few that will

[libvirt] [PATCH 07/12] Convert virDomainVcpuPinIsDuplicate into virDomainPinIsDuplicate

2015-03-13 Thread John Ferlan
Make common between Vcpu and IOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 30 +++--- src/conf/domain_conf.h | 6 +++--- src/libvirt_private.syms | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git

[libvirt] [PATCH 00/12] More cleanup from IOThreads changes

2015-03-13 Thread John Ferlan
During the review process a few things were pointed at as perhaps needing some adjustments based on what was done for IOThreads. Specifically a memory leak in PinVcpuFlags since PinIOThreads was just a copy of the Vcpu code and secondarily since the IOThreads code reused the virDomainVcpuPin* data

[libvirt] [PATCH 12/12] Remove virDomainIOThreadsPinDel

2015-03-13 Thread John Ferlan
This one is no longer necessary Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 17 - src/conf/domain_conf.h | 3 --- src/libvirt_private.syms | 1 - 3 files changed, 21 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt] [PATCH 04/12] Convert virDomainVcpuPinDefFree to virDomainPinDefFree

2015-03-13 Thread John Ferlan
Make common between Vcpu and IOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 20 ++-- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 2 +- src/qemu/qemu_driver.c | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-)

[libvirt] [PATCH 10/12] Replace virDomainIOThreadsPinAdd with virDomainPinAdd

2015-03-13 Thread John Ferlan
This one is no longer necessary Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 45 - src/conf/domain_conf.h | 6 -- src/libvirt_private.syms | 1 - src/qemu/qemu_driver.c | 14 +++--- 4 files changed, 7

[libvirt] [PATCH 08/12] Convert virDomainVcpuPinFindByVcpu into virDomainPinFindByVcpu

2015-03-13 Thread John Ferlan
Make common between Vcpu and IOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 24 src/conf/domain_conf.h | 6 +++--- src/libvirt_private.syms | 2 +- src/qemu/qemu_driver.c | 12 ++-- src/qemu/qemu_process.c | 12

[libvirt] [PATCH 11/12] Replace virDomainVcpuPinDel with virDomainPinDel

2015-03-13 Thread John Ferlan
Make common between Vcpu and IOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 15 --- src/conf/domain_conf.h | 4 +++- src/libvirt_private.syms | 2 +- src/libxl/libxl_driver.c | 4 +++- src/qemu/qemu_driver.c | 16 5

Re: [libvirt] [PATCH] network: avoid memory leak of dnsmasq capabilities

2015-03-13 Thread John Ferlan
On 03/13/2015 06:23 PM, Eric Blake wrote: Valgrind detected a leak: ==17820== 102 (56 direct, 46 indirect) bytes in 1 blocks are definitely lost in loss record 479 of 646 ==17820==at 0x4A08946: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17820==by

Re: [libvirt] [PATCH] virsh: fix report of non-active commit completion

2015-03-13 Thread John Ferlan
On 03/13/2015 12:04 PM, Eric Blake wrote: Commit f182da20 (v1.2.6) caused a slight regression in virsh reporting of a non-active block job; where it used to state Commit complete, it now states Now in synchronized phase. But the synchronized phase is only possible for an active commit.

Re: [libvirt] [PATCH 7/9] libxl: Stubdom emulator type

2015-03-13 Thread Marek Marczykowski-Górecki
On Fri, Mar 13, 2015 at 02:09:34PM -0600, Jim Fehlig wrote: Marek Marczykowski-Górecki wrote: Xen have feature of having device model in separate domain (called stub domain). Add stubdomain element to allow selecting such configuration. Emulator path is still used for qemu running in dom0

[libvirt] [PATCH] libxl: fix regression introduced by commit 4ab8cd77

2015-03-13 Thread Jim Fehlig
Commit 4ab8cd77 added a check requiring input devices to have a bus type of VIR_DOMAIN_INPUT_BUS_USB, failing to start the domain otherwise. But virDomainDefParseXML adds implicit mouse and keyboard if a graphics device is configured. See calls to virDomainDefMaybeAddInput. The regression is

Re: [libvirt] [PATCHv2.5 08/10] qemu: conf: Add support for memory device cold(un)plug

2015-03-13 Thread John Ferlan
+ +int +virDomainMemoryInsert(virDomainDefPtr def, + virDomainMemoryDefPtr mem) +{ +int id = def-nmems; + +if (mem-info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE +virDomainDefHasDeviceAddress(def, mem-info)) { Hmm... so if our incoming mem has

Re: [libvirt] [PATCHv2.5 09/10] qemu: Implement memory device hotplug

2015-03-13 Thread John Ferlan
On 03/04/2015 11:25 AM, Peter Krempa wrote: Add code to hot-add memory devices to running qemu instances. --- src/qemu/qemu_command.c | 4 +-- src/qemu/qemu_command.h | 15 + src/qemu/qemu_driver.c | 5 ++- src/qemu/qemu_hotplug.c | 85

Re: [libvirt] [PATCHv2.5 10/10] qemu: Implement memory device hotunplug

2015-03-13 Thread John Ferlan
On 03/04/2015 11:25 AM, Peter Krempa wrote: Add code to hot-remove memory devices from qemu. Unfortunately QEMU doesn't support this right now, so this is just for completenes. --- src/qemu/qemu_driver.c | 4 ++- src/qemu/qemu_hotplug.c | 91

Re: [libvirt] [libvirt-test-API][PATCH 2/2] Add coredump_with_format test case to linux_domain conf

2015-03-13 Thread hongming
ACK and Pushed Thanks Hongming On 02/27/2015 01:52 PM, jiahu wrote: --- cases/linux_domain.conf | 44 1 file changed, 44 insertions(+) diff --git a/cases/linux_domain.conf b/cases/linux_domain.conf index a5ada35..490ee90 100644 ---

[libvirt] [PATCH] util: vhost user: support for bootindex

2015-03-13 Thread zhang bo
Problem Description: When we set boot order for a vhost-user network interface, we found the boot index doesn't work. Cause of the Problem: In the function qemuBuildVhostuserCommandLine(), it forcely set the arg bootindex of function qemuBuildNicDevStr() to 0. Thus, the bootindex parameter got

Re: [libvirt] [PATCH v4 0/7] Drop network driver lock

2015-03-13 Thread Peter Krempa
On Thu, Mar 12, 2015 at 15:39:14 +0100, Michal Privoznik wrote: Hopefully, the last version. Again, some patches are ACKed already, but I'm sending them again. Not to trash the review bandwidth, but for reviewer to get better picture. Patches 5-7 are already ACKed. Peter signature.asc

Re: [libvirt] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Paolo Bonzini
On 09/03/2015 07:45, zhanghailiang wrote: 'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a possible start of a new migration process while the previous one still exists. But we didn't expose this status to user, instead we returned the 'active' state. Here, we

[libvirt] [PATCH] conf: fix use the wrong type for period

2015-03-13 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1140958 When we set period as unsigned int max value 4294967295 and start the vm, qemu will report error. This becuase we define period as a unsigned int and parse it as a unsigned int, but we use it as a int when set it via QMP in

Re: [libvirt] logging: how about adding a ProcessName field in logging file?

2015-03-13 Thread Daniel P. Berrange
On Fri, Mar 13, 2015 at 05:08:54PM +0800, zhang bo wrote: Suppose there are 3 or more clients of libvirt: 1)nova 2)bash virsh commands 3)user customized ELF 4)etc The env LIBVIRT_DEBUG and LIBVIRT_LOG_OUTPUTS affects all of these clients, thus, they will all accumulate the logs into

Re: [libvirt] [PATCH v4 2/7] network_driver: Use accessor for dnsmasqCaps

2015-03-13 Thread Peter Krempa
On Thu, Mar 12, 2015 at 15:39:16 +0100, Michal Privoznik wrote: This is not an immutable pointer and can change during lifetime. Therefore, in order to drop network driver lock, we must use an internal accessor which does not lock the network driver yet, but it will soon. Now it merely returns

[libvirt] Should logging in the library set its default outputs?

2015-03-13 Thread zhang bo
If the env LIBVIRT_DEBUG and LIBVIRT_LOG_OUTPUTS are not set, the logging in the library would not log into any file. So: Is it necessary to set the default level and outputs in virGlobalInit(), just in case the maintainer forgets to set the ENVs ? Thanks in advance. -- libvir-list mailing

Re: [libvirt] [PATCH v2] qemu: read backing chain names from qemu

2015-03-13 Thread Peter Krempa
On Thu, Mar 12, 2015 at 14:23:48 -0600, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1199182 documents that after a series of disk snapshots into existing destination images, followed by active commits of the top image, it is possible for qemu 2.2 and earlier to end up

[libvirt] logging: how about adding a ProcessName field in logging file?

2015-03-13 Thread zhang bo
Suppose there are 3 or more clients of libvirt: 1)nova 2)bash virsh commands 3)user customized ELF 4)etc The env LIBVIRT_DEBUG and LIBVIRT_LOG_OUTPUTS affects all of these clients, thus, they will all accumulate the logs into *ONE* file set by LIBVIRT_LOG_OUTPUTS. eg: [2015-03-07 00:33:30]:

Re: [libvirt] logging: how about adding a ProcessName field in logging file?

2015-03-13 Thread zhang bo
On 2015/3/13 17:29, Daniel P. Berrange wrote: On Fri, Mar 13, 2015 at 05:08:54PM +0800, zhang bo wrote: Suppose there are 3 or more clients of libvirt: 1)nova 2)bash virsh commands 3)user customized ELF 4)etc The env LIBVIRT_DEBUG and LIBVIRT_LOG_OUTPUTS affects all of these clients,

Re: [libvirt] [libvirt-test-API][PATCH V2 0/2] Add connection_getAllDomainStats test case

2015-03-13 Thread hongming
ACK and Pushed Thanks Hongming On 03/12/2015 03:10 PM, jiahu wrote: The testing case will validate the getAllDomainStats API in class virConnect V2: Added new domainListGetStats API in this case jiahu (2): Add connection_getAllDomainStats test case to linux_domain.conf Add

Re: [libvirt] [PATCH] parallels: fix prlsdkCheckUnsupportedParams checks

2015-03-13 Thread Peter Krempa
On Thu, Mar 12, 2015 at 18:43:29 +0300, Maxim Nestratov wrote: for memory limits since unset ones are no longer zero Ah, sorry, my bad for not noticing this while reviewing Pavel's series. Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_sdk.c |6

Re: [libvirt] [PATCH v4 1/7] bridge_driver: Don't access global driver randomly

2015-03-13 Thread Peter Krempa
On Thu, Mar 12, 2015 at 15:39:15 +0100, Michal Privoznik wrote: Well, network driver code has the driver accessible as a global variable. This makes any rework hard, as it's unclear where the variable is accessed and/or modified. Lets just pass the driver as a parameter to all functions where

Re: [libvirt] [PATCH v4 3/7] struct _virNetworkDriverState: Annotate items

2015-03-13 Thread Peter Krempa
On Thu, Mar 12, 2015 at 15:39:17 +0100, Michal Privoznik wrote: In order to drop network driver lock, lets annotate which structure items are immutable, which have self-locking APIs and so on. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/network/bridge_driver_platform.h | 7

[libvirt] [PATCH v5 for-2.3 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread zhanghailiang
'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a possible start of a new migration process while the previous one still exists. But we didn't expose this status to user, instead we returned the 'active' state. Here, we expose it to the user (such as libvirt), 'cancelling'

Re: [libvirt] [PATCH] parallels: fix prlsdkCheckUnsupportedParams checks

2015-03-13 Thread Maxim Nestratov
13.03.2015 11:04, Peter Krempa пишет: On Thu, Mar 12, 2015 at 18:43:29 +0300, Maxim Nestratov wrote: for memory limits since unset ones are no longer zero Ah, sorry, my bad for not noticing this while reviewing Pavel's series. Never mind. Signed-off-by: Maxim Nestratov

Re: [libvirt] [PATCH v4 4/7] bridge_driver: Drop networkDriverLock() from almost everywhere

2015-03-13 Thread Peter Krempa
On Thu, Mar 12, 2015 at 15:39:18 +0100, Michal Privoznik wrote: Now that we have fine grained locks, there's no need to lock the whole driver. We can rely on self-locking APIs. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/network/bridge_driver.c | 56

Re: [libvirt] [Qemu-devel] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Eric Blake
On 03/13/2015 06:28 AM, Dr. David Alan Gilbert wrote: It simplifies qemu's job of reporting migration status information (qemu is no longer maintaining one set of states internally and a different set of states externally), and I already have the libvirt counterpart patch ready to go to

Re: [libvirt] [PATCHv2.5 08/10] qemu: conf: Add support for memory device cold(un)plug

2015-03-13 Thread John Ferlan
On 03/04/2015 11:24 AM, Peter Krempa wrote: Add a few helpers that allow to operate with memory device definitions on the domain config and use them to implement memory device coldplug in the qemu driver. --- src/conf/domain_conf.c | 100 +++

Re: [libvirt] [PATCHv2.5 06/10] qemu: migration: Forbid migration with memory modules lacking info

2015-03-13 Thread John Ferlan
On 03/04/2015 11:24 AM, Peter Krempa wrote: Make sure that libvirt has all vital information needed to reliably represent configuration of guest's memory devices in case of a migration. This patch forbids migration in case the required slot number and module base address are not present

Re: [libvirt] [PATCHv2.5 07/10] qemu: add support for memory devices

2015-03-13 Thread John Ferlan
On 03/04/2015 11:24 AM, Peter Krempa wrote: Add support to start qemu instance with 'pc-dimm' device. Thanks to the refactors we are able to reuse the existing function to determine the parameters. --- src/qemu/qemu_command.c| 130 -

Re: [libvirt] [PATCH] conf: fix use the wrong type for period

2015-03-13 Thread Martin Kletzander
On Fri, Mar 13, 2015 at 05:15:32PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1140958 When we set period as unsigned int max value 4294967295 and start the vm, qemu will report error. This becuase we define period as a unsigned int and parse it as a unsigned int, but

Re: [libvirt] [PATCHv2.5 05/10] qemu: memdev: Add infrastructure to load memory device information

2015-03-13 Thread John Ferlan
On 03/04/2015 11:24 AM, Peter Krempa wrote: When using 'dimm' memory devices with qemu, some of the information like the slot number and base address need to be reloaded from qemu after process start so that it reflects the actual state. The state then allows to use memory devices across

Re: [libvirt] [Qemu-devel] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: On 03/13/2015 04:49 AM, Paolo Bonzini wrote: On 09/03/2015 07:45, zhanghailiang wrote: 'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a possible start of a new migration process while the previous one still exists.

Re: [libvirt] [PATCH 1/5] Add test for virtio serial port assignment

2015-03-13 Thread Peter Krempa
On Tue, Mar 03, 2015 at 15:44:26 +0100, Ján Tomko wrote: Add a test to demonstrate the effect of this series. --- .../qemuxml2argv-channel-virtio-autoassign.args| 20 + .../qemuxml2argv-channel-virtio-autoassign.xml | 50 ++ tests/qemuxml2argvtest.c

Re: [libvirt] [PATCH v2] qemu: read backing chain names from qemu

2015-03-13 Thread Eric Blake
On 03/13/2015 02:02 AM, Peter Krempa wrote: @@ -16172,8 +16169,12 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm, } qemuDomainObjEnterMonitor(driver, vm); -ret = qemuMonitorBlockJob(priv-mon, device, basePath, backingPath, - speed, mode, async); +

Re: [libvirt] [Qemu-devel] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Eric Blake
On 03/13/2015 04:49 AM, Paolo Bonzini wrote: On 09/03/2015 07:45, zhanghailiang wrote: 'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a possible start of a new migration process while the previous one still exists. But we didn't expose this status to user,

Re: [libvirt] [PATCH v2] qemu: read backing chain names from qemu

2015-03-13 Thread Daniel P. Berrange
On Fri, Mar 13, 2015 at 07:01:06AM -0600, Eric Blake wrote: On 03/13/2015 02:02 AM, Peter Krempa wrote: @@ -16172,8 +16169,12 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm, } qemuDomainObjEnterMonitor(driver, vm); -ret = qemuMonitorBlockJob(priv-mon, device, basePath,

[libvirt] [PATCH 4/4] parallels: minor cleanup

2015-03-13 Thread Maxim Nestratov
indentation is fixed, unnecessary error message removed, unnecessary job freeing removed Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_sdk.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/parallels/parallels_sdk.c

[libvirt] [PATCH 1/4] parallels: set cpu mode when applying xml configuration

2015-03-13 Thread Maxim Nestratov
From: Mikhail Feoktistov mfeoktis...@parallels.com Otherwise exporting existing domain config and defining a new one like this: virsh -c parallels:///system dumpxml instance01 my.xml virsh -c parallels:///system define my.xml leads to an error because PCS default x64 mode turns to x32. Thus, we

[libvirt] [PATCH v2 0/4] parallels: fixes and cleanups

2015-03-13 Thread Maxim Nestratov
From: Maxim Nestratov mnestra...@parallels.com v2 change: - rebased Maxim Nestratov (3): parallels: don't forget to unlock domain if unregister fails parallels: fix home directory for VMs parallels: minor cleanup Mikhail Feoktistov (1): parallels: set cpu mode when applying xml

[libvirt] [PATCH 2/4] parallels: don't forget to unlock domain if unregister fails

2015-03-13 Thread Maxim Nestratov
Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_driver.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index d2907cf..aeb43ad 100644 ---

Re: [libvirt] [PATCH v4 0/7] Drop network driver lock

2015-03-13 Thread Michal Privoznik
On 13.03.2015 11:07, Peter Krempa wrote: On Thu, Mar 12, 2015 at 15:39:14 +0100, Michal Privoznik wrote: Hopefully, the last version. Again, some patches are ACKed already, but I'm sending them again. Not to trash the review bandwidth, but for reviewer to get better picture. Patches 5-7 are

[libvirt] [PATCH 3/4] parallels: fix home directory for VMs

2015-03-13 Thread Maxim Nestratov
Failures of parallelsStorageOpen occured because we incorrectly treated path to VM' configuration file as a directory. Now initialization of parallels VM domains home directory is fixed. Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_sdk.c |8 1

Re: [libvirt] Applying for GSoC project 'Introducing job control to the storage driver' in libvirt

2015-03-13 Thread Taowei Luo
Thank you, I will take a look on those APIs you suggested. BTW, about the project virsh, I found libvirt-client(http://www.rpmfind.net/linux/rpm2html/search.php?query=libvirt-client) already support automatic completion on virsh commands. It is a big progress on the project. So, why it hasn't

Re: [libvirt] [PATCH 2/5] Add functions to track virtio-serial addresses

2015-03-13 Thread Peter Krempa
On Tue, Mar 03, 2015 at 15:44:27 +0100, Ján Tomko wrote: Store the available ports of a virtio-serial controller in a virBitmap. The bitmaps are stored in a hash table - the controller index formatted as a string. Buses are not tracked, because they aren't supported by QEMU. ---

Re: [libvirt] Applying for GSoC project 'Introducing job control to the storage driver' in libvirt

2015-03-13 Thread Michal Privoznik
On 13.03.2015 15:00, Taowei Luo wrote: Thank you, I will take a look on those APIs you suggested. BTW, about the project virsh, I found libvirt-client(http://www.rpmfind.net/linux/rpm2html/search.php?query=libvirt-client) already support automatic completion on virsh commands. It is a big

[libvirt] [PATCH 6/7] parallels: switch off offline management feature

2015-03-13 Thread Maxim Nestratov
which is on by default when a new VM/CT is created. We should do this because this feature can't be controlled by libvirt now and it sets up some iptables rules. So it's better to do this to avoid potential conflict of different set of rules or to avoid unexpected behavior. Signed-off-by: Maxim

[libvirt] [PATCH 4/7] parallels: set network adapter device status to connected

2015-03-13 Thread Maxim Nestratov
when a new network adapter device is added Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_sdk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index f581fbb..9588163

[libvirt] [PATCH 1/7] parallels: introduce and use string constants for network types and names

2015-03-13 Thread Maxim Nestratov
Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_network.c |6 +++--- src/parallels/parallels_sdk.c |6 +++--- src/parallels/parallels_utils.h |8 +++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git

[libvirt] [PATCH 7/7] parallels: don't prevent domain define if VIR_DOMAIN_NET_TYPE_BRIDGE

2015-03-13 Thread Maxim Nestratov
network adapter is used --- src/parallels/parallels_sdk.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index a0a2ba0..4c90a18 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c

[libvirt] [PATCH v2 3/4] qemu: Don't duplicate errors when settings stats period

2015-03-13 Thread Martin Kletzander
In order not to leave old error messages set, this patch refactors the code so the error is reported only when acted upon. The only such place already rewrites any error, so cleaning up all the error reporting in qemuMonitorSetMemoryStatsPeriod() is enough. Signed-off-by: Martin Kletzander

[libvirt] [PATCH v2 0/4] Fix errors with memory balloon stats period

2015-03-13 Thread Martin Kletzander
Nothing big, just some cleanup and then the fix in last patch. More info in particular commit messages. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140958 v1 is here: https://www.redhat.com/archives/libvir-list/2015-March/msg00665.html Martin Kletzander (4): util: Make sure the

[libvirt] [PATCH v2 1/4] util: Make sure the comment about virBufferAddBuffer is true

2015-03-13 Thread Martin Kletzander
Change it so it really *always* eats the @toadd buffer. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/util/virbuffer.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c index 96a0f16..0089d1b 100644 ---

[libvirt] [PATCH 3/7] parallels: better bridge network interface support

2015-03-13 Thread Maxim Nestratov
In order to support 'bridge' network adapters in parallels driver we need to plug our veth devices into corresponding linux bridges. We are going to do this by reusing our abstraction of Virtual Networks in terms of PCS. On a domain creation, we create a new Virtual Network naming it with the same

[libvirt] [PATCH v2 0/7] bridge network support enhancement and other network fixes

2015-03-13 Thread Maxim Nestratov
From: Maxim Nestratov mnestra...@parallels.com v2 change: - rebased on recent network rework Maxim Nestratov (7): parallels: introduce and use string constants for network types and names parallels: fix parallelsLoadNetworks parallels: better bridge network interface support

[libvirt] [PATCH 2/7] parallels: fix parallelsLoadNetworks

2015-03-13 Thread Maxim Nestratov
Don't fail initialization of parallels driver if parallelsLoadNetwork fails for optional networks. This can happen when some of them are added manually and configured incompletely. PCS requires only two networks created automatically (named Host-Only and Bridged), others are optional and their

[libvirt] [PATCH 5/7] parallels: make E1000 network adapter type default

2015-03-13 Thread Maxim Nestratov
Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_sdk.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index 9588163..748a308 100644 --- a/src/parallels/parallels_sdk.c +++

[libvirt] [PATCH] virsh: fix report of non-active commit completion

2015-03-13 Thread Eric Blake
Commit f182da20 (v1.2.6) caused a slight regression in virsh reporting of a non-active block job; where it used to state Commit complete, it now states Now in synchronized phase. But the synchronized phase is only possible for an active commit. For a reproducer, I created a chain 'a - b - c - d -

[libvirt] [PATCH v2 4/4] conf: Use correct type for balloon stats period

2015-03-13 Thread Martin Kletzander
We're parsing memballoon status period as unsigned int, but when we're trying to set it, both we and qemu use signed int. That means large values will get wrapped around to negative one resulting in error. Basically the same problem as commit e3a7b874 was dealing with when updating live domain.

[libvirt] [PATCH v2 2/4] conf: Reorder elements inside memballoon

2015-03-13 Thread Martin Kletzander
All the devices we have format their address as its last sub-element, so let's change memballoon to follow suit. Also adjust RNG to allow any order of them so 'virsh edit' doesn't shout at us. Signed-off-by: Martin Kletzander mklet...@redhat.com --- docs/schemas/domaincommon.rng

[libvirt] [PATCH 3/3] qemu: Disallow concurrent block jobs on a single disk

2015-03-13 Thread Peter Krempa
While qemu may be prepared to do this libvirt is not. Forbid the block ops until we fix our code. --- src/conf/domain_conf.h | 1 + src/qemu/qemu_domain.c | 23 +++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c | 28 +--- 4 files changed, 39

[libvirt] [PATCH 0/3] qemu: fix broken block job handling

2015-03-13 Thread Peter Krempa
Block job handling violates our usage of domain jobs and changes disk source definition behind our back. Peter Krempa (3): qemu: process: Export qemuProcessFindDomainDiskByAlias qemu: event: Don't fiddle with disk backing trees without a job qemu: Disallow concurrent block jobs on a single

Re: [libvirt] [PATCH 1/9] libxl: add tablet/mouse input device support

2015-03-13 Thread Jim Fehlig
Marek Marczykowski-Górecki wrote: From: Marek Marczykowski marma...@invisiblethingslab.com Signed-off-by: Marek Marczykowski-Górecki marma...@invisiblethingslab.com --- src/libxl/libxl_conf.c | 44 1 file changed, 44 insertions(+) Changes in

[libvirt] [PATCH 1/3] qemu: process: Export qemuProcessFindDomainDiskByAlias

2015-03-13 Thread Peter Krempa
--- src/qemu/qemu_process.c | 2 +- src/qemu/qemu_process.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d1f089d..28c3c27 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -390,7 +390,7 @@

[libvirt] [PATCH 2/3] qemu: event: Don't fiddle with disk backing trees without a job

2015-03-13 Thread Peter Krempa
Surprisingly we did not grab a VM job when a block job finished and we'd happily rewrite the backing chain data. This made it possible to crash libvirt when queueing two backing chains tightly and other badness. To fix it, add yet another handler to the helper thread that handles monitor events

Re: [libvirt] [PATCH 3/9] tests: xenconfig: test for multiple USB devices and other HVM options

2015-03-13 Thread Jim Fehlig
Marek Marczykowski-Górecki wrote: Signed-off-by: Marek Marczykowski-Górecki marma...@invisiblethingslab.com --- tests/xlconfigdata/test-fullvirt-multiusb.cfg | 29 tests/xlconfigdata/test-fullvirt-multiusb.xml | 48 +++ tests/xlconfigtest.c