Re: [libvirt] [PATCH 5/6] qemu: domain: Use virXMLFormatElement in qemuDomainObjPrivateXMLFormatJob

2018-03-02 Thread Peter Krempa
On Thu, Mar 01, 2018 at 18:59:46 +0100, Peter Krempa wrote: > Modernize the code by using the clever formatter rather than checking > manually when to format the end of the element. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_domain.c | 34

[libvirt] [PATCH 5/7] tests: util: Remove callback from testCompareDomXML2XMLFiles

2018-03-02 Thread Peter Krempa
The testCompareDomXML2XMLPreFormatCallback is no longer used and thus can be removed. Signed-off-by: Peter Krempa --- tests/genericxml2xmltest.c | 2 +- tests/lxcxml2xmltest.c | 2 +- tests/qemuxml2xmltest.c| 5 ++--- tests/testutils.c | 8 +---

Re: [libvirt] [PATCH v2 10/12] qemu_hotplug: Hotplug of reservations

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > Surprisingly, nothing special is happening here. If we are the > first to use the managed helper then spawn it. If not, we're > almost done. But wasn't there a very special reason to start it between fork and exec? Does that still hold true?

Re: [libvirt] [PATCH] virtlockd: acquire locks on re-exec

2018-03-02 Thread Daniel P . Berrangé
On Fri, Mar 02, 2018 at 04:52:23PM +, Daniel P. Berrangé wrote: > On Thu, Mar 01, 2018 at 04:42:36PM -0700, Jim Fehlig wrote: > > Locks held by virtlockd are dropped on re-exec. > > > > virtlockd 94306 POSIX 5.4G WRITE 0 0 0 /tmp/test.qcow2 > > virtlockd 94306 POSIX 5B

Re: [libvirt] [PATCH v5 02/12] qemu: Create new qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > The esisting function is renamed and called from the new one, so > that even while we're in the process of implementing new checks > all the existing ones will be performed. > > Signed-off-by: Andrea Bolognani > --- >

[libvirt] [PATCH 2/7] tests: qemuxml2xml: Remove testing with allowed format detection

2018-03-02 Thread Peter Krempa
Nobody should use format detection due to security implications. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/disk-drive-detect-zeroes.xml| 2 +- tests/qemuxml2argvdata/hugepages-memaccess.xml | 1 +

[libvirt] [PATCH 0/7] tests: qemu: Do proper status XML testing

2018-03-02 Thread Peter Krempa
The 'fake' status XML testing we were doing until now was terrible and would not catch most of the problems. Also the code was too complicated. This adds a way simpler approach which actually works. (for the small price of adding a lot of test data lines) Peter Krempa (7): tests: qemuxml2xml:

[libvirt] [PATCH 1/7] tests: qemuxml2xml: Rename testInfoFree to testInfoClear

2018-03-02 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 0eb9e6c77a..2cbe0c82a7 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c

[libvirt] [PATCH 6/7] tests: qemuxml2xml: Add modern example of status XML to the test

2018-03-02 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/qemustatusxml2xmldata/modern-in.xml | 443 + tests/qemustatusxml2xmldata/modern-out.xml | 443 + tests/qemuxml2xmltest.c| 1 + 3 files changed, 887

[libvirt] [PATCH 3/7] tests: qemuxml2xml: Add proper domain status XML testing

2018-03-02 Thread Peter Krempa
Add new approach to properly test status XML files by supplying a full XML file rather than generating synthetic test cases by prepending the status header. The two tests introduced here are copies of existing cases using the synthetic header so that current level of testing is kept. The files are

[libvirt] [PATCH 4/7] tests: qemuxml2xml: Remove fake status XML testing

2018-03-02 Thread Peter Krempa
Now that the better approach is in place we can remove the old functions doing the fake formatting. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 218 +--- 1 file changed, 1 insertion(+), 217 deletions(-) diff --git

[libvirt] [PATCH 7/7] tests: qemuxml2xml: Add status XML with outgoing migration with NBD

2018-03-02 Thread Peter Krempa
Signed-off-by: Peter Krempa --- .../qemustatusxml2xmldata/migration-out-nbd-in.xml | 449 + .../migration-out-nbd-out.xml | 449 + tests/qemuxml2xmltest.c| 1 + 3 files changed, 899

Re: [libvirt] [PATCH v2 09/12] qemu: Start PR daemons on domain startup

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > Before we exec() qemu we have to spawn pr-helper processes for > all managed reservations (well, technically there can only one). "can be only one" Since there can only be one why do we bother w/ plurality? > The only caveat there is that we

Re: [libvirt] [PATCH] virtlockd: acquire locks on re-exec

2018-03-02 Thread Daniel P . Berrangé
On Thu, Mar 01, 2018 at 04:42:36PM -0700, Jim Fehlig wrote: > Locks held by virtlockd are dropped on re-exec. > > virtlockd 94306 POSIX 5.4G WRITE 0 0 0 /tmp/test.qcow2 > virtlockd 94306 POSIX 5B WRITE 0 0 0 /run/virtlockd.pid > virtlockd 94306 POSIX 5B WRITE 0

Re: [libvirt] [PATCH v5 01/12] conf: Assign explicit value to VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > Pretty much any reasonable compiler would do this automatically, > but there's no harm in being explicit about it. > > Signed-off-by: Andrea Bolognani > --- > src/conf/domain_conf.h | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH v2 11/12] qemu_hotplug: Hotunplug of reservations

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > Just line in previous commit, if we are the last ones that are > using the pr-manager delete it and also kill the pr-helper > process. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_domain.c | 19

Re: [libvirt] [PATCH v2 12/12] qemu: Detect pr-manager-helper capability

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > The capability tracks if qemu has pr-manager-helper object. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_capabilities.c | 1 + > 1 file changed, 1 insertion(+) > As noted earlier - this should just be merged

Re: [libvirt] [PATCH] tests: Add capabilities for QEMU 2.11.0 on s390x

2018-03-02 Thread John Ferlan
On 02/26/2018 05:20 AM, Shalini Chellathurai Saroja wrote: > Let us introduce the xml and reply files for QEMU 2.11.0 on s390x. > > Signed-off-by: Shalini Chellathurai Saroja > Reviewed-by: Bjoern Walk > Reviewed-by: Boris Fiuczynski

Re: [libvirt] [PATCH 1/2] conf: nodedev: Don't refresh host caps in testdriver

2018-03-02 Thread John Ferlan
On 02/23/2018 06:16 PM, Cole Robinson wrote: > Add a 'testdriver' bool that we set for test_driver.c nodedevs > which will skip accessing host resources via virNodeDeviceUpdateCaps > > Signed-off-by: Cole Robinson > --- > src/conf/node_device_conf.c | 3 +++ >

Re: [libvirt] [PATCH 2/2] test: Implement virConnectListAllNodeDevices

2018-03-02 Thread John Ferlan
On 02/23/2018 06:16 PM, Cole Robinson wrote: > Signed-off-by: Cole Robinson > --- > src/test/test_driver.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index 39784c9fa..844e99dd7 100644 > ---

Re: [libvirt] [PATCH v5 07/12] qemu: Validate PCI controller options (busNr)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > This change catches an invalid use of the option in our > test suite. > > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump > --- >

Re: [libvirt] [PATCH] virtlockd: acquire locks on re-exec

2018-03-02 Thread Jim Fehlig
On 03/02/2018 11:12 AM, Daniel P. Berrangé wrote: On Fri, Mar 02, 2018 at 04:52:23PM +, Daniel P. Berrangé wrote: On Thu, Mar 01, 2018 at 04:42:36PM -0700, Jim Fehlig wrote: Locks held by virtlockd are dropped on re-exec. virtlockd 94306 POSIX 5.4G WRITE 0 0 0 /tmp/test.qcow2

Re: [libvirt] [PATCH v5 10/12] qemu: Validate PCI controller options (chassis and port)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v5 05/12] qemu: Validate PCI controller options (targetIndex)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_domain.c | 52 > -- > 1 file changed, 46 insertions(+), 6

Re: [libvirt] [PATCH v5 06/12] qemu: Validate PCI controller options (pcihole64)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump > --- > src/qemu/qemu_domain.c | 40 > 1 file

Re: [libvirt] [PATCH 1/2] conf: nodedev: Don't refresh host caps in testdriver

2018-03-02 Thread Cole Robinson
On 03/02/2018 04:02 PM, John Ferlan wrote: > > > On 02/23/2018 06:16 PM, Cole Robinson wrote: >> Add a 'testdriver' bool that we set for test_driver.c nodedevs >> which will skip accessing host resources via virNodeDeviceUpdateCaps >> >> Signed-off-by: Cole Robinson >> ---

Re: [libvirt] [PATCH v5 12/12] qemu: Remove old qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > We've implemented all existing checks, and more, in the new > function, so we can finally drop the old one. > > Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump -- libvir-list mailing list

Re: [libvirt] [PATCH v5 03/12] qemu: Validate PCI controller options (modelName)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_domain.c | 229 > +++-- > 1 file changed, 145 insertions(+), 84

Re: [libvirt] [PATCH v5 04/12] qemu: Validate PCI controller options (index)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_domain.c | 68 > +++--- > 1 file changed, 43 insertions(+), 25

Re: [libvirt] [PATCH v5 02/12] qemu: Create new qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > The esisting function is renamed and called from the new one, so Forgot to mention this before:   s/esisting/existing/ -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 08/12] qemu: Validate PCI controller options (numaNode)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > This change catches an invalid use of the option in our > test suite. > > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump > --- >

Re: [libvirt] [PATCH v5 11/12] qemu: Validate PCI controllers (QEMU capabilities)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_domain.c | 190 > - > 1 file changed, 77 insertions(+), 113 deletions(-) > > diff --git a/src/qemu/qemu_domain.c

Re: [libvirt] [PATCH] libxl: don't hardcode scheduler weight

2018-03-02 Thread John Ferlan
On 02/22/2018 05:20 PM, Jim Fehlig wrote: > Long ago in commit dfa1e1dd53 the scheduler weight was accidentally > hardcoded to 1000. Weight is a setting with no unit since it is > relative to the weight of other domains. If no weight is specified, > libxl defaults to 256. > > Instead of

Re: [libvirt] [PATCH 1/2] conf: nodedev: Don't refresh host caps in testdriver

2018-03-02 Thread John Ferlan
On 03/02/2018 04:36 PM, Cole Robinson wrote: > On 03/02/2018 04:02 PM, John Ferlan wrote: >> >> >> On 02/23/2018 06:16 PM, Cole Robinson wrote: >>> Add a 'testdriver' bool that we set for test_driver.c nodedevs >>> which will skip accessing host resources via virNodeDeviceUpdateCaps >>> >>>

Re: [libvirt] [PATCH 0/6] qemu: domain: Private data handling refactors

2018-03-02 Thread John Ferlan
On 03/01/2018 12:59 PM, Peter Krempa wrote: > Extracted from a huge work-in-progres series since these look > stand-alone. > > Peter Krempa (6): > qemu: Add qemu functions for storage source private data handling > qemu: domain: Split out formating of Job data from private data >

Re: [libvirt] [PATCH v5 09/12] qemu: Validate PCI controller options (chassisNr)

2018-03-02 Thread Laine Stump
On 03/02/2018 10:13 AM, Andrea Bolognani wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1483816 > > Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [BUG]libvirt doesn't show the real state of vm

2018-03-02 Thread Wuzongyong (Euler Dept)
Hi, I notice that monitor.sock still exist when I send SIGKILL to qemu process by accident, and I can't find the qemu process through `ps -ef |grep qemu` command. Then I execute `virsh list --all`, libvirt just show that the vm still in running state. I can't find log "Received EOF on xxx"

[libvirt] [PATCH 4/6] qemu: add architecture-specific CPU info handling

2018-03-02 Thread Viktor Mihajlovski
Extract architecture specific data from query-cpus[-fast] if available. A new function qemuMonitorJSONExtractCPUArchInfo() uses a call-back table to find and call architecture-specific extraction handlers. Initially, there's a handler for s390 cpu info to set the halted property depending on the

[libvirt] [PATCH 5/6] tests: add testcase for s390 query-cpus-fast

2018-03-02 Thread Viktor Mihajlovski
The s390 testcase verifies that the s390-specific cpu-state field is correctly mapped to the halted property. Since a few of the x86 and ppc testcases return "halted": "true" it was necessary to update the respective .data files. Signed-off-by: Viktor Mihajlovski

[libvirt] [PATCH 6/6] qemu: refresh vcpu halted state only via query-cpus-fast

2018-03-02 Thread Viktor Mihajlovski
In order to not affect running VMs, refreshing the halted state is only performed if QEMU supports the query-cpus-fast QAPI. Signed-off-by: Viktor Mihajlovski Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer

[libvirt] [PATCH 2/6] qemu: use query-cpus-fast in JSON monitor

2018-03-02 Thread Viktor Mihajlovski
Use query-cpus-fast instead of query-cpus if supported by QEMU. Based on the QEMU_CAPS_QUERY_CPUS_FAST capability. Signed-off-by: Viktor Mihajlovski Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_monitor.c | 10 --

[libvirt] [PATCH 3/6] tests: add qemumonitorjson tests for query-cpus-fast

2018-03-02 Thread Viktor Mihajlovski
Extended the json monitor test program with support for query-cpus-fast and added a sample file set for x86 data obtained using the it. Signed-off-by: Viktor Mihajlovski Reviewed-by: Boris Fiuczynski ---

[libvirt] [PATCH 0/6] Use query-cpus-fast instead of query-cpus

2018-03-02 Thread Viktor Mihajlovski
The QEMU monitor commmand query-cpus is deprecated starting with QEMU 2.12.0 because it can adversely affect the performance of a running virtual machine. This series enables libvirt to use the new query-cpus-fast interface if supported by the local QEMU instance and is required in order to

[libvirt] [PATCH 1/6] qemu: add capability detection for query-cpus-fast

2018-03-02 Thread Viktor Mihajlovski
Detect whether QEMU supports the QMP query-cpus-fast API and set QEMU_CAPS_QUERY_CPUS_FAST in this case. Signed-off-by: Viktor Mihajlovski Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer ---

[libvirt] [PATCH v5 00/12] qemu: Validate PCI controller options

2018-03-02 Thread Andrea Bolognani
Applies cleanly on top of 328b8dbe8bee9939c7108fdec4fda05fd02511f6. Changes from [v4]: * patch 1/12 is new; * use virReportEnumRangeError(), as suggested by laine. Changes from [v3]: * don't introduce new test cases that won't be able to provide full test coverage anyway, as

[libvirt] [PATCH v5 01/12] conf: Assign explicit value to VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE

2018-03-02 Thread Andrea Bolognani
Pretty much any reasonable compiler would do this automatically, but there's no harm in being explicit about it. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h

[libvirt] [PATCH v5 10/12] qemu: Validate PCI controller options (chassis and port)

2018-03-02 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 58 +++--- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH v5 09/12] qemu: Validate PCI controller options (chassisNr)

2018-03-02 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 40 ++-- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH v5 08/12] qemu: Validate PCI controller options (numaNode)

2018-03-02 Thread Andrea Bolognani
This change catches an invalid use of the option in our test suite. https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 52 ++

[libvirt] [PATCH v5 05/12] qemu: Validate PCI controller options (targetIndex)

2018-03-02 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 52 -- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH v5 11/12] qemu: Validate PCI controllers (QEMU capabilities)

2018-03-02 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 190 - 1 file changed, 77 insertions(+), 113 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f54e7b87ae..e0ab43e139 100644 ---

[libvirt] [PATCH v5 07/12] qemu: Validate PCI controller options (busNr)

2018-03-02 Thread Andrea Bolognani
This change catches an invalid use of the option in our test suite. https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 46 +++---

Re: [libvirt] [PATCH v2 10/12] qemu_hotplug: Hotplug of reservations

2018-03-02 Thread Ján Tomko
On Wed, Feb 21, 2018 at 07:11:35PM +0100, Michal Privoznik wrote: Surprisingly, nothing special is happening here. If we are the first to use the managed helper then spawn it. If not, we're almost done. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 72

[libvirt] [PATCH v5 04/12] qemu: Validate PCI controller options (index)

2018-03-02 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 68 +++--- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH v5 06/12] qemu: Validate PCI controller options (pcihole64)

2018-03-02 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 40 1 file changed, 40 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH v5 02/12] qemu: Create new qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Andrea Bolognani
The esisting function is renamed and called from the new one, so that even while we're in the process of implementing new checks all the existing ones will be performed. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 29 ++--- 1 file

[libvirt] [PATCH v5 12/12] qemu: Remove old qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Andrea Bolognani
We've implemented all existing checks, and more, in the new function, so we can finally drop the old one. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git

[libvirt] [PATCH v5 03/12] qemu: Validate PCI controller options (modelName)

2018-03-02 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 229 +++-- 1 file changed, 145 insertions(+), 84 deletions(-) diff --git a/src/qemu/qemu_domain.c

Re: [libvirt] update keycodemapdb submodule for 4.1.0 release

2018-03-02 Thread Andrea Bolognani
On Fri, 2018-03-02 at 08:08 +0100, Martin Kletzander wrote: > On Thu, Mar 01, 2018 at 04:52:09PM +, Daniel P. Berrangé wrote: > > You show that we we missing CI coverage for python3 though, so we > > should address that. We could make our Fedora Jenkins CI builds use py3, > > along with one of

Re: [libvirt] [PATCH 2/6] qemu: use query-cpus-fast in JSON monitor

2018-03-02 Thread Peter Krempa
On Fri, Mar 02, 2018 at 10:29:07 +0100, Viktor Mihajlovski wrote: > Use query-cpus-fast instead of query-cpus if supported by QEMU. > Based on the QEMU_CAPS_QUERY_CPUS_FAST capability. > > Signed-off-by: Viktor Mihajlovski > Reviewed-by: Boris Fiuczynski

Re: [libvirt] [RFC PATCH v3 3/9] qemu: Prefer qom-list-properties to device-list-properties

2018-03-02 Thread Andrea Bolognani
On Thu, 2018-03-01 at 19:03 +0100, Andrea Bolognani wrote: > @@ -2883,6 +2883,12 @@ virQEMUCapsProbeQMPObjects(virQEMUCapsPtr qemuCaps, > int nvalues; > char **values; > size_t i; > +const char *impl = "device-list-properties"; > + > +/* Prefer qom-list-properties if

Re: [libvirt] update keycodemapdb submodule for 4.1.0 release

2018-03-02 Thread Daniel P . Berrangé
On Fri, Mar 02, 2018 at 11:24:03AM +0100, Andrea Bolognani wrote: > On Fri, 2018-03-02 at 08:08 +0100, Martin Kletzander wrote: > > On Thu, Mar 01, 2018 at 04:52:09PM +, Daniel P. Berrangé wrote: > > > You show that we we missing CI coverage for python3 though, so we > > > should address that.

Re: [libvirt] [PATCH 4/6] qemu: add architecture-specific CPU info handling

2018-03-02 Thread Peter Krempa
On Fri, Mar 02, 2018 at 10:29:09 +0100, Viktor Mihajlovski wrote: > Extract architecture specific data from query-cpus[-fast] if > available. A new function qemuMonitorJSONExtractCPUArchInfo() > uses a call-back table to find and call architecture-specific > extraction handlers. > > Initially,

Re: [libvirt] [PATCH v2 07/12] qemu: Introduce pr_helper to qemu.conf

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > Just like we allow users overriding path to bridge-helper > detected at compile time we can allow them to override path to > qemu-pr-helper. > > Signed-off-by: Michal Privoznik > --- > m4/virt-driver-qemu.m4 |

[libvirt] [PATCH] conf: set postParseFailed even without ALLOW_POST_PARSE_FAIL

2018-03-02 Thread Ján Tomko
We allow the postParse callbacks to fail for some reasons (missing emulator binary) when parsing the configs from /etc/libvirt. In that case, def->postParseFailed is set to true and the post parse callbacks are re-executed on domain startup. However this bool was only set when

Re: [libvirt] [PATCH v2 06/12] qemu: Generate cmd line at startup

2018-03-02 Thread Peter Krempa
On Fri, Mar 02, 2018 at 08:22:32 -0500, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: > > This is the easier part. All we need to do here is put -object > > pr-manger-helper,id=$alias,path=$socketPath and then just > > reference the object in -drive

Re: [libvirt] [PATCH] conf: set postParseFailed even without ALLOW_POST_PARSE_FAIL

2018-03-02 Thread Peter Krempa
On Fri, Mar 02, 2018 at 15:17:55 +0100, Ján Tomko wrote: > We allow the postParse callbacks to fail for some reasons (missing > emulator binary) when parsing the configs from /etc/libvirt. > In that case, def->postParseFailed is set to true and the post > parse callbacks are re-executed on domain

Re: [libvirt] [PATCH v2 06/12] qemu: Generate cmd line at startup

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > This is the easier part. All we need to do here is put -object > pr-manger-helper,id=$alias,path=$socketPath and then just > reference the object in -drive file.pr-manger=$alias. s/manger/manager/ My fingers usually the same way though as

Re: [libvirt] update keycodemapdb submodule for 4.1.0 release

2018-03-02 Thread Martin Kletzander
On Fri, Mar 02, 2018 at 10:45:35AM +, Daniel P. Berrangé wrote: On Fri, Mar 02, 2018 at 11:24:03AM +0100, Andrea Bolognani wrote: On Fri, 2018-03-02 at 08:08 +0100, Martin Kletzander wrote: > On Thu, Mar 01, 2018 at 04:52:09PM +, Daniel P. Berrangé wrote: > > You show that we we missing

Re: [libvirt] [PATCH] qemu: remove unused QEMU_CAPS_ENABLE_KVM

2018-03-02 Thread Ján Tomko
On Fri, Mar 02, 2018 at 05:07:16AM +0300, Klim Kireev wrote: It needs for the -enable-kvm flag. This qemu flag can be compiled out, but we already detect that case with the QEMU_CAPS_KVM check. So this check is redundant and can be removed Signed-off-by: Klim Kireev

Re: [libvirt] [PATCH v3 02/12] qemu: Create new qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Laine Stump
On 02/21/2018 09:14 AM, Andrea Bolognani wrote: > The esisting function is renamed and called from the new one, so > that even while we're in the process of implementing new checks > all the existing ones will be performed. > > Signed-off-by: Andrea Bolognani > --- > Based on

Re: [libvirt] [PATCH 2/6] qemu: use query-cpus-fast in JSON monitor

2018-03-02 Thread Peter Krempa
On Fri, Mar 02, 2018 at 13:32:19 +0100, Viktor Mihajlovski wrote: > On 02.03.2018 12:33, Peter Krempa wrote: > [...] > >> @@ -2028,8 +2029,12 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon, > >> (qemuMonitorJSONGetHotpluggableCPUs(mon, , > >> )) < 0) > >> goto cleanup; > >> > >>

Re: [libvirt] [PATCH v2 01/12] virstoragefile: Introduce virStoragePRDef

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > This is a definition that holds information on SCSI persistent > reservation settings. The XML part looks like this: > > > > > > If @managed is set to 'yes' then the is not parsed. > This design was agreed on here: > >

Re: [libvirt] [PATCH v2 05/12] qemu: Store pr runtime data in status XML

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > Now that we generate pr-manager alias and socket path store them > in status XML so that they are preserved across daemon restarts. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_domain.c | 90 >

Re: [libvirt] [PATCH 1/6] qemu: add capability detection for query-cpus-fast

2018-03-02 Thread Peter Krempa
On Fri, Mar 02, 2018 at 10:29:06 +0100, Viktor Mihajlovski wrote: > Detect whether QEMU supports the QMP query-cpus-fast API > and set QEMU_CAPS_QUERY_CPUS_FAST in this case. > > Signed-off-by: Viktor Mihajlovski > Reviewed-by: Boris Fiuczynski

Re: [libvirt] [PATCH v2 1/2] qemu: log the crash information for S390

2018-03-02 Thread Bjoern Walk
John Ferlan [2018-03-01, 02:22PM -0500]: > On 02/27/2018 04:32 AM, Bjoern Walk wrote: > > +if (VIR_STRDUP(ret->data.s390.reason, reason) < 0) { > > +virReportOOMError(); > > +goto error; > > +} > > No need for the OOMError as VIR_STRDUP will splat that

Re: [libvirt] [PATCH 2/6] qemu: use query-cpus-fast in JSON monitor

2018-03-02 Thread Viktor Mihajlovski
On 02.03.2018 12:33, Peter Krempa wrote: [...] >> @@ -2028,8 +2029,12 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon, >> (qemuMonitorJSONGetHotpluggableCPUs(mon, , >> )) < 0) >> goto cleanup; >> >> +fast = virQEMUCapsGet(QEMU_DOMAIN_PRIVATE(mon->vm)->qemuCaps, > > Don't do

Re: [libvirt] [PATCH v3 02/12] qemu: Create new qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Andrea Bolognani
On Fri, 2018-03-02 at 07:34 -0500, Laine Stump wrote: > On 02/21/2018 09:14 AM, Andrea Bolognani wrote: [...] > > +static int > > +qemuDomainDeviceDefValidateControllerPCI(const virDomainControllerDef > > *cont, > > + const virDomainDef *def, > > +

Re: [libvirt] [PATCH v3 02/12] qemu: Create new qemuDomainDeviceDefValidateControllerPCI()

2018-03-02 Thread Laine Stump
On 03/02/2018 08:05 AM, Andrea Bolognani wrote: > On Fri, 2018-03-02 at 07:34 -0500, Laine Stump wrote: >> On 02/21/2018 09:14 AM, Andrea Bolognani wrote: > [...] >>> +static int >>> +qemuDomainDeviceDefValidateControllerPCI(const virDomainControllerDef >>> *cont, >>> +

Re: [libvirt] [PATCH v2 08/12] qemu_domain: Track pr-helper PID in status XML

2018-03-02 Thread John Ferlan
On 02/21/2018 01:11 PM, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_domain.c | 16 > src/qemu/qemu_domain.h | 2 ++ > 2 files changed, 18 insertions(+) > This seems reasonable... Although given the next patch and