Re: [libvirt] [PATCH 1/9] storage: Refactor iSCSI Source matching

2015-04-14 Thread Peter Krempa
On Mon, Apr 13, 2015 at 15:35:46 -0400, John Ferlan wrote: On 04/13/2015 05:27 AM, Peter Krempa wrote: On Thu, Apr 02, 2015 at 13:39:38 -0400, John Ferlan wrote: Create a separate iSCSI Source matching subroutine. Makes the calling code a bit cleaner as well as sets up for future

Re: [libvirt] [PATCH 0/2] Fix handling of disk's WWN (world wide name)

2015-04-14 Thread Peter Krempa
On Mon, Apr 13, 2015 at 15:22:36 +0200, Martin Kletzander wrote: On Tue, Apr 07, 2015 at 04:10:47PM +0200, Peter Krempa wrote: Peter Krempa (2): conf: ABI: Check WWN in disk abi stability check qemu: Enforce WWN to be unique among VM's disks ACK series. Pushed; Thanks. Peter

Re: [libvirt] [PATCH] lib: snapshot: Explain that only one layer of images is inserted

2015-04-14 Thread Peter Krempa
On Mon, Apr 13, 2015 at 21:11:51 -0400, John Ferlan wrote: On 04/10/2015 04:55 AM, Peter Krempa wrote: When creating a snapshot with _REUSE_EXTERNAL when the pre-created image does not directly link to the current active layer libvirt would re-detect the backing chain incorrectly and it

Re: [libvirt] [PATCH 5/5] qemu: Fix condition for checking vcpu when pinning vcpus

2015-04-14 Thread Peter Krempa
On Mon, Apr 13, 2015 at 21:43:22 -0400, John Ferlan wrote: On 04/07/2015 02:50 PM, Peter Krempa wrote: Previously we checked that the vcpu we are trying to set is in range of the number of threads presented by qemu. The problem is that if the VM is offline the count is 0. Since the

Re: [libvirt] [Xen-devel] [libvirt test] 50401: regressions - FAIL

2015-04-14 Thread Daniel P. Berrange
On Tue, Apr 14, 2015 at 10:33:45AM +0100, Ian Campbell wrote: On Tue, 2015-04-14 at 02:27 +, osstest service user wrote: flight 50401 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/50401/ Regressions :-( Tests which did not succeed and are blocking,

Re: [libvirt] [Xen-devel] [libvirt test] 50401: regressions - FAIL

2015-04-14 Thread Ian Campbell
On Tue, 2015-04-14 at 02:27 +, osstest service user wrote: flight 50401 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/50401/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 5

Re: [libvirt] [PATCHv3 7/7] qemu: Refactor qemuDomainBlockJobAbort()

2015-04-14 Thread Peter Krempa
On Mon, Apr 13, 2015 at 21:08:27 -0400, John Ferlan wrote: On 04/09/2015 12:45 PM, Peter Krempa wrote: Change few variable names and refactor the code flow. As an additional bonus the function now fails if the event state is not as expected. --- Notes: Version 3: -

Re: [libvirt] [PATCH] qemu: Use 'idx' instead of 'index' for variable name

2015-04-14 Thread John Ferlan
On 04/14/2015 07:24 AM, Daniel P. Berrange wrote: On Tue, Apr 14, 2015 at 07:19:17AM -0400, John Ferlan wrote: I thought of that too, but it picked up a few comments too ... src/libvirt-domain.c:11105: * block.num.backingIndex - unsigned int giving the backingStore index, ...

[libvirt] [PATCH 0/5] Prohibit use of 'index' for variable

2015-04-14 Thread John Ferlan
Given the recent Xen-devel build failure/issue - this series of patches will remove our uses of '[unsigned] int index' and then generate a rule for it John Ferlan (5): qemu: Adjust the prototype to match the function util: Use 'idx' instead of 'index' snapshot: Change 'index' to 'idx'

Re: [libvirt] [PATCH] virt-aa-helper: add unix channels (esp for qemu-guest-agent) (v2)

2015-04-14 Thread Ján Tomko
On Fri, Apr 10, 2015 at 08:21:03PM +, Serge Hallyn wrote: Changelog (v2): * skip abstract unix sockets The patch changelog does not need to be in git history. Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/security/virt-aa-helper.c | 4 +++- 1 file changed, 3

Re: [libvirt] [PATCH] qemu: monitor: Add check that monitor is non-null to specific commands

2015-04-14 Thread Martin Kletzander
On Fri, Apr 10, 2015 at 04:45:09PM +0200, Peter Krempa wrote: Our monitor locking and cleanup code is weird as it allows to remove the monitor object pointer while we are in the monitor. Additionally EVERY api is using the vm private data after @vm was unlocked. This leads to an unpleasant

[libvirt] [PATCH] qemu: Use 'idx' instead of 'index' for variable name

2015-04-14 Thread John Ferlan
Apparently for Xen-devel 'index' is a global and causes a build failure, so just use the shortened 'idx' instead to avoid the conflict. Signed-off-by: John Ferlan jfer...@redhat.com --- I did try modify cfg.mk to add a syntax check similar to the ii,jj,kk checks, but it tripped up over 'index'

Re: [libvirt] [PATCH] qemu: Use 'idx' instead of 'index' for variable name

2015-04-14 Thread John Ferlan
On 04/14/2015 06:51 AM, Daniel P. Berrange wrote: On Tue, Apr 14, 2015 at 06:45:48AM -0400, John Ferlan wrote: Apparently for Xen-devel 'index' is a global and causes a build failure, so just use the shortened 'idx' instead to avoid the conflict. Signed-off-by: John Ferlan

[libvirt] [PATCHv2 2/5] Add functions dealing with control characters in strings

2015-04-14 Thread Ján Tomko
Add virStringHasControlChars that checks if the string has any control characters other than \t\r\n, and virStringStripControlChars that removes them in-place. --- src/libvirt_private.syms | 2 ++ src/util/virstring.c | 39 +++ src/util/virstring.h |

[libvirt] [PATCH 2/5] util: Use 'idx' instead of 'index'

2015-04-14 Thread John Ferlan
Impending syntax checker will disallow 'int index', so change it here. Signed-off-by: John Ferlan jfer...@redhat.com --- src/util/virnetdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index a7903c3..9a6d4e7 100644 ---

[libvirt] [PATCH 3/5] snapshot: Change 'index' to 'idx'

2015-04-14 Thread John Ferlan
Forthcoming syntax check rule will disallow usage of 'int index', so change it for snapshot Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/snapshot_conf.c | 6 +++--- src/conf/snapshot_conf.h | 2 +- src/qemu/qemu_driver.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)

[libvirt] [PATCH 5/5] cfg: Disallow usage of 'index' as variable name

2015-04-14 Thread John Ferlan
Since we've run afoul of the Xen-devel build for shadowing a global declaration of 'index', just disallow using index for a variable name Signed-off-by: John Ferlan jfer...@redhat.com --- cfg.mk | 5 + 1 file changed, 5 insertions(+) diff --git a/cfg.mk b/cfg.mk index 3111a89..9ba2134

[libvirt] [PATCH 4/5] nwfilter: Change 'index' to 'idx'

2015-04-14 Thread John Ferlan
Forthcoming syntax check rule will disallow usage of 'int index', so change it for nwfilter Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/nwfilter_params.c | 8 src/conf/nwfilter_params.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

Re: [libvirt] [PATCH] qemu: save domain status after set memory parameters

2015-04-14 Thread Ján Tomko
On Tue, Apr 14, 2015 at 06:24:41PM +0800, Shanzhi Yu wrote: After set memory parameters for running domain, save the change to live xml is needed otherwise it will disappear after restart libvirtd. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1211548 Signed-off-by: Shanzhi Yu

Re: [libvirt] [PATCH] sparc: Add default PCI root controller

2015-04-14 Thread Ján Tomko
On Mon, Apr 13, 2015 at 04:14:37PM +0200, Martin Kletzander wrote: It is there even with -nodefaults and -no-user-config, so count with that so we can start sparc domains. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/qemu/qemu_domain.c | 8 +++- 1 file changed, 7

Re: [libvirt] [PATCH] PowerPC: Replace hardcoded values of 'pseries-2*' machine in schema

2015-04-14 Thread Ján Tomko
On Tue, Apr 07, 2015 at 03:27:20PM +0530, Prerna Saxena wrote: From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Mon, 6 Apr 2015 22:56:25 -0500 Qemu-system-ppc64 has introduced new variants of pseries machine type, such as 'pseries', 'pseries-2.1'..'pseries-2.3'. Replace the hardcoded

Re: [libvirt] [PATCH] tools: improve the error info when fail to parse parameter --soft-limit of memtune

2015-04-14 Thread Ján Tomko
On Tue, Apr 14, 2015 at 06:24:40PM +0800, Shanzhi Yu wrote: When set guest memory with a invalid parameter of --soft-limit, it posts weird error: $ virsh memtune r7 --hard-limit 20417224 --soft-limit 9007199254740992 --swap-hard-limit 35417224 The subject is too long, as well as this

[libvirt] [PATCH 1/5] qemu: Adjust the prototype to match the function

2015-04-14 Thread John Ferlan
Changing the prototype to not have int *index since we'll soon be disallowing index as a name. Curiously the original commit (a4504ac) for the function used 'int idx' in the function - so they didn't match. Now they do. Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.h | 2

Re: [libvirt] [PATCHv2] virBitmap: Place virBitmapIsAllClear check after virBitmapParse calls

2015-04-14 Thread John Ferlan
On 04/13/2015 08:01 AM, Erik Skultety wrote: This patch adds checks for empty bitmaps right after the calls of virBitmapParse. These only include spots where set API's are called and where domain's XML is parsed. Also, it partially reverts commit 983f5a which added a check for invalid

[libvirt] [PATCHv2 1/5] tests: rename testStripIPv6BracketsData to testStripData

2015-04-14 Thread Ján Tomko
For reuse with other Strip* functions. --- tests/virstringtest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/virstringtest.c b/tests/virstringtest.c index a0bfd61..9d0b438 100644 --- a/tests/virstringtest.c +++ b/tests/virstringtest.c @@ -522,14 +522,14 @@

Re: [libvirt] [PATCH] qemu: Use 'idx' instead of 'index' for variable name

2015-04-14 Thread Daniel P. Berrange
On Tue, Apr 14, 2015 at 07:19:17AM -0400, John Ferlan wrote: On 04/14/2015 06:51 AM, Daniel P. Berrange wrote: On Tue, Apr 14, 2015 at 06:45:48AM -0400, John Ferlan wrote: Apparently for Xen-devel 'index' is a global and causes a build failure, so just use the shortened 'idx' instead to

[libvirt] [PATCHv2 0/5] Strip control codes from virBufferEscapeString

2015-04-14 Thread Ján Tomko
For https://bugzilla.redhat.com/show_bug.cgi?id=1184131 https://bugzilla.redhat.com/show_bug.cgi?id=1066564 v1: https://www.redhat.com/archives/libvir-list/2015-March/msg01529.html v2: * added patches 1-4 that should prevent us from calling virBufferEscapeString with control codes * patch 5

[libvirt] [PATCHv2 4/5] Ignore storage volumes with control codes in their names

2015-04-14 Thread Ján Tomko
To prevent generating invalid XML. https://bugzilla.redhat.com/show_bug.cgi?id=1066564 --- src/storage/storage_backend_fs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index d4d65bc..fb33f08 100644 ---

[libvirt] [PATCHv2 5/5] Strip control codes in virBufferEscapeString

2015-04-14 Thread Ján Tomko
These cannot be represented in XML. We have been stripping them, but only if the string had characters that needed escaping: ' Extend the strcspn check to include control codes, and strip them even if we don't do any escaping. https://bugzilla.redhat.com/show_bug.cgi?id=1184131

[libvirt] [PATCH] qemu: save domain status after set memory parameters

2015-04-14 Thread Shanzhi Yu
After set memory parameters for running domain, save the change to live xml is needed otherwise it will disappear after restart libvirtd. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1211548 Signed-off-by: Shanzhi Yu s...@redhat.com --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3

[libvirt] [PATCH] tools: improve the error info when fail to parse parameter --soft-limit of memtune

2015-04-14 Thread Shanzhi Yu
When set guest memory with a invalid parameter of --soft-limit, it posts weird error: $ virsh memtune r7 --hard-limit 20417224 --soft-limit 9007199254740992 --swap-hard-limit 35417224 error: Unable to parse integer parameter 'NAME Change it to error: Unable to parse integer parameter

Re: [libvirt] [PATCH] qemu: Use 'idx' instead of 'index' for variable name

2015-04-14 Thread Daniel P. Berrange
On Tue, Apr 14, 2015 at 06:45:48AM -0400, John Ferlan wrote: Apparently for Xen-devel 'index' is a global and causes a build failure, so just use the shortened 'idx' instead to avoid the conflict. Signed-off-by: John Ferlan jfer...@redhat.com --- I did try modify cfg.mk to add a syntax

[libvirt] [PATCHv2 3/5] Strip control characters from sysfs attributes

2015-04-14 Thread Ján Tomko
Including them in the XML makes them unparsable. https://bugzilla.redhat.com/show_bug.cgi?id=1184131 --- src/node_device/node_device_udev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 8c39e5f..5e98222 100644

Re: [libvirt] [PATCH 1/2] Add VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event

2015-04-14 Thread Ján Tomko
On Mon, Apr 13, 2015 at 01:59:39PM -0400, John Ferlan wrote: On 04/04/2015 01:16 PM, Ján Tomko wrote: The counterpart to VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED. https://bugzilla.redhat.com/show_bug.cgi?id=1206114 --- daemon/remote.c | 37 +++

[libvirt] [PATCH 6/7] Introduce virNetDevBandwidthUpdateFilter

2015-04-14 Thread Michal Privoznik
This is practically a wrapper over virNetDevBandwidthManipulateFilter() that will update the desired filter on an interface (usually a network bridge) with a new MAC address. Although, the MAC address in question usually refers to some other interface - the one that the filter is constructed for.

Re: [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Eric Blake
[adding qemu] On 04/14/2015 09:58 AM, Marc-André Lureau wrote: Hi On Tue, Apr 14, 2015 at 4:25 PM, Martin Kletzander mklet...@redhat.com wrote: Is this not exposed in any way in QEMU? Do we really need to use this (what we're trying to avoid)? That works with the following change:

[libvirt] [PATCHv2 0/7] Fix checking of NULL monitor and clean up code

2015-04-14 Thread Peter Krempa
This is a v2 to https://www.redhat.com/archives/libvir-list/2015-April/msg00416.html This fixes all commands and cleans up the code in the process. Peter Krempa (7): qemu: monitor: Clean up coding style qemu: monitor: Sanitize control flow in qemuMonitorSetCapabilities qemu: monitor:

[libvirt] [PATCH 7/7] processNicRxFilterChangedEvent: Take appropriate actions for NET_TYPE_NETWORK too

2015-04-14 Thread Michal Privoznik
So, as partly explained in previous commit, there is an issue with NATed networks on a guest originated MAC change. When user sets @floor in inbound/ under bandwidth/ it results in a QoS hierarchy being built on the corresponding bridge (yes, this feature is type='network' only). The reason is we

[libvirt] [PATCH 0/2] Re: libvirtd live-locking on CTX_LOCK when doing 'virsh domid save /tmp/blah' with guest corrupting memory (on purpose).

2015-04-14 Thread Ian Jackson
Konrad Rzeszutek Wilk writes (libvirtd live-locking on CTX_LOCK when doing 'virsh domid save /tmp/blah' with guest corrupting memory (on purpose).): It looks like thread #10 is blocking in libxl_read_exactly waiting for 'libxl-save-helper'. Said application (see below) has dispatched an

Re: [libvirt] [PATCH 0/5] Add vmport feature (v3)

2015-04-14 Thread Martin Kletzander
On Thu, Apr 02, 2015 at 07:02:30PM +0200, Marc-André Lureau wrote: Hi, The QEMU machine vmport option allows to set the VMWare IO port emulation. This emulation is useful for absolute pointer input when the guest has vmware input drivers, and is enabled by default for kvm. However it is

Re: [libvirt] [PATCH 1/5] docs: add domain vmport feature

2015-04-14 Thread Marc-André Lureau
On Tue, Apr 14, 2015 at 4:25 PM, Martin Kletzander mklet...@redhat.com wrote: This will break syntax-check (the\n the). good catch, fixed -- Marc-André Lureau -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Martin Kletzander
On Tue, Apr 14, 2015 at 05:58:45PM +0200, Marc-André Lureau wrote: Hi On Tue, Apr 14, 2015 at 4:25 PM, Martin Kletzander mklet...@redhat.com wrote: Is this not exposed in any way in QEMU? Do we really need to use this (what we're trying to avoid)? That works with the following change:

[libvirt] [PATCHv2] Emit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED in the QEMU driver

2015-04-14 Thread Ján Tomko
Only for devices that have an alias. --- v2: only set the alias when ret == 0 and emit the event before the alias can disappear mention that AttachMemory emits the event src/qemu/qemu_driver.c | 42 ++ src/qemu/qemu_hotplug.c | 5 + 2 files

Re: [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Eric Blake
On 04/14/2015 10:24 AM, Martin Kletzander wrote: That works with the following change: ACK with that squashed in, no need to resend it ;) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 768cef1..1b20a7f 100644 --- a/src/qemu/qemu_capabilities.c +++

Re: [libvirt] [PATCH] virNetSocketNewConnectUNIX: Use flocks when spawning a daemon

2015-04-14 Thread Ján Tomko
On Thu, Apr 02, 2015 at 06:21:01PM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1200149 Even though we have a mutex mechanism so that two clients don't spawn two daemons, it's not strong enough. It can happen that while one client is spawning the daemon, the

[libvirt] [PATCH 3/7] virDomainActualNetDefContentsFormat: Format class_id more frequently

2015-04-14 Thread Michal Privoznik
After a360912179 the formatting of virDomainActualNetDefPtr was changed a bit. However, during the function rewrite, iface's class_id is not formatted as frequently as it could be. In fact, after rewrite it's formatted only for iface of type VIR_DOMAIN_NET_TYPE_DIRECT where it makes no sense and

Re: [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Martin Kletzander
On Tue, Apr 14, 2015 at 10:07:00AM -0600, Eric Blake wrote: [adding qemu] On 04/14/2015 09:58 AM, Marc-André Lureau wrote: Hi On Tue, Apr 14, 2015 at 4:25 PM, Martin Kletzander mklet...@redhat.com wrote: Is this not exposed in any way in QEMU? Do we really need to use this (what we're

[libvirt] [PATCH 2/7] RNG schema: allow plain @floor to bandwidth/

2015-04-14 Thread Michal Privoznik
The inbound/ element to bandwidth/ has several attributes from which two are mandatory. Well, from two at least one has to be present: @average or @floor or both. Instead of inventing crazy RNG schema, let's make all the attributes optional there and rely on our parsing code to correctly handle

[libvirt] [PATCH 5/7] virnetdevbandwidth.c: Separate tc filter creation to a function

2015-04-14 Thread Michal Privoznik
Not only this simplifies the code a bit, it prepares the environment for upcoming patches. The new virNetDevBandwidthManipulateFilter() function is capable of both removing a filter and adding a new one. At the same time! Yeah, this is not currently used anywhere but look at the next commit where

[libvirt] [PATCH 4/7] virNetDevBandwidthSet: Add priority to filter

2015-04-14 Thread Michal Privoznik
Currently, when constructing traffic shaping rules, the ingress filter is created without any priority specified on the command line. This makes kernel to make up one. While this works, it simplifies things a big if we provide the filter priority. In this case, since it's the root filter lets have

[libvirt] [PATCH 0/7] QoS: Adapt to changing MAC

2015-04-14 Thread Michal Privoznik
While we taught libvirt to listen to MAC address changes from guests we forgot to update our QoS hierarchy accordingly. The first 3 patches are pure bug fixes and can go in regardless of state of the rest. The 4th patch is a slight improvement as it makes filter priority predictable. Then,

[libvirt] [PATCH 1/7] virNetDevBandwidthPlug: Update function description

2015-04-14 Thread Michal Privoznik
The comment is describing arguments passed to the function. However, there's no @ifmac argument. In 955af4d4 it was replaced with @ifmac_ptr. Unfortunately, the comment wasn't updated. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/util/virnetdevbandwidth.c | 2 +- 1 file changed,

Re: [libvirt] [PATCH 1/2] virnetdev: move virNetDevSysfsFile() upwards

2015-04-14 Thread Michal Privoznik
On 14.04.2015 18:21, Lubomir Rintel wrote: ...and provide a bogus implementation for non-Linux. No functional change. We'd like to use it from within virNetDevSetNamespace() to determine if we need to move a 802.11 PHY to a namespace when moving the interface. --- src/util/virnetdev.c | 34

Re: [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Martin Kletzander
On Thu, Apr 02, 2015 at 07:02:33PM +0200, Marc-André Lureau wrote: vmport machine argument is only supported since qemu 2.2.0 --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCHv2 7/7] qemu: monitor: Refactor and fix monitor checking

2015-04-14 Thread Peter Krempa
Among all the monitor APIs some where checking if mon is NULL and some were not. Since it's possible to have mon equal to NULL in case a second call is attempted once entered the monitor. This requires that every single API checks for the monitor. This patch adds a macro that helps checking the

Re: [libvirt] [PATCH] sanlock: Use VIR_ERR_RESOURCE_BUSY if sanlock_acquire fails

2015-04-14 Thread Eric Blake
On 04/14/2015 08:40 AM, Jiri Denemark wrote: When acquiring resource via sanlock fails, we would report it as VIR_ERR_INTERNAL_ERROR, which is not very friendly to applications using libvirt. Moreover, the lockd driver would report the same failure as VIR_ERR_RESOURCE_BUSY, which looks better.

Re: [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Marc-André Lureau
Hi On Tue, Apr 14, 2015 at 4:25 PM, Martin Kletzander mklet...@redhat.com wrote: Is this not exposed in any way in QEMU? Do we really need to use this (what we're trying to avoid)? That works with the following change: diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCHv2 1/7] qemu: monitor: Clean up coding style

2015-04-14 Thread Peter Krempa
Fix line spacing between functions, ensure that function return type is on a separate line and reflow arguments for VIR_DEBUG statements. --- src/qemu/qemu_monitor.c | 836 1 file changed, 492 insertions(+), 344 deletions(-) diff --git

[libvirt] [PATCHv2 2/7] qemu: monitor: Sanitize control flow in qemuMonitorSetCapabilities

2015-04-14 Thread Peter Krempa
--- src/qemu/qemu_monitor.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 398c236..fcdd41d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1527,7 +1527,6 @@

[libvirt] [PATCHv2 4/7] qemu: monitor: Don't use 'ret' variable where not necessary

2015-04-14 Thread Peter Krempa
Quite a lot places set the 'ret' variable just once right before returning it's value. Remove such usage. --- src/qemu/qemu_monitor.c | 465 +--- 1 file changed, 167 insertions(+), 298 deletions(-) diff --git a/src/qemu/qemu_monitor.c

[libvirt] [PATCH] sanlock: Use VIR_ERR_RESOURCE_BUSY if sanlock_acquire fails

2015-04-14 Thread Jiri Denemark
When acquiring resource via sanlock fails, we would report it as VIR_ERR_INTERNAL_ERROR, which is not very friendly to applications using libvirt. Moreover, the lockd driver would report the same failure as VIR_ERR_RESOURCE_BUSY, which looks better. Unfortunately, in sanlock driver we don't

[libvirt] [PATCHv2 5/7] qemu: monitor: @running in qemuMonitorGetStatus is always non-NULL

2015-04-14 Thread Peter Krempa
Add the attribute and remove the check. --- src/qemu/qemu_monitor.c | 4 ++-- src/qemu/qemu_monitor.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index c91a660..20605cd 100644 --- a/src/qemu/qemu_monitor.c +++

[libvirt] [PATCHv2 3/7] qemu: monitor: Ensure that qemuMonitorSetLink is called with non-null name

2015-04-14 Thread Peter Krempa
--- src/qemu/qemu_monitor.c | 6 +++--- src/qemu/qemu_monitor.h | 3 ++- src/qemu/qemu_process.c | 6 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index fcdd41d..d251ae1 100644 --- a/src/qemu/qemu_monitor.c +++

[libvirt] [PATCHv2 6/7] qemu: monitor: Fix qemuMonitorGetAllBlockStatsInfo with HMP

2015-04-14 Thread Peter Krempa
Commit f6563bc3 introduced HMP impl of the function (so that a different uglier function could be removed). Before the HMP code is called there's a leftover check that the monitor is JSON which inhibits the code from working. --- src/qemu/qemu_monitor.c | 6 -- 1 file changed, 6 deletions(-)

[libvirt] [PATCH 1/2] virnetdev: move virNetDevSysfsFile() upwards

2015-04-14 Thread Lubomir Rintel
...and provide a bogus implementation for non-Linux. No functional change. We'd like to use it from within virNetDevSetNamespace() to determine if we need to move a 802.11 PHY to a namespace when moving the interface. --- src/util/virnetdev.c | 34 ++ 1 file

[libvirt] [PATCH 2/2] lxc: move wireless PHYs to a network namespace

2015-04-14 Thread Lubomir Rintel
The 802.11 interfaces can not be moved by themselves, their Phy has to move too. If there are other interfaces, they have to move too -- hopefully it's not too confusing. This is a less-invasive alternative to defining a new hostdev type for PHYs. --- src/util/virnetdev.c | 31

[libvirt] [PATCH 0/2] lxc: allow using 802.11 wireless interfaces in LXC domains

2015-04-14 Thread Lubomir Rintel
Hi, I'm using libvirt-lxc with mac80211_hwsim to construct virtual wireless network for NetworkManager testing. Currently, I have to move the interfaces to the domains manually, as sharing wan 802.11 wireless link with a LXC namespace does not work: hostdev mode='capabilities' type='net'

Re: [libvirt] [PATCH 1/5] docs: add domain vmport feature

2015-04-14 Thread Martin Kletzander
On Thu, Apr 02, 2015 at 07:02:31PM +0200, Marc-André Lureau wrote: A new feature that can be turned on or off. The QEMU machine vmport option allows to set the VMWare IO port emulation. This emulation is useful for absolute pointer input when the guest has vmware input drivers, and is enabled

Re: [libvirt] [PATCH] qemu: monitor: Add check that monitor is non-null to specific commands

2015-04-14 Thread Peter Krempa
On Tue, Apr 14, 2015 at 14:09:45 +0200, Martin Kletzander wrote: On Fri, Apr 10, 2015 at 04:45:09PM +0200, Peter Krempa wrote: Our monitor locking and cleanup code is weird as it allows to remove the monitor object pointer while we are in the monitor. Additionally EVERY api is using the vm

Re: [libvirt] [PATCH] libxl: Disallow save or migrate when host devices are assigned to a guest.

2015-04-14 Thread Jim Fehlig
Konrad Rzeszutek Wilk wrote: It is unhealthy. If the device is not doing any DMA operations it would work - but if you are saving and there are DMA operations happening the chance of corruption (outstanding DMAs) increase. As such re-use the check migration used. s/used// ?

[libvirt] [PATCH v3 2/6] qemu: Use domain iothreadids to IOThread's 'thread_id'

2015-04-14 Thread John Ferlan
Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the 'thread_id' as returned from the live qemu monitor data. Remove the iothreadpids list from _qemuDomainObjPrivate and replace with the new iothreadids 'thread_id' element. Rather than use the default numbering scheme of

[libvirt] [PATCH v3 0/6] Implement Add/Del IOThreads

2015-04-14 Thread John Ferlan
v2: http://www.redhat.com/archives/libvir-list/2015-April/msg00426.html Differences: Patch 1 (old patch 3): - virDomainIOThreadIDDefParseXML: - Fix error message for id (was element, change to attribute for iothread element) - Silently bump the 'def-iothreads' count if there are a

[libvirt] [PATCH v3 1/6] conf: Add new domain XML element 'iothreadids'

2015-04-14 Thread John Ferlan
Adding a new XML element 'iothreadids' in order to allow defining specific IOThread ID's rather than relying on the algorithm to assign IOThread ID's starting at 1 and incrementing to iothreads count. This will allow future patches to be able to add new IOThreads by a specific iothread_id and of

[libvirt] [PATCH v3 4/6] remote: Add support for AddIOThread and DelIOThread

2015-04-14 Thread John Ferlan
Add remote support for the add/delete IOThread API's Signed-off-by: John Ferlan jfer...@redhat.com --- src/remote/remote_driver.c | 2 ++ src/remote/remote_protocol.x | 30 +- src/remote_protocol-structs | 12 3 files changed, 43 insertions(+), 1

[libvirt] [PATCH v3 5/6] qemu: Add support to Add/Delete IOThreads

2015-04-14 Thread John Ferlan
Add qemuDomainAddIOThread and qemuDomainDelIOThread in order to add or remove an IOThread to/from the host either for live or config optoins The implementation for the 'live' option will use the iothreadpids list in order to make decision, while the 'config' option will use the iothreadids list.

[libvirt] [PATCH v3 6/6] virsh: Add iothreadadd and iothreaddel commands

2015-04-14 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1161617 Add command to allow adding and removing IOThreads from the domain including the configuration and live domain. $ virsh iothreadadd --help NAME iothreadadd - add an IOThread to the guest domain SYNOPSIS iothreadadd domain id

[libvirt] [PATCH v3 3/6] Implement virDomainAddIOThread and virDomainDelIOThread

2015-04-14 Thread John Ferlan
Add libvirt API's to manage adding and deleting IOThreads to/from the domain Signed-off-by: John Ferlan jfer...@redhat.com --- include/libvirt/libvirt-domain.h | 6 ++ src/driver-hypervisor.h | 12 src/libvirt-domain.c | 118 +++

Re: [libvirt] [PATCH] qemu: save domain status after set memory parameters

2015-04-14 Thread Shanzhi Yu
On 04/14/2015 07:54 PM, Ján Tomko wrote: On Tue, Apr 14, 2015 at 06:24:41PM +0800, Shanzhi Yu wrote: After set memory parameters for running domain, save the change to live xml is needed otherwise it will disappear after restart libvirtd. Resolves:

Re: [libvirt] [PATCH 1/9] storage: Refactor iSCSI Source matching

2015-04-14 Thread John Ferlan
On 04/14/2015 02:43 AM, Peter Krempa wrote: On Mon, Apr 13, 2015 at 15:35:46 -0400, John Ferlan wrote: On 04/13/2015 05:27 AM, Peter Krempa wrote: On Thu, Apr 02, 2015 at 13:39:38 -0400, John Ferlan wrote: Create a separate iSCSI Source matching subroutine. Makes the calling code a bit

[libvirt] [PATCH] Add articles to virDomainDeviceDetachFlags docs

2015-04-14 Thread Ján Tomko
Reported by John Ferlan. --- Pushed as trivial. src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 0acfd13..ccacdb4 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -8463,7 +8463,7 @@

Re: [libvirt] [PATCH 1/2] Add VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event

2015-04-14 Thread John Ferlan
On 04/14/2015 09:35 AM, Ján Tomko wrote: On Mon, Apr 13, 2015 at 01:59:39PM -0400, John Ferlan wrote: On 04/04/2015 01:16 PM, Ján Tomko wrote: The counterpart to VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED. https://bugzilla.redhat.com/show_bug.cgi?id=1206114 --- daemon/remote.c

Re: [libvirt] [PATCH 3/2] Add an example for EVENT_ID_DEVICE_ADDED

2015-04-14 Thread John Ferlan
On 04/14/2015 08:58 AM, Ján Tomko wrote: --- examples/object-events/event-test.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) ACK - thanks John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] Emit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED in the QEMU driver

2015-04-14 Thread Ján Tomko
On Mon, Apr 13, 2015 at 02:03:57PM -0400, John Ferlan wrote: On 04/04/2015 01:16 PM, Ján Tomko wrote: Only for devices that have an alias. --- src/qemu/qemu_driver.c | 17 - src/qemu/qemu_hotplug.c | 5 + 2 files changed, 21 insertions(+), 1 deletion(-)

[libvirt] [PATCH] build: include correct header for time()

2015-04-14 Thread Eric Blake
Found by ./autobuild.sh during a mingw cross-compile: Commit 8a96e87 was not innocuous - glibc happens to leak the definition of time() through other headers, so that even without sys/select.h, virrandom.c compiled just fine. But on mingw, we were not so lucky; sys/select.h was important for its

[libvirt] [PATCH] build: provide virNetDevSysfsFile on non-Linux

2015-04-14 Thread Eric Blake
Commit 49ed6cff is broken on mingw and other non-linux platforms: CCLD libvirt.la Cannot export virNetDevSysfsFile: symbol not defined collect2: error: ld returned 1 exit status * src/util/virnetdev.c: Provide virNetDevSysfsFile fallback. Signed-off-by: Eric Blake ebl...@redhat.com

[libvirt] [PATCH] virsh: fix regression in 'virsh event' by domain

2015-04-14 Thread Eric Blake
Commit a0670ae caused a regression in 'virsh event' and 'virsh qemu-monitor-event' - if a user tries to filter the command to a specific domain, an error message is printed: $ virsh event dom --loop error: internal error: virsh qemu-monitor-event: no domain VSH_OT_DATA option and then the

Re: [libvirt] [PATCH] qemu: fix index error when clean up vport profile

2015-04-14 Thread Martin Kletzander
On Wed, Apr 08, 2015 at 02:40:15AM +0800, Huanle Han wrote: 1. 'last_good_net' indicates the index of last successfully configured net. so def-nets[last_good_net] should also be clean up if error occurs. 2. if error occurs in 'virNetDevMacVLanVPortProfileRegisterCallback' (second 'goto

Re: [libvirt] [PATCH] xen: fix build error on rhel-5

2015-04-14 Thread Eric Blake
On 04/14/2015 06:43 AM, Pavel Hrdina wrote: ../../src/xen/block_stats.c:82: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/xen/block_stats.c | 6 +++--- 1 file changed, 3

Re: [libvirt] [PATCH] xen: fix build error on rhel-5

2015-04-14 Thread Pavel Hrdina
On Tue, Apr 14, 2015 at 07:03:53AM -0600, Eric Blake wrote: On 04/14/2015 06:43 AM, Pavel Hrdina wrote: ../../src/xen/block_stats.c:82: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Pavel Hrdina phrd...@redhat.com ---

[libvirt] [PATCH] xen: fix build error on rhel-5

2015-04-14 Thread Pavel Hrdina
../../src/xen/block_stats.c:82: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/xen/block_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH] hostdev: fix loop index error when resetvfnetconfig

2015-04-14 Thread Martin Kletzander
On Thu, Apr 02, 2015 at 11:56:19PM +0800, Huanle Han wrote: The variable 'last_processed_hostdev_vf' indicates index of the last successfully configed vf. When resetvfnetconfig because of failure, hostdevs[last_processed_hostdev_vf] should also be reset. Signed-off-by: Huanle Han

Re: [libvirt] [PATCH 0/5] Prohibit use of 'index' for variable

2015-04-14 Thread Martin Kletzander
On Tue, Apr 14, 2015 at 07:54:56AM -0400, John Ferlan wrote: Given the recent Xen-devel build failure/issue - this series of patches will remove our uses of '[unsigned] int index' and then generate a rule for it John Ferlan (5): qemu: Adjust the prototype to match the function util: Use 'idx'

[libvirt] [PATCH 3/2] Add an example for EVENT_ID_DEVICE_ADDED

2015-04-14 Thread Ján Tomko
--- examples/object-events/event-test.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c index db7acd9..4f17273 100644 --- a/examples/object-events/event-test.c +++