[libvirt] [PATCH] qemu:address:Fix segfault in qemuDomainPrimeVirtioDeviceAddresses

2018-11-08 Thread Wang Yechao
On aarch64, lauch vm with the follow configuration: libvirtd will crash when access the net->model. Signed-off-by: Wang Yechao --- src/qemu/qemu_domain_address.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c

Re: [libvirt] [PATCH v3 04/13] security_manager: Rework metadata locking

2018-11-08 Thread John Ferlan
On 10/17/18 5:06 AM, Michal Privoznik wrote: > Trying to use virlockd to lock metadata turns out to be too big > gun. Since we will always spawn a separate process for relabeling > we are safe to use thread unsafe POSIX locks and take out > virtlockd completely out of the picture. > >

Re: [libvirt] [PATCH v3 02/13] virprocess: Make virProcessRunInMountNamespace use virProcessRunInFork

2018-11-08 Thread John Ferlan
On 10/17/18 5:06 AM, Michal Privoznik wrote: > Both virProcessRunInMountNamespace() and virProcessRunInFork() > look very similar. De-duplicate the code and make > virProcessRunInMountNamespace() call virProcessRunInFork().> > Signed-off-by: Michal Privoznik > --- > src/util/virprocess.c | 62

Re: [libvirt] [PATCH v3 03/13] security: Always spawn process for transactions

2018-11-08 Thread John Ferlan
On 10/17/18 5:06 AM, Michal Privoznik wrote: > In the next commit the virSecurityManagerMetadataLock() is going > to be turned thread unsafe. Therefore, we have to spawn a > separate process for it. Always. > > Signed-off-by: Michal Privoznik > --- > src/security/security_dac.c | 2 +- >

Re: [libvirt] [PATCH v3 01/13] virprocess: Introduce virProcessRunInFork

2018-11-08 Thread John Ferlan
On 10/17/18 5:06 AM, Michal Privoznik wrote: > This new helper can be used to spawn a child process and run > passed callback from it. This will come handy esp. if the > callback is not thread safe. > > Signed-off-by: Michal Privoznik > --- > src/libvirt_private.syms | 1 + >

Re: [libvirt] [PATCH] news: Add entry for soft reset support in Xen

2018-11-08 Thread Jim Fehlig
On 11/8/18 10:27 AM, Andrea Bolognani wrote: On Thu, 2018-11-08 at 08:52 -0700, Jim Fehlig wrote: Signed-off-by: Jim Fehlig --- I'm torn on whether this is a new feature, improvement, or even simply a bug fix... The categories are quite fuzzy, but that also means that getting it 100% right

Re: [libvirt] [PATCH] news: Add entry for soft reset support in Xen

2018-11-08 Thread Andrea Bolognani
On Thu, 2018-11-08 at 08:52 -0700, Jim Fehlig wrote: > Signed-off-by: Jim Fehlig > --- > > I'm torn on whether this is a new feature, improvement, or even > simply a bug fix... The categories are quite fuzzy, but that also means that getting it 100% right is not that important :) Personally

[libvirt] [PATCH] news: Add entry for soft reset support in Xen

2018-11-08 Thread Jim Fehlig
Signed-off-by: Jim Fehlig --- I'm torn on whether this is a new feature, improvement, or even simply a bug fix... docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 9d98c34df2..e1d10cf7f1 100644 --- a/docs/news.xml +++

Re: [libvirt] [PATCH] libvirt: add daemon itself as shutdown reason

2018-11-08 Thread John Ferlan
On 11/8/18 8:10 AM, Nikolay Shirokovskiy wrote: > > > On 08.11.2018 15:58, John Ferlan wrote: >> >> >> On 11/8/18 2:03 AM, Nikolay Shirokovskiy wrote: >>> >>> >>> On 07.11.2018 17:29, John Ferlan wrote: On 10/8/18 7:21 AM, Nikolay Shirokovskiy wrote: > Let's introduce

Re: [libvirt] [PATCH] libvirt: add daemon itself as shutdown reason

2018-11-08 Thread Nikolay Shirokovskiy
On 08.11.2018 15:58, John Ferlan wrote: > > > On 11/8/18 2:03 AM, Nikolay Shirokovskiy wrote: >> >> >> On 07.11.2018 17:29, John Ferlan wrote: >>> >>> >>> On 10/8/18 7:21 AM, Nikolay Shirokovskiy wrote: Let's introduce shutdown reason "daemon" which means we have to kill running

Re: [libvirt] [PATCH v2 0/3] Add "memfd" memory backing type

2018-11-08 Thread Marc-André Lureau
Hi On Thu, Nov 8, 2018 at 4:40 PM Marc-André Lureau wrote: > > Hi > > On Mon, Sep 17, 2018 at 5:15 PM wrote: > > > > From: Marc-André Lureau > > > > Hi, > > > > This is an alternative series from "[PATCH 0/5] Use memfd if > > possible". Instead of automatically using memfd for anonymous memory

[libvirt] [PATCH v2 0/4] add disk driver metadata_cache_size option

2018-11-08 Thread Nikolay Shirokovskiy
1st docs patch may need tweaks if merged now (if -blockdev will not be available in 4.10) diff from v1 [1] === - support only -blockdev configurations - add 'default' value for the attribute - set QEMU_CAPS_QCOW2_L2_CACHE_SIZE only for recent qemu versions (see 2nd patch) - factor

[libvirt] [PATCH v2 4/4] DO NOT APPLY: add xml2argv test for metadata_cache_size

2018-11-08 Thread Nikolay Shirokovskiy
This needs next: - turning QEMU_CAPS_BLOCKDEV on - adding caps data for not yet released qemu 3.1 Signed-off-by: Nikolay Shirokovskiy --- .../qemuxml2argvdata/disk-metadata_cache_size.args | 39 ++ tests/qemuxml2argvtest.c | 2 ++ 2 files changed,

[libvirt] [PATCH v2 3/4] qemu: support metadata-cache-size for blockdev

2018-11-08 Thread Nikolay Shirokovskiy
Just set l2-cache-size to INT64_MAX for all format nodes of qcow2 type in block node graph. -drive configuration is not supported because we can not set l2 cache size down the backing chain in this case. Note that imlementation sets l2-cache-size and not cache-size. Unfortunately at time of this

[libvirt] [PATCH v2 1/4] xml: add disk driver metadata_cache_size option

2018-11-08 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 11 + src/conf/domain_conf.c | 17 src/conf/domain_conf.h | 9

[libvirt] [PATCH v2 2/4] qemu: caps: add QEMU_CAPS_QCOW2_L2_CACHE_SIZE

2018-11-08 Thread Nikolay Shirokovskiy
For qemu capable of setting l2-cache-size for qcow2 images to INT64_MAX and semantics of upper limit on l2 cache size. We can only check this by qemu version (3.1.0) now. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_capabilities.c | 5 + src/qemu/qemu_capabilities.h | 1 + 2 files

Re: [libvirt] [PATCH] spec: Drop support for Fedora 27

2018-11-08 Thread Michal Privoznik
On 11/08/2018 01:12 PM, Andrea Bolognani wrote: > In accordance with our platform support policy, now that > Fedora 29 is out we no longer support building on Fedora 27. > > This allows us to remove a few version checks. > > Signed-off-by: Andrea Bolognani > --- > libvirt.spec.in | 8

Re: [libvirt] [PATCH] spec: Drop support for Fedora 27

2018-11-08 Thread Erik Skultety
On Thu, Nov 08, 2018 at 01:12:44PM +0100, Andrea Bolognani wrote: > In accordance with our platform support policy, now that > Fedora 29 is out we no longer support building on Fedora 27. > > This allows us to remove a few version checks. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by:

Re: [libvirt] [PATCH] libvirt: add daemon itself as shutdown reason

2018-11-08 Thread John Ferlan
On 11/8/18 2:03 AM, Nikolay Shirokovskiy wrote: > > > On 07.11.2018 17:29, John Ferlan wrote: >> >> >> On 10/8/18 7:21 AM, Nikolay Shirokovskiy wrote: >>> Let's introduce shutdown reason "daemon" which means we have to >>> kill running domain ourselves as the best action we can take at >>>

Re: [libvirt] [PATCH v2 0/3] Add "memfd" memory backing type

2018-11-08 Thread Marc-André Lureau
Hi On Mon, Sep 17, 2018 at 5:15 PM wrote: > > From: Marc-André Lureau > > Hi, > > This is an alternative series from "[PATCH 0/5] Use memfd if > possible". Instead of automatically using memfd for anonymous memory > when available (as suggested by Daniel), it introduces the "memfd" > memory

[libvirt] [PATCH] spec: Drop support for Fedora 27

2018-11-08 Thread Andrea Bolognani
In accordance with our platform support policy, now that Fedora 29 is out we no longer support building on Fedora 27. This allows us to remove a few version checks. Signed-off-by: Andrea Bolognani --- libvirt.spec.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[libvirt] [PATCH v8 10/14] conf: Allocate/release 'uid' and 'fid' in PCI address

2018-11-08 Thread Yi Min Zhao
This patch adds new functions for reservation, assignment and release to handle the uid/fid. If the uid/fid is defined in the domain XML, they will be reserved directly in the collecting phase. If any of them is not defined, we will find out an available value for them from the zPCI address

[libvirt] [PATCH v8 14/14] news: Update news for PCI address extension attributes

2018-11-08 Thread Yi Min Zhao
Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 9d98c34df2..4549c0a46f 100644

[libvirt] [PATCH v8 11/14] qemu: Generate and use zPCI device in QEMU command line

2018-11-08 Thread Yi Min Zhao
Add new functions to generate zPCI command string and append it to QEMU command line. And the related tests are added. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Bjoern Walk Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani ---

[libvirt] [PATCH v8 13/14] docs: Add 'uid' and 'fid' information

2018-11-08 Thread Yi Min Zhao
Update 'Device address' section to describe 'zpci' element and its two attributes 'uid' and 'fid'. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani --- docs/formatdomain.html.in | 10 +- 1

[libvirt] [PATCH v8 08/14] conf: Introduce parser, formatter for uid and fid

2018-11-08 Thread Yi Min Zhao
This patch introduces new XML parser/formatter functions. Uid is 16-bit and non-zero. Fid is 32-bit. They are the two attributes of zpci which is introduced as PCI address element. Zpci element is parsed and formatted along with PCI address. And add the related test cases. Signed-off-by: Yi Min

[libvirt] [PATCH v8 01/14] conf: Add definitions for 'uid' and 'fid' PCI address attributes

2018-11-08 Thread Yi Min Zhao
Add zPCI definitions in preparation of extending the PCI address with parameters uid (user-defined identifier) and fid (PCI function identifier). Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Bjoern Walk Reviewed-by: Ján Tomko

[libvirt] [PATCH v8 00/14] PCI passthrough support on s390

2018-11-08 Thread Yi Min Zhao
Abstract The PCI representation in QEMU has been extended for S390 allowing configuration of zPCI attributes like uid (user-defined identifier) and fid (PCI function identifier). The details can be found here: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg07262.html To support

[libvirt] [PATCH v8 09/14] qemu: Add zPCI address definition check

2018-11-08 Thread Yi Min Zhao
We should ensure that QEMU supports zPCI when a zPCI address is defined in XML and otherwise report an error. This patch introduces a generic validation function qemuDomainDeviceDefValidateAddress() which calls qemuDomainDeviceDefValidateZPCIAddress() if address type is PCI address.

[libvirt] [PATCH v8 06/14] conf: Introduce address caching for PCI extensions

2018-11-08 Thread Yi Min Zhao
This patch provides a caching mechanism for the device address extensions uid and fid on S390. For efficient sparse address allocation, we introduce two hash tables for uid/fid which hold the address set information per domain. Also in order to improve performance of searching available value, we

[libvirt] [PATCH v8 05/14] qemu: Auto add pci-root for s390/s390x guests

2018-11-08 Thread Yi Min Zhao
The pci-root depends on zpci capability. So autogenerate pci-root if zpci exists. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Bjoern Walk Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 1 + 1 file

[libvirt] [PATCH v8 04/14] qemu: Enable PCI multi bus for S390 guests

2018-11-08 Thread Yi Min Zhao
QEMU on s390 supports PCI multibus since forever. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Bjoern Walk Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 4 1 file changed, 4 insertions(+)

[libvirt] [PATCH v8 07/14] conf: use virXMLFormatElement() in virDomainDeviceInfoFormat()

2018-11-08 Thread Yi Min Zhao
In order to add zPCI child element for PCI address, we update virDomainDeviceInfoFormat() to format device info by helper function virXMLFormatElement(). Then we could simply format zPCI address into child buffer later. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by:

[libvirt] [PATCH v8 12/14] qemu: Add hotpluging support for PCI devices on S390 guests

2018-11-08 Thread Yi Min Zhao
This commit adds hotplug support for PCI devices on S390 guests. There's no need to implement hot unplug for zPCI as QEMU implements an unplug callback which will unplug both PCI and zPCI device in a cascaded way. Currently, the following PCI devices are supported: virtio-blk-pci

[libvirt] [PATCH v8 03/14] conf: Introduce extension flag and zPCI member for PCI address

2018-11-08 Thread Yi Min Zhao
This patch introduces PCI address extension flag for virDomainDeviceInfo and virPCIDeviceAddress. The extension flag in virDomainDeviceInfo is used internally during calculating PCI extension flag. The one in virPCIDeviceAddress is the duplicate to indicate extension address is being used.

[libvirt] [PATCH v8 02/14] qemu: Introduce zPCI capability

2018-11-08 Thread Yi Min Zhao
Let's introduce zPCI capability. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Bjoern Walk Reviewed-by: Ján Tomko Reviewed-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[libvirt] [python] WIP-FYI: mypy annotations for libvirt-python

2018-11-08 Thread Philipp Hahn
Hello, Maybe you already have heads about mypy , which "is an experimental optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing". I started to write a manual annotation file for the Python binding of

Re: [libvirt] [PATCH v2] lxc: Clang is complaining about possible NULL pointer.

2018-11-08 Thread Martin Kletzander
On Wed, Nov 07, 2018 at 04:23:47PM -0500, John Ferlan wrote: On 11/7/18 3:57 PM, Julio Faracco wrote: The array "mount" inside lxc_container is not being checked before for loop. Clang syntax scan is complaining about this segmentation fault. Signed-off-by: Julio Faracco ---

Re: [libvirt] [PATCH 0/3] add disk driver metadata_cache_size option

2018-11-08 Thread Nikolay Shirokovskiy
On 07.11.2018 17:42, Peter Krempa wrote: > On Fri, Nov 02, 2018 at 11:11:50 +0100, Kevin Wolf wrote: >> Am 01.11.2018 um 12:32 hat Nikolay Shirokovskiy geschrieben: >>> Hi, all. >>> >>> This is a patch series after offlist agreement on introducing >>> metadata-cache-size option for disks. The