Re: [libvirt] [PATCH 5/8] qemu: implement vsock hotplug

2018-06-04 Thread Ján Tomko
On Wed, May 30, 2018 at 04:57:54PM +0200, Ján Tomko wrote: Allow hotplugging the vsock device. https://bugzilla.redhat.com/show_bug.cgi?id=1291851 Signed-off-by: Ján Tomko --- src/qemu/qemu_driver.c | 9 ++- src/qemu/qemu_hotplug.c | 70 +

Re: [libvirt] [PATCH v8 00/18] Add support for TPM emulator (for 4.5)

2018-06-04 Thread Marc Hartmayer
On Thu, May 24, 2018 at 10:25 PM +0200, Stefan Berger wrote: > This series of patches adds support for the TPM emulator backend that > is available in QEMU and based on swtpm + libtpms. It allows to attach a > TPM 1.2 or 2 to a QEMU VM. sVirt labels are used for labeling the swtpm > process, its

Re: [libvirt] [PATCH V2] tests: xmconfigtest: add tests for cmdline formating

2018-06-04 Thread Jim Fehlig
On 06/04/2018 12:29 PM, John Ferlan wrote: On 05/23/2018 05:31 PM, Jim Fehlig wrote: Commit 656151bf fixed formatting of the element. Perhaps it would have been noticed and fixed earlier if we had a test. With this change, all possible cases of formating from xmconfig are formatting

[libvirt] [PATCH] qemu: fix msg could be a wild pointer in qemuMonitorIOProcess()

2018-06-04 Thread Shannon Zhao
From: Weilun Zhu As qemuMonitorJSONIOProcess() will unlock the qemu monitor, there is some extreme situation, eg qemu send message to monitor twice in a short time, where the local viriable 'msg' of qemuMonitorIOProcess() could be a wild point: 1. qemuMonitorSend() assign mon->msg to parameter

Re: [libvirt] [RFC PATCH 7/7] qemu: command: Enable formatting vfio-pci.display option onto cmdline

2018-06-04 Thread John Ferlan
On 05/30/2018 09:43 AM, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > src/qemu/qemu_command.c| 24 +++- > .../hostdev-mdev-display-spice-no-opengl.args | 32 > ++ > .../hostdev-mdev-display-spice-opengl.args

Re: [libvirt] [RFC PATCH 6/7] qemu: domain: Set default vfio-pci display value depending on capability

2018-06-04 Thread John Ferlan
On 05/30/2018 09:43 AM, Erik Skultety wrote: > If QEMU supports vfio-pci.display option, we default to 'off' as we're > not trying to guess what a user's intentions with the mdev are. Perform > this decision as part of driver-specific post parse callback. > > Signed-off-by: Erik Skultety >

Re: [libvirt] [RFC PATCH 5/7] qemu: caps: Add vfio-pci.display capability

2018-06-04 Thread John Ferlan
On 05/30/2018 09:42 AM, Erik Skultety wrote: > QEMU 2.12 introduced a new vfio-pci device option 'display=on/off/auto'. > Initially, libvirt is only going to support values on/off only, as we > don't want to predict what the intended usage of the mediated device > will be and most importantly,

Re: [libvirt] [RFC PATCH 4/7] conf: Introduce new attribute 'display'

2018-06-04 Thread John Ferlan
On 05/30/2018 09:42 AM, Erik Skultety wrote: > QEMU introduced a new type of display for mediated devices using > vfio-pci backend which controls whether a mediated device can be used as > a native rendering device as an alternative to an emulated video device. > This patch adds the necessary

Re: [libvirt] [RFC PATCH 1/7] conf: Remove a redundant model/address-type check in mdev post parse

2018-06-04 Thread John Ferlan
On 05/30/2018 09:42 AM, Erik Skultety wrote: > It's pointless to check the same thing multiple times. > Fix the indentation along the way too. > > Signed-off-by: Erik Skultety > --- > src/conf/domain_conf.c | 14 ++ > 1 file changed, 2 insertions(+), 12 deletions(-) >

Re: [libvirt] [RFC PATCH 2/7] qemu: command: Move graphics iteration to its own function

2018-06-04 Thread John Ferlan
On 05/30/2018 09:42 AM, Erik Skultety wrote: > It should be the command line helper who takes care of the iteration > rather than the caller. > > Signed-off-by: Erik Skultety > --- > src/qemu/qemu_command.c | 60 > + > 1 file changed, 36

Re: [libvirt] [RFC PATCH 3/7] conf: Introduce virDomainDefHasSpiceGL helper

2018-06-04 Thread John Ferlan
On 05/30/2018 09:42 AM, Erik Skultety wrote: > This helper will later help us to make corresponding changes when > building QEMU cmdline, depending on what implementation of vfio-pci > display should be used - dmabuf (requires OpenGL) vs vfio region mapping > (doesn't need OpenGL). > >

[libvirt] [PATCH] build: Don't install sysconfig files as scripts

2018-06-04 Thread Jiri Denemark
The files are not scripts and should not be executable. Broken by v4.0.0-294-g5f998681df. Signed-off-by: Jiri Denemark --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 0c380780c3..b2db1e9db9 100644 ---

[libvirt] [PATCH] Post-release version bump to 4.5.0

2018-06-04 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Pushed as "should really be done as part of the release process" :-) configure.ac | 2 +- docs/news.xml | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b869a17afe..5378e49c0b 100644 ---

Re: [libvirt] [PATCH 2/1] nwfilter: Fix IP address learning

2018-06-04 Thread John Ferlan
On 06/01/2018 06:33 AM, Daniel P. Berrangé wrote: > On Sat, May 26, 2018 at 08:27:47AM -0400, John Ferlan wrote: >> In a previous commit: >> >>commit d4bf8f415074759baf051644559e04fe7f8b >>Author: Daniel P. Berrangé >>Date: Wed Feb 14 09:43:59 2018 + >> >> nwfilter:

[libvirt] Release of libvirt-4.4.0

2018-06-04 Thread Daniel Veillard
It's finally out, tagged in git, with signed tarball and rpms at the usual place: ftp://libvirt.org/libvirt/ I also made a 4.4.0 release for the python bindings that one can find at ftp://libvirt.org/libvirt/python/ There is apparently more new features than improvements, and no bug

Re: [libvirt] [PATCH v3] Loop through all resolved addresses in virNetSocketNewListenTCP

2018-06-04 Thread Olaf Hering
Am Mon, 4 Jun 2018 21:16:17 +0200 schrieb Ján Tomko : > On Mon, Jun 04, 2018 at 12:29:37PM +0200, Olaf Hering wrote: > >-goto error; > This skips all errors, not just EADDRNOTAVAIL. Saving the errno here... Why would any error matter here? Why was that one 'goto error;' ever

Re: [libvirt] [PATCH 02/10] qemu: conf: Remove 'allow_disk_format_probing' config option

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:44AM +0200, Peter Krempa wrote: The option is insecure and it has been long enough for users to migrate their disk files to use explicit format. Drop the option and related code. The config parser still parses it and rejects statup if it's still present in the

Re: [libvirt] [PATCH 01/10] tests: Drop tests enabling allowDiskFormatProbing

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 10:58:43AM +0200, Peter Krempa wrote: Format probing will be dropped so remove the tests which will become obsolete. Signed-off-by: Peter Krempa --- .../qemuxml2argvdata/disk-many-format-probing.args | 32 - .../qemuxml2argvdata/disk-many-format-probing.xml

Re: [libvirt] [PATCH] conf: Introduce align for hostmem-file

2018-06-04 Thread John Ferlan
[removed developers from To since they read libvir-list anyway] On 05/29/2018 08:38 AM, Jie Wang wrote: > QEMU has add the 'align' option to 'memory-backend-file'. Expose > this option to users by new element align. > Would perhaps be nice to have a few more details about what this is as part

Re: [libvirt] [PATCH] qemu: Fix domain resume after failed migration

2018-06-04 Thread Peter Krempa
On Mon, Jun 04, 2018 at 16:51:18 +0200, Jiri Denemark wrote: > Libvirt relies on being able to kill the destination domain and resume > the source one during migration until we called "cont" on the > destination. Unfortunately, QEMU automatically activates block devices > at the end of migration

Re: [libvirt] [PATCH v3] Loop through all resolved addresses in virNetSocketNewListenTCP

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 12:29:37PM +0200, Olaf Hering wrote: Currently virNetSocketNewListenTCP bails out early under the following conditions: - the hostname resolves to at least one IPv4 and at least one IPv6 address - the local interfaces have that one IPv4 address assigned, but not any of

Re: [libvirt] [PATCH] qemu: check for QEMU_CAPS_DEVICE_VHOST_VSOCK

2018-06-04 Thread Jiri Denemark
On Mon, Jun 04, 2018 at 20:24:29 +0200, Ján Tomko wrote: > My commit b8b42ca added support for formatting the vsock > command line without actually checking if it's supported. > > Add it to the per-device validation function. > > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > >

Re: [libvirt] [PATCH] qemu: Fix domain resume after failed migration

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 04:51:18PM +0200, Jiri Denemark wrote: Libvirt relies on being able to kill the destination domain and resume the source one during migration until we called "cont" on the destination. Unfortunately, QEMU automatically activates block devices at the end of migration even

[libvirt] [PATCH] Add Virtlyst web application to apps.html

2018-06-04 Thread Daniel Nicoletti
Signed-off-by: Daniel Nicoletti --- docs/apps.html.in | 15 +++ 1 file changed, 15 insertions(+) diff --git a/docs/apps.html.in b/docs/apps.html.in index 863be4ff23..9b67fd5399 100644 --- a/docs/apps.html.in +++ b/docs/apps.html.in @@ -466,6 +466,21 @@ minutes. The only

Re: [libvirt] [PATCH] Add Virtlyst web application to apps.html

2018-06-04 Thread Daniel Nicoletti
Thanks, just finishing the fixes and will send it again. Hmm I didn know about NWFilter feature, will leave that as a feature request that I need to study :) 2018-06-04 15:23 GMT-03:00 John Ferlan : > Missing the SoB. > > From https://libvirt.org/hacking.html > > ... > Contributors to libvirt

Re: [libvirt] [PATCH 5/8] qemu: implement vsock hotplug

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 12:13:07PM -0400, John Ferlan wrote: On 05/30/2018 10:57 AM, Ján Tomko wrote: Allow hotplugging the vsock device. https://bugzilla.redhat.com/show_bug.cgi?id=1291851 Signed-off-by: Ján Tomko --- src/qemu/qemu_driver.c | 9 ++- src/qemu/qemu_hotplug.c | 70

Re: [libvirt] [PATCH V2] tests: xmconfigtest: add tests for cmdline formating

2018-06-04 Thread John Ferlan
On 05/23/2018 05:31 PM, Jim Fehlig wrote: > Commit 656151bf fixed formatting of the element. Perhaps it > would have been noticed and fixed earlier if we had a test. With this > change, all possible cases of formating from xmconfig are formatting > covered > > 1. no 'extra=' or 'root=' in

[libvirt] [PATCH] qemu: check for QEMU_CAPS_DEVICE_VHOST_VSOCK

2018-06-04 Thread Ján Tomko
My commit b8b42ca added support for formatting the vsock command line without actually checking if it's supported. Add it to the per-device validation function. https://bugzilla.redhat.com/show_bug.cgi?id=1291851 Reported-by: John Ferlan Signed-off-by: Ján Tomko --- src/qemu/qemu_domain.c |

Re: [libvirt] [PATCH] Add Virtlyst web application to apps.html

2018-06-04 Thread John Ferlan
Missing the SoB. >From https://libvirt.org/hacking.html ... Contributors to libvirt projects must assert that they are in compliance with the Developer Certificate of Origin 1.1. This is achieved by adding a "Signed-off-by" line containing the contributor's name and e-mail to every commit

Re: [libvirt] [tck PATCH] Don't assume the domain's network interface tap device is named "vnet0"

2018-06-04 Thread Daniel P . Berrangé
On Mon, Jun 04, 2018 at 09:52:52AM -0400, Laine Stump wrote: > Some of the tests perform operations on the tap device of the test > domain's network interface. They mostly assume that this tap device is > named "vnet0", which is the case if there is no other domain running > on the host, but isn't

Re: [libvirt] [tck PATCH v2 07/13] scripts: switch to using luks encryption with QEMU

2018-06-04 Thread Daniel P . Berrangé
On Fri, Jun 01, 2018 at 09:52:50PM -0400, Laine Stump wrote: > On 06/01/2018 09:06 PM, Laine Stump wrote: > > On 05/21/2018 12:46 PM, Daniel P. Berrangé wrote: > >> The ability to use qcow legacy encryption is disabled with QEMU for a > >> long time. Switch to using luks encryption, although this

Re: [libvirt] [tck PATCH v2 02/13] scripts: strip quotes from URI before checking it

2018-06-04 Thread Daniel P . Berrangé
On Fri, Jun 01, 2018 at 04:04:09PM -0400, Laine Stump wrote: > On 05/21/2018 12:46 PM, Daniel P. Berrangé wrote: > > The config file may have the URI listed with or without quotes, and the > > nwfilter tests didn't strip quotes before checking against the > > whitelisted URI. > > I'm curious what

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-04 Thread Daniel P . Berrangé
On Thu, Apr 26, 2018 at 08:16:54PM -0400, John Ferlan wrote: > > > On 04/26/2018 12:09 PM, Marc Hartmayer wrote: > > On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan > > wrote: > >> On 04/12/2018 08:40 AM, Marc Hartmayer wrote: > >>> The commit 'close callback: move it to driver'

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-04 Thread John Ferlan
[...] >> >> True virsh uses NULL so it's fine; however, I was thinking about more >> generically - why would a Register routine with a callback to free >> memory free the memory upon successful register. >> >> I'm still not sure I understand why the API cannot return a failure, but >> Daniel says

Re: [libvirt] [PATCH 8/8] qemu: implement vsock coldplug/coldunplug

2018-06-04 Thread John Ferlan
On 05/30/2018 10:57 AM, Ján Tomko wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_driver.c | 22 -- > 1 file changed, 20 insertions(+), 2 deletions(-) > Reviewed-by: John Ferlan John -- libvir-list

Re: [libvirt] [PATCH 7/8] qemu: implement vsock hotunplug

2018-06-04 Thread John Ferlan
On 05/30/2018 10:57 AM, Ján Tomko wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_driver.c | 5 +++- > src/qemu/qemu_hotplug.c | 68 > - > src/qemu/qemu_hotplug.h | 3 +++ > 3

Re: [libvirt] [PATCH 6/8] conf: introduce virDomainVsockDefEquals

2018-06-04 Thread John Ferlan
On 05/30/2018 10:57 AM, Ján Tomko wrote: > Introduce a function for comparing two vsock definitions. > > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > > Signed-off-by: Ján Tomko > --- > src/conf/domain_conf.c | 18 ++ > src/conf/domain_conf.h | 3 +++ >

Re: [libvirt] [PATCH 5/8] qemu: implement vsock hotplug

2018-06-04 Thread John Ferlan
On 05/30/2018 10:57 AM, Ján Tomko wrote: > Allow hotplugging the vsock device. > > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_driver.c | 9 ++- > src/qemu/qemu_hotplug.c | 70 >

Re: [libvirt] [PATCH 4/8] qemu: export vsock-related functions

2018-06-04 Thread John Ferlan
On 05/30/2018 10:57 AM, Ján Tomko wrote: > Export qemuAssignDeviceVsockAlias, qemuBuildVsockDevStr > and qemuProcessOpenVhostVsock for reuse in hotplug. > > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_alias.c | 2 +- >

Re: [libvirt] [PATCH 3/8] export virDomainVsockDefFree

2018-06-04 Thread John Ferlan
On 05/30/2018 10:57 AM, Ján Tomko wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > > Signed-off-by: Ján Tomko > --- > src/libvirt_private.syms | 1 + > 1 file changed, 1 insertion(+) > I think this should just be merged w/ patch 5 since that's where it's first used...

Re: [libvirt] [PATCH 2/8] qemuBuildVsockDevStr: allow passing a fdprefix

2018-06-04 Thread John Ferlan
$subj: qemu: Add prefix for vsock vhostfd On 05/30/2018 10:57 AM, Ján Tomko wrote: > A string prefix for the file descriptor name. Domain startup consider: Alter qemuBuildVsockDevStr to allow passing a prefix for the vhostfd file descriptor name. > uses the numeric value of fd without a

Re: [libvirt] [PATCH 1/8] qemu: split out qemuBuildVsockDevStr

2018-06-04 Thread John Ferlan
On 05/30/2018 10:57 AM, Ján Tomko wrote: > Split out the device string building to allow reusal in hotplug. s/reusal in hotplug/reuse for hotplug/ > > https://bugzilla.redhat.com/show_bug.cgi?id=1291851 > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_command.c | 36

[libvirt] [RFC] proposal for libiscsi storage pool

2018-06-04 Thread Clementine Hayat
Hi everybody! I am starting this thread to discuss a new storage pool backend for iSCSI using libiSCSI. There already is an iSCSI backend, however, it uses iscsiadm binary to execute the desired operation. The binary can be spawned multiple times during single execution of an API. This is

[libvirt] [PATCH v9 15/17] conf: Audit TPM emulator device at domain startup

2018-06-04 Thread Stefan Berger
Extend the existing auditing with auditing for the TPM emulator. Signed-off-by: Stefan Berger Reviewed-by: Ján Tomko --- docs/auditlog.html.in | 2 +- src/conf/domain_audit.c | 16 +--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/auditlog.html.in

[libvirt] [PATCH v9 02/17] qemu: Extend QEMU capabilities with 'tpm-emulator'

2018-06-04 Thread Stefan Berger
Extend the QEMU capabilities with tpm-emulator support. Signed-off-by: Stefan Berger Reviewed-by: John Ferlan Reviewed-by: Ján Tomko --- src/qemu/qemu_capabilities.c | 5 + src/qemu/qemu_capabilities.h | 1 +

[libvirt] [PATCH v9 16/17] conf: Use resrc=tpm in case of TPM passthrough following docs

2018-06-04 Thread Stefan Berger
Fix the resrc field for the TPM passthrough case to show tpm. This fixes the code to follow the documentation. Signed-off-by: Stefan Berger Reviewed-by: Ján Tomko --- src/conf/domain_audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_audit.c

[libvirt] [PATCH v9 11/17] qemu: Add swtpm to emulator cgroup

2018-06-04 Thread Stefan Berger
Add the external swtpm to the emulator cgroup so that upper limits of CPU usage can be enforced on the emulated TPM. To enable this we need to have the swtpm write its process id (pid) into a file. We then read it from the file to configure the emulator cgroup. The PID file is created in

[libvirt] [PATCH v9 08/17] tests: Add test cases for external swtpm TPM emulator

2018-06-04 Thread Stefan Berger
This patch adds extensions to existing test cases and specific test cases for the tpm-emulator. Signed-off-by: Stefan Berger Reviewed-by: John Ferlan Reviewed-by: Ján Tomko --- .../tpm-emulator.x86_64-latest.args| 33 ++ tests/qemuxml2argvtest.c

[libvirt] [PATCH v9 10/17] conf: Add support for choosing emulation of a TPM 2.0

2018-06-04 Thread Stefan Berger
This patch extends the TPM's device XML with TPM 2.0 support. This only works for the emulator type backend and looks as follows: The swtpm process now has --tpm2 as an additional parameter: system_u:system_r:svirt_t:s0:c597,c632 tss 18477 11.8 0.0 28364 3868 ? Rs

[libvirt] [PATCH v9 04/17] security: Add DAC and SELinux security for tpm-emulator

2018-06-04 Thread Stefan Berger
Extend the DAC and SELinux modules with support for the tpm-emulator. We label the Unix socket that QEMU connects to after starting swtmp with DAC and SELinux labels. We do not have to restore the labels in this case since the tpm-emulator will remove the Unix socket when it terminates.

[libvirt] [PATCH v9 14/17] qemu: Run swtpm_setup in unprivileged mode for a TPM 2.0

2018-06-04 Thread Stefan Berger
swtpm_setup can be run for a TPM 2 in unprivileged mode assuming XDG_CONFIG_HOME has been set and the necessary configuration files have been put into that directory. For current reference also see this link: https://github.com/stefanberger/swtpm/pull/63 Signed-off-by: Stefan Berger

[libvirt] [PATCH v9 07/17] qemu: Add support for external swtpm TPM emulator

2018-06-04 Thread Stefan Berger
This patch adds support for an external swtpm TPM emulator. The XML for this type of TPM looks as follows: The XML will currently only start a TPM 1.2. Upon first start, libvirt will run `swtpm_setup`, which will simulate the manufacturing of a TPM and create certificates for it and

[libvirt] [PATCH v9 00/17] Add support for TPM emulator

2018-06-04 Thread Stefan Berger
This series of patches adds support for the TPM emulator backend that is available in QEMU and based on swtpm + libtpms. It allows to attach a TPM 1.2 or 2.0 to a QEMU VM. sVirt labels are used for labeling the swtpm process, its Unix socket, and log file with the same label that the QEMU process

[libvirt] [PATCH v9 13/17] security: Add swtpm paths to the domain's AppArmor profile

2018-06-04 Thread Stefan Berger
This patch extends the AppArmor domain profile with file paths the swtpm accesses for state, log, pid, and socket files. Both, QEMU and swtpm, use this AppArmor profile. Signed-off-by: Stefan Berger Cc: Christian Ehrhardt --- examples/apparmor/libvirt-qemu | 3 +++

[libvirt] [PATCH v9 17/17] conf: Use virDomainChrSourceDefClear() rather than VIR_FREE()

2018-06-04 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d99fa8f297..899fd3021d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt] [PATCH v9 05/17] qemu: Extend qemu_conf with tpm-emulator support

2018-06-04 Thread Stefan Berger
Extend qemu_conf with user and group for running the tpm-emulator and add directories to the configuration for the locations of the log, state, and socket of the tpm-emulator. Also add these new directories to the QEMU Makefile.inc.am and the RPM spec file libvirt.spec.in. Signed-off-by: Stefan

[libvirt] [PATCH v9 12/17] news: Update news with new TPM emulator feature

2018-06-04 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Ján Tomko --- docs/news.xml | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index a2829eff6a..05a5b76e63 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -33,6 +33,19 @@ --> + + + +

[libvirt] [PATCH v9 06/17] qemu: Extend QEMU with external TPM support

2018-06-04 Thread Stefan Berger
Implement functions for managing the storage of the external swtpm as well as starting and stopping it. Also implement functions to use swtpm_setup, which simulates the manufacturing of a TPM, which includes creation of certificates for the device. Further, the external TPM needs storage on the

[libvirt] [PATCH v9 09/17] security: Label the external swtpm with SELinux labels

2018-06-04 Thread Stefan Berger
In this patch we label the swtpm process with SELinux labels. We give it the same label as the QEMU process has. We label its state directory and files as well. We restore the old security labels once the swtpm has terminated. The file and process labels now look as follows: Directory:

[libvirt] [PATCH v9 03/17] util: Implement virFileChownFiles()

2018-06-04 Thread Stefan Berger
Implement virFileChownFiles() which changes file ownership of all files in a given directory. Signed-off-by: Stefan Berger Reviewed-by: John Ferlan Reviewed-by: Ján Tomko --- src/libvirt_private.syms | 1 + src/util/virfile.c | 55

[libvirt] [PATCH v9 01/17] conf: Add support for external swtpm TPM emulator to domain XML

2018-06-04 Thread Stefan Berger
This patch adds support for an external swtpm TPM emulator. The XML for this type of TPM looks as follows: The XML will currently only define a TPM 1.2. Extend the documentation. Add a test case testing the XML parser and formatter. Signed-off-by: Stefan Berger Reviewed-by: John

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

2018-06-04 Thread Cornelia Huck
On Mon, 4 Jun 2018 16:17:52 +0200 Ján Tomko wrote: > On Mon, Jun 04, 2018 at 02:05:17PM +0800, Yi Min Zhao wrote: > > > > > >在 2018/6/2 下午10:18, Ján Tomko 写道: > >> On Thu, May 24, 2018 at 02:24:30PM +0200, Xiao Feng Ren wrote: > >>> From: Yi Min Zhao > >>> > >>> The pci-root depends on zpci

Re: [libvirt] [PATCH v6 0/9] x86: Secure Encrypted Virtualization (AMD)

2018-06-04 Thread Brijesh Singh
On 05/29/2018 10:28 AM, Brijesh Singh wrote: ... On 05/28/2018 05:06 AM, Erik Skultety wrote: On Wed, May 23, 2018 at 04:18:25PM -0500, Brijesh Singh wrote: This patch series provides support for launching an encrypted guest using AMD's new Secure Encrypted  Virtualization (SEV)

[libvirt] [PATCH] qemu: Fix domain resume after failed migration

2018-06-04 Thread Jiri Denemark
Libvirt relies on being able to kill the destination domain and resume the source one during migration until we called "cont" on the destination. Unfortunately, QEMU automatically activates block devices at the end of migration even when it's called with -S. This wasn't a big issue in the past

[libvirt] [PATCH v1 13/18] use VIR_AUTOFREE in src/util/virfdstream.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virfdstream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index e4973a2..e7befbc 100644 --- a/src/util/virfdstream.c

[libvirt] [PATCH v1 15/18] use VIR_AUTOFREE in src/util/virconf.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virconf.c | 42 -- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index e0a3fd1..7dd8820 100644

[libvirt] [PATCH v1 14/18] use VIR_AUTOFREE in src/util/virfile.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virfile.c | 303 + 1 file changed, 99 insertions(+), 204 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index

[libvirt] [PATCH v1 12/18] use VIR_AUTOFREE in src/util/virdbus.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virdbus.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/src/util/virdbus.c b/src/util/virdbus.c index ba8b684..66dbe41 100644 ---

[libvirt] [PATCH v1 11/18] use VIR_AUTOFREE in src/util/vireventpoll.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/vireventpoll.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/util/vireventpoll.c b/src/util/vireventpoll.c index 81ecab4..13d278d 100644 ---

[libvirt] [PATCH v1 10/18] use VIR_AUTOFREE in src/util/virdnsmasq.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virdnsmasq.c | 116 +- 1 file changed, 39 insertions(+), 77 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index

[libvirt] [PATCH v1 18/18] use VIR_AUTOFREE in src/util/virhook.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virhook.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/util/virhook.c b/src/util/virhook.c index facd74a..51f0eb5 100644 --- a/src/util/virhook.c

[libvirt] [PATCH v1 07/18] use VIR_AUTOFREE in src/util/virbuffer.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virbuffer.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c index 3d6defb..5152f73 100644 ---

[libvirt] [PATCH v1 16/18] use VIR_AUTOFREE in src/util/virfilecache.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virfilecache.c | 35 +++ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c index dab7216..49049b7

[libvirt] [PATCH v1 05/18] use VIR_AUTOFREE in src/util/iohelper.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/iohelper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/iohelper.c b/src/util/iohelper.c index bb8a8dd..f7794dc 100644 --- a/src/util/iohelper.c +++

[libvirt] [PATCH v1 09/18] use VIR_AUTOFREE in src/util/virfcp.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virfcp.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/util/virfcp.c b/src/util/virfcp.c index 7660ba7..b703744 100644 --- a/src/util/virfcp.c

[libvirt] [PATCH v1 17/18] use VIR_AUTOFREE in src/util/virfirewall.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virfirewall.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index 10c370a..568612c 100644 ---

[libvirt] [PATCH v1 04/18] use VIR_AUTOFREE in src/util/virauthconfig.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virauthconfig.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c index

[libvirt] [PATCH v1 08/18] use VIR_AUTOFREE in src/util/vircgroup.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/vircgroup.c | 526 ++- 1 file changed, 179 insertions(+), 347 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index

[libvirt] [PATCH v1 03/18] use VIR_AUTOFREE in src/util/virauth.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virauth.c | 60 +++--- 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/src/util/virauth.c b/src/util/virauth.c index

[libvirt] [PATCH v1 06/18] use VIR_AUTOFREE in src/util/viraudit.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/viraudit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/viraudit.c b/src/util/viraudit.c index 0085dc3..a49d458 100644 --- a/src/util/viraudit.c +++

[libvirt] [PATCH v1 01/18] add macros for implementing automatic cleanup functionality

2018-06-04 Thread Sukrit Bhatnagar
New macros are added to src/util/viralloc.h which help in adding cleanup attribute to variable declarations. Signed-off-by: Sukrit Bhatnagar --- src/util/viralloc.h | 69 + 1 file changed, 69 insertions(+) diff --git a/src/util/viralloc.h

[libvirt] [PATCH v1 02/18] use VIR_AUTOFREE in src/util/virarptable.c

2018-06-04 Thread Sukrit Bhatnagar
Modify code to use VIR_AUTOFREE macro wherever required. Signed-off-by: Sukrit Bhatnagar --- src/util/virarptable.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/util/virarptable.c b/src/util/virarptable.c index c0e90dc..f53a479 100644 ---

[libvirt] [PATCH v1 00/18] use VIR_AUTOFREE in src/util

2018-06-04 Thread Sukrit Bhatnagar
This series of patches modifies some files in src/util to use VIR_AUTOFREE for automatic freeing of memory and get rid of some VIR_FREE macro invocations. Sukrit Bhatnagar (18): add macros for implementing automatic cleanup functionality use VIR_AUTOFREE in src/util/virarptable.c use

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

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 02:05:17PM +0800, Yi Min Zhao wrote: 在 2018/6/2 下午10:18, Ján Tomko 写道: On Thu, May 24, 2018 at 02:24:30PM +0200, Xiao Feng Ren wrote: From: Yi Min Zhao The pci-root depends on zpci capability. So autogenerate pci-root if zpci exists. Signed-off-by: Yi Min Zhao

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

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 01:57:04PM +0800, Yi Min Zhao wrote: 在 2018/6/2 下午10:16, Ján Tomko 写道: On Thu, May 24, 2018 at 02:24:29PM +0200, Xiao Feng Ren wrote: From: Yi Min Zhao QEMU on s390 supports PCI multibus since forever. But zPCI, as extension of PCI device on s390, is the significant

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

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 03:52:31PM +0800, Yi Min Zhao wrote: 在 2018/6/2 下午10:15, Ján Tomko 写道: On Thu, May 24, 2018 at 02:24:28PM +0200, Xiao Feng Ren wrote: From: Yi Min Zhao This patch introduces a new attribute PCI address extension flag to deal with the extension PCI attributes such as

[libvirt] [PATCH 10/10] DO_NOT_APPLY: HACK: Regenerate qemucapabilitiestest data

2018-06-04 Thread Peter Krempa
Use the LD_PRELOAD .so library used in 'qemucapsprobe' to regenerate the files. The library is instrumented to write the replies to 'caps.json' and instrumentation in the test move it to the correct place. Use 'fix-files.sh' to do so as it's using a static variable to track the initial newline.

[libvirt] [PATCH 08/10] tests: qemucapabilities: Test commands used to query capabilities

2018-06-04 Thread Peter Krempa
Use qemuMonitorTestNewFromFileFull which allows to test commands used along with providing replies. This has two advantages: 1) It's easier to see which command was used when looking at the files 2) We check that the used commands are actually in the correct order Signed-off-by: Peter Krempa

[libvirt] [PATCH 07/10] tests: qemucapsprobemock: Prepare 'qemucapsprobe' for the new format

2018-06-04 Thread Peter Krempa
Change the output of qemucapsprobe to record the commands used for querying. This allows to easily identify which reply belongs to which command and also will allow to test whether we use stable queries. This change includes changing dropping of the QMP greeting from the file and reformatting of

[libvirt] [PATCH 05/10] tests: qemucapsprobemock: Simplify and extract skipping of empty lines

2018-06-04 Thread Peter Krempa
The prettyfied output may sometimes contain empty lines which would desynchonize the test monitor workers. The skipping code can be much simplified though. Also a extract it so so that it's obvious what it's doing and can be reused. Signed-off-by: Peter Krempa --- tests/qemucapsprobemock.c | 26

[libvirt] [PATCH 03/10] tests: qemumonitor: Simplify handling of end of file in full file test

2018-06-04 Thread Peter Krempa
On EOF, the loop can be terminated right away since most of it is skipped anyways and the handling of the last command is repeated after the loop. Signed-off-by: Peter Krempa --- tests/qemumonitortestutils.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff

[libvirt] [PATCH 06/10] tests: qemucapsprobemock: Fail if JSON reply from qemu can't be reformatted

2018-06-04 Thread Peter Krempa
Rather than skipping output on failure fail loudly. Signed-off-by: Peter Krempa --- tests/qemucapsprobemock.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/qemucapsprobemock.c b/tests/qemucapsprobemock.c index f26fa6b285..a0d2acb69a 100644 ---

[libvirt] [PATCH 02/10] tests: qemucapabilities: Reset command sequence before second probe

2018-06-04 Thread Peter Krempa
The test data for capabilities is obtained from two consecutive qemu runs when the regular monitor object will be reset. Do the same for the test monitor object which is not disposed between runs by calling qemuMonitorResetCommandID. Signed-off-by: Peter Krempa --- tests/qemucapabilitiestest.c

[libvirt] [PATCH 04/10] tests: qemumonitor: Optimize control flow when concatenating replies

2018-06-04 Thread Peter Krempa
The test file can be broken up by newlines and is automatically concatenated back. Fix the control flow so that the concatenation code 'continues' the loop rather than branching out. Also add an anotation to the concatenation code. Signed-off-by: Peter Krempa --- tests/qemumonitortestutils.c |

[libvirt] [PATCH 01/10] qemu: monitor: Add possibility to reset command sequence in tests

2018-06-04 Thread Peter Krempa
qemucapabilitiestest for simplicity uses one test monitor object for simulating work of two separate inquiries of the qemu process. To allow better testing in the future it will be required to reset the counter so that it accurately simulates how qemu would behave. This patch adds a private

Re: [libvirt] [PATCH v8 09/18] security: Label the external swtpm with SELinux labels

2018-06-04 Thread Stefan Berger
On 06/02/2018 09:18 AM, Ján Tomko wrote: On Thu, May 24, 2018 at 04:26:05PM -0400, Stefan Berger wrote: +/* + * _virSecuritySELinuxRestoreFileLabels: + * + * @mgr: the virSecurityManager + * @path: path to a directory or a file + * + * Restore the file labels on the given path; if the path is a

[libvirt] [PATCH 00/10] tests: qemucapabilities: Record and test commands used to gather qemuCaps

2018-06-04 Thread Peter Krempa
The '.replies' files are quite confusing since we don't record which command created the given reply. Also our tests did not validate whether the correct command was called. Address this by recording which command was called and reuse qemuMonitorTestNewFromFileFull which allows checking the

[libvirt] [tck PATCH] Don't assume the domain's network interface tap device is named "vnet0"

2018-06-04 Thread Laine Stump
Some of the tests perform operations on the tap device of the test domain's network interface. They mostly assume that this tap device is named "vnet0", which is the case if there is no other domain running on the host, but isn't true if some other domain was running. This patch adds a utility

Re: [libvirt] [PATCH] virDomainDefCopy: Skip ostype checks

2018-06-04 Thread Ján Tomko
On Mon, Jun 04, 2018 at 12:23:50PM +0200, Michal Privoznik wrote: On 06/02/2018 02:23 PM, Ján Tomko wrote: On Sat, Jun 02, 2018 at 12:57:39PM +0200, Michal Privoznik wrote: When parsing domain XML the virCapsDomainData lookup is performed in order to fill in missing def->os.arch and

Re: [libvirt] [PATCH] tests: qemuxml2argv: Make tests based on DO_TEST_CAPS_INTERNAL stable

2018-06-04 Thread Peter Krempa
On Mon, Jun 04, 2018 at 15:33:03 +0200, Peter Krempa wrote: > To avoid problems with test cases specifying an alias machine type which > would change once capabilities for a newer version are added strip all > alias machine types for the DO_TEST_CAPS_INTERNAL based tests. > > Signed-off-by: Peter

  1   2   >