Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-24 Thread Michal Privoznik
On 11/24/2017 06:18 PM, Paolo Bonzini wrote: > On 24/11/2017 18:07, Michal Privoznik wrote: >> On 11/24/2017 04:42 PM, Paolo Bonzini wrote: >>> One daemon per QEMU is nicer IMO because it lets us do MCS. Of course >>> one daemon per QEMU can only apply to system libvirtd; session must use >>> one

[libvirt] [PATCH 4/6] Introduce qemuDomainNamespaceUnlinkPaths

2017-11-24 Thread Ján Tomko
Split out the logic of unlinking devices from qemuDomainNamespaceTeardownHostdev for reuse in other functions. --- src/qemu/qemu_domain.c | 55 +++--- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH 6/6] Do not pass driver to qemuDomainNamespace{Setup, Teardown} functions

2017-11-24 Thread Ján Tomko
The underlying function which needs the driver gets it from the passed virDomainObj object anyway. --- src/qemu/qemu_domain.c | 34 -- src/qemu/qemu_domain.h | 30 ++ src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_hotplug.c | 42

[libvirt] [PATCH 3/6] Introduce qemuDomainNamespaceMknodPath

2017-11-24 Thread Ján Tomko
Use this function in qemuDomainNamespaceSetup* functions which only require creating one device. --- src/qemu/qemu_domain.c | 120 +++-- 1 file changed, 26 insertions(+), 94 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c

[libvirt] [PATCH 1/6] qemuDomainNamespaceTeardownHostdev: rename path to paths

2017-11-24 Thread Ján Tomko
To match the "things/nthings" pattern used in virDomainDef. --- src/qemu/qemu_domain.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9dab6b24b..c4a1e6d0b 100644 --- a/src/qemu/qemu_domain.c +++

[libvirt] [PATCH 0/6] Remove some repetitive code from qemuDomainNamespace* functions

2017-11-24 Thread Ján Tomko
Ján Tomko (6): qemuDomainNamespaceTeardownHostdev: rename path to paths Introduce qemuDomainNamespaceMknodPaths Introduce qemuDomainNamespaceMknodPath Introduce qemuDomainNamespaceUnlinkPaths Introduce qemuDomainNamespaceUnlinkPath Do not pass driver to

[libvirt] [PATCH 5/6] Introduce qemuDomainNamespaceUnlinkPath

2017-11-24 Thread Ján Tomko
Use it in every qemuDomainNamespaceTeardown* function that only wants to unlink one device. --- src/qemu/qemu_domain.c | 117 +++-- 1 file changed, 26 insertions(+), 91 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH 2/6] Introduce qemuDomainNamespaceMknodPaths

2017-11-24 Thread Ján Tomko
Separate the logic of creating devices from their gathering. Use this new function in qemuDomainNamespaceSetupHostdev and qemuDomainNamespaceSetupDisk. --- src/qemu/qemu_domain.c | 82 +- 1 file changed, 48 insertions(+), 34 deletions(-) diff

[libvirt] [PATCH 1/3] conf: Clean up virDomainNumaDefNodeDistanceParseXML

2017-11-24 Thread John Ferlan
Clean up the style a bit w/r/t to not using a unary operator on an integer value that could be zero - compare vs. zero instead. Set the def->mem_nodes[*].distances to rdist or ldist inside the if condition - no need to set outside since the value being set to is what was fetched. During cleanup,

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-24 Thread Paolo Bonzini
On 24/11/2017 18:07, Michal Privoznik wrote: > On 11/24/2017 04:42 PM, Paolo Bonzini wrote: >> One daemon per QEMU is nicer IMO because it lets us do MCS. Of course >> one daemon per QEMU can only apply to system libvirtd; session must use >> one daemon per host. > > Agreed. One daemon per QEMU

[libvirt] [PATCH 3/3] conf: Fix memory leak for distances in virDomainNumaFree

2017-11-24 Thread John Ferlan
Commit id '74119a03f' neglected to clean up @distances when the numa definition is cleaned up. Signed-off-by: John Ferlan --- src/conf/numa_conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index eadf8f2282..c906a53de0

[libvirt] [PATCH 0/3] Adjust some formatting for numa distance code and resolve a memory leak

2017-11-24 Thread John Ferlan
While reviewing the recent distance adjustments for Michal, I noted a couple of minor formatting things as well as a memory leak when removing the distances. John Ferlan (3): conf: Clean up virDomainNumaDefNodeDistanceParseXML conf: Clean up virDomainNumaDefCPUFormatXML conf: Fix memory

[libvirt] [PATCH 2/3] conf: Clean up virDomainNumaDefCPUFormatXML

2017-11-24 Thread John Ferlan
Don't use a unary comparison for an int value - compare against zero directly instead. Signed-off-by: John Ferlan --- src/conf/numa_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index

Re: [libvirt] [PATCH v2 00/12] Make auto completion better

2017-11-24 Thread Michal Privoznik
On 11/13/2017 05:06 PM, Michal Privoznik wrote: > v2 of: > > https://www.redhat.com/archives/libvir-list/2017-November/msg00213.html > > diff to v1: > -cmdComplete reworked > -Dozen of small improvements > > The command completion is still missing. I mean, 'virsh start' will > still give you

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-24 Thread Michal Privoznik
On 11/24/2017 04:42 PM, Paolo Bonzini wrote: > On 24/11/2017 15:52, Daniel P. Berrange wrote: >>> So what has been suggested so far is: >>> >>> >>> >>> >>> >>> > > without an inner element leaves libvirtd with > the choice of a daemon per QEMU, or a daemon per host in a

Re: [libvirt] [PATCH] s390: qemu-capabilities: Avoid error message when missing non-kvm host cpu info

2017-11-24 Thread Jiri Denemark
On Fri, Nov 24, 2017 at 09:02:02 +0100, Boris Fiuczynski wrote: > From: "Jason J. Herne" > > Libvirt prints an error on startup when it is missing host cpu model > information for any queried qemu binary. On s390 we only have host cpu model > information for kvm

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-24 Thread Paolo Bonzini
On 24/11/2017 15:52, Daniel P. Berrange wrote: >> So what has been suggested so far is: >> >> >> >> >> >> without an inner element leaves libvirtd with the choice of a daemon per QEMU, or a daemon per host in a well-known location. Unprivileged libvirtd would always use

Re: [libvirt] [PATCH] storage: Fix broken storage_driver build

2017-11-24 Thread Michal Privoznik
On 11/24/2017 03:45 PM, John Ferlan wrote: > Commit id '5d5c732d7' had an incorrect assignment and was found > by travis build: > > storage/storage_driver.c:1668:14: error: equality comparison with extraneous > parentheses [-Werror,-Wparentheses-equality] > if ((obj ==

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-24 Thread Daniel P. Berrange
On Fri, Nov 24, 2017 at 03:38:54PM +0100, Michal Privoznik wrote: > On 08/22/2017 06:27 PM, Paolo Bonzini wrote: > > Hi all, > > > > Sorry for resurrecting old thread but seems like there was no agreement > reached. > > We don't want to expose any paths because the fact that PR helper is a >

[libvirt] [PATCH] storage: Fix broken storage_driver build

2017-11-24 Thread John Ferlan
Commit id '5d5c732d7' had an incorrect assignment and was found by travis build: storage/storage_driver.c:1668:14: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((obj == virStoragePoolObjListSearch(>pools,

Re: [libvirt] New QEMU daemon for persistent reservations

2017-11-24 Thread Michal Privoznik
On 08/22/2017 06:27 PM, Paolo Bonzini wrote: > Hi all, > Sorry for resurrecting old thread but seems like there was no agreement reached. We don't want to expose any paths because the fact that PR helper is a separate binary that uses a UNIX socket to talk to qemu is a implementation detail of

[libvirt] [PATCH 3/3] qemu: domain: Fix backing store terminator for non-backing local files

2017-11-24 Thread Peter Krempa
Raw local files do not pass through the backing store detector and thus the code did not allocate the required backing store terminator for them. Previously the terminating element would be formatted into the XML since the default values used for the metadata allowed that. This is a regression

[libvirt] [PATCH 2/3] qemu: process: Move handling of non-backing files into qemuDomainDetermineDiskChain

2017-11-24 Thread Peter Krempa
Until now we would skip loading of the backing chain for files which don't support backing chains only when starting up the VM. Move the check from qemuProcessPrepareHostStorage with some adaptations so that's always applied. --- src/qemu/qemu_domain.c | 17 +

[libvirt] [PATCH 0/3] qemu: Yet another backingStore terminator fix (blockdev-add saga)

2017-11-24 Thread Peter Krempa
Raw images would not get the terminator due to the changes. Peter Krempa (3): qemu: domain: Refactor control flow in qemuDomainDetermineDiskChain qemu: process: Move handling of non-backing files into qemuDomainDetermineDiskChain qemu: domain: Fix backing store terminator for

[libvirt] [PATCH 1/3] qemu: domain: Refactor control flow in qemuDomainDetermineDiskChain

2017-11-24 Thread Peter Krempa
Split out clearing of the backing chain prior to other code since it will be required later and optimize few layers of nested conditions and loops. --- src/qemu/qemu_domain.c | 37 + 1 file changed, 17 insertions(+), 20 deletions(-) diff --git

Re: [libvirt] [PATCH v2 14/21] conf: Shorten names in virDomainChrSerialTarget enumeration

2017-11-24 Thread Andrea Bolognani
On Fri, 2017-11-24 at 12:12 +0100, Jiri Denemark wrote: > > Any application that's been coded sensibly will deal with the new > > values in a graceful manner, eg. displaying "unknown model" or > > something along the line rather than failing. > > Showing an unknown device and failing is not very

Re: [libvirt] [PATCH v2 22/21] docs: Improve documentation for serial consoles

2017-11-24 Thread Pavel Hrdina
On Fri, Nov 24, 2017 at 11:35:01AM +0100, Andrea Bolognani wrote: > On Thu, 2017-11-23 at 18:05 +0100, Pavel Hrdina wrote: > > On Wed, Nov 22, 2017 at 04:24:07PM +0100, Andrea Bolognani wrote: > > > + > > > + Some of the values listed above are not compatible with all > > > +

Re: [libvirt] [PATCH v2 17/21] conf: Add target type and model for pl011

2017-11-24 Thread Pavel Hrdina
On Fri, Nov 24, 2017 at 11:26:32AM +0100, Andrea Bolognani wrote: > On Thu, 2017-11-23 at 17:43 +0100, Pavel Hrdina wrote: > > On Tue, Nov 21, 2017 at 05:42:27PM +0100, Andrea Bolognani wrote: > > > We can finally introduce a specific target model for the pl011 device > > > used by mach-virt

Re: [libvirt] [PATCH v2 15/21] conf: Add target type and model for spapr-vty

2017-11-24 Thread Pavel Hrdina
On Fri, Nov 24, 2017 at 11:15:34AM +0100, Andrea Bolognani wrote: > On Thu, 2017-11-23 at 17:35 +0100, Pavel Hrdina wrote: > > > @@ -3585,6 +3585,7 @@ > > > isa > > > usb > > > pci > > > +spapr-vio > > > > Since we cannot reduce isa-serial into isa, I guest

Re: [libvirt] [PATCH v2 14/21] conf: Shorten names in virDomainChrSerialTarget enumeration

2017-11-24 Thread Jiri Denemark
On Fri, Nov 24, 2017 at 11:10:42 +0100, Andrea Bolognani wrote: > On Thu, 2017-11-23 at 16:54 +0100, Pavel Hrdina wrote: > > On Tue, Nov 21, 2017 at 05:42:24PM +0100, Andrea Bolognani wrote: > > > Now that the target type is no longer formatted on the QEMU command > > > line, we don't need the

Re: [libvirt] [PATCH v2 22/21] docs: Improve documentation for serial consoles

2017-11-24 Thread Andrea Bolognani
On Thu, 2017-11-23 at 18:05 +0100, Pavel Hrdina wrote: > On Wed, Nov 22, 2017 at 04:24:07PM +0100, Andrea Bolognani wrote: > > + > > + Some of the values listed above are not compatible with all > > + architecture and machine types, and if the value is missing > > altogether, > >

Re: [libvirt] [PATCH v2 17/21] conf: Add target type and model for pl011

2017-11-24 Thread Andrea Bolognani
On Thu, 2017-11-23 at 17:43 +0100, Pavel Hrdina wrote: > On Tue, Nov 21, 2017 at 05:42:27PM +0100, Andrea Bolognani wrote: > > We can finally introduce a specific target model for the pl011 device > > used by mach-virt guests, which means isa-serial will no longer show > > up to confuse users. > >

Re: [libvirt] [PATCH v2 15/21] conf: Add target type and model for spapr-vty

2017-11-24 Thread Andrea Bolognani
On Thu, 2017-11-23 at 17:35 +0100, Pavel Hrdina wrote: > > @@ -3585,6 +3585,7 @@ > > isa > > usb > > pci > > +spapr-vio > > Since we cannot reduce isa-serial into isa, I guest having spapr-vio in > addition to other ${BUS}-serial would be weird, so how about >

Re: [libvirt] [PATCH v2 14/21] conf: Shorten names in virDomainChrSerialTarget enumeration

2017-11-24 Thread Andrea Bolognani
On Thu, 2017-11-23 at 16:54 +0100, Pavel Hrdina wrote: > On Tue, Nov 21, 2017 at 05:42:24PM +0100, Andrea Bolognani wrote: > > Now that the target type is no longer formatted on the QEMU command > > line, we don't need the values to match the QEMU device names any > > longer, so we can shorten the

[libvirt] [PATCH] s390: qemu-capabilities: Avoid error message when missing non-kvm host cpu info

2017-11-24 Thread Boris Fiuczynski
From: "Jason J. Herne" Libvirt prints an error on startup when it is missing host cpu model information for any queried qemu binary. On s390 we only have host cpu model information for kvm enabled qemu instances. So when virt type is not kvm, this is actually not an