[libvirt] [PATCH] qemu: avoid deadlock on domain object enter monitor fail

2017-07-18 Thread Wang King
Should be followed with qemuDomainObjExitMonitor only if qemuDomainObjEnterMonitorAsync returns 0. --- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_process.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index c23f

Re: [libvirt] [PATCH] spapr: make default PHB optionnal

2017-07-18 Thread David Gibson
On Wed, Jul 12, 2017 at 05:09:37PM +0530, Shivaprasad G Bhat wrote: > > > On 07/12/2017 04:25 PM, Andrea Bolognani wrote: > > [libvir-list added to the loop] > > > > On Tue, 2017-07-04 at 10:47 +0200, Greg Kurz wrote: > > > On Tue, 4 Jul 2017 17:29:01 +1000 David Gibson > > > wrote: > > > > On

Re: [libvirt] [PATCH v4 2/3] conf: Introduce TLS options for VxHS block device clients

2017-07-18 Thread ashish mittal
On Mon, Jul 17, 2017 at 4:50 PM, John Ferlan wrote: > > > On 07/12/2017 06:09 PM, ashish mittal wrote: >> On Fri, Jun 30, 2017 at 1:29 PM, John Ferlan wrote: >>> >>> >>> On 06/29/2017 10:02 PM, Ashish Mittal wrote: From: Ashish Mittal Add a new TLS X.509 certificate type - "vxhs".

[libvirt] [PATCH] mpath: Fix memory leak in virStorageBackendCreateVols

2017-07-18 Thread ZhiPeng Lu
@map_device, allocated by virAsprintf in virStorageBackendCreateVols, was not freed and leaked. Signed-off-by: Zhipeng Lu --- src/storage/storage_backend_mpath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_backend_mpath.c index 6

[libvirt] [PATCH RESEND] phyp: Fix memory leak in phypUUIDTable_Push

2017-07-18 Thread ZhiPeng Lu
@remote_file, allocated by virAsprintf, was not freed and leaked. Signed-off-by: Zhipeng Lu --- src/phyp/phyp_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 9121581..662e2f7 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phy

Re: [libvirt] [PATCH 6/8] conf: domain: move video type validation to DeviceDefValidate

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > This allows drivers to set their own default. But if a driver neglects > to fill one in, we still error like we previously would at parse time. > > Signed-off-by: Cole Robinson > --- > src/conf/domain_conf.c | 29 + > 1

Re: [libvirt] [PATCH 7/8] qemu: Set default video type in qemu PostParse

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > And not generic domain_conf code. We will need qemu private functions > in a bit. > > Signed-off-by: Cole Robinson > --- > src/conf/domain_conf.c | 3 --- > src/qemu/qemu_domain.c | 7 +++ > 2 files changed, 7 insertions(+), 3 deletions(-) >

Re: [libvirt] [PATCH 8/8] qemu: Default to video type=virtio for machvirt

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > arm/aarch64 -M virt on KVM doesn't and will never work with standard > VGA card emulation. The recommended method is to use type=virtio, so > let's make it the default for video devices without an explicit type > set by the user > > https://bugzilla

Re: [libvirt] [PATCH 5/8] conf: domain: add VIDEO_TYPE_DEFAULT

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > Will be needed for future patches to pull the default video type > setting out of XML parsing routines. > > Signed-off-by: Cole Robinson > --- > src/conf/domain_conf.c | 1 + > src/conf/domain_conf.h | 1 + > src/qemu/qem

Re: [libvirt] [PATCH 4/8] conf: add virDomainVideoDefNew

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > To handle setting a default heads value. Convert callers that were > doing it by hand > > Signed-off-by: Cole Robinson > --- > src/conf/domain_conf.c| 21 - > src/conf/domain_conf.h| 1 + > src/libvirt_private.

Re: [libvirt] [PATCH 3/8] qemu: annotate some VIDEO_TYPE enum switch

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > For the ram/vram monitor wrappers, just add a default: clause... > seems like it should be rarely extended so this saves every committer > from needing to update > > For the validation switch, fill in the missing values > > Signed-off-by: Cole Robi

Re: [libvirt] [PATCH 2/8] qemu: domain: Move some validation out of DeviceDefPostParse

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > And into DeviceDefValidate which is the expected place > > Signed-off-by: Cole Robinson > --- > src/qemu/qemu_domain.c | 55 > +++--- > 1 file changed, 30 insertions(+), 25 deletions(-) > Reviewed-by:

Re: [libvirt] [PATCH 1/8] qemu: parse: drop redundant video config

2017-07-18 Thread John Ferlan
On 06/28/2017 02:49 PM, Cole Robinson wrote: > The ram/vram = 0 bits aren't needed, and PostParse will fill in the > needed QXL default > > Signed-off-by: Cole Robinson > --- > src/qemu/qemu_command.c | 4 > src/qemu/qemu_parse_command.c | 11 +-- > 2 files changed, 1 inser

Re: [libvirt] [PATCH] docs: schema: make disk driver name attribute optional

2017-07-18 Thread Jim Fehlig
On 07/18/2017 03:18 PM, Laine Stump wrote: On 07/18/2017 01:42 PM, Jim Fehlig wrote: /domain/devices/disk/driver/@name is not a required or mandatory attribute according to formatdomain, and indeed it was agreed on IRC that the attribute is "optional for input, recommended (but not required) for

Re: [libvirt] [PATCH] docs: schema: make disk driver name attribute optional

2017-07-18 Thread Laine Stump
On 07/18/2017 01:42 PM, Jim Fehlig wrote: > /domain/devices/disk/driver/@name is not a required or mandatory > attribute according to formatdomain, and indeed it was agreed on > IRC that the attribute is "optional for input, recommended (but > not required) for output". Currently the schema require

Re: [libvirt] [PATCH] virFileInData: Report an error if unable to reposition file

2017-07-18 Thread John Ferlan
On 07/11/2017 05:05 AM, Michal Privoznik wrote: > The purpose of this function is to tell if the current position > in given FD is in data section or a hole and how much bytes there > is remaining until the end of the section. This is achieved by > couple of lseeks(). The most important part is t

[libvirt] [PATCH v2 6/6] nwfilter: Remove need for nwfilterDriverLock in some API's

2017-07-18 Thread John Ferlan
Now that nwfilters object list is self locking, it's no longer necessary to hold the driver level lock for certain API's. However, for the DefineXML, Undefine, and Reload processing keeping that lock ensures for serialization required in order to process the filter Instantiation properly. Signed-

[libvirt] [PATCH v2 5/6] nwfilter: Convert virNWFilterObj to use virObjectLockable

2017-07-18 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, lock/unlock, and reference counting. Because we have the need for instantiation in a recursive manner, introduce the virObjectTryLock to handle the virNWFilterObjTryLock proce

[libvirt] [PATCH v2 4/6] nwfilter: Remove recursive locking for nwfilter instantiation

2017-07-18 Thread John Ferlan
The current algorithm required usage of recursive locks because there was no other mechanism available to ensure that the object wasn't deleted whilst the instantiation was taking place. Unfortunately common objects (virObjectLockable) do not allow for recursive locks; however, since this is a ver

[libvirt] [PATCH v2 2/6] nwfilter: Remove unnecessary UUID comparison bypass

2017-07-18 Thread John Ferlan
Commit id '46a811db07' added code to check if the filter by Name already existed with a different UUID, to go along with the existing found filter by UUID and compare the Names match thus making it impossible to reach this find by Name condition without both the Name and UUID already matching, so r

[libvirt] [PATCH v2 3/6] nwfilter: Convert _virNWFilterObjList to be a virObjectLockable

2017-07-18 Thread John Ferlan
Perhaps a bit out of order from the normal convert driver object to virObjectLockable, then convert the driver object list. However, as it turns out nwfilter objects have been using a recursive mutex for which the common virObject code does not want to use. So, if we convert the nwfilter object li

[libvirt] [PATCH v2 0/6] nwfilter adjustments for common object

2017-07-18 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2017-June/msg00079.html Changes since v1 (if I can recall all of them!): Patches 1, 4, 8-13 were pushed Patches 2, 3, 5-7 are dropped This this is a rework of patches 14-17 Patch 1 (former patch14): * Requested adjustments made to ACK'd patch, bu

[libvirt] [PATCH v2 1/6] nwfilter: Add @refs logic to __virNWFilterObj

2017-07-18 Thread John Ferlan
"Simple" conversion to the virObjectLockable object isn't quite possible yet because the nwfilter lock requires usage of recursive locking due to algorithms handing filter ""'s and ""'s. The list search logic would also benefit from using hash tables for lookups. So this patch is step 1 in the proc

Re: [libvirt] [PATCH v2] qemu: Check for existence of provided *_tls_x509_cert_dir

2017-07-18 Thread John Ferlan
ping? Tks - John On 06/29/2017 10:32 AM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1458630 > > Introduce virQEMUDriverConfigSetCertDir which will handle reading the > qemu.conf config file specific setting for default, vnc, spice, chardev, > and migrate. If a setting is

Re: [libvirt] [PATCH v7 3/6] hyperv: add hypervInvokeMethod

2017-07-18 Thread Matthias Bolte
2017-07-18 18:54 GMT+02:00 Andrea Bolognani : > On Tue, 2017-06-27 at 15:13 -0400, Sri Ramanujam wrote: >> This commit adds support for invoking methods on remote objects >> via hypervInvokeMethod. >> --- >> src/hyperv/hyperv_wmi.c | 590 >> >> src

Re: [libvirt] [PATCH] libxl: fix cdrom default driver name

2017-07-18 Thread Jim Fehlig
On 07/18/2017 11:10 AM, Laine Stump wrote: On 07/17/2017 10:42 AM, Christian Ehrhardt wrote: In recent libvirt libxl does fill non-existant driver elements with type='raw', but lacks the name='qemu' attribute that it had in the past. Without that the xml fails to validate, therefore old XML file

[libvirt] [PATCH] docs: schema: make disk driver name attribute optional

2017-07-18 Thread Jim Fehlig
/domain/devices/disk/driver/@name is not a required or mandatory attribute according to formatdomain, and indeed it was agreed on IRC that the attribute is "optional for input, recommended (but not required) for output". Currently the schema requires the attribute, causing virt-xml-validate to fail

Re: [libvirt] [PATCH v2] bhyve: Add support for VNC autoport

2017-07-18 Thread Alexander Nusov
Hi Roman, Sorry for the delay (I didn't setup a correct filter for the mailing list and missed your follow-up mail) Updated patch looks awesome. thank you for your effort! > Note 1: while adding tests I noticed that port allocator will actually > skip already bound ports, so I'm wondering

Re: [libvirt] [PATCH] libxl: fix cdrom default driver name

2017-07-18 Thread Laine Stump
On 07/17/2017 10:42 AM, Christian Ehrhardt wrote: > In recent libvirt libxl does fill non-existant driver elements with > type='raw', > but lacks the name='qemu' attribute that it had in the past. > Without that the xml fails to validate, therefore old XML files can't be > edited/defined anymore.

Re: [libvirt] [PATCH v7 3/6] hyperv: add hypervInvokeMethod

2017-07-18 Thread Andrea Bolognani
On Tue, 2017-06-27 at 15:13 -0400, Sri Ramanujam wrote: > This commit adds support for invoking methods on remote objects > via hypervInvokeMethod. > --- >  src/hyperv/hyperv_wmi.c | 590 > >  src/hyperv/hyperv_wmi.h |   8 +- >  src/hyperv/openwsman.h

Re: [libvirt] [PATCH] security: apparmor: Properly link with storage driver in helper program

2017-07-18 Thread Christian Ehrhardt
On Tue, Jul 18, 2017 at 12:51 PM, Peter Krempa wrote: > The refactor to split up storage driver into modules broke the apparmor > helper program, since that did not initialize the storage driver > properly and thus detection of the backing chain could not work. > > Register the storage driver bac

Re: [libvirt] [PATCH] test/Makefile.am: drop WARN_CFLAGS from LDFLAGS

2017-07-18 Thread Pavel Hrdina
On Mon, Jun 26, 2017 at 06:01:20PM +0200, Ján Tomko wrote: > Introduced by commit 0832c58, with the intention to link with > the stack protector library. > > Another instance introduced by commit 4cbc15d which separated > commandhelper_LDADD from LDADDS. > > Not needed because per commit 71b54636

[libvirt] [PATCH v2 0/3] Fix a couple issues found w/ vHBA logic

2017-07-18 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2017-July/msg00029.html Changes in v2: Rewrote patch 1 to resolve (new) bz1472277. This can also be cherry picked into 3.2-maint (and any others that get created). Added patch 2 - it's obvious why Adjusted patch 3 to make the change in storage rat

[libvirt] [PATCH v2 3/3] conf: Fix vHBA checkParent logic for pool creation

2017-07-18 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1458708 When originally designed in commit id '42a021c1', providing the 'parent' attribute to the was checked to make sure that the "parent" of the wwnn/wwpn matched that of the provided parent "just in case" someone created the node device first, then

[libvirt] [PATCH v2 1/3] storage: Fix existing parent check for vHBA creation

2017-07-18 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1472277 Commit id '106930aaa' altered the order of checking for an existing vHBA (e.g something created via nodedev-create functionality outside of the storage pool logic) which inadvertantly broke the code to decide whether to alter/force the fchost->ma

[libvirt] [PATCH v2 2/3] storage: Remove @conn from virNodeDeviceCreateVport

2017-07-18 Thread John Ferlan
It's no longer needed since the checkParent code moved back to storage_backend_scsi.c Signed-off-by: John Ferlan --- src/conf/node_device_conf.c| 8 +++- src/conf/node_device_conf.h| 3 +-- src/storage/storage_backend_scsi.c | 2 +- 3 files changed, 5 insertions(+), 8 deletio

Re: [libvirt] [RFC PATCH v2 1/4] numa: describe siblings distances within cells

2017-07-18 Thread Wim ten Have
On Wed, 28 Jun 2017 15:21:29 +0100 "Daniel P. Berrange" wrote: > On Wed, Jun 28, 2017 at 03:56:36PM +0200, Wim Ten Have wrote: > > From: Wim ten Have > > > > Add libvirtd NUMA cell domain administration functionality to > > describe underlying cell id sibling distances in full fashion > > when

Re: [libvirt] [PATCH 1/2] storage: Alter check for default managed setting

2017-07-18 Thread John Ferlan
On 07/18/2017 03:03 AM, Erik Skultety wrote: > On Mon, Jul 03, 2017 at 02:52:05PM -0400, John Ferlan wrote: >> Only alter the managed setting if it wasn't provided. If someone provided >> 'no', then honor that rather than overwriting. > > IMO this deserves to be tracked by a BZ, since the curren

Re: [libvirt] [PATCH] wireshark: Adapt to tvb_new_subset() rename

2017-07-18 Thread Martin Kletzander
On Tue, Jul 18, 2017 at 10:34:09AM +0200, Michal Privoznik wrote: In Wireshark commit of 7cd6906056922e4b8 (contained in v2.4.0) the tvb_new_subset() function was renamed to tvb_new_subset_length_caplen(). However, we can take the extra step and rename to tvb_new_subset_remaining() directly (see

Re: [libvirt] [PATCH 09/11] qemu: introduce struct _virQEMUCapsCachePriv

2017-07-18 Thread Jiri Denemark
On Mon, Jul 10, 2017 at 14:46:48 +0200, Pavel Hrdina wrote: > This will store private data that will be used by following patches > when switching to virFileCache. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_capabilities.c | 51 > ++-- > src/qem

Re: [libvirt] [PATCH 08/11] qemu: separate virQEMUCapsInitCached out of virQEMUCapsNewForBinaryInternal

2017-07-18 Thread Jiri Denemark
On Mon, Jul 10, 2017 at 14:46:47 +0200, Pavel Hrdina wrote: > Preparation for switching to virFileCache where there are two callbacks, > one to get a new data and second one to load a cached data. > > This also removes virQEMUCapsReset which is no longer required. > > Signed-off-by: Pavel Hrdina

Re: [libvirt] [PATCH 07/11] qemu: don't pass qemuctime into virQEMUCapsIsValid

2017-07-18 Thread Jiri Denemark
On Mon, Jul 10, 2017 at 14:46:46 +0200, Pavel Hrdina wrote: > It's not required and following patches will change the code. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_capabilities.c | 29 +++-- > 1 file changed, 11 insertions(+), 18 deletions(-) > > diff --git

Re: [libvirt] [PATCH v2] tests: enable qemu 2.9 capabilities test for s390

2017-07-18 Thread Ján Tomko
On Mon, Jul 10, 2017 at 11:12:37AM +0200, Boris Fiuczynski wrote: Adjust qemu 2.9 s390 capabilites xml and enable qemu capabilities test. Signed-off-by: Boris Fiuczynski --- V2: removed s390x 2.9.50 caps and added 2.9.0 caps (Jan) .../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 14445

[libvirt] [PATCH] nodedev: Fix call to virNodeDeviceObjListFree in nodeStateReload

2017-07-18 Thread John Ferlan
Commit id '9c5d98fd8' missed changing this call to use driver->devs rather than @driver->devs. Signed-off-by: John Ferlan --- Pushed under build breaker rule (debian-8 and centos-6) src/node_device/node_device_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_

Re: [libvirt] [PATCH v2] Add support for virtio-net.tx_queue_size

2017-07-18 Thread Michal Privoznik
[Adding MST who wrote qemu patches] On 07/18/2017 12:21 PM, Peter Krempa wrote: > On Tue, Jul 18, 2017 at 09:01:31 +0200, Michal Privoznik wrote: >> On 07/18/2017 08:23 AM, Peter Krempa wrote: >>> On Mon, Jul 17, 2017 at 15:39:56 +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show

Re: [libvirt] [PATCH 2/2] conf: Fix vHBA checkParent logic for pool creation

2017-07-18 Thread Erik Skultety
On Mon, Jul 03, 2017 at 02:52:06PM -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1458708 > > When originally designed in commit id '42a021c1', providing the 'parent' > attribute to the > was checked to make sure that the "parent" of the wwnn/wwpn matched that > of the pro

Re: [libvirt] [PATCH v2] bhyve: Add support for VNC autoport

2017-07-18 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: > From: Alexander Nusov > > This patch adds support for automatic VNC port assignment for bhyve guests. > --- > Changes from v1: > > * Call virPortAllocatorRelease() in virBhyveProcessStop() to release >VNC port; that's done unconditionally of using autoport > *

[libvirt] [PATCH] security: apparmor: Properly link with storage driver in helper program

2017-07-18 Thread Peter Krempa
The refactor to split up storage driver into modules broke the apparmor helper program, since that did not initialize the storage driver properly and thus detection of the backing chain could not work. Register the storage driver backends explicitly. Unfortunately it's now necessary to link with t

Re: [libvirt] [PATCH v2] Add support for virtio-net.tx_queue_size

2017-07-18 Thread Peter Krempa
On Tue, Jul 18, 2017 at 09:01:31 +0200, Michal Privoznik wrote: > On 07/18/2017 08:23 AM, Peter Krempa wrote: > > On Mon, Jul 17, 2017 at 15:39:56 +0200, Michal Privoznik wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1462653 > > > > This bugzilla is not public. > > Okay, I'll drop it fr

[libvirt] [PATCH] wireshark: Adapt to tvb_new_subset() rename

2017-07-18 Thread Michal Privoznik
In Wireshark commit of 7cd6906056922e4b8 (contained in v2.4.0) the tvb_new_subset() function was renamed to tvb_new_subset_length_caplen(). However, we can take the extra step and rename to tvb_new_subset_remaining() directly (see Wireshark commit 0ecfc7280cf3d7). The reasoning is that there is no

Re: [libvirt] [PATCH] spapr: make default PHB optionnal

2017-07-18 Thread Andrea Bolognani
On Wed, 2017-07-12 at 17:09 +0530, Shivaprasad G Bhat wrote: > Setting numa_node for emulated devices is the benefit for now. On x86, I > figured there is > no way to set the numa_node for the root controller and the emulated > devices sitting there > all have numa_node set to -1. Only the devices

Re: [libvirt] [PATCH] security: dac: relabel spice rendernode

2017-07-18 Thread Daniel P. Berrange
On Mon, Jul 17, 2017 at 12:42:12PM -0400, Cole Robinson wrote: > On 07/17/2017 12:35 PM, Daniel P. Berrange wrote: > > On Mon, Jul 17, 2017 at 12:31:50PM -0400, Cole Robinson wrote: > >> For a logged in user this a path like /dev/dri/renderD128 will have > >> default ownership root:video which won'

Re: [libvirt] [PATCH 1/2] storage: Alter check for default managed setting

2017-07-18 Thread Erik Skultety
On Mon, Jul 03, 2017 at 02:52:05PM -0400, John Ferlan wrote: > Only alter the managed setting if it wasn't provided. If someone provided > 'no', then honor that rather than overwriting. IMO this deserves to be tracked by a BZ, since the current behaviour is in contrast to what the documentation sa

Re: [libvirt] backingStore info adding late breaks virt-aa-helper

2017-07-18 Thread Peter Krempa
On Tue, Jul 18, 2017 at 08:57:36 +0200, Christian Ehrhardt wrote: > On Mon, Jul 17, 2017 at 8:40 PM, Christian Ehrhardt < > christian.ehrha...@canonical.com> wrote: > > > > > > > On Mon, Jul 17, 2017 at 8:17 PM, Christian Ehrhardt < > > christian.ehrha...@canonical.com> wrote: > >> > >> So it is t

Re: [libvirt] [PATCH v2] Add support for virtio-net.tx_queue_size

2017-07-18 Thread Michal Privoznik
On 07/18/2017 08:23 AM, Peter Krempa wrote: > On Mon, Jul 17, 2017 at 15:39:56 +0200, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1462653 > > This bugzilla is not public. Okay, I'll drop it from the commit message. > >> >> Just like I've added support for setting rx_q