Re: [libvirt] [PATCH 1/3] virfile: Provide stub for virFileInData

2017-05-19 Thread Peter Krempa
On Fri, May 19, 2017 at 13:31:32 +0200, Michal Privoznik wrote: > On 05/19/2017 12:28 PM, Peter Krempa wrote: > > On Thu, May 18, 2017 at 15:46:44 +0200, Michal Privoznik wrote: > >> Some older systems (such as RHEL6) lack SEEK_HOLE and SEEK_DATA > >> which virFileInData relies on. Provide a stub

[libvirt] [PATCH] qemu: handle missing bind host/service on chardev hotplug

2017-05-19 Thread Ján Tomko
On domain startup, bind host or bind service can be omitted and we will format a working command line. Extend this to hotplug as well and specify the service to QEMU even if the host is missing. https://bugzilla.redhat.com/show_bug.cgi?id=1452441 --- src/qemu/qemu_monitor_json.c | 13

Re: [libvirt] [PATCH 2/3] virfiletest: Test virFileInData iff SEEK_HOLE is defined

2017-05-19 Thread Peter Krempa
On Thu, May 18, 2017 at 15:46:45 +0200, Michal Privoznik wrote: > Yet another place where we need to wrap code in > HAVE_DECL_SEEK_HOLE block. > > Signed-off-by: Michal Privoznik > --- > tests/virfiletest.c | 36 +++- > 1 file changed, 23

Re: [libvirt] [PATCH 2/3] virfiletest: Test virFileInData iff SEEK_HOLE is defined

2017-05-19 Thread Michal Privoznik
On 05/19/2017 12:36 PM, Peter Krempa wrote: > On Thu, May 18, 2017 at 15:46:45 +0200, Michal Privoznik wrote: >> Yet another place where we need to wrap code in >> HAVE_DECL_SEEK_HOLE block. >> >> Signed-off-by: Michal Privoznik >> --- >> tests/virfiletest.c | 36

Re: [libvirt] [PATCH 01/10] virt-aa-helper: Ask for no deny rule for readonly disk elements

2017-05-19 Thread Guido Günther
Hi Christian, On Fri, May 19, 2017 at 11:18:18AM +0200, Christian Ehrhardt wrote: > On Fri, May 19, 2017 at 10:03 AM, Guido Günther wrote: > > > But if we aim for a profile replace on blockcommit [1] the would't matter > > since the whole profile would get replaced, wouldn't

Re: [libvirt] [PATCH] qemu: hotplug: print correct vcpu when validating hot(un)plug config

2017-05-19 Thread Ján Tomko
On Fri, May 12, 2017 at 05:49:44PM +0200, Peter Krempa wrote: The error message would contain first vcpu id after the list of vcpus selected for modification. To print the proper vcpu id remember the first vcpu selected to be modified. --- src/qemu/qemu_hotplug.c | 9 +++-- 1 file changed, 7

Re: [libvirt] [PATCH] conf: Don't assign value from ..TypeFromString directly to enum

2017-05-19 Thread Ján Tomko
On Fri, May 19, 2017 at 10:27:57AM +0200, Peter Krempa wrote: Enums are unsigned, so it's impossible to check whether the helper returned -1 for invalid conversions. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452454 --- src/conf/domain_conf.c | 15 +-- 1 file changed, 9

Re: [libvirt] [PATCH] conf: Don't assign value from ..TypeFromString directly to enum

2017-05-19 Thread Pavel Hrdina
On Fri, May 19, 2017 at 10:27:57AM +0200, Peter Krempa wrote: > Enums are unsigned, so it's impossible to check whether the helper > returned -1 for invalid conversions. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452454 > --- > src/conf/domain_conf.c | 15 +-- > 1

Re: [libvirt] [PATCH 8/8] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-19 Thread Christian Ehrhardt
On Fri, May 19, 2017 at 9:55 AM, Guido Günther wrote: > LGTM but I don't know much about PPC64, it's SLOF and where the device > tree should be located. > Hi those paths for SLOF are the default one for Debian/Ubuntu at least. $ dpkg -L qemu-slof /. /usr /usr/share

Re: [libvirt] [PATCH 01/10] virt-aa-helper: Ask for no deny rule for readonly disk elements

2017-05-19 Thread Cedric Bosdonnat
Hi Christian, On Fri, 2017-05-19 at 11:18 +0200, Christian Ehrhardt wrote: > > On Fri, May 19, 2017 at 10:03 AM, Guido Günther wrote: > > But if we aim for a profile replace on blockcommit [1] the would't matter > > since the whole profile would get replaced, wouldn't it? > >

Re: [libvirt] [PATCH 0/8] Multiple cleanups within interfaceobj and interface driver

2017-05-19 Thread John Ferlan
ping^2? Tks - John On 05/09/2017 12:13 PM, John Ferlan wrote: > > ping? > > NB: In the virInterfaceObjList patch, I've added a > VIR_FREE(interfaces->objs); to virInterfaceObjListFree. It should be > obvious why... > > Tks - > > John > > On 04/25/2017 06:36 PM, John Ferlan wrote: >>

Re: [libvirt] [PATCH 00/19] Start altering storage code to privatize of the object

2017-05-19 Thread John Ferlan
ping? Tks - John On 05/09/2017 11:30 AM, John Ferlan wrote: > Begin the process of making adjustments to the storage pool and volume code > in order to privatize the virStoragePoolObj and virStoragePoolObjList > > Didn't want to post 40+ patches at one time... This is the first storage >

Re: [libvirt] [PATCH 15/19] storage: Introduce virStoragePoolObjForEachVolume

2017-05-19 Thread John Ferlan
On 05/19/2017 06:46 AM, Peter Krempa wrote: > On Tue, May 09, 2017 at 11:30:22 -0400, John Ferlan wrote: >> Create/Use API to "walk" the storage pool object volume list. >> >> Signed-off-by: John Ferlan >> --- >> src/conf/virstorageobj.c | 10 ++ >>

Re: [libvirt] [PATCH 01/10] virt-aa-helper: Ask for no deny rule for readonly disk elements

2017-05-19 Thread Guido Günther
On Fri, May 19, 2017 at 11:18:18AM +0200, Christian Ehrhardt wrote: > On Fri, May 19, 2017 at 10:03 AM, Guido Günther wrote: > > > But if we aim for a profile replace on blockcommit [1] the would't matter > > since the whole profile would get replaced, wouldn't it? > > > >

[libvirt] [PATCH] conf: Don't assign value from ..TypeFromString directly to enum

2017-05-19 Thread Peter Krempa
Enums are unsigned, so it's impossible to check whether the helper returned -1 for invalid conversions. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452454 --- src/conf/domain_conf.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

Re: [libvirt] [PATCH 01/10] virt-aa-helper: Ask for no deny rule for readonly disk elements

2017-05-19 Thread Christian Ehrhardt
On Fri, May 19, 2017 at 10:03 AM, Guido Günther wrote: > But if we aim for a profile replace on blockcommit [1] the would't matter > since the whole profile would get replaced, wouldn't it? > Since this is based on [1][2] looping in Cédric here to share some old explaiantions.

Re: [libvirt] [PATCH 1/3] virfile: Provide stub for virFileInData

2017-05-19 Thread Peter Krempa
On Thu, May 18, 2017 at 15:46:44 +0200, Michal Privoznik wrote: > Some older systems (such as RHEL6) lack SEEK_HOLE and SEEK_DATA > which virFileInData relies on. Provide a stub for these systems. > > Signed-off-by: Michal Privoznik > --- > configure.ac | 5 + >

Re: [libvirt] [PATCH 2/3] virfiletest: Test virFileInData iff SEEK_HOLE is defined

2017-05-19 Thread Peter Krempa
On Thu, May 18, 2017 at 15:46:45 +0200, Michal Privoznik wrote: > Yet another place where we need to wrap code in > HAVE_DECL_SEEK_HOLE block. > > Signed-off-by: Michal Privoznik > --- > tests/virfiletest.c | 36 +++- > 1 file changed, 23

Re: [libvirt] [PATCH 3/3] virfiletest: include linux/falloc.h

2017-05-19 Thread Peter Krempa
On Thu, May 18, 2017 at 15:46:46 +0200, Michal Privoznik wrote: > On systems with older glibc including fcntl.h for getting > FALLOC_FL_PUNCH_HOLE defined is not enough. We must also include > linux/falloc.h. > > Signed-off-by: Michal Privoznik > --- > tests/virfiletest.c |

Re: [libvirt] [PATCH 15/19] storage: Introduce virStoragePoolObjForEachVolume

2017-05-19 Thread Peter Krempa
On Tue, May 09, 2017 at 11:30:22 -0400, John Ferlan wrote: > Create/Use API to "walk" the storage pool object volume list. > > Signed-off-by: John Ferlan > --- > src/conf/virstorageobj.c | 10 ++ > src/conf/virstorageobj.h | 4 >

Re: [libvirt] [PATCH 1/3] virfile: Provide stub for virFileInData

2017-05-19 Thread Michal Privoznik
On 05/19/2017 12:28 PM, Peter Krempa wrote: > On Thu, May 18, 2017 at 15:46:44 +0200, Michal Privoznik wrote: >> Some older systems (such as RHEL6) lack SEEK_HOLE and SEEK_DATA >> which virFileInData relies on. Provide a stub for these systems. >> >> Signed-off-by: Michal Privoznik

[libvirt] [PATCH] util: Don't leak @replay in virSystemdGetMachineNameByPID

2017-05-19 Thread Wang King
@reply is a DBusMessage object returned by virDBusCallMethod in get machine object call path, dereference it before calling virDBusCallMethod again to get machine name. --- src/util/virsystemd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c

[libvirt] [PATCH v2] nodedev: Increase the netlink socket buffer size to the one used by udev

2017-05-19 Thread Erik Skultety
From: "ning.bo" When a number of SRIOV VFs (up to 128 on Intel XL710) is created: for i in `seq 0 1`; do echo 63 > /sys/class/net//device/sriov_numvfs done libvirtd will then report "udev_monitor_receive_device returned NULL" error because the netlink socket buffer is not

[libvirt] [PATCH 13/16] network: Consistent use of @obj for virnetworkobj

2017-05-19 Thread John Ferlan
Consistently use @obj for a virNetworkObjPtr. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 333 +++ 1 file changed, 166 insertions(+), 167 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c

[libvirt] [PATCH 14/16] network: Adjust virNetworkObjNew call and return

2017-05-19 Thread John Ferlan
Have the call take a virNetworkDefPtr and save it in the object. Have virNetworkObjNew return a locked obj Avoids the need for a virNetworkObjSetDef type API for the one test need. Update the test code and do some other name changes to make it look like other code. Signed-off-by: John Ferlan

[libvirt] [PATCH 05/16] network: Move macmap mgmt from bridge_driver to virnetworkobj

2017-05-19 Thread John Ferlan
In preparation for having a private virNetworkObj - let's create/move some API's that handle the obj->macmap. The API's will be renamed to have a virNetworkObj prefix to follow conventions and the arguments slightly modified to accept what's necessary to complete their task. Signed-off-by: John

[libvirt] [PATCH 06/16] network: Add virNetworkObj Get/Set API's for @dnsmasqPid and @radvdPid

2017-05-19 Thread John Ferlan
In preparation for making the object private, create/use a couple of API's to get/set the obj->dnsmasqPid and obj->radvdPid. NB: Since the pid's can sometimes changed based on intervening functions, be sure to always fetch the latest value. Signed-off-by: John Ferlan ---

[libvirt] [PATCH] Do not release unreserved address in qemuDomainAttachRNGDevice

2017-05-19 Thread Ján Tomko
Only set releaseaddr to true after the address has been reserved successfully. https://bugzilla.redhat.com/show_bug.cgi?id=1452581 --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

[libvirt] [PATCH v1] xenParseXLDiskSrc: protect against a NULL pointer reference

2017-05-19 Thread Wim Ten Have
From: Wim ten Have This patch protects against a NULL pointer dereference leading to a SEGV and that way taking out libvirtd while performing domain conversion requests per domxml-from-native xen-xl xl.cfg within xenParseXLDiskSrc() when partial disk parameters are

[libvirt] [PATCH v1] xenParseXLDiskSrc: protect against a NULL pointer reference

2017-05-19 Thread Wim Ten Have
From: Wim ten Have Working larger code changes whilst testing functionality and domxml conversion methodology for xen-xl (xenconfig) a cumbersome caveat surfaced that potentially can take libvirtd out with a SEGV when parsing complex disk xl.cfg directives. This patch

[libvirt] [PATCH 09/16] network: Add virNetworkObj Get API's for @def and @newDef

2017-05-19 Thread John Ferlan
In preparation for making the object private, create a couple of API's to get the obj->def and obj->newDef. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 14 ++ src/conf/virnetworkobj.h| 6 + src/libvirt_private.syms| 2 +

[libvirt] [PATCH 07/16] network: Alter virNetworkObj @class_id to be @classIdMap

2017-05-19 Thread John Ferlan
Change the variable name to be a bit more descriptive and less confusing when used with the data.network.actual->class_id. In preparation for privatizing virNetworkObj, create accessor function to fetch the @classIdMap. Signed-off-by: John Ferlan ---

[libvirt] [PATCH 08/16] network: Add virNetworkObj Get/Set API's for @floor_sum

2017-05-19 Thread John Ferlan
In preparation for making the object private, create a couple of API's to get/set the obj->floor_sum. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 15 +++ src/conf/virnetworkobj.h| 7 +++ src/libvirt_private.syms| 2 ++

[libvirt] [PATCH 16/16] network: Privatize virNetworkObj

2017-05-19 Thread John Ferlan
Move from virnetworkobj.h into virnetworkobj.c Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 21 + src/conf/virnetworkobj.h | 20 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/conf/virnetworkobj.c

[libvirt] [PATCH 00/16] Make the virNetworkObjPtr private

2017-05-19 Thread John Ferlan
All part of the effort I have to have a common object model. This series is network test, driver, and virnetworkobj related to work towards that goal. By the last patch, the object is now private to virnetworkobj.c John Ferlan (16): test: Fix up formatting in network test API's test: Use

Re: [libvirt] [PATCH v2] xenconfig: fix handling of NULL disk source

2017-05-19 Thread Jim Fehlig
On 05/19/2017 08:38 AM, Wim Ten Have wrote: From: Wim ten Have It is possible to crash libvirtd when converting xl native config to domXML when the xl config contains an empty disk source, e.g. an empty CDROM. Fix by checking that the disk source is non-NULL before

Re: [libvirt] [PATCH v1] xenParseXLDiskSrc: protect against a NULL pointer reference

2017-05-19 Thread Jim Fehlig
On 05/19/2017 06:38 AM, Wim Ten Have wrote: From: Wim ten Have Working larger code changes whilst testing functionality and domxml conversion methodology for xen-xl (xenconfig) a cumbersome caveat surfaced that potentially can take libvirtd out with a SEGV when parsing

[libvirt] [PATCH v2] xenconfig: fix handling of NULL disk source

2017-05-19 Thread Wim Ten Have
From: Wim ten Have It is possible to crash libvirtd when converting xl native config to domXML when the xl config contains an empty disk source, e.g. an empty CDROM. Fix by checking that the disk source is non-NULL before parsing it. Wim ten Have (1): xenconfig: fix

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

2017-05-19 Thread John Ferlan
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 vHBA/NPIV which wouldn't be good. Currently not a problem since

[libvirt] [PATCH 05/13] nodedev: Use common naming for virnodedeviceobj

2017-05-19 Thread John Ferlan
A virNodeDeviceObjPtr is an @obj A virNodeDeviceObjListPtr is an @devs Signed-off-by: John Ferlan --- src/conf/virnodedeviceobj.c | 130 ++-- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/src/conf/virnodedeviceobj.c

[libvirt] [PATCH 00/13] Make the virNodeDeviceObjPtr private

2017-05-19 Thread John Ferlan
All part of the effort I have to have a common object model. This series is node device test, driver, and virnodedevobj related. There's also a couple of bug fixes at the beginning of the series from things I have found during this effort. There's still a few more patches in local branches to

[libvirt] [PATCH 01/13] test: Adjust cleanup/error paths for nodedev test APIs

2017-05-19 Thread John Ferlan
- 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 also simplifies some exit logic... - In

[libvirt] [PATCH 02/13] nodedev: Fix locking in virNodeDeviceObjRemove

2017-05-19 Thread John Ferlan
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 at them. Signed-off-by: John Ferlan ---

Re: [libvirt] [PATCH v1] xenParseXLDiskSrc: protect against a NULL pointer reference

2017-05-19 Thread Wim ten Have
On Fri, 19 May 2017 08:12:08 -0600 Jim Fehlig wrote: > On 05/19/2017 06:38 AM, Wim Ten Have wrote: > > From: Wim ten Have > > > > Working larger code changes whilst testing functionality and domxml > > conversion methodology for xen-xl (xenconfig) a

[libvirt] [PATCH v2] xenconfig: fix handling of NULL disk source

2017-05-19 Thread Wim Ten Have
From: Wim ten Have It is possible to crash libvirtd when converting xl native config to domXML when the xl config contains an empty disk source, e.g. an empty CDROM. Fix by checking that the disk source is non-NULL before parsing it. Signed-off-by: Wim ten Have

Re: [libvirt] [PATCH v1 0/3] Loadparm support

2017-05-19 Thread Farhan Ali
On 05/17/2017 05:59 PM, John Ferlan wrote: On 05/17/2017 09:48 AM, Farhan Ali wrote: Polite ping :) Could you please update to top of tree and repost... I know for sure qemu_capabilities have changed. In general things look good to me though... Thanks! John Hi John, Thanks for

Re: [libvirt] [PATCH 0/8] Multiple cleanups within interfaceobj and interface driver

2017-05-19 Thread Michal Privoznik
On 04/26/2017 12:36 AM, John Ferlan wrote: > Sensing a theme lately yet? > > More adjustments in preparation for having virobject code handle the bulk > of the object management code. > > Far less in this series than the other two... The Clone code was a bit > unique and required more of a

[libvirt] [PATCH v2 3/3] tests : Testcases for loadparm

2017-05-19 Thread Farhan Ali
Add testcases for loadparm Signed-off-by: Farhan Ali Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk Reviewed-by: Marc Hartmayer ---

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

2017-05-19 Thread Farhan Ali
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. Signed-off-by: Farhan Ali Reviewed-by: Bjoern Walk

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

2017-05-19 Thread Farhan Ali
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 Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski

[libvirt] [PATCH v1 0/3] Loadparm support

2017-05-19 Thread Farhan Ali
This patch series introduces the support for new s390x 'loadparm' feature. The 'loadparm' can be used to select the boot entry to boot from, for a boot device. Here is a link to the QEMU patches: https://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg00192.html ChangeLog - v1 -> v2:

Re: [libvirt] [PATCH 7/8] interface: Clean up virInterfaceObjListFindByMACString

2017-05-19 Thread Michal Privoznik
On 04/26/2017 12:36 AM, John Ferlan wrote: > 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

Re: [libvirt] [PATCH 8/8] interface: Introduce virInterfaceObjNew

2017-05-19 Thread Michal Privoznik
On 04/26/2017 12:36 AM, John Ferlan wrote: > 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

Re: [libvirt] [PATCH 3/8] interface: Use virInterfaceDefPtr rather than deref from virInterfaceObjPtr

2017-05-19 Thread Michal Privoznik
On 04/26/2017 12:36 AM, John Ferlan wrote: > 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

Re: [libvirt] [PATCH v1 0/3] Loadparm support

2017-05-19 Thread Farhan Ali
Please ignore v1 tag on the email. It's actually v2, sorry about that On 05/19/2017 12:56 PM, Farhan Ali wrote: This patch series introduces the support for new s390x 'loadparm' feature. The 'loadparm' can be used to select the boot entry to boot from, for a boot device. Here is a link to the

Re: [libvirt] [PATCH v1 0/3] Loadparm support

2017-05-19 Thread Christian Borntraeger
On 05/19/2017 07:34 PM, Daniel P. Berrange wrote: > On Fri, May 19, 2017 at 12:56:44PM -0400, Farhan Ali wrote: >> This patch series introduces the support for new s390x 'loadparm' >> feature. The 'loadparm' can be used to select the boot entry to >> boot from, for a boot device. > > Why do we

Re: [libvirt] [PATCH v1 0/3] Loadparm support

2017-05-19 Thread Daniel P. Berrange
On Fri, May 19, 2017 at 12:56:44PM -0400, Farhan Ali wrote: > This patch series introduces the support for new s390x 'loadparm' > feature. The 'loadparm' can be used to select the boot entry to > boot from, for a boot device. Why do we need / want any of this when we already have bootindex=NN

Re: [libvirt] [PATCH] libxl: add default VNC listen address

2017-05-19 Thread Joao Martins
On 05/17/2017 10:38 PM, Jim Fehlig wrote: > If a VNC listen address is not specified in domXML, libxl will > default to 127.0.0.1, but this is never reflected in the domXML. > If not specified, set the listen address in virDomainGraphicsDef > struct to the libxl default when creating the frame

Re: [libvirt] [PATCH v1 0/3] Loadparm support

2017-05-19 Thread Farhan Ali
On 05/19/2017 01:34 PM, Daniel P. Berrange wrote: On Fri, May 19, 2017 at 12:56:44PM -0400, Farhan Ali wrote: This patch series introduces the support for new s390x 'loadparm' feature. The 'loadparm' can be used to select the boot entry to boot from, for a boot device. Why do we need / want

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

2017-05-19 Thread Christian Borntraeger
On 05/19/2017 06:56 PM, 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. > > Signed-off-by: Farhan Ali

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

2017-05-19 Thread Farhan Ali
On 05/19/2017 02:40 PM, Christian Borntraeger wrote: On 05/19/2017 06:56 PM, 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

[libvirt] [PATCH v4 0/5] Hyperv-method invocation

2017-05-19 Thread Sri Ramanujam
Changes from v3: * Feedback from code review * Added 5 minute timeout to hypervInvokeMethod Sri Ramanujam (5): hyperv: Functions to work with invocation parameters. hyperv: Generate object property type information. hyperv: add hypervInvokeMethod hyperv: support virDomainSendKey

[libvirt] [PATCH v2 15/19] storage: Introduce APIs to search/scan storage pool volumes list

2017-05-19 Thread John Ferlan
Introduce virStoragePoolObjForEachVolume to scan each volume calling the passed callback function until all volumes have been processed in the storage pool volume list, unless the callback function returns an error. Introduce virStoragePoolObjSearchVolume to search each volume calling the passed

[libvirt] [PATCH 02/16] test: Use consistent variable names for network test driver APIs

2017-05-19 Thread John Ferlan
A virNetworkObjPtr will be an 'obj'. A virNetworkPtr will be a 'net'. Signed-off-by: John Ferlan --- src/test/test_driver.c | 182 - 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/src/test/test_driver.c

[libvirt] [PATCH 03/16] network: Perform some formatting cleanup in bridge_driver

2017-05-19 Thread John Ferlan
Modify code to have two spaces between functions, follow function more recent function formatting w/r/t args per line and function return type and name on separate lines. Signed-off-by: John Ferlan --- src/network/bridge_driver.c | 228

[libvirt] [PATCH 15/16] network: Modify naming for virNetworkObjList* fetching APIs

2017-05-19 Thread John Ferlan
Use the structure names in the @data setup - makes it easier that going back to find the struct. Use the @maxnames instead of @nnames since that's what it is. Modify the @filter to be @aclfilter and change the typedef from virNetworkObjListFilter to virNetworkObjListACLFilter. Signed-off-by:

[libvirt] [PATCH 04/16] network: Use consistent naming in bridge_driver for virNetwork objects

2017-05-19 Thread John Ferlan
Use @obj for a virNetworkObjPtr Use @net for a virNetworkPtr Clean up the bridge_driver.h Signed-off-by: John Ferlan --- src/network/bridge_driver.c | 966 ++-- src/network/bridge_driver.h | 50 ++- 2 files changed, 511

[libvirt] [PATCH 01/16] test: Fix up formatting in network test API's

2017-05-19 Thread John Ferlan
Fix some spacing/formatting in the network test driver code. Signed-off-by: John Ferlan --- src/test/test_driver.c | 87 +- 1 file changed, 64 insertions(+), 23 deletions(-) diff --git a/src/test/test_driver.c

[libvirt] [PATCH 10/16] network: Introduce virNetworkObj{Get|Set}Autostart

2017-05-19 Thread John Ferlan
In preparation for privatizing the virNetworkObj structure, move the guts of the Get/Set Autostart from the driver into virnetworkobj. Alter the driver to make the calls to the networkobj code. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c| 74

[libvirt] [PATCH 11/16] network: Introduce virNetworkObj{Is|Set}Active

2017-05-19 Thread John Ferlan
In order to privatize the virNetworkObj create accessors in virnetworkobj in order to handle the get/set of the active value. Also rather than an unsigned int, convert it to a boolean to match other drivers representation and the reality of what it is. Signed-off-by: John Ferlan

[libvirt] [PATCH 12/16] network: Introduce virNetworkObjIsPersistent

2017-05-19 Thread John Ferlan
In preparation to privatize the virNetworkObj - create an accessor function to get the current @persistent value. Also change the value to a bool rather than an unsigned int (since that's how it's generated anyway). Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c

[libvirt] [PATCH v4 2/5] hyperv: Generate object property type information.

2017-05-19 Thread Sri Ramanujam
Update the generator to generate basic property type information for each CIM object representation. Right now, it generates arrays of hypervCimType structs: struct _hypervCimType { const char *name; const char *type; bool isArray; }; --- src/hyperv/hyperv_wmi_classes.h| 19

[libvirt] [PATCH v4 3/5] hyperv: add hypervInvokeMethod

2017-05-19 Thread Sri Ramanujam
This commit adds support for invoking methods on remote objects via hypervInvokeMethod. --- src/hyperv/hyperv_wmi.c | 584 src/hyperv/hyperv_wmi.h | 3 + src/hyperv/openwsman.h | 4 + 3 files changed, 591 insertions(+) diff --git

[libvirt] [PATCH v4 1/5] hyperv: Functions to work with invocation parameters.

2017-05-19 Thread Sri Ramanujam
This commit introduces functionality for creating and working with invoke parameters. This commit does not include any code for serializing and actually performing the method invocations; it merely defines the functions and API for using invocation parameters in driver code.

[libvirt] [PATCH v4 4/5] hyperv: support virDomainSendKey

2017-05-19 Thread Sri Ramanujam
This commit adds support for virDomainSendKey. It also serves as an example of how to use the new method invocation APIs with a single "simple" type parameter. --- src/hyperv/hyperv_driver.c| 107 ++ src/hyperv/hyperv_wmi.c | 7 +++

[libvirt] [PATCH v4 5/5] hyperv: Add support for virDomainSetMemory

2017-05-19 Thread Sri Ramanujam
Introduces support for virDomainSetMemory. This also serves an an example for how to use the new method invocation API with a more complicated method, this time including an EPR and embedded param. --- src/hyperv/hyperv_driver.c| 94 +++

Re: [libvirt] libvirt question

2017-05-19 Thread zhun...@gmail.com
Thanks a lot! zhun...@gmail.com From: Martin Kletzander Date: 2017-05-19 14:16 To: zhun...@gmail.com CC: libvir-list Subject: Re: [libvirt] libvirt question On Fri, May 19, 2017 at 10:52:32AM +0800, zhun...@gmail.com wrote: >Hello,I wrote a program using libvirt API to get vm information like

Re: [libvirt] [PATCH 7/8] appmor, libvirt-qemu: Add 9p support

2017-05-19 Thread Stefan Bader
On 18.05.2017 21:40, Serge E. Hallyn wrote: > Quoting Guido Günther (a...@sigxcpu.org): >> On Thu, May 18, 2017 at 11:21:54AM -0500, Serge E. Hallyn wrote: >>> Mind you I'm not crazy about this. If this could be toggled with a >>> default-off config option that would seem better than always

Re: [libvirt] libvirt question

2017-05-19 Thread Martin Kletzander
On Fri, May 19, 2017 at 10:52:32AM +0800, zhun...@gmail.com wrote: Hello,I wrote a program using libvirt API to get vm information like this: /*dom is virDomainPtr type*/ dom=virDomainLookupByID(conn,activeDomains[i]); if(dom!=NULL) printf("%d--%s\n",activeDomains[i],dom->name);

[libvirt] [PATCH V2 0/2] Define macro for IPv4 loopback address and use it in libxl

2017-05-19 Thread Jim Fehlig
V2 of https://www.redhat.com/archives/libvir-list/2017-May/msg00616.html While reviewing V1, Joao suggesting adding a macro for the various hardcoded "127.0.0.1" used throughout the code. Patch 1 does that. Patch2 is improved in V2 to include setting the listen address for spice as well as VNC.

[libvirt] [PATCH V2 1/2] maint: define a macro for IPv4 loopback address

2017-05-19 Thread Jim Fehlig
Use a macro instead of hardcoding "127.0.0.1" throughout the sources. Signed-off-by: Jim Fehlig --- src/internal.h | 2 ++ src/qemu/qemu_conf.c | 4 ++-- src/util/virsocketaddr.c | 4 ++-- src/vz/vz_sdk.c | 2 +- 4 files changed, 7 insertions(+), 5

[libvirt] [PATCH V2 2/2] libxl: add default listen address for VNC and spice

2017-05-19 Thread Jim Fehlig
If a VNC listen address is not specified in domXML, libxl will default to 127.0.0.1, but this is never reflected in the domXML. In the case of spice, a missing listen address resulted in listening on all interfaces, i.e. '0.0.0.0'. If not specified, set the listen address in virDomainGraphicsDef

Re: [libvirt] [PATCH] libxl: add default VNC listen address

2017-05-19 Thread Jim Fehlig
On 05/19/2017 11:56 AM, Joao Martins wrote: On 05/17/2017 10:38 PM, Jim Fehlig wrote: If a VNC listen address is not specified in domXML, libxl will default to 127.0.0.1, but this is never reflected in the domXML. If not specified, set the listen address in virDomainGraphicsDef struct to the

Re: [libvirt] [PATCH 2/8] apparmor, virt-aa-helper: allow /usr/share/OVMF/ too

2017-05-19 Thread Guido Günther
Hi Stefan, On Thu, May 18, 2017 at 10:53:40AM +0200, Stefan Bader wrote: > From: Simon McVittie > > The split firmware and variables files introduced by > https://bugs.debian.org/764918 are in a different directory for some reason. > Let the virtual machine read both. > >

[libvirt] [PATCH] usb: keep leading zeros of vendor/product id in USB device

2017-05-19 Thread Chen Hanxiao
From: Chen Hanxiao Some vendor id or product id may have leading zeros. We should show them. Signed-off-by: Chen Hanxiao --- src/util/virusb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virusb.c

Re: [libvirt] [PATCH 4/8] apparmor, virt-aa-helper: Allow access to libnl-3 config files

2017-05-19 Thread Guido Günther
On Thu, May 18, 2017 at 10:53:42AM +0200, Stefan Bader wrote: > From: Felix Geyer > > Allow access to libnl-3 config files > > Signed-off-by: Christian Ehrhardt > Signed-off-by: Stefan Bader > Acked-by: Guido

Re: [libvirt] [PATCH 5/8] apparmor, virt-aa-helper: Explicit denies for host devices

2017-05-19 Thread Guido Günther
On Thu, May 18, 2017 at 10:53:43AM +0200, Stefan Bader wrote: > From: Felix Geyer > > Add explicit denies for disk devices to avoid cluttering dmesg with > (acceptable) denials (merged with a second patch which added more > disk device names). > > Signed-off-by: Christian

Re: [libvirt] [PATCH 8/8] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-19 Thread Guido Günther
On Thu, May 18, 2017 at 10:53:46AM +0200, Stefan Bader wrote: > From: Serge Hallyn > > Updates profile to allow running on ppc64el. > > Bug-Ubuntu: https://bugs.launchpad.net/bugs/1374554 > > Signed-off-by: Christian Ehrhardt >

Re: [libvirt] [PATCH 01/10] virt-aa-helper: Ask for no deny rule for readonly disk elements

2017-05-19 Thread Guido Günther
On Mon, May 15, 2017 at 06:07:12PM +0200, Stefan Bader wrote: > On 15.05.2017 17:48, Guido Günther wrote: > > On Mon, May 15, 2017 at 03:23:10PM +0200, Stefan Bader wrote: > >> From: Serge Hallyn > >> > >> Just because a disk element only requests read access doesn't mean

Re: [libvirt] [PATCH 1/3] virfile: Provide stub for virFileInData

2017-05-19 Thread Daniel P. Berrange
On Fri, May 19, 2017 at 01:31:32PM +0200, Michal Privoznik wrote: > On 05/19/2017 12:28 PM, Peter Krempa wrote: > > On Thu, May 18, 2017 at 15:46:44 +0200, Michal Privoznik wrote: > >> Some older systems (such as RHEL6) lack SEEK_HOLE and SEEK_DATA > >> which virFileInData relies on. Provide a

[libvirt] [PATCH 06/13] nodedev: Cleanup driver code and prototypes

2017-05-19 Thread John Ferlan
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, nodeDeviceUpdateDriverName, and nodeDeviceGetTime don't follow

[libvirt] [PATCH 08/13] nodedev: Alter param to nodeDeviceUpdateCaps

2017-05-19 Thread John Ferlan
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 insertions(+), 6 deletions(-) diff --git a/src/node_device/node_device_driver.c

[libvirt] [PATCH 04/13] nodedev: Move node_device_linux_sysfs from node_driver to conf

2017-05-19 Thread John Ferlan
Move the whole file from src/node_device into src/conf and rename the API's to have the "virNodeDevice" prefix. Signed-off-by: John Ferlan --- src/Makefile.am| 8 .../node_device_linux_sysfs.c | 24

[libvirt] [PATCH 11/13] nodedev: Introduce virNodeDeviceObjGetDef

2017-05-19 Thread John Ferlan
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 + src/conf/virnodedeviceobj.h | 2 ++

[libvirt] [PATCH 10/13] nodedev: Use consistent names for driver variables

2017-05-19 Thread John Ferlan
A virNodeDeviceObjPtr is an @obj A virNodeDeviceObjListPtr is a @devs A virNodeDevicePtr is a @device Signed-off-by: John Ferlan --- src/node_device/node_device_driver.c | 70 ++-- src/node_device/node_device_hal.c| 42

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

2017-05-19 Thread John Ferlan
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 --- src/node_device/node_device_driver.c | 96

[libvirt] [PATCH 12/13] nodedev: Remove privateData from virNodeDeviceObj

2017-05-19 Thread John Ferlan
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. Signed-off-by: John Ferlan ---

[libvirt] [PATCH 13/13] nodedev: Introduce virNodeDeviceObjNew

2017-05-19 Thread John Ferlan
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 | 33 ++--- 1 file changed, 22 insertions(+),

[libvirt] [PATCH 07/13] nodedev: Alter param to nodeDeviceUpdateDriverName

2017-05-19 Thread John Ferlan
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. Signed-off-by: John Ferlan --- src/node_device/node_device_driver.c | 14 -- 1