[libvirt] [PATCH v2 1/2] add nodeset='all' for interleave mode

2018-09-28 Thread Peng Hao
sometimes we hoped that the memory of vm can be evenly distributed in all nodes according to interleave mode. But different hosts has different node number. So we add nodeset='all' for interleave mode. Signed-off-by: Peng Hao --- src/conf/numa_conf.c | 77

[libvirt] [PATCH v2 2/2] add docs for interleave nodeset='all'

2018-09-28 Thread Peng Hao
Signed-off-by: Peng Hao --- docs/formatdomain.html.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 1f12ab5..9aca921 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1242,6 +1242,7 @@

Re: [libvirt] [PATCH 05/11] conf: Add function description for virDomainDefPostParse

2018-09-28 Thread John Ferlan
On 9/20/18 1:44 PM, Marc Hartmayer wrote: > Signed-off-by: Marc Hartmayer > Reviewed-by: Boris Fiuczynski > --- > src/conf/domain_conf.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index a3f2fcb0a001..3c307d325a89

Re: [libvirt] [PATCH 06/11] conf: Get rid of virDomainDeviceDefPostParseOne

2018-09-28 Thread John Ferlan
On 9/20/18 1:44 PM, Marc Hartmayer wrote: > Move the domainPostParseDataAlloc/Free calls to > virDomainDeviceDefParse. As an consequence > virDomainDeviceDefPostParseOne is superfluous and can therefore be > removed. > > Signed-off-by: Marc Hartmayer > Reviewed-by: Boris Fiuczynski > --- >

Re: [libvirt] [PATCH 04/11] conf: Use getParseOpaque() in virDomainObjSetDefTransient

2018-09-28 Thread John Ferlan
On 9/20/18 1:44 PM, Marc Hartmayer wrote: > This allows the QEMU driver to use the originally used QEMU > capabilities for copying the domain. It avoids the usage of a possible > changed QEMU capability as virQEMUCapsCacheLookup might return a > different QEMU capability than used before (for

Re: [libvirt] [PATCH 03/11] qemu: Pass QEMUCaps to virDomainDefPostParse

2018-09-28 Thread John Ferlan
On 9/20/18 1:44 PM, Marc Hartmayer wrote: > ...although priv->qemuCaps will be NULL in almost every case when the > post parse callback has failed. That may change in the future. > > Signed-off-by: Marc Hartmayer > Reviewed-by: Boris Fiuczynski > --- > src/qemu/qemu_process.c | 2 +- > 1

Re: [libvirt] [PATCH v2 0/8] libxl: PVHv2 support

2018-09-28 Thread Marek Marczykowski-Górecki
On Mon, Sep 24, 2018 at 05:09:44PM -0600, Jim Fehlig wrote: > On 9/18/18 6:50 PM, Marek Marczykowski-Górecki wrote: > > This is a respin of my old PVHv1 patch[1], converted to PVHv2. > > Should the code use "PVH" name (as libxl does internally), or "PVHv2" as in > > many places in Xen

Re: [libvirt] [PATCH 02/11] qemu: Introduce qemuDomainUpdateQEMUCaps()

2018-09-28 Thread John Ferlan
On 9/20/18 1:44 PM, Marc Hartmayer wrote: > This function updates the used QEMU capabilities of @vm by querying > the QEMU capabilities cache. > > Signed-off-by: Marc Hartmayer > Reviewed-by: Boris Fiuczynski > --- > src/qemu/qemu_domain.c | 25 + >

Re: [libvirt] [PATCH 01/11] qemu: Use VIR_STEAL_PTR macro

2018-09-28 Thread John Ferlan
On 9/20/18 1:44 PM, Marc Hartmayer wrote: > Signed-off-by: Marc Hartmayer > Reviewed-by: Bjoern Walk > Reviewed-by: Boris Fiuczynski > Reviewed-by: Stefan Zimmermann > --- > src/qemu/qemu_domain.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Reviewed-by: John Ferlan

[libvirt] [PATCH 0/7] Various Coverity based concerns

2018-09-28 Thread John Ferlan
I'm sure it'll be felt one or two could just be false positives, but I have 35-40 of true false positives and it seems at least these go above just noise on the channel. Perhaps the most difficult one to immediately see was the libxl refcnt patch. That involves a little bit of theory and has been

[libvirt] [PATCH 2/7] libxl: Fix possible object refcnt issue

2018-09-28 Thread John Ferlan
When libxlDomainMigrationDstPrepare adds the @args to an virNetSocketAddIOCallback using libxlMigrateDstReceive as the target of the virNetSocketIOFunc @func with the knowledge that the libxlMigrateDstReceive will virObjectUnref @args at the end thus not needing to Unref during normal processing

[libvirt] [PATCH 3/7] tests: Inline a sysconf call for linuxCPUStatsToBuf

2018-09-28 Thread John Ferlan
While unlikely, sysconf(_SC_CLK_TCK) could fail leading to indeterminate results for the subsequent division. So let's just remove the # define and inline the same change. Signed-off-by: John Ferlan --- tests/virhostcputest.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-)

[libvirt] [PATCH 6/7] tests: Use STRNEQ_NULLABLE

2018-09-28 Thread John Ferlan
It's possible that the @outbuf and/or @errbuf could be NULL and thus we need to use the right comparison macro. Found by Coverity Signed-off-by: John Ferlan --- tests/commandtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/commandtest.c b/tests/commandtest.c

[libvirt] [PATCH 7/7] nwfilter: Alter virNWFilterSnoopReqLeaseDel logic

2018-09-28 Thread John Ferlan
Move the fetch of @ipAddrLeft to after the goto skip_instantiate and remove the (req->binding) guard since we know that as long as req->binding is created, then req->threadkey is filled in. Found by Coverity Signed-off-by: John Ferlan --- src/nwfilter/nwfilter_dhcpsnoop.c | 9 - 1 file

[libvirt] [PATCH 4/7] util: Data overrun may lead to divide by zero

2018-09-28 Thread John Ferlan
Commit 87a8a30d6 added the function based on the virsh function, but used an unsigned long long instead of a double and thus that limits the maximum result. Signed-off-by: John Ferlan --- src/util/virutil.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

[libvirt] [PATCH 1/7] lxc: Only check @nparams in lxcDomainBlockStatsFlags

2018-09-28 Thread John Ferlan
Remove the "!params" check from the condition since it's possible someone could pass a non NULL value there, but a 0 for the nparams and thus continue on. The external API only checks if @nparams is non-zero, then check for NULL @params. Found by Coverity Signed-off-by: John Ferlan ---

[libvirt] [PATCH 5/7] tests: Alter logic in testCompareXMLToDomConfig

2018-09-28 Thread John Ferlan
Rather than initialize actualconfig and expectconfig before having the possibility that libxlDriverConfigNew could fail and thus land in cleanup, let's just move them and return immediately upon failure. Signed-off-by: John Ferlan --- tests/libxlxml2domconfigtest.c | 11 +-- 1 file

[libvirt] Availability of libvirt-4.8.0 Release Candidate 2

2018-09-28 Thread Daniel Veillard
RC2 is now tagged in git, and I have pushed signed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ Again this seems to work fine in my limited testing, CI seems to be back to green which is a good sign too :-) https://ci.centos.org/view/libvirt/ That said that's not as

[libvirt] [PATCH v2] qemu: agent: Avoid agentError when closing the QEMU agent

2018-09-28 Thread Wang Yechao
After calling qemuAgentClose(), it is still possible for the QEMU Agent I/O event callback to get invoked. This will trigger an agent error because mon->fd has been set to -1 at this point. Then vm->privateData->agentError is always 'true' except that restart libvirtd or restart qemu-guest-agent

[libvirt] [PATCH v6 09/13] conf: Allocate/release 'uid' and 'fid' in PCI address

2018-09-28 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 collecting phase. If zPCI address is empty, we will find out an available value for it from zPCI address hashtable, and

[libvirt] [PATCH v6 11/13] qemu: Add hotpluging support for PCI devices on S390 guests

2018-09-28 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 v6 12/13] docs: Add 'uid' and 'fid' information

2018-09-28 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 --- docs/formatdomain.html.in | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v6 13/13] news: Update news for PCI address extension attributes

2018-09-28 Thread Yi Min Zhao
Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 3ed6ff8aeb..9600c97102 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,17

[libvirt] [PATCH v6 03/13] conf: Introduce a new PCI address extension flag

2018-09-28 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 v6 00/13] PCI passthrough support on s390

2018-09-28 Thread Yi Min Zhao
Abstract The PCI representation in QEMU has recently 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

[libvirt] [PATCH v6 10/13] qemu: Generate and use zPCI device in QEMU command line

2018-09-28 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 --- src/qemu/qemu_command.c | 102

[libvirt] [PATCH v6 08/13] qemu: Add zPCI address definition check

2018-09-28 Thread Yi Min Zhao
We should ensure that the QEMU should support zPCI when zPCI address is defined in XML. Otherwise the error should be reported. This patch introduces a generic validation function qemuDomainDeviceDefValidateAddress() which calls qemuDomainDeviceDefValidateZPCIAddress() if address type is PCI

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

2018-09-28 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 --- cfg.mk| 1 +

[libvirt] [PATCH v6 04/13] qemu: Enable PCI multi bus for S390 guests

2018-09-28 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(+)

Re: [libvirt] [PATCH] Revert "vircgroup: cleanup controllers not managed by systemd on error"

2018-09-28 Thread Marc Hartmayer
On Thu, Sep 27, 2018 at 04:13 PM +0200, Pavel Hrdina wrote: > This reverts commit 1602aa28f820ada66f707cef3e536e8572fbda1e. > > There is no need to call virCgroupRemove() nor virCgroupFree() if > virCgroupEnableMissingControllers() fails because it will not modify > 'group' at all. The cleanup

[libvirt] [PATCH v6 07/13] conf: Introduce parser, formatter for uid and fid

2018-09-28 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 v6 02/13] qemu: Introduce zPCI capability

2018-09-28 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] [PATCH v6 05/13] qemu: Auto add pci-root for s390/s390x guests

2018-09-28 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 v6 06/13] conf: Introduce address caching for PCI extensions

2018-09-28 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

Re: [libvirt] [PATCH] vircgroup: fix NULL pointer dereferencing

2018-09-28 Thread Marc Hartmayer
On Thu, Sep 27, 2018 at 02:38 PM +0200, John Ferlan wrote: > $subj: > > util: Fix cgroup processing NULL pointer dereferencing I’m fine with this change :) > > > On 9/26/18 11:53 AM, Marc Hartmayer wrote: >> When virCgroupEnableMissingControllers fails it's possible that *group >> is still set

Re: [libvirt] [PATCH] qemu: agent: Reset agentError whenqemuConnectAgent success

2018-09-28 Thread wang.yechao255
> On 27.09.2018 14:37, Wang Yechao wrote: > > qemuAgentClose and qemuAgentIO have race condition, > > as follows: > > > > main thread: second thread: > > virEventPollRunOnceprocessSerialChangedEvent > > virEventPollDispatchHandles > > virMutexUnlock()

Re: [libvirt] [PATCH] qemu: agent: Reset agentError when qemuConnectAgent success

2018-09-28 Thread Nikolay Shirokovskiy
On 27.09.2018 14:37, Wang Yechao wrote: > qemuAgentClose and qemuAgentIO have race condition, > as follows: > > main thread: second thread: > virEventPollRunOnceprocessSerialChangedEvent > virEventPollDispatchHandles > virMutexUnlock() >