[libvirt] [PATCH v6 7/9] remote: implement the remote protocol for launch security

2018-05-23 Thread Brijesh Singh
Add remote support for launch security info. Signed-off-by: Brijesh Singh --- src/remote/remote_daemon_dispatch.c | 47 + src/remote/remote_driver.c | 42 - src/remote/remote_protocol.x|

[libvirt] [PATCH v6 4/9] qemu/cgroup: add /dev/sev in shared devices list

2018-05-23 Thread Brijesh Singh
QEMU uses /dev/sev device while creating the SEV guest, lets add /dev/sev in the list of devices allowed to be accessed by the QEMU. Signed-off-by: Brijesh Singh <> --- docs/drvqemu.html.in | 1 + src/qemu/qemu.conf | 2 +-

[libvirt] [PATCH v6 5/9] qemu: add support to launch SEV guest

2018-05-23 Thread Brijesh Singh
QEMU >= 2.12 provides 'sev-guest' object which is used to launch encrypted VMs on AMD platform using SEV feature. The various inputs required to launch SEV guest is provided through the tag. A typical SEV guest launch command line looks like this: # $QEMU ...\ -object

[libvirt] Likely build race, "/usr/bin/ld: cannot find -lvirt"

2018-05-23 Thread Ian Jackson
tl;dr: I think there is a bug in libvirt's build system which, with low probability, causes a build failure containing this message: /usr/bin/ld: cannot find -lvirt Complete build logs of two attempts:

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

2018-05-23 Thread Brijesh Singh
This patch series provides support for launching an encrypted guest using AMD's new Secure Encrypted Virtualization (SEV) feature. SEV is an extension to the AMD-V architecture which supports running multiple VMs under the control of a hypervisor. When enabled, SEV feature allows the memory

[libvirt] [PATCH v6 6/9] libvirt: add new public API to get launch security info

2018-05-23 Thread Brijesh Singh
The API can be used outside the libvirt to get the launch security information. When SEV is enabled, the API can be used to get the measurement of the launch process. Signed-off-by: Brijesh Singh --- include/libvirt/libvirt-domain.h | 17 ++

[libvirt] [PATCH v6 1/9] qemu: provide support to query the SEV capability

2018-05-23 Thread Brijesh Singh
QEMU version >= 2.12 provides support for launching an encrypted VMs on AMD x86 platform using Secure Encrypted Virtualization (SEV) feature. This patch adds support to query the SEV capability from the qemu. Signed-off-by: Brijesh Singh --- src/conf/domain_capabilities.h

[libvirt] [PATCH v6 2/9] qemu: introduce SEV feature in hypervisor capabilities

2018-05-23 Thread Brijesh Singh
Extend hypervisor capabilities to include sev feature. When available, hypervisor supports launching an encrypted VM on AMD platform. The sev feature tag provides additional details like Platform Diffie-Hellman (PDH) key and certificate chain which can be used by the guest owner to establish a

[libvirt] [PATCH v6 8/9] qemu: Add support to launch security info

2018-05-23 Thread Brijesh Singh
This patch implements the internal driver API for launch event into qemu driver. When SEV is enabled, execute 'query-sev-launch-measurement' to get the measurement of memory encrypted through launch sequence. Signed-off-by: Brijesh Singh --- src/qemu/qemu_driver.c |

[libvirt] [PATCH v6 3/9] conf: introduce launch-security element in domain

2018-05-23 Thread Brijesh Singh
The launch-security element can be used to define the security model to use when launching a domain. Currently we support 'sev'. When 'sev' is used, the VM will be launched with AMD SEV feature enabled. SEV feature supports running encrypted VM under the control of KVM. Encrypted VMs have their

[libvirt] [PATCH v6 9/9] virsh: implement new command for launch security

2018-05-23 Thread Brijesh Singh
Add new 'launch-security' command, the command can be used to get or set the launch security information when booting encrypted VMs. Signed-off-by: Brijesh Singh --- tools/virsh-domain.c | 81 tools/virsh.pod | 5

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

2018-05-23 Thread Jim Fehlig
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 covered 1. no 'extra=' or 'root=' in xm.cfg 2. 'extra=' but no 'root=' in xm.cfg 3. 'root=' but no 'extra='

Re: [libvirt] [PATCH v4 0/4] qemu: Add support for -device hda-output (disable line-in)

2018-05-23 Thread Erik Skultety
On Tue, May 22, 2018 at 01:12:31PM +0200, Filip Alac wrote: > Add support for hda 'output' codec for ich6 and ich9 sound devices, > which allow us to disable line-in for guest. > 'hda-output' codec is available since 0.14 version of qemu. > > Fixes: >

Re: [libvirt] [PATCH 11/15] qemu: domain: Add private data for NBD migration storage source definition

2018-05-23 Thread Peter Krempa
On Tue, May 22, 2018 at 20:26:56 -0400, John Ferlan wrote: > > > On 05/18/2018 07:29 AM, Peter Krempa wrote: > > Allow saving various aspects necessary to do NBD migration via blockdev > > by storing a 'virStorageSource' in the disk private data meant to store > > the NBD target of migration.

Re: [libvirt] [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-23 Thread Markus Armbruster
Eduardo Habkost writes: > On Mon, May 21, 2018 at 04:46:36PM -0300, Daniel Henrique Barboza wrote: >> >> >> On 05/21/2018 03:14 PM, Eduardo Habkost wrote: >> > > Issue#2: the flag isn't a property of the target. Due to -no-acpi, it's >> > > not even a property of the

Re: [libvirt] [ v3 0/4] Introduce network-backed loader & NVRAM.

2018-05-23 Thread Prerna
On Mon, May 21, 2018 at 4:40 PM, Prerna Saxena wrote: > Libvirt domain XML allows only local filepaths to specify a loader element > or its matching NVRAM. Given that VMs may themselves move across hypervisor > hosts, it should be possible to allocate loaders/NVRAM disks

[libvirt] [ [PATCH v3 8/8] virsh: Add event name completion to 'nodedev-event' command

2018-05-23 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer.c | 31 +++ tools/virsh-completer.h | 4 tools/virsh-nodedev.c | 1 + 3 files changed, 36 insertions(+) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index 1fab758e12..162b7a0e1c

[libvirt] [ [PATCH v3 1/8] virsh-secret: Rename vshEventCallback to vshSecretEventCallback

2018-05-23 Thread Lin Ma
The next patch will use it in virsh-completer.c for returning the name list of secret events. The patch code originally authored by Michal Privoznik, Please refer to https://www.redhat.com/archives/libvir-list/2018-May/msg01022.html I splitted it to 2 patches with tiny change. Signed-off-by:

[libvirt] [ [PATCH v3 2/8] virsh: Add event name completion to 'secret-event' command

2018-05-23 Thread Lin Ma
The patch code originally authored by Michal Privoznik, Please refer to https://www.redhat.com/archives/libvir-list/2018-May/msg01022.html Signed-off-by: Lin Ma --- tools/virsh-completer.c | 27 +++ tools/virsh-completer.h | 4 tools/virsh-secret.c

[libvirt] [ [PATCH v3 3/8] virsh: Move vshEventCallback structure definition to virsh-domain.h

2018-05-23 Thread Lin Ma
The next patch will use it in virsh-completer.c for returning the strings of domain event name. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 8 +--- tools/virsh-domain.h | 8 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain.c

[libvirt] [ [PATCH v3 0/8] virsh completion for event, secret-event, pool-event and nodedev-event

2018-05-23 Thread Lin Ma
v2 -> v3: Most of patches in original v2 patchset were pushed, only 2 patches left, So create a new patchset for including the 2 patches and 6 new completion patches which about secret-event, pool-event and nodedev-event. (Borrowed code & idea from Michal Privoznik for these patches design)

[libvirt] [ [PATCH v3 1/8] virsh-secret: Rename vshEventCallback to vshSecretEventCallback

2018-05-23 Thread Lin Ma
The next patch will use it in virsh-completer.c for returning the name list of secret events. The patch code originally authored by Michal Privoznik, Please refer to https://www.redhat.com/archives/libvir-list/2018-May/msg01022.html I splitted it to 2 patches with tiny change. Signed-off-by:

[libvirt] [ [PATCH v3 3/8] virsh: Move vshEventCallback structure definition to virsh-domain.h

2018-05-23 Thread Lin Ma
The next patch will use it in virsh-completer.c for returning the strings of domain event name. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 8 +--- tools/virsh-domain.h | 8 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain.c

[libvirt] [ [PATCH v3 5/8] virsh-pool: Rename vshEventCallback to vshPoolEventCallback

2018-05-23 Thread Lin Ma
The next patch will use it in virsh-completer.c for returning the name list of pool events. Signed-off-by: Lin Ma --- tools/virsh-pool.c | 18 ++ tools/virsh-pool.h | 8 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/tools/virsh-pool.c

[libvirt] [ [PATCH v3 7/8] virsh-nodedev: Rename vshEventCallback to vshNodedevEventCallback

2018-05-23 Thread Lin Ma
The next patch will use it in virsh-completer.c for returning the name list of nodedev events. Signed-off-by: Lin Ma --- tools/virsh-nodedev.c | 18 ++ tools/virsh-nodedev.h | 8 2 files changed, 14 insertions(+), 12 deletions(-) diff --git

[libvirt] [ [PATCH v3 4/8] virsh: Add event name completion to 'event' command

2018-05-23 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer.c | 31 +++ tools/virsh-completer.h | 3 +++ tools/virsh-domain.c| 1 + 3 files changed, 35 insertions(+) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index b402fd22c3..c0c3c5571a

[libvirt] [ [PATCH v3 2/8] virsh: Add event name completion to 'secret-event' command

2018-05-23 Thread Lin Ma
The patch code originally authored by Michal Privoznik, Please refer to https://www.redhat.com/archives/libvir-list/2018-May/msg01022.html Signed-off-by: Lin Ma --- tools/virsh-completer.c | 27 +++ tools/virsh-completer.h | 4 tools/virsh-secret.c

[libvirt] [ [PATCH v3 6/8] virsh: Add event name completion to 'pool-event' command

2018-05-23 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer.c | 30 ++ tools/virsh-completer.h | 4 tools/virsh-pool.c | 1 + 3 files changed, 35 insertions(+) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index c0c3c5571a..1fab758e12

[libvirt] [ [PATCH v3 0/8] virsh completion for event, secret-event, pool-event and nodedev-event

2018-05-23 Thread Lin Ma
v2 -> v3: Most of patches in original v2 patchset were pushed, only 2 patches left, So create a new patchset for including the 2 patches and 6 new completion patches which about secret-event, pool-event and nodedev-event. (Borrowed code & idea from Michal Privoznik for these patches design)

Re: [libvirt] [RFC PATCH 6/6] qemu: Format pseries.cap-hpt-mps on the command line

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 19:09:59 +0200, Andrea Bolognani wrote: > On Wed, 2018-05-23 at 18:40 +0200, Peter Krempa wrote: > > On Wed, May 23, 2018 at 18:18:02 +0200, Andrea Bolognani wrote: > > > +/* QEMU expects the argument to be a number of left shifts: > > > + * for

Re: [libvirt] [RFC PATCH 5/6] conf: Parse and format HPT maxpagesize

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 18:52:57 +0200, Andrea Bolognani wrote: > On Wed, 2018-05-23 at 18:36 +0200, Peter Krempa wrote: > > On Wed, May 23, 2018 at 18:18:01 +0200, Andrea Bolognani wrote: > > > +def->hpt_maxpagesize = VIR_ROUND_UP(def->hpt_maxpagesize, > > > 1024); > > > > The code

Re: [libvirt] [RFC PATCH 2/6] conf: Tweak HPT parsing and formatting

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 18:50:04 +0200, Andrea Bolognani wrote: > On Wed, 2018-05-23 at 18:42 +0200, Peter Krempa wrote: > > On Wed, May 23, 2018 at 18:17:58 +0200, Andrea Bolognani wrote: > > > +if (hasResizing) { > > > +if (virAsprintf(, " resizing='%s'", > >

Re: [libvirt] [PATCH] news: Add TLS non-shared storage migration

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 18:40:00 +0200, Andrea Bolognani wrote: > On Wed, 2018-05-23 at 16:59 +0200, Peter Krempa wrote: > > Signed-off-by: Peter Krempa > > --- > > docs/news.xml | 10 ++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/docs/news.xml

Re: [libvirt] [PATCH 03/22] virsh: Enhance documentation of cpu-compare command

2018-05-23 Thread Kashyap Chamarthy
On Wed, May 16, 2018 at 10:39:22AM +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > tools/virsh.pod | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/virsh.pod b/tools/virsh.pod > index 929958a953..5f72e11dec 100644 > ---

Re: [libvirt] [PATCH] qemu: monitor: Remove diskSecretLookup monitor event

2018-05-23 Thread Ján Tomko
On Tue, May 22, 2018 at 03:57:57PM +0200, Peter Krempa wrote: After the text monitor was deleted this event can't be triggered. Remove it and all the unnecessary code. Signed-off-by: Peter Krempa --- This applies on top of the text monitor removal series. I forgot to

Re: [libvirt] [PATCH 22/22] news: Mention new CPU related APIs

2018-05-23 Thread Kashyap Chamarthy
On Wed, May 16, 2018 at 10:39:41AM +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > docs/news.xml | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index 7d40e85b9a..bd7885e91a 100644 > --- a/docs/news.xml >

Re: [libvirt] [PATCH 05/22] Improve documentation of virConnectGetCPUModelNames

2018-05-23 Thread Kashyap Chamarthy
On Wed, May 16, 2018 at 10:39:24AM +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/libvirt-host.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/libvirt-host.c b/src/libvirt-host.c > index 76087badd8..ed689b9ec2

Re: [libvirt] [PATCH 02/22] virsh: Extract common code from cmdCPU{Compare, Baseline}

2018-05-23 Thread Jiri Denemark
On Tue, May 22, 2018 at 17:33:14 -0400, Collin Walling wrote: > On 05/16/2018 04:39 AM, Jiri Denemark wrote: > > Both cpu-compare and cpu-baseline commands accept more that just CPU > > definition XML(s). For users' convenience they are able to extract the > > CPU definition(s) even from domain

Re: [libvirt] [PATCH 04/22] virsh: Enhance documentation of cpu-models command

2018-05-23 Thread Jiri Denemark
On Wed, May 23, 2018 at 13:08:51 +0200, Kashyap Chamarthy wrote: > On Wed, May 16, 2018 at 10:39:23AM +0200, Jiri Denemark wrote: > > Signed-off-by: Jiri Denemark > > --- > > tools/virsh.pod | 8 +++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git

Re: [libvirt] [PATCH 4/8] qemu: monitor: Drop QEMU_CHECK_MONITOR_JSON... macros

2018-05-23 Thread Peter Krempa
On Tue, May 22, 2018 at 15:24:06 +0200, Ján Tomko wrote: > On Tue, May 22, 2018 at 02:35:44PM +0200, Peter Krempa wrote: > > Monitor is now JSON only. Drop the old cruft. > > > > In theory, you should still be able to get a domain with a text monitor > via qemu-attach. > > In practice,

Re: [libvirt] [PATCH 08/22] Introduce virConnectCompareHypervisorCPU public API

2018-05-23 Thread Jiri Denemark
On Tue, May 22, 2018 at 18:27:51 -0400, Collin Walling wrote: > On 05/16/2018 04:39 AM, Jiri Denemark wrote: > > This new API compares the given CPU description with the CPU the > > specified hypervisor is able to provide on the host. It is a more useful > > version of virConnectCompareCPU, which

Re: [libvirt] [PATCH 00/12] Add support for TPM emulator

2018-05-23 Thread John Ferlan
On 05/22/2018 04:44 PM, 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 Unix socket,

Re: [libvirt] [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-23 Thread Eduardo Habkost
On Wed, May 23, 2018 at 11:17:55AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > On Mon, May 21, 2018 at 04:46:36PM -0300, Daniel Henrique Barboza wrote: [...] > >> Since no objection was made back then, this logic was put into query-target > >> starting > >>

[libvirt] [PATCH] Fix memory leak issues in virshAllocpagesPagesizeCompleter.

2018-05-23 Thread Roland Schulz
Signed-off-by: Roland Schulz --- tools/virsh-completer.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index 1435d1d4c..c72f3bcad 100644 --- a/tools/virsh-completer.c +++

Re: [libvirt] [PATCH 4/8] qemu: monitor: Drop QEMU_CHECK_MONITOR_JSON... macros

2018-05-23 Thread Ján Tomko
On Wed, May 23, 2018 at 03:04:47PM +0200, Peter Krempa wrote: On Tue, May 22, 2018 at 15:24:06 +0200, Ján Tomko wrote: On Tue, May 22, 2018 at 02:35:44PM +0200, Peter Krempa wrote: > Monitor is now JSON only. Drop the old cruft. > In theory, you should still be able to get a domain with a text

Re: [libvirt] [PATCH 04/22] virsh: Enhance documentation of cpu-models command

2018-05-23 Thread Kashyap Chamarthy
On Wed, May 16, 2018 at 10:39:23AM +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > tools/virsh.pod | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/tools/virsh.pod b/tools/virsh.pod > index 5f72e11dec..5fc8201893 100644 >

[libvirt] [PATCH v2] Edit test capabilities to contain different cell pagesizes.

2018-05-23 Thread Roland Schulz
Signed-off-by: Roland Schulz --- src/test/test_driver.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 467587b19..3fe0c2831 100644 --- a/src/test/test_driver.c +++

Re: [libvirt] [PATCH 07/22] qemu_capabilities: Introduce virQEMUCapsCacheLookupDefault

2018-05-23 Thread Jiri Denemark
On Tue, May 22, 2018 at 18:24:57 -0400, Collin Walling wrote: > On 05/16/2018 04:39 AM, Jiri Denemark wrote: > > virConnectGetDomainCapabilities needs to lookup QEMU capabilities > > matching a specified binary, architecture, virt type, and machine type > > while using default values when any of

[libvirt] AppArmor support for TPM emulator; was:Re: [PATCH 00/12] Add support for TPM emulator

2018-05-23 Thread Stefan Berger
On 05/23/2018 08:07 AM, John Ferlan wrote: On 05/22/2018 04:44 PM, 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

[libvirt] [PATCH v2 2/5] tests: qemuxml2argv: Verify that disk secret alias is correct with user-aliases

2018-05-23 Thread Peter Krempa
Change the disk encryption type to qcow2+luks so that the appropriate secret objects are generated. This tests that the proper alias is used for the passphrase secret object. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/user-aliases.args | 8 +++-

[libvirt] [PATCH v2 0/5] qemu: Forbid old qcow/qcow2 encryption

2018-05-23 Thread Peter Krempa
The old qcow/qcow2 encryption format is so broken that qemu decided to drop it completely. This series forbids the use of such images even with qemus prior to this and removes all the cruft necessary to support it. v2: - fixed check to include the qcow format too - reworded the error message

Re: [libvirt] [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-23 Thread Daniel Henrique Barboza
Hi, On 05/23/2018 09:27 AM, Eduardo Habkost wrote: On Wed, May 23, 2018 at 11:17:55AM +0200, Markus Armbruster wrote: Eduardo Habkost writes: On Mon, May 21, 2018 at 04:46:36PM -0300, Daniel Henrique Barboza wrote: [...] Since no objection was made back then, this

Re: [libvirt] [PATCH v2] Edit test capabilities to contain different cell pagesizes.

2018-05-23 Thread Michal Privoznik
On 05/23/2018 02:40 PM, Roland Schulz wrote: > Signed-off-by: Roland Schulz > --- > src/test/test_driver.c | 18 +++--- > 1 file changed, 11 insertions(+), 7 deletions(-) In the $SUBJ I'd add the prefix "test driver:" to tell explicitly what part of code this

[libvirt] [PATCH v2 4/5] qemu: domain: Forbid storage with old QCOW2 encryption

2018-05-23 Thread Peter Krempa
The encryption was buggy and qemu actually dropped it upstream. Forbid it for all versions since it would cause other problems too. Problems with the old encryption include weak crypto, corruption of images with blockjobs and a lot of usability problems. This requires changing of the encryption

[libvirt] [PATCH] Fix indentation of virshAllocpagesPagesizeCompleter arguments.

2018-05-23 Thread Roland Schulz
--- tools/virsh-completer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index cbd5326d0..1df4d55af 100644 --- a/tools/virsh-completer.c +++ b/tools/virsh-completer.c @@ -568,8 +568,8 @@

[libvirt] [PATCH v2 1/5] tests: qemuxml2argv: Drop disk encryption from 'interface-server' test

2018-05-23 Thread Peter Krempa
The disk encryption part is no way relevant to the rest of the test so drop it. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/interface-server.xml | 3 --- tests/qemuxml2xmloutdata/interface-server.xml | 3 --- 2 files changed, 6 deletions(-) diff --git

[libvirt] [PATCH v2 5/5] qemu: Remove code for setting up disk passphrases

2018-05-23 Thread Peter Krempa
Now that the old qcow2 encryption is removed we can safely delete all this code since it's not needed any more. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 13 -- src/qemu/qemu_monitor.h | 4 -- src/qemu/qemu_monitor_json.c | 28

[libvirt] [PATCH v2 3/5] tests: qemublock: Switch to qcow2+luks in test files

2018-05-23 Thread Peter Krempa
The next patch will forbid the old qcow2 encryption completely. Remove it from the tests. Signed-off-by: Peter Krempa --- .../qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption.json | 2 +- .../qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption.xml |

Re: [libvirt] [PATCH 06/12] qemu: Extend QEMU with external TPM support

2018-05-23 Thread Ján Tomko
On Tue, May 22, 2018 at 04:44:47PM -0400, Stefan Berger wrote: 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

[libvirt] [RFC PATCH 2/6] conf: Tweak HPT parsing and formatting

2018-05-23 Thread Andrea Bolognani
This doesn't seem very useful at the moment, but it will make sense once we introduce another HPT-related setting. The output XML is decoupled from the input XML in preparation of future changes as well; while doing so, we can shave a few lines off the latter. This commit is best viewed with

[libvirt] [RFC PATCH 0/6] qemu: Support pagesize tuning for pSeries guests

2018-05-23 Thread Andrea Bolognani
The QEMU part, which is RFC as well, can be found at http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg02818.html Applies cleanly on top of c49013f26c6b40b741f4d5fc61269898f7fd25b8. Andrea Bolognani (6): conf: Reintroduce virDomainDef::hpt_resizing conf: Tweak HPT parsing and

[libvirt] [RFC PATCH 1/6] conf: Reintroduce virDomainDef::hpt_resizing

2018-05-23 Thread Andrea Bolognani
We're going to introduce a second HPT-related setting soon, at which point using a single location to store everything is no longer going to cut it. This mostly, but not completely, reverts 3dd1eb3b2650. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 21

[libvirt] [RFC PATCH 5/6] conf: Parse and format HPT maxpagesize

2018-05-23 Thread Andrea Bolognani
This commit is best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani --- docs/schemas/domaincommon.rng | 21 ++--- src/conf/domain_conf.c| 44 --- src/conf/domain_conf.h| 1 +

[libvirt] [RFC PATCH 3/6] qemu: Introduce QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MPS

2018-05-23 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h | 1 + .../caps_2.12.0.aarch64.replies | 24 ++- .../caps_2.12.0.aarch64.xml | 2 +-

[libvirt] [RFC PATCH 4/6] tests: Pretend we have pseries.cap-hpt-mps in 2.12

2018-05-23 Thread Andrea Bolognani
That's not the case, of course, but the relevant QEMU code has not been merged upstream yet and this is a cheap way to show the capability is actually detected correctly. Do not merge. Signed-off-by: Andrea Bolognani --- tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies

[libvirt] [RFC PATCH 6/6] qemu: Format pseries.cap-hpt-mps on the command line

2018-05-23 Thread Andrea Bolognani
This makes the feature fully functional. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571078 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 26 tests/qemuxml2argvdata/pseries-features.args | 3 ++- 2 files

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

2018-05-23 Thread Stefan Berger
On 05/23/2018 11:43 AM, Ján Tomko wrote: On Tue, May 22, 2018 at 04:44:49PM -0400, Stefan Berger wrote: 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

Re: [libvirt] [RFC PATCH 2/6] conf: Tweak HPT parsing and formatting

2018-05-23 Thread Andrea Bolognani
On Wed, 2018-05-23 at 18:42 +0200, Peter Krempa wrote: > On Wed, May 23, 2018 at 18:17:58 +0200, Andrea Bolognani wrote: > > +if (hasResizing) { > > +if (virAsprintf(, " resizing='%s'", > > +virDomainHPTResizingTypeToStri > >

Re: [libvirt] [GSoC] Design ideas for implementing cleanup attribute

2018-05-23 Thread Pavel Hrdina
On Sun, Mar 25, 2018 at 01:55:07AM +0530, Sukrit Bhatnagar wrote: > Hi, > > I am interested in implementing the GCC cleanup attribute for automatic > resource freeing as part of GSoC'18. I have shared a proposal for the same. > > This mail is to discuss the code design for implementing it. > >

Re: [libvirt] [GSoC] Design ideas for implementing cleanup attribute

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 18:05:17 +0200, Pavel Hrdina wrote: [...] > I liked the way how GLib is solving the issue so we can simply use the > same approach since it looks reasonable. > > There would be three different macros that would be used to annotate > variable with attribute cleanup: > >

Re: [libvirt] [RFC PATCH 5/6] conf: Parse and format HPT maxpagesize

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 18:18:01 +0200, Andrea Bolognani wrote: > This commit is best viewed with 'git show -w'. > > Signed-off-by: Andrea Bolognani > --- > docs/schemas/domaincommon.rng | 21 ++--- > src/conf/domain_conf.c| 44

Re: [libvirt] [PATCH] news: Add TLS non-shared storage migration

2018-05-23 Thread Andrea Bolognani
On Wed, 2018-05-23 at 16:59 +0200, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index 8f2c7d5dff..329b1c7129 100644 > --- a/docs/news.xml > +++

Re: [libvirt] [RFC PATCH 6/6] qemu: Format pseries.cap-hpt-mps on the command line

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 18:18:02 +0200, Andrea Bolognani wrote: > This makes the feature fully functional. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571078 > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_command.c | 26

Re: [libvirt] [RFC PATCH 2/6] conf: Tweak HPT parsing and formatting

2018-05-23 Thread Peter Krempa
On Wed, May 23, 2018 at 18:17:58 +0200, Andrea Bolognani wrote: > This doesn't seem very useful at the moment, but it will make > sense once we introduce another HPT-related setting. > > The output XML is decoupled from the input XML in preparation > of future changes as well; while doing so, we

Re: [libvirt] [RFC PATCH 5/6] conf: Parse and format HPT maxpagesize

2018-05-23 Thread Andrea Bolognani
On Wed, 2018-05-23 at 18:36 +0200, Peter Krempa wrote: > On Wed, May 23, 2018 at 18:18:01 +0200, Andrea Bolognani wrote: > > +def->hpt_maxpagesize = VIR_ROUND_UP(def->hpt_maxpagesize, > > 1024); > > The code in the patch using it with qemu actually expects so this is a > power of 2,

Re: [libvirt] [PATCH] Fix memory leak issues in virshAllocpagesPagesizeCompleter.

2018-05-23 Thread Michal Privoznik
On 05/23/2018 02:40 PM, Roland Schulz wrote: > Signed-off-by: Roland Schulz > --- > tools/virsh-completer.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c > index 1435d1d4c..c72f3bcad

[libvirt] Issue

2018-05-23 Thread Mehdi AROUI
HEllo, I try to install libvirt-python in my windows 10, with version 3.6 of python, but I have the message * pkg-config binary is required to compile libvirt-python* how to fix that. thanks in advance regards. -- libvir-list mailing list libvir-list@redhat.com

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

2018-05-23 Thread Ján Tomko
On Tue, May 22, 2018 at 04:44:49PM -0400, Stefan Berger wrote: 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 ---

Re: [libvirt] [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-23 Thread Daniel Henrique Barboza
On 05/21/2018 03:14 PM, Eduardo Habkost wrote: Issue#2: the flag isn't a property of the target. Due to -no-acpi, it's not even a property of the machine type. If it was, query-machines would be the natural owner of the flag. Perhaps query-machines is still the proper owner. The value of

Re: [libvirt] [PATCH 04/22] virsh: Enhance documentation of cpu-models command

2018-05-23 Thread Kashyap Chamarthy
On Wed, May 23, 2018 at 02:43:23PM +0200, Jiri Denemark wrote: > On Wed, May 23, 2018 at 13:08:51 +0200, Kashyap Chamarthy wrote: > > On Wed, May 16, 2018 at 10:39:23AM +0200, Jiri Denemark wrote: > > > Signed-off-by: Jiri Denemark > > > --- > > > tools/virsh.pod | 8

[libvirt] [PATCH] news: Add TLS non-shared storage migration

2018-05-23 Thread Peter Krempa
Signed-off-by: Peter Krempa --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 8f2c7d5dff..329b1c7129 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -54,6 +54,16 @@ a QEMU virtual machine.

Re: [libvirt] [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-23 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, May 23, 2018 at 11:17:55AM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> > On Mon, May 21, 2018 at 04:46:36PM -0300, Daniel Henrique Barboza wrote: > [...] >> >> Since no objection was made back then,

Re: [libvirt] [PATCH 10/12] conf: Add support for choosing emulation of a TPM 2

2018-05-23 Thread Ján Tomko
On Tue, May 22, 2018 at 04:44:51PM -0400, Stefan Berger wrote: This patch extends the TPM's device XML with TPM 2 support. This only works for the emulator type backend and looks as follows: The swtpm process now has --tpm2 as an additional parameter:

Re: [libvirt] AppArmor support for TPM emulator; was:Re: [PATCH 00/12] Add support for TPM emulator

2018-05-23 Thread John Ferlan
On 05/23/2018 09:20 AM, Stefan Berger wrote: > On 05/23/2018 08:07 AM, John Ferlan wrote: >> >> On 05/22/2018 04:44 PM, 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 >>>

Re: [libvirt] [PATCH 10/12] conf: Add support for choosing emulation of a TPM 2

2018-05-23 Thread Stefan Berger
On 05/23/2018 11:55 AM, Ján Tomko wrote: On Tue, May 22, 2018 at 04:44:51PM -0400, Stefan Berger wrote: This patch extends the TPM's device XML with TPM 2 support. This only works for the emulator type backend and looks as follows:       The swtpm process now has --tpm2 as an

Re: [libvirt] [RFC PATCH 6/6] qemu: Format pseries.cap-hpt-mps on the command line

2018-05-23 Thread Andrea Bolognani
On Wed, 2018-05-23 at 18:40 +0200, Peter Krempa wrote: > On Wed, May 23, 2018 at 18:18:02 +0200, Andrea Bolognani wrote: > > +/* QEMU expects the argument to be a number of left shifts: > > + * for example, if you wanted to limit the guest to 4 KiB > > pages, > > +

Re: [libvirt] [PATCH 06/12] qemu: Extend QEMU with external TPM support

2018-05-23 Thread Stefan Berger
On 05/23/2018 11:41 AM, Ján Tomko wrote: On Tue, May 22, 2018 at 04:44:47PM -0400, Stefan Berger wrote: 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

Re: [libvirt] [PATCH 04/22] virsh: Enhance documentation of cpu-models command

2018-05-23 Thread Jiri Denemark
On Wed, May 23, 2018 at 16:53:37 +0200, Kashyap Chamarthy wrote: > On Wed, May 23, 2018 at 02:43:23PM +0200, Jiri Denemark wrote: > > On Wed, May 23, 2018 at 13:08:51 +0200, Kashyap Chamarthy wrote: > > > On Wed, May 16, 2018 at 10:39:23AM +0200, Jiri Denemark wrote: > > > > Signed-off-by: Jiri

Re: [libvirt] AppArmor support for TPM emulator; was:Re: [PATCH 00/12] Add support for TPM emulator

2018-05-23 Thread Stefan Berger
On 05/23/2018 02:03 PM, John Ferlan wrote: On 05/23/2018 09:20 AM, Stefan Berger wrote: On 05/23/2018 08:07 AM, John Ferlan wrote: On 05/22/2018 04:44 PM, Stefan Berger wrote: This series of patches adds support for the TPM emulator backend that is available in QEMU and based on swtpm +