[libvirt] [PATCH go-xml] 1, add support for disk cache and io, and add test case. 2, add support for controller model, and add test case. 3, extend DomainAddress struct for PCI address and target

2017-05-26 Thread zhenwei.pi
--- domain.go | 13 +++-- domain_test.go | 56 +--- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/domain.go b/domain.go index 848835a..cbb22e5 100644 --- a/domain.go +++ b/domain.go @@ -30,8 +30,10 @@ import ( )

[libvirt] [PATCH] fix memory leak in daemonUnixSocketPaths and qemuMonitorJSONAttachCharDevCommand

2017-05-26 Thread Yi Wang
From: Xi Xu The @rundir is allocated in virGetUserRuntimeDirectory, may lost when virFileMakePath failed. The tlsalias allocated in qemuAliasTLSObjFromSrcAlias may lost when append string to json. --- daemon/libvirtd.c| 1 + src/qemu/qemu_monitor_json.c | 2 ++ 2

Re: [libvirt] [PATCH v3 2/3] qemu : Add loadparm to qemu command line string

2017-05-26 Thread John Ferlan
... >> Was there ever thought to adding loadparm to the machine XML? What's the >> reasoning to not have it there. If it's only valid for bootindex=1, >> then it's far easier to check if the machine XML has it defined rather >> than perusing the disk/network lists (which could be lengthy) only

[libvirt] [PATCH] virsh: ignore readline -Wstrict-prototypes warning

2017-05-26 Thread Roman Bogorodskiy
When building with clang 4.0.0, virsh build fails like this: gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools' CC virsh-virsh.o In file included from virsh.c:45: In file included from /usr/local/include/readline/readline.h:31:

Re: [libvirt] [PATCH] util: fix virfcp build on non-Linux

2017-05-26 Thread John Ferlan
On 05/26/2017 12:05 PM, Roman Bogorodskiy wrote: > - Include virerror.h for virReportSystemError > - Rename stub functions to match original function names > --- > Pushed under the build breaker rule. > > src/util/virfcp.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >

[libvirt] [PATCH] util: fix virfcp build on non-Linux

2017-05-26 Thread Roman Bogorodskiy
- Include virerror.h for virReportSystemError - Rename stub functions to match original function names --- Pushed under the build breaker rule. src/util/virfcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/virfcp.c b/src/util/virfcp.c index

Re: [libvirt] [PATCH 0/7] extend node_device for CCW and fc_remote_port

2017-05-26 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: > On Fri, May 26, 2017 at 07:11:53AM -0400, John Ferlan wrote: > > > > > > On 05/26/2017 03:15 AM, Bjoern Walk wrote: > > > Thanks a lot for your review John. > > > > > > If you don't mind, you can make the adjustments you mentioned and push, > > > as I can only

Re: [libvirt] [PATCH 0/7] extend node_device for CCW and fc_remote_port

2017-05-26 Thread Daniel P. Berrange
On Fri, May 26, 2017 at 07:11:53AM -0400, John Ferlan wrote: > > > On 05/26/2017 03:15 AM, Bjoern Walk wrote: > > Thanks a lot for your review John. > > > > If you don't mind, you can make the adjustments you mentioned and push, > > as I can only prepare a v2 on Monday and I wanted to get this

Re: [libvirt] [PATCH v3 2/3] qemu : Add loadparm to qemu command line string

2017-05-26 Thread Farhan Ali
On 05/25/2017 08:34 PM, John Ferlan wrote: On 05/23/2017 09:27 AM, Farhan Ali wrote: Introduce a new QEMU capability for loadparm and if the capability is supported by QEMU then append the loadparm value to "-machine" string of qemu command line. Signed-off-by: Farhan Ali

[libvirt] [libvirt-php PATCH] use proper arginfo for libvirt_domain_create

2017-05-26 Thread Dawid Zamirski
this function takes only resource argument. --- src/libvirt-php.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index bfc9b7d..99d6397 100644 --- a/src/libvirt-php.c +++ b/src/libvirt-php.c @@ -629,7 +629,7 @@ static zend_function_entry

Re: [libvirt] [PATCH v3 1/3] conf : Add loadparm boot option for a boot device

2017-05-26 Thread Farhan Ali
On 05/25/2017 07:58 PM, John Ferlan wrote: On 05/23/2017 09:27 AM, Farhan Ali wrote: Update the per device boot schema to add an optional loadparm parameter. Extend the virDomainDeviceInfo to support loadparm option. Modify the appropriate functions to parse loadparm from boot device xml.

Re: [libvirt] [PATCH v2 11/11] interface: Alter virInterfaceObjListAssignDef @def param

2017-05-26 Thread John Ferlan
On 05/26/2017 08:55 AM, Peter Krempa wrote: > On Fri, May 26, 2017 at 07:59:10 -0400, John Ferlan wrote: >> Rather than pass by value, let's pass by reference since the object ends >> up "owning" the XML definition, let's make that ownership a bit more real. >> >> Signed-off-by: John Ferlan

Re: [libvirt] [PATCH v2 09/11] interface: Introduce virInterfaceObjEndAPI

2017-05-26 Thread John Ferlan
On 05/26/2017 08:56 AM, Peter Krempa wrote: > On Fri, May 26, 2017 at 07:59:08 -0400, John Ferlan wrote: >> For now it'll just call the virInterfaceObjUnlock, but a future adjustment >> will do something different. >> >> The virInterfaceObjUnlock is now private to virinterfaceobj.c with a >>

Re: [libvirt] [PATCH v2 02/11] interface: Remove some unnecessary goto's for Interface tests

2017-05-26 Thread John Ferlan
On 05/26/2017 08:27 AM, Peter Krempa wrote: > On Fri, May 26, 2017 at 07:59:01 -0400, John Ferlan wrote: >> Rather than using goto cleanup on object find failure and having cleanup >> need to check if the obj was present before unlocking, just return >> immediately. >> >> Signed-off-by: John

Re: [libvirt] [PATCH v2 04/14] nodedev: Use switch for virNodeDeviceObjHasCap and virNodeDeviceCapMatch

2017-05-26 Thread John Ferlan
On 05/26/2017 08:36 AM, Peter Krempa wrote: > On Fri, May 26, 2017 at 08:22:26 -0400, John Ferlan wrote: >> >> >> On 05/26/2017 03:14 AM, Peter Krempa wrote: >>> On Thu, May 25, 2017 at 15:57:01 -0400, John Ferlan wrote: In order to ensure that whenever something is added to

Re: [libvirt] [PATCH go-xml] add support for disk cache and io add support for controller model extend DomainAddress struct for PCI address and target

2017-05-26 Thread Daniel P. Berrange
On Fri, May 26, 2017 at 06:50:58PM +0800, zhenwei.pi wrote: > --- > domain.go | 13 +++-- > domain_test.go | 31 --- > 2 files changed, 39 insertions(+), 5 deletions(-) > > diff --git a/domain.go b/domain.go > index 848835a..1382cd0 100644 > ---

Re: [libvirt] Double deference error in libvirt_virConnectDomainEventRegisterAny

2017-05-26 Thread Daniel P. Berrange
On Fri, May 26, 2017 at 04:39:17PM +0800, fangying wrote: > Hi, > We'd like to report a double dereference error of 'pyobj_cbData' in > libvirt_virConnectDomainEventRegisterAny. > The bug can be triggered in the situation where 'domainEventRegisterAny' > (the python interface of

Re: [libvirt] [PATCH v2 13/14] nodedev: Pass @def by reference to create/assign object

2017-05-26 Thread John Ferlan
On 05/26/2017 08:12 AM, Peter Krempa wrote: > On Thu, May 25, 2017 at 15:57:10 -0400, John Ferlan wrote: >> Since the @def is consumed by the assignment function, let's pass by >> reference instead of value and really consume it. >> >> Signed-off-by: John Ferlan >> --- >>

[libvirt] [PATCH go-xml] add support for disk cache and io add support for controller model extend DomainAddress struct for PCI address and target

2017-05-26 Thread zhenwei.pi
--- domain.go | 13 +++-- domain_test.go | 31 --- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/domain.go b/domain.go index 848835a..1382cd0 100644 --- a/domain.go +++ b/domain.go @@ -30,8 +30,10 @@ import ( ) type DomainController

[libvirt] Double deference error in libvirt_virConnectDomainEventRegisterAny

2017-05-26 Thread fangying
Hi, We'd like to report a double dereference error of 'pyobj_cbData' in libvirt_virConnectDomainEventRegisterAny. The bug can be triggered in the situation where 'domainEventRegisterAny' (the python interface of libvirt_virConnectDomainEventRegisterAny) is invoked and network connection

Re: [libvirt] [PATCH v2 06/14] nodedev: Cleanup driver code and prototypes

2017-05-26 Thread John Ferlan
On 05/26/2017 04:13 AM, Peter Krempa wrote: > On Thu, May 25, 2017 at 15:57:03 -0400, John Ferlan wrote: >> Alter the node_device_driver source and prototypes to follow more >> recent code style guidelines w/r/t spacing between functions, format >> of the function, and the prototype definitions.

Re: [libvirt] [PATCH v2 09/11] interface: Introduce virInterfaceObjEndAPI

2017-05-26 Thread Peter Krempa
On Fri, May 26, 2017 at 07:59:08 -0400, John Ferlan wrote: > For now it'll just call the virInterfaceObjUnlock, but a future adjustment > will do something different. > > The virInterfaceObjUnlock is now private to virinterfaceobj.c with a > short term forward reference. > > Additionally, make

Re: [libvirt] [PATCH v2] rpc: Allow up to 256K records to be returned per domain from virConnectGetAllDomainStats.

2017-05-26 Thread Peter Krempa
On Fri, May 26, 2017 at 13:50:08 +0100, Richard W.M. Jones wrote: > The number of records that virConnectGetAllDomainStats can return per > domain is currently limited to 4096. This is quite low -- for > example, a single guest with ~320 disks will hit this limit. This > increases the limit to

Re: [libvirt] [PATCH v2 11/11] interface: Alter virInterfaceObjListAssignDef @def param

2017-05-26 Thread Peter Krempa
On Fri, May 26, 2017 at 07:59:10 -0400, John Ferlan wrote: > Rather than pass by value, let's pass by reference since the object ends > up "owning" the XML definition, let's make that ownership a bit more real. > > Signed-off-by: John Ferlan > --- >

[libvirt] [PATCH v2] rpc: Allow up to 256K records to be returned per domain from virConnectGetAllDomainStats.

2017-05-26 Thread Richard W.M. Jones
The number of records that virConnectGetAllDomainStats can return per domain is currently limited to 4096. This is quite low -- for example, a single guest with ~320 disks will hit this limit. This increases the limit to make it much larger. Note that VIR_NET_MESSAGE_MAX still protects the

Re: [libvirt] [PATCH v2 05/14] nodedev: Use common naming for virnodedeviceobj

2017-05-26 Thread John Ferlan
On 05/26/2017 03:15 AM, Peter Krempa wrote: > On Thu, May 25, 2017 at 15:57:02 -0400, John Ferlan wrote: >> A virNodeDeviceObjPtr is an @obj >> >> A virNodeDeviceObjListPtr is an @devs >> >> Signed-off-by: John Ferlan >> --- >> src/conf/virnodedeviceobj.c | 130 >>

Re: [libvirt] [PATCH] rpc: Allow up to 256K records to be returned from virConnectGetAllDomainStats.

2017-05-26 Thread Daniel P. Berrange
On Fri, May 26, 2017 at 01:29:20PM +0100, Richard W.M. Jones wrote: > In commit 89a706681cb3a4aa003d920db3163b809cfbc9ca, the returned > array of stats is limited to REMOTE_DOMAIN_LIST_MAX entries (4096). > > As well as being far too low -- this breaks if a single guest is added > with 320 disks

Re: [libvirt] [PATCH] rpc: Allow up to 256K records to be returned from virConnectGetAllDomainStats.

2017-05-26 Thread Peter Krempa
On Fri, May 26, 2017 at 13:29:20 +0100, Richard W.M. Jones wrote: > In commit 89a706681cb3a4aa003d920db3163b809cfbc9ca, the returned > array of stats is limited to REMOTE_DOMAIN_LIST_MAX entries (4096). > > As well as being far too low -- this breaks if a single guest is added > with 320 disks --

Re: [libvirt] [PATCH v2 04/14] nodedev: Use switch for virNodeDeviceObjHasCap and virNodeDeviceCapMatch

2017-05-26 Thread Peter Krempa
On Fri, May 26, 2017 at 08:22:26 -0400, John Ferlan wrote: > > > On 05/26/2017 03:14 AM, Peter Krempa wrote: > > On Thu, May 25, 2017 at 15:57:01 -0400, John Ferlan wrote: > >> In order to ensure that whenever something is added to virNodeDevCapType > >> that both functions are considered for

[libvirt] [PATCH] rpc: Allow up to 256K records to be returned from virConnectGetAllDomainStats.

2017-05-26 Thread Richard W.M. Jones
In commit 89a706681cb3a4aa003d920db3163b809cfbc9ca, the returned array of stats is limited to REMOTE_DOMAIN_LIST_MAX entries (4096). As well as being far too low -- this breaks if a single guest is added with 320 disks -- it also seems as if use of REMOTE_DOMAIN_LIST_MAX was a mistake, and it

Re: [libvirt] [PATCH v2 02/11] interface: Remove some unnecessary goto's for Interface tests

2017-05-26 Thread Peter Krempa
On Fri, May 26, 2017 at 07:59:01 -0400, John Ferlan wrote: > Rather than using goto cleanup on object find failure and having cleanup > need to check if the obj was present before unlocking, just return > immediately. > > Signed-off-by: John Ferlan > --- >

Re: [libvirt] [PATCH v2 04/14] nodedev: Use switch for virNodeDeviceObjHasCap and virNodeDeviceCapMatch

2017-05-26 Thread John Ferlan
On 05/26/2017 03:14 AM, Peter Krempa wrote: > On Thu, May 25, 2017 at 15:57:01 -0400, John Ferlan wrote: >> In order to ensure that whenever something is added to virNodeDevCapType >> that both functions are considered for processing of a new capability, >> change the if-then-else construct into

Re: [libvirt] [PATCH] rpc: Double buffer size instead of quadrupling buffer size.

2017-05-26 Thread Peter Krempa
On Fri, May 26, 2017 at 13:02:15 +0100, Richard W.M. Jones wrote: > When increasing the buffer size up to VIR_NET_MESSAGE_MAX, we > currently quadruple it each time. This unfortunately means that we > cannot allow certain buffer sizes -- for example the current > VIR_NET_MESSAGE_MAX == 33554432

Re: [libvirt] [PATCH v2 14/14] nodedev: Introduce virNodeDeviceObjNew

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:11 -0400, John Ferlan wrote: > Create an allocator for the virNodeDeviceObjPtr - include setting up > the mutex, saving the virNodeDeviceDefPtr, and locking the return object. > > Signed-off-by: John Ferlan > --- > src/conf/virnodedeviceobj.c |

Re: [libvirt] [PATCH v2 13/14] nodedev: Pass @def by reference to create/assign object

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:10 -0400, John Ferlan wrote: > Since the @def is consumed by the assignment function, let's pass by > reference instead of value and really consume it. > > Signed-off-by: John Ferlan > --- > src/conf/virnodedeviceobj.c| 8 >

Re: [libvirt] [PATCH v2 12/14] nodedev: Remove privateData from virNodeDeviceObj

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:09 -0400, John Ferlan wrote: > It was only ever used in node_device_hal.c which really never used it > anyway since the NODE_DEV_UDI was never referenced. Remove free_udi() > and @privData as well as the references to obj->privateData & > obj->privateFree. > >

[libvirt] [PATCH] rpc: Double buffer size instead of quadrupling buffer size.

2017-05-26 Thread Richard W.M. Jones
When increasing the buffer size up to VIR_NET_MESSAGE_MAX, we currently quadruple it each time. This unfortunately means that we cannot allow certain buffer sizes -- for example the current VIR_NET_MESSAGE_MAX == 33554432 can never be "hit" since ‘newlen’ jumps from 16MB to 64MB. Instead of

Re: [libvirt] [PATCH v2 11/14] nodedev: Introduce virNodeDeviceObjGetDef

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:08 -0400, John Ferlan wrote: > In preparation for privatizing the virNodeDeviceObj - create an accessor > for the @def field and then use it for various callers. > > Signed-off-by: John Ferlan > --- > src/conf/virnodedeviceobj.c | 7

[libvirt] [PATCH v2 07/11] interface: Clean up virInterfaceObjListFindByMACString

2017-05-26 Thread John Ferlan
Alter the algorithm to return a list of matching names rather than a list of match virInterfaceObjPtr which are then just dereferenced extracting the def->name and def->mac. Since the def->mac would be the same as the passed @mac, just return a list of names and as long as there's only one,

[libvirt] [PATCH v2 00/11] Multiple cleanups within interfaceobj and interface driver

2017-05-26 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2017-April/msg01225.html I've been informed via internal IRC that the patches 9, 10, and 11 don't apply cleanly - so here's a clean series. John John Ferlan (11): interface: Consistently use 'obj' for a virInterfaceObjPtr interface: Remove

[libvirt] [PATCH v2 04/11] interface: Make _virInterfaceObj struct private

2017-05-26 Thread John Ferlan
Move the struct into virinterfaceobj.c, create necessary accessors, and initializers. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 28 src/conf/virinterfaceobj.h | 20 +--- src/libvirt_private.syms | 3 +++

[libvirt] [PATCH v2 02/11] interface: Remove some unnecessary goto's for Interface tests

2017-05-26 Thread John Ferlan
Rather than using goto cleanup on object find failure and having cleanup need to check if the obj was present before unlocking, just return immediately. Signed-off-by: John Ferlan --- src/test/test_driver.c | 37 + 1 file changed, 13

[libvirt] [PATCH v2 10/11] interface: Convert virInterfaceObj to use virObjectLockable

2017-05-26 Thread John Ferlan
Now that we have a bit more control, let's convert our object into a lockable object and let that magic handle the create and lock/unlock. Signed-off-by: John Ferlan --- po/POTFILES.in | 1 - src/conf/virinterfaceobj.c | 110

[libvirt] [PATCH v2 06/11] interface: Rename some virInterfaceObj* API's

2017-05-26 Thread John Ferlan
Prefix should have been virInterfaceObjList since the API is operating on the list of interfaces. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 37 +++-- src/conf/virinterfaceobj.h | 31 ---

[libvirt] [PATCH v2 11/11] interface: Alter virInterfaceObjListAssignDef @def param

2017-05-26 Thread John Ferlan
Rather than pass by value, let's pass by reference since the object ends up "owning" the XML definition, let's make that ownership a bit more real. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 12 +++- src/conf/virinterfaceobj.h | 2 +-

[libvirt] [PATCH v2 05/11] interface: Make _virInterfaceObjList struct private

2017-05-26 Thread John Ferlan
Move the structs into virinterfaceobj.c, create necessary accessors, and initializers. This also includes reworking virInterfaceObjListClone to handle receiving a source interfaces list pointer, creating the destination interfaces object, and copying everything from source into dest.

[libvirt] [PATCH v2 09/11] interface: Introduce virInterfaceObjEndAPI

2017-05-26 Thread John Ferlan
For now it'll just call the virInterfaceObjUnlock, but a future adjustment will do something different. The virInterfaceObjUnlock is now private to virinterfaceobj.c with a short term forward reference. Additionally, make virInterfaceObjLock private since it's only used in virinterfaceobj

[libvirt] [PATCH v2 03/11] interface: Use virInterfaceDefPtr rather than deref from virInterfaceObjPtr

2017-05-26 Thread John Ferlan
We're about to make the obj much more private, so make it easier to see future changes which will require accessors for the obj->def This also includes modifying some interfaces->objs[i]->X references to be obj = interfaces->objs[i]; and then def = obj->def Signed-off-by: John Ferlan

[libvirt] [PATCH v2 01/11] interface: Consistently use 'obj' for a virInterfaceObjPtr

2017-05-26 Thread John Ferlan
Alter variable names to be obj rather than 'iface' and/or 'obj'. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 48 ++-- src/conf/virinterfaceobj.h | 4 +-- src/test/test_driver.c | 78 +++---

[libvirt] [PATCH v2 08/11] interface: Introduce virInterfaceObjNew

2017-05-26 Thread John Ferlan
Create/use a helper to perform the object allocation Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c index

Re: [libvirt] [PATCH v2 02/14] nodedev: Fix locking in virNodeDeviceObjRemove

2017-05-26 Thread John Ferlan
On 05/26/2017 02:57 AM, Peter Krempa wrote: > On Thu, May 25, 2017 at 15:56:59 -0400, John Ferlan wrote: >> The current mechanism doesn't lock each element in devs->objs as it's >> looking at it, rather it keeps locking/unlocking the passed element for >> which the removal is being attempted.

Re: [libvirt] [PATCH] node: Don't return invalid pointers

2017-05-26 Thread Ján Tomko
On Fri, May 26, 2017 at 01:39:24PM +0200, Peter Krempa wrote: Commit 4337bc57be introduced code that would in certain error paths unref the last reference of a pointer, but return it. Clear the pointers before returning them --- src/node_device/node_device_driver.c | 8 ++--

Re: [libvirt] [PATCH v2 09/14] nodedev: Create helper for finding by name in driver

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:06 -0400, John Ferlan wrote: > Create nodeDeviceObjFindByName which will perform the corresponding > virNodeDeviceObjFindByName call for various node_device_driver callers > rather than having the same repetitive code. > > Signed-off-by: John Ferlan

Re: [libvirt] [PATCH v2 01/14] test: Adjust cleanup/error paths for nodedev test APIs

2017-05-26 Thread John Ferlan
On 05/26/2017 03:05 AM, Peter Krempa wrote: > On Thu, May 25, 2017 at 15:56:58 -0400, John Ferlan wrote: >> - Rather than "goto cleanup;" on failure to virNodeDeviceObjFindByName >>an @obj, just return directly. This then allows the cleanup: label code >>to not have to check "if (obj)"

[libvirt] [PATCH] node: Don't return invalid pointers

2017-05-26 Thread Peter Krempa
Commit 4337bc57be introduced code that would in certain error paths unref the last reference of a pointer, but return it. Clear the pointers before returning them --- src/node_device/node_device_driver.c | 8 ++-- src/test/test_driver.c | 4 +++- 2 files changed, 9

Re: [libvirt] [PATCH] node_device: fix memory leak in nodeDeviceSysfsGetSCSIHostCaps

2017-05-26 Thread Erik Skultety
On Thu, May 25, 2017 at 10:39:48PM -0400, Yi Wang wrote: > The @tmp is allocated in virVHBAGetConfig in virVHBAIsVportCapable > condition, it will lost when virVHBAGetConfig called again. > > Signed-off-by: Yi Wang > --- > src/node_device/node_device_linux_sysfs.c | 3 ++- >

Re: [libvirt] [PATCH 0/7] extend node_device for CCW and fc_remote_port

2017-05-26 Thread John Ferlan
On 05/26/2017 03:15 AM, Bjoern Walk wrote: > Thanks a lot for your review John. > > If you don't mind, you can make the adjustments you mentioned and push, > as I can only prepare a v2 on Monday and I wanted to get this in v3.4.0. > > Best, > Bjoern > I've made the adjustments and will push

Re: [libvirt] [PATCH 3/7] node_device: detect CCW devices

2017-05-26 Thread John Ferlan
... >> >> ... >> >>> diff --git a/tests/nodedevschemadata/ccw_0_0_1-invalid.xml >>> b/tests/nodedevschemadata/ccw_0_0_1-invalid.xml >>> new file mode 100644 >>> index 0..d840555c0 >>> --- /dev/null >>> +++ b/tests/nodedevschemadata/ccw_0_0_1-invalid.xml >>> @@ -0,0 +1,10 @@

Re: [libvirt] [PATCH 4/7] virsh: nodedev: ability to filter CCW capabilities

2017-05-26 Thread John Ferlan
On 05/26/2017 03:00 AM, Bjoern Walk wrote: > John Ferlan [2017-05-25, 03:21PM -0400]: >> >> >> On 05/22/2017 02:38 AM, Bjoern Walk wrote: >>> Now that the node_device driver is aware of CCW devices, let's hook up >>> virsh so that we can filter them properly. >>> >>>

[libvirt] [PATCH] qemu: Don't special case mdevs when assigning PCI addresses

2017-05-26 Thread Andrea Bolognani
We can treat mdevs the same as all other PCI hostdevs and figure out whether they are PCI Express or legacy PCI by checking the size of their config space. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain_address.c | 3 --- 1 file changed, 3 deletions(-) diff --git

Re: [libvirt] [PATCH] util: fix memory leak in virSocketAddrFormatFull

2017-05-26 Thread Erik Skultety
On Thu, May 25, 2017 at 10:12:45PM -0400, Yi Wang wrote: > The @ipv6_host allocated in virAsprintf may be lost when virAsprintf > addrstr failed. > > Signed-off-by: Yi Wang > --- > src/util/virsocketaddr.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff

[libvirt] [PATCH v3 0/2] Check for

2017-05-26 Thread Michal Privoznik
v3 of: https://www.redhat.com/archives/libvir-list/2017-May/msg00939.html diff to v2: - moved xmlopt argument further the argument list in virDomainSnapshotRedefinePrep - drop couple of checks in qemuDomainABIStabilityCheck Patch 1/2 has been ACKed. But just conditionally. So I'm sending it

[libvirt] [PATCH v3 2/2] virQEMUDriverDomainABIStability: Check for memoryBacking

2017-05-26 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1450349 Problem is, qemu fails to load guest memory image if these attribute change on migration/restore from an image. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 2 ++ src/qemu/qemu_conf.c | 2 +-

[libvirt] [PATCH v3 1/2] virDomainXMLOption: Introduce virDomainABIStabilityDomain

2017-05-26 Thread Michal Privoznik
While checking for ABI stability, drivers might pose additional checks that are not valid for general case. For instance, qemu driver might check some memory backing attributes because of how qemu works. But those attributes may work well in other drivers. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 2/2] lxc: fixing wrong VIR_FREE after a return statement.

2017-05-26 Thread Martin Kletzander
On Thu, May 25, 2017 at 07:28:14PM -0300, Julio Faracco wrote: There is a VIR_FREE after a return statement. That code section is never executed and for this reason the "tty" variable is not being freed. This commit rearrange the logic. Same here, ACK with slight change in $SUBJ, will push

Re: [libvirt] [PATCH 1/2] configure: fixing acl missing variable.

2017-05-26 Thread Martin Kletzander
On Thu, May 25, 2017 at 07:27:25PM -0300, Julio Faracco wrote: This commit fixes an acl missing variable. The virt-acl.m4 inside the macro directory does not contain the variable 'with_acl'. So, it is being set as an empty string "with_acl=''". This is causing a missing option during the

Re: [libvirt] [PATCH 1/7] node_device: Use the iterator variable

2017-05-26 Thread Marc Hartmayer
On Thu, May 25, 2017 at 08:37 PM +0200, John Ferlan wrote: > On 05/22/2017 02:38 AM, Bjoern Walk wrote: >> From: Marc Hartmayer >> >> As the switch statement checks data.type of the iterator variable @cap >> it must use this variable for the

Re: [libvirt] [PATCH v2 3/3] virQEMUDriverDomainABIStability: Check for memoryBacking

2017-05-26 Thread Michal Privoznik
On 05/24/2017 05:06 PM, Daniel P. Berrange wrote: > On Wed, May 24, 2017 at 04:45:57PM +0200, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1450349 >> >> Problem is, qemu fails to load guest memory image if these >> attribute change on migration/restore from an image. > >

Re: [libvirt] Remotable Libvirt

2017-05-26 Thread Martin Kletzander
On Thu, May 25, 2017 at 10:16:26AM -0700, Peter Volpe wrote: Hi Everyone, We are working towards building on the virtualization management functionality in cockpit (http://cockpit-project.org/) and wanted to get some feedback on the best way to integrate with libvirt. As a quick overview,

Re: [libvirt] [PATCH v2 07/14] nodedev: Alter param to nodeDeviceUpdateDriverName

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:04 -0400, John Ferlan wrote: > Rather than taking an virNodeDeviceObjPtr and dereffing the obj->def, > just pass the def. > > Also check for an error in the function to have the calling function goto > cleanup on error. Again two semanticaly different changes in

Re: [libvirt] [PATCH v2 08/14] nodedev: Alter param to nodeDeviceUpdateCaps

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:05 -0400, John Ferlan wrote: > Rather than taking an virNodeDeviceObjPtr and dereffing the obj->def, > just pass the def. > > Signed-off-by: John Ferlan > --- > src/node_device/node_device_driver.c | 12 ++-- > 1 file changed, 6

Re: [libvirt] Remotable Libvirt

2017-05-26 Thread Daniel P. Berrange
On Thu, May 25, 2017 at 10:26:47AM -0700, Peter wrote: > As far as I know libvirt doesn't currently have a remoteable API. It does > have a daemon that communicates with clients via a XDR RPC. > (https://libvirt.org/internals/rpc.html) However from what I'm hearing the > RPC is considered an

Re: [libvirt] [PATCH v2 06/14] nodedev: Cleanup driver code and prototypes

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:03 -0400, John Ferlan wrote: > Alter the node_device_driver source and prototypes to follow more > recent code style guidelines w/r/t spacing between functions, format > of the function, and the prototype definitions. > > While the new names for nodeDeviceUpdateCaps,

Re: [libvirt] [PATCH 0/7] extend node_device for CCW and fc_remote_port

2017-05-26 Thread Bjoern Walk
Thanks a lot for your review John. If you don't mind, you can make the adjustments you mentioned and push, as I can only prepare a v2 on Monday and I wanted to get this in v3.4.0. Best, Bjoern -- IBM Systems Linux on z Systems & Virtualization Development

Re: [libvirt] [PATCH] CI: show the log in case of failure

2017-05-26 Thread Martin Kletzander
On Thu, May 25, 2017 at 07:54:13PM -0300, Claudio André wrote: Em 25/05/2017 11:15, Martin Kletzander escreveu: I need to investigate why this doesn't work, I don't have that file [...] Just figured that out. The systems in Travis are just so old that the automake there doesn't create the

Re: [libvirt] [PATCH v2 05/14] nodedev: Use common naming for virnodedeviceobj

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:02 -0400, John Ferlan wrote: > A virNodeDeviceObjPtr is an @obj > > A virNodeDeviceObjListPtr is an @devs > > Signed-off-by: John Ferlan > --- > src/conf/virnodedeviceobj.c | 130 > ++-- > 1 file

Re: [libvirt] [PATCH v2 04/14] nodedev: Use switch for virNodeDeviceObjHasCap and virNodeDeviceCapMatch

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:01 -0400, John Ferlan wrote: > In order to ensure that whenever something is added to virNodeDevCapType > that both functions are considered for processing of a new capability, > change the if-then-else construct into a switch statement. > > Signed-off-by: John

Re: [libvirt] [PATCH 1/1] CI: add code coverage analysis

2017-05-26 Thread Martin Kletzander
On Thu, May 25, 2017 at 08:44:48PM -0300, Claudio André wrote: Em 25/05/2017 03:49, Martin Kletzander escreveu: On Thu, May 25, 2017 at 01:14:36AM -0300, claudioandre...@gmail.com wrote: From: Claudio André It builds the code coverage report and uploads the

Re: [libvirt] [PATCH v2 03/14] nodedev: Need to check for vport capable scsi_host for vHBA searches

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:57:00 -0400, John Ferlan wrote: > When searching for an NPIV capable fc_host, not only does there need to > be an "fc_host" capability with the specified wwnn/wwpn or fabric_wwn, > but that scsi_host must be vport capable; otherwise, one could end up > picking an exising

Re: [libvirt] [PATCH 5/7] util: helper functions for fibre channel devices

2017-05-26 Thread Bjoern Walk
John Ferlan [2017-05-25, 03:23PM -0400]: On 05/22/2017 02:38 AM, Bjoern Walk wrote: We will need some convenient helper functions for managing sysfs-entries for fibre channel-backed devices. Let's implement them and make them available in the private API. Signed-off-by:

Re: [libvirt] [PATCH 7/7] docs: update news.xml

2017-05-26 Thread Bjoern Walk
John Ferlan [2017-05-25, 03:26PM -0400]: On 05/22/2017 02:38 AM, Bjoern Walk wrote: Mention CCW and fc_remote_port capablities in the news.xml file. Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk ---

Re: [libvirt] [PATCH 6/7] node_device: introduce new capability FC_RPORT

2017-05-26 Thread Bjoern Walk
John Ferlan [2017-05-25, 03:26PM -0400]: On 05/22/2017 02:38 AM, Bjoern Walk wrote: Similar to scsi_host and fc_host, there is a relation between a scsi_target and its transport specific fc_remote_port. Let's expose this relation and relevant information behind it. An

Re: [libvirt] [PATCH v2 01/14] test: Adjust cleanup/error paths for nodedev test APIs

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:56:58 -0400, John Ferlan wrote: > - Rather than "goto cleanup;" on failure to virNodeDeviceObjFindByName >an @obj, just return directly. This then allows the cleanup: label code >to not have to check "if (obj)" before calling virNodeDeviceObjUnlock. >This

Re: [libvirt] [PATCH 4/7] virsh: nodedev: ability to filter CCW capabilities

2017-05-26 Thread Bjoern Walk
John Ferlan [2017-05-25, 03:21PM -0400]: On 05/22/2017 02:38 AM, Bjoern Walk wrote: Now that the node_device driver is aware of CCW devices, let's hook up virsh so that we can filter them properly. Reviewed-by: Boris Fiuczynski Reviewed-by:

Re: [libvirt] [PATCH 3/7] node_device: detect CCW devices

2017-05-26 Thread Bjoern Walk
John Ferlan [2017-05-25, 03:05PM -0400]: One would hope they're in range, but since the rng had ranges should you check here similar to what virDomainDeviceCCWAddressIsValid does? It's fine this way since this is essentially reporting from udev which one can only assume

Re: [libvirt] [PATCH v2 02/14] nodedev: Fix locking in virNodeDeviceObjRemove

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:56:59 -0400, John Ferlan wrote: > The current mechanism doesn't lock each element in devs->objs as it's > looking at it, rather it keeps locking/unlocking the passed element for > which the removal is being attempted. Fix things to lock each element > as we're looking

Re: [libvirt] [PATCH 1/7] node_device: Use the iterator variable

2017-05-26 Thread Bjoern Walk
John Ferlan [2017-05-25, 02:37PM -0400]: On 05/22/2017 02:38 AM, Bjoern Walk wrote: From: Marc Hartmayer As the switch statement checks data.type of the iterator variable @cap it must use this variable for the update too. s/must/can... I