[libvirt] [PATCH] docs: index.html.in: Deduplicate the link of QEMU and KVM

2019-04-15 Thread Han Han
Because the page of QEMU and KVM use the same doc drvqemu.html, merge the into one and name it as QEMU/KVM. Signed-off-by: Han Han --- docs/index.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.html.in b/docs/index.html.in index f593445d06..97a4e9eef7

Re: [libvirt] [PATCH] news: Document firmware autoselection exposure in domcaps

2019-04-15 Thread Cole Robinson
On 4/10/19 11:39 AM, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > docs/news.xml | 12 > 1 file changed, 12 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index 21807f26d3..eb97d25c80 100644 > --- a/docs/news.xml > +++ b/docs/news.xml > @@ -49,6

Re: [libvirt] [PATCH 0/3] vmx: add efi firmware attribute

2019-04-15 Thread Cole Robinson
On 4/9/19 10:04 AM, Pino Toscano wrote: > Use the recently added infrastructure for firmware autoselection, and > indicate which firmware is used by a VMware guest. > > Pino Toscano (3): > vmx: convert firmware config for autoselection > vmx: write firmware back from autoselection > docs:

Re: [libvirt] [PATCH] test_driver: provide virDomainGetTime implementation

2019-04-15 Thread Cole Robinson
On 4/9/19 6:16 AM, Ján Tomko wrote: > On Mon, Apr 08, 2019 at 01:43:17AM +0200, Ilias Stamatis wrote: >> Implement testDomainGetTime by returning the current time. >> >> Signed-off-by: Ilias Stamatis >> --- >> I initially implemented this using clock_gettime, but Pavel suggested >> that this

Re: [libvirt] [PATCH] virErrorPreserveLast/virErrorRestore conversions

2019-04-15 Thread Cole Robinson
Thanks for the patch! The code changes look good (with some minor comments below). The commit message needs work though. Some good guidelines are: https://chris.beams.io/posts/git-commit/ The subject should mention roughly what file it's touching. git log tools/virsh-domain.c will give some

Re: [libvirt] [PATCH 0/3] Emit event on lease attach/detach

2019-04-15 Thread Cole Robinson
On 4/5/19 3:57 AM, Michal Privoznik wrote: > Unfortunately, we can't emit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED or > VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event because that carries device > alias within itself and leases don't have one. > Hmm. I understand that aren't really devices so it doesn't have

[libvirt] [PATCH v2 5/6] tests: qemuxml2xml: Convert genid* to TEST_CAPS

2019-04-15 Thread Cole Robinson
Convert these test cases to use DO_TEST_CAPS_LATEST * genid * genid-auto This ensures the test infrastructure is working as expected for a test case with explicit -active and -inactive XML test data Signed-off-by: Cole Robinson --- .../{genid-active.xml => genid-active.x86_64-latest.xml}

[libvirt] [PATCH v2 2/6] tests: qemuxml2xml: Add DO_TEST_CAPS*

2019-04-15 Thread Cole Robinson
Add DO_TEST_CAPS* macros, lifted from qemuxml2argvtest. Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 39 --- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index

[libvirt] [PATCH v2 1/6] tests: qemuxml2xml: Set name in testQemuInfo

2019-04-15 Thread Cole Robinson
Use the same pattern that is used in qemuxml2argvtest, setting the name in a static testQemuInfo instance inside the test macros Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 47 + 1 file changed, 24 insertions(+), 23 deletions(-) diff --git

[libvirt] [PATCH v2 0/6] tests: qemuxml2xml: add DO_TEST_CAPS*

2019-04-15 Thread Cole Robinson
v1: https://www.redhat.com/archives/libvir-list/2019-April/msg00083.html v2 changes: - Push first series prep work - Split last patch into multiple pieces - Add genid* conversion to demonstrate -active and -inactive names - Address Andrea's review comments Cole Robinson (6):

[libvirt] [PATCH v2 3/6] tests: qemuxml2xml: Convert virtio-*transitional to TEST_CAPS

2019-04-15 Thread Cole Robinson
Convert these test cases to use DO_TEST_CAPS_LATEST * virtio-transitional * virtio-non-transitional Signed-off-by: Cole Robinson --- ...virtio-non-transitional.x86_64-latest.xml} | 0 ... => virtio-transitional.x86_64-latest.xml} | 0 tests/qemuxml2xmltest.c | 20

[libvirt] [PATCH v2 4/6] tests: qemuxml2xml: Convert os-firmware* to TEST_CAPS

2019-04-15 Thread Cole Robinson
Convert these test cases to use DO_TEST_CAPS_LATEST * os-firmware-bios * os-firmware-efi * os-firmware-efi-secboot Signed-off-by: Cole Robinson --- .../os-firmware-bios.x86_64-latest.xml| 68 +++ tests/qemuxml2xmloutdata/os-firmware-bios.xml | 1 -

[libvirt] [PATCH v2 6/6] tests: qemuxml2xml: Convert aarch64-os-firmware-efi to TEST_CAPS

2019-04-15 Thread Cole Robinson
Demostrate DO_TEST_CAPS_ARCH_LATEST by converting the test case 'aarch64-os-firmware-efi' Signed-off-by: Cole Robinson --- ...aarch64-os-firmware-efi.aarch64-latest.xml | 31 +++ .../aarch64-os-firmware-efi.xml | 1 - tests/qemuxml2xmltest.c

Re: [libvirt] [PATCH] qemu: do not set wait:false for client sockets

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 06:51:48PM +0200, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Qemu commit 767abe7 ("chardev: forbid 'wait' option with client sockets") effectively deprecates usage of "wait" with client sockets starting with qemu 4.0, and earlier versions ignored the

Re: [libvirt] [dbus PATCH] tests: fix test_connect

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 02:15:28PM -0400, Cole Robinson wrote: On 4/15/19 11:25 AM, Pavel Hrdina wrote: Calling fixtures directly was removed in pytest 4.0, we can change the fixture to be a wrapper around the original function and use the original fixture name. Would be nice to call out the

Re: [libvirt] [PATCH 12/12] tests: qemuxml2xml: Add DO_TEST_CAPS*

2019-04-15 Thread Cole Robinson
On 4/11/19 8:15 AM, Ján Tomko wrote: > On Thu, Apr 11, 2019 at 12:44:16PM +0200, Andrea Bolognani wrote: >> On Mon, 2019-04-01 at 12:47 -0400, Cole Robinson wrote: >>> Add DO_TEST_CAPS* macros, lifted from qemuxml2argvtest. Use it on >>> a few recently added xml2xml tests that use DO_TEST_CAPS in

Re: [libvirt] [PATCH] virSecurityDACRestoreChardevLabel: Restore UNIX sockets too

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 05:52:50PM +0200, Michal Privoznik wrote: We're setting seclabels on unix sockets but never restoring them. Surprisingly, we are in SELinux driver. s/we are/we are doing so/ would be clearer Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 14

Re: [libvirt] [PATCH for v5.3.0 10/17] security: Remember owner only for top level image

2019-04-15 Thread Cole Robinson
On 4/15/19 1:09 PM, Michal Privoznik wrote: > On 4/10/19 11:35 PM, Cole Robinson wrote: >> On 3/28/19 11:04 AM, Michal Privoznik wrote: >>> Here is the problem: If all disks had XATTRs (i.e. domains using >>> them were started with owner remembering turned on) then >>> refcounting implemented in

[libvirt] [PATCH v2 1/3] util: enum: Add 'label' arg to virEnum*String

2019-04-15 Thread Cole Robinson
This will allow VIR_ENUM_IMPL calls to register a string label which will be used to raise errors from virEnum*String functions. For example, if virDomainVirtType may use label='domain type', sp virEnumFromString called with bad value='zzz' will raise: invalid argument: Unknown 'domain type'

[libvirt] [PATCH v2 2/3] util: enum: Add NULL 'label' arg VIR_ENUM_IMPL calls

2019-04-15 Thread Cole Robinson
Allow passing in a 'label' string for raising errors from ToString/FromString calls. Adjust all VIR_ENUM_IMPL calls to pass in NULL to disable error reporting. We will add strings at a later time. Signed-off-by: Cole Robinson --- docs/apibuild.py | 14 ++

[libvirt] [PATCH v2 3/3] conf: Add virDomainVirtType enum error label

2019-04-15 Thread Cole Robinson
Signed-off-by: Cole Robinson --- Not sure if we should apply this now or after some flag day. I'm open to suggestions src/bhyve/bhyve_driver.c | 6 +- src/conf/domain_conf.c | 12 +++- src/libxl/libxl_driver.c | 6 +- src/qemu/qemu_capabilities.c | 5 + 4

[libvirt] [PATCH v2 0/3] Add 'label' arg to VIR_ENUM_IMPL

2019-04-15 Thread Cole Robinson
v1: https://www.redhat.com/archives/libvir-list/2019-April/msg00589.html v2 changes: - First two patches applied - Turn on the error reporting, but only for label != NULL - Fill in label == NULL for all VIR_ENUM_IMPL calls - Patch #3 is added as an example conversion Cole

[libvirt] [PATCH v1 4/4] qemu: monitor: implement query-cpu-model-comparison

2019-04-15 Thread Collin Walling
Interfaces with QEMU to compare CPU models. The command takes two CPU models, A and B, that are given a model name and an optional list of CPU features. Through the query-cpu-model-comparison command issued via QMP, a result is produced that contains the comparison evaluation string (identical,

[libvirt] [PATCH v1 3/4] qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON

2019-04-15 Thread Collin Walling
This capability enables CPU model comparison between two CPU definitions via QMP. Signed-off-by: Collin Walling --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +

[libvirt] [PATCH v1 2/4] qemu: monitor: helper functions for CPU models

2019-04-15 Thread Collin Walling
Refactor some code in qemuMonitorJSONGetCPUModelExpansion to be later used for the comparison and baseline functions. This does not alter any functionality. Signed-off-by: Collin Walling Reviewed-by: Bjoern Walk --- src/qemu/qemu_monitor_json.c | 166 --- 1

[libvirt] [PATCH v1 1/4] cpu_conf: xml to cpu definition parse helper

2019-04-15 Thread Collin Walling
Implement an XML to virCPUDefPtr helper that handles the ctxt prerequisite for virCPUDefParseXML. This does not alter any functionality. Signed-off-by: Collin Walling Reviewed-by: Bjoern Walk --- src/conf/cpu_conf.c | 30 ++ src/conf/cpu_conf.h | 6

[libvirt] [PATCH v1 0/4] RFC CPU Model Comparison via QMP

2019-04-15 Thread Collin Walling
This is a preview of the CPU comparison (and soon baseline) patches. Comments are welcome on all aspects, as they will help guide the development of the baseline implementation. The first couple of patches simply refactor code. The first introduces an XML -> CPU def helper to be used to extract

[libvirt] [PATCH v2 1/2] rpc: cleanup in virNetTLSContextNew

2019-04-15 Thread Adrian Brzezinski
Failed new gnutls context allocations in virNetTLSContextNew function results in double free and segfault. Occasional memory leaks may also occur. Signed-off-by: Adrian Brzezinski --- src/rpc/virnettlscontext.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v2 2/2] news: cleanup in virNetTLSContextNew

2019-04-15 Thread Adrian Brzezinski
Signed-off-by: Adrian Brzezinski --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 86c7734..9338381 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -51,6 +51,16 @@ + + + rpc: cleanup

[libvirt] [PATCH v2 0/2] rpc: cleanup in virNetTLSContextNew

2019-04-15 Thread Adrian Brzezinski
Changes: - no new goto label - passing ctxt->priority directly to VIR_FREE - dedicated commit for news file Adrian Brzezinski (2): rpc: cleanup in virNetTLSContextNew news: cleanup in virNetTLSContextNew docs/news.xml | 10 ++ src/rpc/virnettlscontext.c | 10 +-

Re: [libvirt] [dbus PATCH] tests: fix test_connect

2019-04-15 Thread Cole Robinson
On 4/15/19 11:25 AM, Pavel Hrdina wrote: > Calling fixtures directly was removed in pytest 4.0, we can change the > fixture to be a wrapper around the original function and use the > original fixture name. > > Signed-off-by: Pavel Hrdina > --- > tests/libvirttest.py | 15 +-- > 1

[libvirt] Is qemu guestfwd working?

2019-04-15 Thread Marc-André Lureau
Hi, How is guestfwd working? I am testing with the following domain xml snippet, which should let the guest connect to 10.0.2.1:4600 If I have a domain with bridge networking, adding guestfwd isn't going to work, unless I am missing something. Should libvirt prevent that? But even

Re: [libvirt] [PATCH] rpc: Segfaults and memory leak in virNetTLSContextNew function

2019-04-15 Thread Adrian Brzezinski
On 15.04.2019 11:21, Daniel P. Berrangé wrote: > On Fri, Apr 12, 2019 at 06:10:49PM +0200, Adrian Brzezinski wrote: >> Failed new gnutls context allocations in virNetTLSContextNew function >> results in double free and segfault. Occasional memory leaks may also >> occur. You can read detailed

Re: [libvirt] [PATCH for v5.3.0 10/17] security: Remember owner only for top level image

2019-04-15 Thread Michal Privoznik
On 4/10/19 11:35 PM, Cole Robinson wrote: On 3/28/19 11:04 AM, Michal Privoznik wrote: Here is the problem: If all disks had XATTRs (i.e. domains using them were started with owner remembering turned on) then refcounting implemented in XATTRs would work nicely and we could set the whole backing

[libvirt] [PATCH] qemu: do not set wait:false for client sockets

2019-04-15 Thread marcandre . lureau
From: Marc-André Lureau Qemu commit 767abe7 ("chardev: forbid 'wait' option with client sockets") effectively deprecates usage of "wait" with client sockets starting with qemu 4.0, and earlier versions ignored the value. Cc: Daniel P. Berrangé Signed-off-by: Marc-André Lureau ---

Re: [libvirt] [PATCH v4] socket: allow wait=false for client socket

2019-04-15 Thread Daniel P . Berrangé
On Mon, Apr 15, 2019 at 06:33:36PM +0200, Marc-André Lureau wrote: > Commit 767abe7 ("chardev: forbid 'wait' option with client sockets") > is a bit too strict. Current libvirt always set wait=false, and will > thus fail to add client chardev. > > Make the code more permissive, allowing

[libvirt] [PATCH v3 0/2] qemu: Honor memory mode='strict'

2019-04-15 Thread Michal Privoznik
v3 of: diff to v2: - Not calling qemuSetupCpusetMems() in qemuProcessLaunch - Dropping qemuSetupCpusetMems() Michal Prívozník (2): qemu: Set up EMULATOR thread and cpuset.mems before exec()-ing qemu qemu_cgroup: Remove unused qemuSetupCpusetMems src/qemu/qemu_cgroup.c | 35

[libvirt] [PATCH v3 1/2] qemu: Set up EMULATOR thread and cpuset.mems before exec()-ing qemu

2019-04-15 Thread Michal Privoznik
It's funny how this went unnoticed for such a long time. Long story short, if a domain is configured with VIR_DOMAIN_NUMATUNE_MEM_STRICT libvirt doesn't really honour that. This is because of 7e72ac787848 after which libvirt allowed qemu to allocate memory just anywhere and only after that it used

[libvirt] [PATCH v3 2/2] qemu_cgroup: Remove unused qemuSetupCpusetMems

2019-04-15 Thread Michal Privoznik
This function is not used anymore. Let's remove it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_cgroup.c | 35 --- src/qemu/qemu_cgroup.h | 1 - 2 files changed, 36 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index

[libvirt] [PATCH v4] socket: allow wait=false for client socket

2019-04-15 Thread Marc-André Lureau
Commit 767abe7 ("chardev: forbid 'wait' option with client sockets") is a bit too strict. Current libvirt always set wait=false, and will thus fail to add client chardev. Make the code more permissive, allowing wait=false with client socket chardevs. Deprecate usage of 'wait' with client sockets.

Re: [libvirt] [PATCH v2 2/2] qemu: Set up EMULATOR thread and cpuset.mems before exec()-ing qemu

2019-04-15 Thread Michal Privoznik
On 4/15/19 3:47 PM, Martin Kletzander wrote: On Wed, Apr 10, 2019 at 06:10:44PM +0200, Michal Privoznik wrote: It's funny how this went unnoticed for such a long time. Long story short, if a domain is configured with VIR_DOMAIN_NUMATUNE_MEM_STRICT libvirt doesn't really honour that. This is

Re: [libvirt] [PATCH v3] socket: allow wait=false for client socket

2019-04-15 Thread Marc-André Lureau
On Mon, Apr 15, 2019 at 6:27 PM Daniel P. Berrangé wrote: > > On Mon, Apr 15, 2019 at 06:21:29PM +0200, Marc-André Lureau wrote: > > Commit 767abe7 ("chardev: forbid 'wait' option with client sockets") > > is a bit too strict. Current libvirt always set wait=false, and will > > thus fail to add

Re: [libvirt] [PATCH v3] socket: allow wait=false for client socket

2019-04-15 Thread Daniel P . Berrangé
On Mon, Apr 15, 2019 at 06:21:29PM +0200, Marc-André Lureau wrote: > Commit 767abe7 ("chardev: forbid 'wait' option with client sockets") > is a bit too strict. Current libvirt always set wait=false, and will > thus fail to add client chardev. > > Make the code more permissive, allowing

[libvirt] [PATCH v3] socket: allow wait=false for client socket

2019-04-15 Thread Marc-André Lureau
Commit 767abe7 ("chardev: forbid 'wait' option with client sockets") is a bit too strict. Current libvirt always set wait=false, and will thus fail to add client chardev. Make the code more permissive, allowing wait=false with client socket chardevs. Deprecate usage of 'wait' with client sockets.

Re: [libvirt] [PATCH v2 0/7] vbox: drop support for many old versions

2019-04-15 Thread Andrea Bolognani
On Fri, 2019-04-12 at 14:00 +0100, Daniel P. Berrangé wrote: > Daniel P. Berrangé (7): > vbox: drop support for VirtualBox 4.x releases > vbox: drop C API definition for release 4.0 > vbox: drop C API definition for release 4.1 > vbox: drop C API definition for release 4.2 > vbox: drop C

[libvirt] [PATCH 21/21] qemu: caps: Add capability for dynamic 'auto-read-only' support for files

2019-04-15 Thread Peter Krempa
Initial implementation of 'auto-read-only' didn't reopen the backing files when needed. For '-blockdev' to work we need to be able to tel qemu to open a file read-only and change it during blockjobs as we label backing chains with a sVirt label which does not allow writing. The dynamic

[libvirt] [PATCH 17/21] qemu: qapi: Implement worker for introspecting builtin types

2019-04-15 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c| 31 ++- tests/qemumonitorjsontest.c | 2 ++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 8a695e022d..d401e9a303 100644 ---

[libvirt] [PATCH 19/21] qemu: qapi: Implement support for 'features'

2019-04-15 Thread Peter Krempa
Starting from version 4.1 qemu allows reporting 'features' for a given QAPI type object. This allows reporting support of fixes and additions which are otherwise invisible in the QAPI schema. Implement a possibility to query 'features' in the QAPI query strings. Signed-off-by: Peter Krempa ---

[libvirt] [PATCH 10/21] qemu: qapi: Convert arguments of QAPI traversal helpers to a struct

2019-04-15 Thread Peter Krempa
Create a context data type for the QAPI path rather than passing an increasing number of arguments. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 67 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_qapi.c

[libvirt] [PATCH 14/21] qemu: qapi: Report schema and user errors for QAPI queries

2019-04-15 Thread Peter Krempa
We treated broken schema as failure to look up given query. Treat it as a separate error instead. It is unlikely to happen though. Also prepare for possibility of user errors if query components which can't be queired deeper have following components. Signed-off-by: Peter Krempa ---

[libvirt] [PATCH 08/21] qemu: qapi: Separate virQEMUQAPISchemaTraverse into functions by object type

2019-04-15 Thread Peter Krempa
Simplify virQEMUQAPISchemaTraverse by separating out the necessary operations for given 'meta-type' into separate functions. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 117 --- 1 file changed, 78 insertions(+), 39 deletions(-) diff --git

[libvirt] [PATCH 07/21] qemu: qapi: Convert virQEMUQAPISchemaTraverse to recursive lookup

2019-04-15 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 88 ++-- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 23cbac4405..2652061f4e 100644 --- a/src/qemu/qemu_qapi.c +++

[libvirt] [PATCH 13/21] qemu: qapi: Use declarative approach for meta-type parsers in virQEMUQAPISchemaTraverse

2019-04-15 Thread Peter Krempa
Introduce an array of callbacks for given 'meta-type' of the QAPI schema structure rather than using code to select it. This will simplify extension for the other meta-types which are not handled yet. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 31 +-- 1

[libvirt] [PATCH 16/21] qemu: qapi: Implement worker for introspecting enums

2019-04-15 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c| 42 - tests/qemumonitorjsontest.c | 3 +++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index f17a162434..8a695e022d 100644 ---

[libvirt] [PATCH 09/21] qemu: qapi: Optimize out some helper functions

2019-04-15 Thread Peter Krempa
virQEMUQAPISchemaTypeFromObject and virQEMUQAPISchemaTypeFromObject can be very easily folded into virQEMUQAPISchemaTraverseObject removing the need for the helpers. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 45 ++-- 1 file changed, 6

[libvirt] [PATCH 11/21] qemu: qapi: Rename local vars in virQEMUQAPISchemaTraverseObject

2019-04-15 Thread Peter Krempa
Now that 'query' is no longer an argument we can reuse it. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 78b2be749e..ed2a4992ab 100644 ---

[libvirt] [PATCH 12/21] qemu: qapi: Add helpers for virQEMUQAPISchemaTraverseContext

2019-04-15 Thread Peter Krempa
Rather than modifying the context struct add a helpers that does this. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 46 +--- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index

[libvirt] [PATCH 15/21] qemu: qapi: Prepare for extension of virQEMUQAPISchemaPathGet docs

2019-04-15 Thread Peter Krempa
Prepare section for boolean queries and make the typed query section more clear. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index

[libvirt] [PATCH 04/21] qemu: qapi: Fix return value of impossible case in virQEMUQAPISchemaTraverse

2019-04-15 Thread Peter Krempa
The return statement after the infinite loop without a break is there to appease the compiler. Make it return NULL as it would be a failure if control flow reaches that point. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[libvirt] [PATCH 18/21] qemu: qapi: Implement worker for introspecting alternate types

2019-04-15 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c| 34 -- tests/qemumonitorjsontest.c | 3 +++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index d401e9a303..4ed67b68bc 100644 ---

[libvirt] [PATCH 01/21] tests: qemumonitorjson: Rename schema validation test cases

2019-04-15 Thread Peter Krempa
Rename DO_TEST_QAPI_SCHEMA to DO_TEST_QAPI_VALIDATE. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 60 ++--- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index

[libvirt] [PATCH 02/21] qemu: qapi: Use automatic memory cleanup

2019-04-15 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 427809e9e3..90df50ec77 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -207,7 +207,7

[libvirt] [PATCH 03/21] tests: qemumonitorjson: Add tests for QAPI schema query

2019-04-15 Thread Peter Krempa
While we technically test the query strings in the qemucapabilitiestest this was done to help refactor and extend the QAPI schema query infrastructure. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 45 + 1 file changed, 45 insertions(+) diff

[libvirt] [PATCH 05/21] qemu: qapi: Return schema entry via argument in virQEMUQAPISchemaTraverse

2019-04-15 Thread Peter Krempa
To allow for boolean query string, let's return the queried schema entry via argument rather than a return value. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_qapi.c

[libvirt] [PATCH 06/21] qemu: qapi: Modify values returned by virQEMUQAPISchemaPathGet

2019-04-15 Thread Peter Krempa
Return 1 if the schema entry was found optionally returning it rather than depending on the returned object. Some callers don't care which schema object belongs to the query, but rather only want to know whether it exists. Additionally this will allow introducing boolean queries for checking if

[libvirt] [PATCH 00/21] qemu: qapi: Schema query improvements and feature detection (blockdev-add saga)

2019-04-15 Thread Peter Krempa
Allow detecting dynamic auto-read-only which will be possible in qemu 4.1 by fixing and improving QAPI schema queries. Note that the last two patches should not be pushed and will require tweaking once qemu 4.0 is released. Peter Krempa (21): tests: qemumonitorjson: Rename schema validation

Re: [libvirt] [PATCH] tools: Reduce table width in virsh(1)

2019-04-15 Thread Michal Privoznik
On 4/15/19 4:53 PM, Andrea Bolognani wrote: The table included in the sample output for 'list --title' is unnecessarily wide, which causes man to complain: warning [p 8, 0.5i]: can't break line Make the table narrower. Spotted by Lintian (manpage-has-errors-from-man tag). Signed-off-by:

Re: [libvirt] [PATCH v2 1/7] vbox: drop support for VirtualBox 4.x releases

2019-04-15 Thread Andrea Bolognani
On Fri, 2019-04-12 at 14:00 +0100, Daniel P. Berrangé wrote: > Support for all the 4.x releases was ended by VirtualBox maintainers in > Dec 2015. Even the "newest" 4.3.40 of those is only supported on old > versions of Linux (Ubuntu <= 13.03, RHEL <= 6, SLES <= 11), which are all > discontinued

[libvirt] [PATCH] virSecurityDACRestoreChardevLabel: Restore UNIX sockets too

2019-04-15 Thread Michal Privoznik
We're setting seclabels on unix sockets but never restoring them. Surprisingly, we are in SELinux driver. Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/security/security_dac.c

Re: [libvirt] [PATCH] tools: Fix grammar

2019-04-15 Thread Eric Blake
On 4/15/19 9:54 AM, Andrea Bolognani wrote: > Apparently "allow(s) to frobnicate" is not correct English, and > either "allow(s) one to frobnicate" or "allow(s) frobnicating" > should be used instead. > > Spotted by Lintian (spelling-error-in-{binary,manpage} tags). > > Signed-off-by: Andrea

[libvirt] [dbus PATCH] tests: fix test_connect

2019-04-15 Thread Pavel Hrdina
Calling fixtures directly was removed in pytest 4.0, we can change the fixture to be a wrapper around the original function and use the original fixture name. Signed-off-by: Pavel Hrdina --- tests/libvirttest.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

Re: [libvirt] [PATCH v2 0/6] Add support for setting the emulator scheduler parameters

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 04:23:18PM +0200, Martin Kletzander wrote: On Mon, Apr 15, 2019 at 03:59:27PM +0200, Ján Tomko wrote: On Mon, Apr 15, 2019 at 03:14:21PM +0200, Martin Kletzander wrote: I/O threads and vCPU threads already support setting schedulers, but until now it was impossible to

Re: [libvirt] [PATCH v2 1/6] conf: Parse common scheduler attributes in separate function

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 04:19:43PM +0200, Martin Kletzander wrote: On Mon, Apr 15, 2019 at 03:55:26PM +0200, Ján Tomko wrote: On Mon, Apr 15, 2019 at 03:14:22PM +0200, Martin Kletzander wrote: This will become useful later when parsing emulatorsched parameters which don't need the rest of the

[libvirt] [PATCH 1/2] conf: pass the element/attribute names to virSchedulerFormat

2019-04-15 Thread Ján Tomko
Instead of constructing them dynamically from a base name, pass the two different static strings. While adjusting the callers, also expect a negative return value. Signed-off-by: Ján Tomko --- src/conf/domain_conf.c | 30 +- 1 file changed, 17 insertions(+), 13

[libvirt] [PATCH 2/2] conf: switch virDomainSchedulerFormat to use virXMLFormatElement

2019-04-15 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/domain_conf.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 93d32c9df1..1f44237b11 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt] [PATCH 0/2] refactor virDomainSchedulerFormat

2019-04-15 Thread Ján Tomko
*** BLURB HERE *** Ján Tomko (2): conf: pass the element/attribute names to virSchedulerFormat conf: switch virDomainSchedulerFormat to use virXMLFormatElement src/conf/domain_conf.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) -- 2.19.2 --

[libvirt] [PATCH] tools: Reduce table width in virsh(1)

2019-04-15 Thread Andrea Bolognani
The table included in the sample output for 'list --title' is unnecessarily wide, which causes man to complain: warning [p 8, 0.5i]: can't break line Make the table narrower. Spotted by Lintian (manpage-has-errors-from-man tag). Signed-off-by: Andrea Bolognani --- tools/virsh.pod | 8

[libvirt] [PATCH] tools: Fix grammar

2019-04-15 Thread Andrea Bolognani
Apparently "allow(s) to frobnicate" is not correct English, and either "allow(s) one to frobnicate" or "allow(s) frobnicating" should be used instead. Spotted by Lintian (spelling-error-in-{binary,manpage} tags). Signed-off-by: Andrea Bolognani --- tools/virsh-domain.c | 3 ++-

[libvirt] [PATCH] Handle copying bitmaps to larger data buffers

2019-04-15 Thread Allen, John
If a bitmap of a shorter length than the data buffer is passed to virBitmapToDataBuf, it will read off the end of the bitmap and copy junk into the returned buffer. Add a check to only copy the length of the bitmap to the buffer. The problem can be observed after setting a vcpu affinity using the

Re: [libvirt] [PATCH 2/2] util: Fix NAME section for virkey{code, name}-*

2019-04-15 Thread Martin Kletzander
On Mon, Apr 15, 2019 at 04:24:27PM +0200, Andrea Bolognani wrote: On Mon, 2019-04-15 at 16:10 +0200, Martin Kletzander wrote: On Mon, Apr 15, 2019 at 03:21:01PM +0200, Andrea Bolognani wrote: > Spotted by Lintian (manpage-has-bad-whatis-entry tag). > > Signed-off-by: Andrea Bolognani > --- >

Re: [libvirt] [PATCH 2/2] util: Fix NAME section for virkey{code, name}-*

2019-04-15 Thread Andrea Bolognani
On Mon, 2019-04-15 at 16:10 +0200, Martin Kletzander wrote: > On Mon, Apr 15, 2019 at 03:21:01PM +0200, Andrea Bolognani wrote: > > Spotted by Lintian (manpage-has-bad-whatis-entry tag). > > > > Signed-off-by: Andrea Bolognani > > --- > > src/util/Makefile.inc.am | 8 ++-- > > 1 file changed,

Re: [libvirt] [PATCH v2 0/6] Add support for setting the emulator scheduler parameters

2019-04-15 Thread Martin Kletzander
On Mon, Apr 15, 2019 at 03:59:27PM +0200, Ján Tomko wrote: On Mon, Apr 15, 2019 at 03:14:21PM +0200, Martin Kletzander wrote: I/O threads and vCPU threads already support setting schedulers, but until now it was impossible to do so for the main QEMU thread (emulator thread in the libvirt

Re: [libvirt] [PATCH v2 1/6] conf: Parse common scheduler attributes in separate function

2019-04-15 Thread Martin Kletzander
On Mon, Apr 15, 2019 at 03:55:26PM +0200, Ján Tomko wrote: On Mon, Apr 15, 2019 at 03:14:22PM +0200, Martin Kletzander wrote: This will become useful later when parsing emulatorsched parameters which don't need the rest of the current function. Signed-off-by: Martin Kletzander ---

Re: [libvirt] [PATCH v2 2/6] conf: Format thread IDs optionally

2019-04-15 Thread Martin Kletzander
On Mon, Apr 15, 2019 at 03:58:05PM +0200, Ján Tomko wrote: On Mon, Apr 15, 2019 at 03:14:23PM +0200, Martin Kletzander wrote: This will be used later when we want to format emulator scheduler parameters which don't apply for multiple threads. Signed-off-by: Martin Kletzander squash! conf: Do

[libvirt] [PATCH 1/1] viruuid: On POWER, qemu exports uuid as 'vm, uuid' devicetree node.

2019-04-15 Thread Dimitri John Ledkov
Signed-off-by: Dimitri John Ledkov --- src/util/viruuid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/viruuid.c b/src/util/viruuid.c index 0c12ddcc3e..8553a68965 100644 --- a/src/util/viruuid.c +++ b/src/util/viruuid.c @@ -1,3 +1,4 @@ + /* * viruuid.c: helper APIs for

[libvirt] [PATCH 0/1] power: add support for vm,uuid file

2019-04-15 Thread Dimitri John Ledkov
On POWER systems, qemu exports uuid as a firmware devicetree node vm,uuid. Use that in a similar manner to the product_uuid file as on DMI based (x86) machines. Dimitri John Ledkov (1): viruuid: On POWER, qemu exports uuid as 'vm,uuid' devicetree node. src/util/viruuid.c | 2 ++ 1 file

Re: [libvirt] [PATCH 2/2] util: Fix NAME section for virkey{code, name}-*

2019-04-15 Thread Martin Kletzander
On Mon, Apr 15, 2019 at 03:21:01PM +0200, Andrea Bolognani wrote: Spotted by Lintian (manpage-has-bad-whatis-entry tag). Signed-off-by: Andrea Bolognani --- src/util/Makefile.inc.am | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) Makes sense, the two rules above could also have

Re: [libvirt] [PATCH v2 0/6] Add support for setting the emulator scheduler parameters

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 03:14:21PM +0200, Martin Kletzander wrote: I/O threads and vCPU threads already support setting schedulers, but until now it was impossible to do so for the main QEMU thread (emulator thread in the libvirt naming). This is, however, requested for some very specific

Re: [libvirt] [PATCH v2 2/6] conf: Format thread IDs optionally

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 03:14:23PM +0200, Martin Kletzander wrote: This will be used later when we want to format emulator scheduler parameters which don't apply for multiple threads. Signed-off-by: Martin Kletzander squash! conf: Do not format negative thread IDs Signed-off-by: Martin

Re: [libvirt] [PATCH v2 1/6] conf: Parse common scheduler attributes in separate function

2019-04-15 Thread Ján Tomko
On Mon, Apr 15, 2019 at 03:14:22PM +0200, Martin Kletzander wrote: This will become useful later when parsing emulatorsched parameters which don't need the rest of the current function. Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c | 70 +-

Re: [libvirt] [PATCH 1/2] keycodemapdb: Update submodule

2019-04-15 Thread Martin Kletzander
On Mon, Apr 15, 2019 at 03:21:00PM +0200, Andrea Bolognani wrote: We need commit 6280c94f306d in order to fix our generated man pages. Signed-off-by: Andrea Bolognani --- src/keycodemapdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Martin Kletzander diff --git

Re: [libvirt] vcpupin reports bogus vcpu affinities

2019-04-15 Thread Allen, John
On Wed, Apr 03, 2019 at 01:48:33PM -0400, Cole Robinson wrote: > On 3/26/19 4:06 PM, Allen, John wrote: > > For pinned vcpus, vcpupin will report inaccurate affinity values on machines > > with high core counts (256 cores in my case). The problem is produced as > > follows: > > > > $ virsh

Re: [libvirt] [PATCH] Don't hardcode list of git submodules

2019-04-15 Thread Andrea Bolognani
On Mon, 2019-04-15 at 15:11 +0200, Martin Kletzander wrote: > On Mon, Apr 15, 2019 at 02:46:19PM +0200, Andrea Bolognani wrote: > > +CI_SUBMODULES = $(shell git submodules | awk '{ print $2 }') > > Possibly "git submodule status --recursive"? If we started using nested submodules we'd have to be

Re: [libvirt] [PATCH v2 2/2] qemu: Set up EMULATOR thread and cpuset.mems before exec()-ing qemu

2019-04-15 Thread Martin Kletzander
On Wed, Apr 10, 2019 at 06:10:44PM +0200, Michal Privoznik wrote: It's funny how this went unnoticed for such a long time. Long story short, if a domain is configured with VIR_DOMAIN_NUMATUNE_MEM_STRICT libvirt doesn't really honour that. This is because of 7e72ac787848 after which libvirt

Re: [libvirt] [PATCH v2 1/2] qemuSetupCpusetMems: Use VIR_AUTOFREE()

2019-04-15 Thread Martin Kletzander
On Wed, Apr 10, 2019 at 06:10:43PM +0200, Michal Privoznik wrote: There is one string that can be VIR_AUTOFREE used on. Signed-off-by: Michal Privoznik --- src/qemu/qemu_cgroup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ACK, trivial signature.asc Description: PGP

[libvirt] [PATCH 1/2] keycodemapdb: Update submodule

2019-04-15 Thread Andrea Bolognani
We need commit 6280c94f306d in order to fix our generated man pages. Signed-off-by: Andrea Bolognani --- src/keycodemapdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keycodemapdb b/src/keycodemapdb index 16e5b07876..6280c94f30 16 --- a/src/keycodemapdb +++

[libvirt] [PATCH 0/2] util: Fix NAME section for virkey{code, name}-*

2019-04-15 Thread Andrea Bolognani
Andrea Bolognani (2): keycodemapdb: Update submodule util: Fix NAME section for virkey{code,name}-* src/keycodemapdb | 2 +- src/util/Makefile.inc.am | 8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH 2/2] util: Fix NAME section for virkey{code, name}-*

2019-04-15 Thread Andrea Bolognani
Spotted by Lintian (manpage-has-bad-whatis-entry tag). Signed-off-by: Andrea Bolognani --- src/util/Makefile.inc.am | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index f44d3b3b2a..c757f5a6ae 100644 ---

[libvirt] [PATCH v2 5/6] qemu: Add support for emulatorsched

2019-04-15 Thread Martin Kletzander
This helps in a scenarios where vCPUs run with a priority that is so high they might starve the emulator thread. And it also fits with the rest of the settings. Signed-off-by: Martin Kletzander --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[libvirt] [PATCH v2 3/6] docs: Mention iothreadsched element in the docs and reword

2019-04-15 Thread Martin Kletzander
Just one missing occurrence of iothreadsched fixed plus some rewording for this to make more sense for the readers. Signed-off-by: Martin Kletzander --- docs/formatdomain.html.in | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in

  1   2   >