Re: [libvirt] [RFC PATCH 01/17] qemu: setup shared memory without explicit numa configuration

2018-08-15 Thread John Ferlan
On 07/13/2018 09:28 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > When a domain is configured with 'shared' memory backing: > > > > > > But no explicit NUMA configuration, let's configure a shared memory > backend associated with default -numa. > >

Re: [libvirt] [RFC PATCH 00/17] Add vhost-user-gpu support

2018-08-15 Thread John Ferlan
On 08/14/2018 07:25 PM, Marc-André Lureau wrote: > ping > On Fri, Jul 13, 2018 at 3:28 PM wrote: Quite a bit has changed w/r/t qemu_capabilities.{c,h}. Can you please resync with the top of the tree and repost. Hopefully Pavel or Michal will be able to take a look at the repost as well since

Re: [libvirt] [PATCH] spec: Add firmware/nvram paths for edk2 arm and ia32

2018-08-15 Thread Cole Robinson
Ignore this, accidental repost of an old patch - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2 1/2] spec: Change nvram comments to reference edk2 package names

2018-08-15 Thread Cole Robinson
Signed-off-by: Cole Robinson --- libvirt.spec.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 883c8a49e7..f2099c3096 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1163,13 +1163,13 @@ exit 1 %define arg_selinux_mount

[libvirt] [PATCH] spec: Add firmware/nvram paths for edk2 arm and ia32

2018-08-15 Thread Cole Robinson
And clarify the comments to instead mention the package names that provide these files Signed-off-by: Cole Robinson --- libvirt.spec.in | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3edb60d2d2..f3d5c032af 100644 ---

[libvirt] [PATCH v2 2/2] spec: Add firmware/nvram paths for edk2 arm and ia32

2018-08-15 Thread Cole Robinson
Signed-off-by: Cole Robinson --- libvirt.spec.in | 9 + 1 file changed, 9 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index f2099c3096..e7196b7d3b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1165,12 +1165,21 @@ exit 1 %if 0%{?fedora} # Nightly

[libvirt] [PATCH v2 0/2] spec: Add more nvram firmware paths

2018-08-15 Thread Cole Robinson
Add nvram firmware paths for ovmf ia32 and ovmf arm32. The latter is at least useful for upcoming Fedora which will support arm32 installs, rather than just pre-created disk image imports First patch is just a comment cleanup/improvement v2: Separate patches per Andrea's review Fix

Re: [libvirt] [PATCH] spec: Add firmware/nvram paths for edk2 arm and ia32

2018-08-15 Thread Cole Robinson
On 08/15/2018 07:17 AM, Andrea Bolognani wrote: On Wed, 2018-08-08 at 19:45 -0400, Cole Robinson wrote: And clarify the comments to instead mention the package names that provide these files Please split this into two patches - one that tweaks the existing comments and one that adds new

Re: [libvirt] [PATCH v2 5/5] apparmor: allow to preserve /dev mountpoints into qemu namespaces

2018-08-15 Thread Christian Ehrhardt
[...] > > + mount options=(rw, move) /dev/ -> /{var/,}run/libvirt/qemu/*.dev/, > > + mount options=(rw, move) /dev/** -> > > /{var/,}run/libvirt/qemu/*{/,}, > > + mount options=(rw, move) /{var/,}run/libvirt/qemu/*.dev/ -> /dev/, > > + mount options=(rw, move) /{var/,}run/libvirt/qemu/*{/,}

[libvirt] Investigation and possible fix of 1361592 - apparmor profiles do not include backing files

2018-08-15 Thread Povilas Kanapickas
Hi, I've looked into why apparmor profiles do not contain exceptions for backing files of images which later leads to permission errors due to apparmor containment. As of newest libvirt git master, only the first level backing image is included, the subsequent images are omitted. Below is my

Re: [libvirt] [PATCH v2 5/5] apparmor: allow to preserve /dev mountpoints into qemu namespaces

2018-08-15 Thread Jamie Strandboge
On Tue, 2018-08-14 at 08:18 +0200, Christian Ehrhardt wrote: > Libvirt now tries to preserve all mounts under /dev in qemu > namespaces. > The old rules only listed a set of known paths but those are no more > enough. > > I found some due to containers like /dev/.lxc/* and such but also >

Re: [libvirt] [PATCH v2 4/5] apparmor: allow qemu-smb access in /tmp

2018-08-15 Thread Jamie Strandboge
On Tue, 2018-08-14 at 08:18 +0200, Christian Ehrhardt wrote: > The samba feature of qemu will place the samba config file in > /tmp/qemu-smb.. > > But at least it has a predictable path identifying qemu-smb feature > itself by an infix in the path. > > This is a compromise of security and

Re: [libvirt] [PATCH v2 3/5] apparmor: allow expected /tmp access patterns

2018-08-15 Thread Jamie Strandboge
On Tue, 2018-08-14 at 08:18 +0200, Christian Ehrhardt wrote: > Several cases were found needing /tmp, for example ceph will try to > list /tmp > This is a compromise of security and usability: > - we only allow generally enumerating the base dir > - enumerating anything deeper in the dir is at

Re: [libvirt] [PATCH 4/4] qemu: caps: Format SEV platform data into qemuCaps cache

2018-08-15 Thread Peter Krempa
On Wed, Aug 15, 2018 at 17:02:08 +0200, Erik Skultety wrote: > Since we're not saving the platform-specific data into a cache, we're > not going to populate the structure, which in turn will cause a crash > upon calling virNodeGetSEVInfo because of a NULL pointer dereference. > Ultimately, we

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-15 Thread Daniel P . Berrangé
On Wed, Aug 15, 2018 at 06:08:18PM +0200, Andrea Bolognani wrote: > On Fri, 2018-08-10 at 10:38 +0100, Daniel P. Berrangé wrote: > > On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote: > > > G_ADD_PRIVATE was added in 2.38 and older functions are getting > > > deprecated: > > >

Re: [libvirt] [libvirt-glib][PATCH] Use new GObject define macros with private

2018-08-15 Thread Andrea Bolognani
On Fri, 2018-08-10 at 10:38 +0100, Daniel P. Berrangé wrote: > On Fri, Aug 10, 2018 at 11:29:30AM +0200, Michal Privoznik wrote: > > G_ADD_PRIVATE was added in 2.38 and older functions are getting deprecated: > > https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits > > Our min glib2

Re: [libvirt] [PATCH 3/4] qemu: Fix probing of AMD SEV support

2018-08-15 Thread Peter Krempa
On Wed, Aug 15, 2018 at 17:02:07 +0200, Erik Skultety wrote: > So the procedure to detect SEV support works like this: > 1) we detect that sev-guest is among the QOM types and set the cap flag > 2) we probe the monitor for SEV support > - this is tricky, because QEMU with compiled SEV support

Re: [libvirt] [PATCH 2/4] qemu: Define and use a auto cleanup function with virSEVCapability

2018-08-15 Thread Peter Krempa
On Wed, Aug 15, 2018 at 17:02:06 +0200, Erik Skultety wrote: > Keep with the recent effort of replacing as many explicit *Free > functions with their automatic equivalents. > > Signed-off-by: Erik Skultety > --- This also fixes some coding style issues along, but ... ACK signature.asc

Re: [libvirt] [PATCH 4/4] qemu: caps: Format SEV platform data into qemuCaps cache

2018-08-15 Thread Erik Skultety
On Wed, Aug 15, 2018 at 05:02:08PM +0200, Erik Skultety wrote: > Since we're not saving the platform-specific data into a cache, we're > not going to populate the structure, which in turn will cause a crash > upon calling virNodeGetSEVInfo because of a NULL pointer dereference. > Ultimately, we

Re: [libvirt] [PATCH 1/4] tests: sev: Test launch-security with specific QEMU version

2018-08-15 Thread Peter Krempa
On Wed, Aug 15, 2018 at 17:02:05 +0200, Erik Skultety wrote: > In order to test SEV we need real QEMU capabilities. Ideally, this would > be tested with -latest capabilities, however, our capabilities are > currently tied to Intel HW, even the 2.12.0 containing SEV were edited by > hand, so we can

[libvirt] [PATCH v2 1/3] vsh: Add API for printing tables.

2018-08-15 Thread Simon Kobyda
It solves problems with alignment of columns. Width of each column is calculated by its biggest cell. Should solve unicode bug. In future, it may be implemented in virsh, virt-admin... This API has 5 public functions: - vshTableNew - adds new table and defines its header - vshTableRowAppend -

[libvirt] [PATCH v2 3/3] vsh: Added tests

2018-08-15 Thread Simon Kobyda
For now, there are 5 test cases - testVshTableNew: Creating table with empty header - testVshTableHeader: Printing table with/without header - testVshTableRowAppend: Appending row with various number of cells. Only row with same number of cells as in header is accepted. - testVshTableNewUnicode:

[libvirt] [PATCH v2 0/3] vsh: Introduce new API for printing tables

2018-08-15 Thread Simon Kobyda
Created new API for priting tables, mainly to solve alignment problems. Implemented these test to virsh list. In the future, API may be everywhere in virsh and virt-admin. Also wrote basic tests for the new API, and corrected tests in virshtest which are influenced by implementation of the API in

[libvirt] [PATCH v2 2/3] virsh: Implement new table API for virsh list

2018-08-15 Thread Simon Kobyda
Instead of printing it straight in virsh, it creates table struct which is filled with header and rows(domains). It allows us to know more about table before printing to calculate alignment right. Signed-off-by: Simon Kobyda --- tests/virshtest.c| 14 ++--

[libvirt] [PATCH 2/4] qemu: Define and use a auto cleanup function with virSEVCapability

2018-08-15 Thread Erik Skultety
Keep with the recent effort of replacing as many explicit *Free functions with their automatic equivalents. Signed-off-by: Erik Skultety --- src/conf/domain_capabilities.h | 4 src/qemu/qemu_capabilities.c | 12 src/qemu/qemu_monitor_json.c | 11 ++- 3 files

[libvirt] [PATCH 4/4] qemu: caps: Format SEV platform data into qemuCaps cache

2018-08-15 Thread Erik Skultety
Since we're not saving the platform-specific data into a cache, we're not going to populate the structure, which in turn will cause a crash upon calling virNodeGetSEVInfo because of a NULL pointer dereference. Ultimately, we should start caching this data along with host-specific capabilities like

[libvirt] [PATCH 3/4] qemu: Fix probing of AMD SEV support

2018-08-15 Thread Erik Skultety
So the procedure to detect SEV support works like this: 1) we detect that sev-guest is among the QOM types and set the cap flag 2) we probe the monitor for SEV support - this is tricky, because QEMU with compiled SEV support will always report -object sev-guest and query-sev-capabilities

[libvirt] [PATCH 1/4] tests: sev: Test launch-security with specific QEMU version

2018-08-15 Thread Erik Skultety
In order to test SEV we need real QEMU capabilities. Ideally, this would be tested with -latest capabilities, however, our capabilities are currently tied to Intel HW, even the 2.12.0 containing SEV were edited by hand, so we can only use that one for now, as splitting the capabilities according

[libvirt] [PATCH 0/4] Fix a SIGSEGV in libvirtd when querying AMD SEV info

2018-08-15 Thread Erik Skultety
This series fixes the following BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1612009 TL;DR: We don't format SEV platform data (PDH, certificate chain,...) into our qemu caps cache which poses a problem after libvirtd restart when we restore from the cache and get a segfault upon issuing

Re: [libvirt] [PATCH] storage: Properly terminate secrets

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 10:44:20AM +0200, Michal Privoznik wrote: The virSecretGetSecretString() helper looks up a secret for given pool and returns its value in @secret_value and its length in @secret_value_size. However, the trailing '\0' is not included in either of the variables. This is

Re: [libvirt] [PATCHv2 25/62] conf: Implement private data formatting and parsing for disks

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:59PM +0200, Peter Krempa wrote: Allow storing of private data in the status XML for disks. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 60 ++ src/conf/domain_conf.h | 7 ++ 2 files changed, 67

[libvirt] [PATCH 6/8] qemu: monitor: Use qemuMonitorJSONBlockJobError in qemuMonitorJSONDrivePivot

2018-08-15 Thread Peter Krempa
The API deals with a block job so use the common error reporting function for it. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index

[libvirt] [PATCH 5/8] qemu: monitor: Move qemuMonitorJSONDrivePivot together with block-job APIs

2018-08-15 Thread Peter Krempa
Move all relevant APIs dealing with existing jobs together. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 55 ++-- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c

[libvirt] [PATCH 1/8] qemu: monitor: Remove error classes not conforming to QAPI schema

2018-08-15 Thread Peter Krempa
Both were removed prior to qemu v1.2.0-rc0 when switching to the new error format where almost all error types were converted to GenericError. Relevant qemu commits are and Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[libvirt] [PATCH 8/8] qemu: monitor: Separate probing for active block commit

2018-08-15 Thread Peter Krempa
Extract the code used to probe for the functionality so that it does not litter the code used for actual work. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 2 +- src/qemu/qemu_monitor_json.c | 58 ++-- src/qemu/qemu_monitor_json.h | 3

[libvirt] [PATCH 7/8] qemu: monitor: Rename 'device' argument for block job control APIs

2018-08-15 Thread Peter Krempa
Starting from qemu 2.7 the 'device' argument is in fact a name of the job itself. Change our APIs accordingly and adjust the error message. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 18 +- src/qemu/qemu_monitor.h | 6 +++---

[libvirt] [PATCH 4/8] qemu: monitor: Use qemuMonitorJSONCheckError in qemuMonitorJSONBlockStream

2018-08-15 Thread Peter Krempa
The API does not report any special job-related error so the generic error function should be used. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index

[libvirt] [PATCH 2/8] qemu: monitor: Use qemuMonitorJSONCheckError in qemuMonitorJSONBlockJobError

2018-08-15 Thread Peter Krempa
Report the generic errors using the existing function so that we don't reimplement the same functionality multiple times. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git

[libvirt] [PATCH 0/8] qemu: monitor: Clean up error handling for block job APIs

2018-08-15 Thread Peter Krempa
Remove handling of errors which QEMU no longer reports and rename fields so that it conforms with the new semantics. Peter Krempa (8): qemu: monitor: Remove error classes not conforming to QAPI schema qemu: monitor: Use qemuMonitorJSONCheckError in qemuMonitorJSONBlockJobError qemu:

[libvirt] [PATCH 3/8] qemu: monitor: Remove temporary variables

2018-08-15 Thread Peter Krempa
Now that the job name is used in single place in the respective functions remove the temporary strings. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c

Re: [libvirt] [PATCHv2 24/62] qemu: domain: Add infrastructure to generate block node names

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:58PM +0200, Peter Krempa wrote: Node names for block objects in qemu need to be unique for an instance of the qemu process. Add a counter to generate objects sequentially and store it in the status XML so that we can restore it. The helpers added allow to create

Re: [libvirt] [PATCHv2 13/62] qemu: monitor: Add 'nodename' argument for 'block_resize'

2018-08-15 Thread Peter Krempa
On Wed, Aug 15, 2018 at 10:43:23 +0200, Ján Tomko wrote: > On Mon, Aug 13, 2018 at 05:59:47PM +0200, Peter Krempa wrote: > > Allow referring to individual node name to rezise. > > s/rezise/resize/ > > > > > Signed-off-by: Peter Krempa > > --- > > src/qemu/qemu_driver.c | 2 +- > >

Re: [libvirt] [PATCHv2 23/62] conf: domain: Format out user provided backing chains in XML

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:57PM +0200, Peter Krempa wrote: If a user configures the backing chain in the XML we should not ignore it. We already do parse it but don't format it out. As a safety-precaution don't attempt to format detected chain into the inactive XML. Signed-off-by: Peter

Re: [libvirt] [PATCHv2 22/62] qemu: process: Don't detect nodenames when we support -blockdev

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:56PM +0200, Peter Krempa wrote: We'll specify them ourselves so it's pointless to attempt to redetect them. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH] spec: Add firmware/nvram paths for edk2 arm and ia32

2018-08-15 Thread Andrea Bolognani
On Wed, 2018-08-08 at 19:45 -0400, Cole Robinson wrote: > And clarify the comments to instead mention the package names > that provide these files Please split this into two patches - one that tweaks the existing comments and one that adds new entries. [...] > -# Nightly firmware repo

Re: [libvirt] [PATCHv2 21/62] qemu: domain: Don't redetect backing chain when using -blockdev

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:55PM +0200, Peter Krempa wrote: We need to load the backing chain from the XML when using -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCHv2 20/62] qemu: process: clear QEMU_CAPS_BLOCKDEV for VMs with SD card

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:54PM +0200, Peter Krempa wrote: SD cards are currently passed by using -drive only which would not be compatible with using -blockdev fully. Clear QEMU_CAPS_BLOCKDEV if the VM has such devices. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 9 +

Re: [libvirt] [PATCHv2 18/62] util: virqemu: Simplify debugging if building QOM object with missing args

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:52PM +0200, Peter Krempa wrote: Print the values so it's simpler to debug. Signed-off-by: Peter Krempa --- src/util/virqemu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: Digital signature

Re: [libvirt] [PATCHv2 19/62] qemu: caps: Add capability for using the blockdev infrastructure

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:53PM +0200, Peter Krempa wrote: The capability currently is not enabled so that we can add individual bits first. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 2 insertions(+) Reviewed-by:

Re: [libvirt] [PATCHv2 17/62] qemu: hotplug: Don't generate alias when detaching disk

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:51PM +0200, Peter Krempa wrote: It should be impossible to lack an alias in the domain definition. Other disk types don't generate it so remove it here as well. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 5 - 1 file changed, 5 deletions(-)

Re: [libvirt] [PATCHv2 16/62] tests: qemu: Add test data for backing chains and indexes

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:50PM +0200, Peter Krempa wrote: Add test data for nested backing chains with/without indexes (used in status XMLs) which will excercise blockdev and the related work. Signed-off-by: Peter Krempa --- .../disk-backing-chains-index.x86_64-2.12.0.args | 1 +

[libvirt] [PATCH -v2 1/1] esx: Make esxDomainGetVcpusFlags check flags

2018-08-15 Thread Marcos Paulo de Souza
Before this patch, esxDomainGetVcpusFlags was not checking the flags argument. Current, get and set vcpus was failing in ESX since it was checking for "maxSupportedVcpus", and this configuration can be ommited by ESXi[1]. Now, if VIR_DOMAIN_VCPU_MAXIMUM is specified in flags argument

[libvirt] [PATCH -v2 0/1] esx: Fix get/set vcpus

2018-08-15 Thread Marcos Paulo de Souza
Hi guys, this is the second version of the patch, the first one can be found here[1]. This version addresses the comments from Matthias Bolte, making the change simpler and cleaner. Let me know if there are other details that needs to change. [1]:

[libvirt] [PATCH v2 01/10] qemu: qapi: Simplify value handling in virQEMUQAPISchemaTraverse

2018-08-15 Thread Peter Krempa
Introduce a few variables so that we can easily access the modifier character and also don't have to do pointer aritmetics when selecting the schema entries. This will simplify adding of new modifier characters. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 19 --- 1

[libvirt] [PATCH v2 09/10] qemu: capabilities: Always assume QEMU_CAPS_ADD_FD

2018-08-15 Thread Peter Krempa
The capability was usable since qemu 1.3 so we can remove all the detection code. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 17 src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c

[libvirt] [PATCH v2 00/10] qemu: Get rid of QEMU_CAPS_ADD_FD (and improve block-commit probing)

2018-08-15 Thread Peter Krempa
Diff to v1: - stopped probing for active block-commit support when we can use QMP schema - qemuxml2argvmock's implementation of virCommandPassFD now passes through specific file descriptors and ignores the rest. Peter Krempa (10): qemu: qapi: Simplify value handling in virQEMUQAPISchemaTraverse

[libvirt] [PATCH v2 08/10] tests: qemuxml2argv: modernize TPM passthrough tests

2018-08-15 Thread Peter Krempa
All supported qemus support FD passing so modify the tests to test the proper code path. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/tpm-passthrough-crb.args | 5 +++-- tests/qemuxml2argvdata/tpm-passthrough.args | 5 +++-- tests/qemuxml2argvmock.c| 18

[libvirt] [PATCH v2 06/10] tests: qemuxml2argvmock: Allow 'safe' file descriptors in mocked virCommandPassFD

2018-08-15 Thread Peter Krempa
Allow FDs which are marked as safe for FD passing. Signed-off-by: Peter Krempa --- tests/qemuxml2argvmock.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 4df92cf396..581f720227 100644 ---

[libvirt] [PATCH v2 03/10] qemu: qapi: Allow selecting specifically optional schema entries in virQEMUQAPISchemaTraverse

2018-08-15 Thread Peter Krempa
Add a new modifier character which will select given schema entry only when it is optional. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index

[libvirt] [PATCH v2 02/10] qemu: qapi: Split up virQEMUQAPISchemaObjectGetType

2018-08-15 Thread Peter Krempa
Split it into a function that returns the whole schema entry so that we can do additional checks and a helper getting the type string from the schema entry. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 51 --- 1 file changed, 40

[libvirt] [PATCH v2 07/10] qemu: command: Extract opening of TPM backend FDs for mocking purposes

2018-08-15 Thread Peter Krempa
Allow mocking of the file descriptor numbers used for the TPM passthrough mode by extracting the relevant code into an exported function. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 41 +++-- src/qemu/qemu_command.h | 7 +++ 2 files

[libvirt] [PATCH v2 04/10] qemu: capabilities: Detect active block commit via QMP schema probing if possible

2018-08-15 Thread Peter Krempa
For versions where we can probe that the arguments are optional we can perform the probing by a schema query rather than sending a separate command to do so. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 8 +---

Re: [libvirt] [PATCHv2 15/62] tests: qemuxml2argv: Fork CAPS_LATEST test cases for 'blockdev'

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:49PM +0200, Peter Krempa wrote: The blockdev support will change existing approach to add disks to VMs so all tests using the DO_TEST_CAPS_LATEST approach which have any disks need to be forked so that the changes can be applied. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCHv2 14/62] tests: qemu: Drop disk from hostdev-mdev tests

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:48PM +0200, Peter Krempa wrote: The disk is not necessary to test the mdevs. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/hostdev-mdev-display-missing-graphics.xml| 6 -- .../hostdev-mdev-display-spice-egl-headless.x86_64-latest.args | 2 --

Re: [libvirt] [PATCHv2 13/62] qemu: monitor: Add 'nodename' argument for 'block_resize'

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:47PM +0200, Peter Krempa wrote: Allow referring to individual node name to rezise. s/rezise/resize/ Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_monitor.c | 12 ++-- src/qemu/qemu_monitor.h | 3 ++-

Re: [libvirt] [PATCHv2 12/62] qemu: monitor: Allow using 'qdev' instead of 'device' for getting disk throttling

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:46PM +0200, Peter Krempa wrote: The 'device' field reported by 'query-block' is empty when -blockdev is used. Add an argument which will allow matching disk by using the qdev id so we can use this code with -blockdev. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCHv2 11/62] qemu: monitor: Allow using 'id' instead of 'device' for 'block_set_io_throttle'

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:45PM +0200, Peter Krempa wrote: The 'device' argument matches only the legacy drive alias. For blockdev we need to set the throttling for a QOM id and thus we'll need to use the 'id' field. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +-

Re: [libvirt] [PATCH v3 3/3] virtestmock: Track action

2018-08-15 Thread Michal Privoznik
On 08/14/2018 11:54 PM, John Ferlan wrote: > > > On 07/27/2018 11:24 AM, Michal Privoznik wrote: >> As advertised in the previous commit, we need the list of >> accessed files to also contain action that caused the $path to >> appear on the list. Not only this enables us to fine tune our >>

Re: [libvirt] [PATCHv2 10/62] qemu: monitor: Reuse qemuMonitorJSONQueryBlock in qemuMonitorJSONBlockIoThrottleInfo

2018-08-15 Thread Ján Tomko
On Mon, Aug 13, 2018 at 05:59:44PM +0200, Peter Krempa wrote: The wrapper executes the command and does error detection so there's no need to open-code all of those things. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 37 + 1 file changed, 5

Re: [libvirt] [PATCHv2 06/62] tests: qemucapabilities: Update capability data for qemu 3.0.0

2018-08-15 Thread Peter Krempa
On Tue, Aug 14, 2018 at 16:13:09 +0200, Ján Tomko wrote: > On Mon, Aug 13, 2018 at 05:59:40PM +0200, Peter Krempa wrote: > > The diff contains changes from the change of the JSON library > > reformatting as well as dropping of the preconfig state and adding of > > the 'qdev' field to output of

Re: [libvirt] [PATCH] rpc: Initialize a worker pool for max_workers=0 as well

2018-08-15 Thread Marc Hartmayer
On Tue, Aug 14, 2018 at 06:19 PM +0200, John Ferlan wrote: > On 08/07/2018 07:38 AM, Marc Hartmayer wrote: >> Semantically, there is no difference between an uninitialized worker >> pool and an initialized worker pool with zero workers. Let's allow the >> worker pool to be initialized for