Re: [libvirt] [PATCH v4 1/8] qemu_monitor: helper functions for CPU models

2019-07-25 Thread Collin Walling
Thanks for taking the time to review these! On 7/24/19 12:18 PM, Boris Fiuczynski wrote: Reviewed-by: Boris Fiuczynski On 7/17/19 4:03 PM, Collin Walling wrote: [...] -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v4 8/8] qemu_driver: hook up query-cpu-model-comparison

2019-07-25 Thread Collin Walling
[...] + +virCPUCompareResult +virQEMUCapsCPUModelComparison(virQEMUCapsPtr qemuCaps, +  const char *libDir, +  uid_t runUid, +  gid_t runGid, +  virCPUDefPtr cpu_a, +  

Re: [libvirt] [PATCH v4 5/8] qemu_monitor: implement query-cpu-model-comparison

2019-07-25 Thread Collin Walling
On 7/24/19 12:18 PM, Boris Fiuczynski wrote: On 7/17/19 4:03 PM, Collin Walling wrote: [...] diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index b599ee6..3c33c63 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5875,6 +5875,101 @@

[libvirt] [PATCH v7 10/19] utils: Implement function to pass a buffer to send via a fd to virCommand

2019-07-25 Thread Stefan Berger
Implement virCommandSetSendBuffer() that allows the caller to pass a file descriptor and buffer to virCommand. virCommand will write the buffer into the file descriptor. That file descriptor could be the write end of a pipe or one of the file descriptors of a socketpair. The other file descriptor

[libvirt] [PATCH v7 15/19] tpm: Use fd to pass password to swtpm_setup and swtpm

2019-07-25 Thread Stefan Berger
Allow vTPM state encryption when swtpm_setup and swtpm support passing a passphrase using a file descriptor. This patch enables the encryption of the vTPM state only. It does not encrypt the state during migration, so the destination secret does not need to have the same password at this point.

[libvirt] [PATCH v7 09/19] tpm: Parse the capabilities supported by swtpm and swtpm_setup

2019-07-25 Thread Stefan Berger
Run 'swtpm socket --print-capabilities' and 'swtpm_setup --print-capabilities' to get the JSON object of the features the programs are supporting and parse them into a bitmap. Signed-off-by: Stefan Berger --- include/libvirt/virterror.h | 2 + src/libvirt_private.syms| 2 +

[libvirt] [PATCH v7 03/19] conf: Extend TPM XML parser with encryption support

2019-07-25 Thread Stefan Berger
Extend the TPM device XML parser and XML generator with emulator state encryption support. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- docs/schemas/domaincommon.rng | 11 +++ src/conf/domain_conf.c| 31 ++- src/conf/domain_conf.h

[libvirt] [PATCH v7 07/19] tpm: Refactor virTPMEmulatorInit to use loop

2019-07-25 Thread Stefan Berger
Refactor virTPMEmulatorInit to use a loop with parameters. This allows for easier extension later on. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- src/util/virtpm.c | 82 +-- 1 file changed, 37 insertions(+), 45 deletions(-) diff

[libvirt] [PATCH v7 13/19] utils: Extend virCommandProcessIO to include the send buffers

2019-07-25 Thread Stefan Berger
Extend virCommandProcessIO to include the send buffers in the poll loop. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- src/util/vircommand.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/src/util/vircommand.c

[libvirt] [PATCH v7 12/19] utils: Mark inpipe as non-blocking

2019-07-25 Thread Stefan Berger
Mark a virCommand's inpipe (write-end of pipe) as non-blocking so that it will never block when we were to try to write too many bytes to it while it doesn't have the capacity to hold them. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- src/util/vircommand.c | 13

[libvirt] [PATCH v7 06/19] tpm: Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c

2019-07-25 Thread Stefan Berger
Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c and introduce a few functions to query the executables needed for virCommands. Add locking to protect the tool paths and return a copy of the tool paths to callers wanting to access them so that we can run the initialization function

[libvirt] [PATCH v7 08/19] tpm: Check whether previously found executables were updated

2019-07-25 Thread Stefan Berger
Check whether previously found executables were updated and if so look for them again. This helps to use updated features of swtpm and its tools upon updating them. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- src/qemu/qemu_tpm.c | 1 + src/util/virtpm.c | 34

[libvirt] [PATCH v7 17/19] tpm: Check TPM XML device configuration changes after edit

2019-07-25 Thread Stefan Berger
Since swtpm does not support getting started without password once it was created with encryption enabled, we don't allow encryption to be removed. Similarly, we do not allow encryption to be added once swtpm has run. We also prevent chaning the type of the TPM backend since the encrypted state is

[libvirt] [PATCH v7 18/19] docs: Extend Secret XML documentation with vtpm usage type

2019-07-25 Thread Stefan Berger
Extend the Secret XML documentation with vtpm usage type. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- docs/formatsecret.html.in | 61 +-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH v7 01/19] secret: Add support for usage type vTPM, extend schema and test case

2019-07-25 Thread Stefan Berger
Add support for usage type vTPM to secret. Extend the schema for the Secret to support the vTPM usage type and add a test case for parsing the Secret with usage type vTPM. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- docs/schemas/secret.rng

[libvirt] [PATCH v7 05/19] tests: Add tests for QEMU command line generation with encrypted TPM

2019-07-25 Thread Stefan Berger
The QEMU command line does not change when TPM state is encrypted compared to when it is plain. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- .../tpm-emulator-tpm2-enc.x86_64-latest.args | 35 +++ tests/qemuxml2argvtest.c

[libvirt] [PATCH v7 19/19] docs: Extend TPM docs with new encryption element

2019-07-25 Thread Stefan Berger
Describe the encryption element in the TPM's domain XML. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- docs/formatdomain.html.in | 12 1 file changed, 12 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index

[libvirt] [PATCH v7 00/19] Add support for vTPM state encryption

2019-07-25 Thread Stefan Berger
This series of patches addresses the RFE in BZ 172830: https://bugzilla.redhat.com/show_bug.cgi?id=1728030 This series of patches adds support for vTPM state encryption by passing the read-end of a pipe's file descriptor to 'swtpm_setup' and 'swtpm' where they can read a passphrase from and

[libvirt] [PATCH v7 02/19] tests: Add already existing test case tpm-emulator-tpm2

2019-07-25 Thread Stefan Berger
Add an already existing test case tpm-emulator-tpm2 to qemuxml2xmltest.c Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- tests/qemuxml2xmltest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemuxml2xmltest.c

[libvirt] [PATCH v7 14/19] tests: Extend command test to transfer large data to process on multiple fds

2019-07-25 Thread Stefan Berger
Add a test case to commandtest.c to test the transfer of data to a process who received the read-end of pipes' file descriptors. Transfer large (128 kb) byte streams. Extend the commandhelper.c with support for --readfd command line parameter and convert the data receive loop to use poll and

[libvirt] [PATCH v7 04/19] tests: Add test for TPM XML encryption parser and formatter

2019-07-25 Thread Stefan Berger
Add a test case for the TPM XML encryption parser and formatter. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- .../tpm-emulator-tpm2-enc.xml | 32 + .../tpm-emulator-tpm2-enc.xml | 36

[libvirt] [PATCH v7 16/19] tpm: Pass migration key passphrase via fd to swtpm

2019-07-25 Thread Stefan Berger
This patch now passes the passphrase as a migration key to swtpm. This now encrypts the state of the TPM while a VM is migrated between hosts or when suspended into a file. Since the migration key secret is the same as the state encryption secret, this now requires that the migration destination

[libvirt] [PATCH v7 11/19] utils: Convert pollfd array to be allocated

2019-07-25 Thread Stefan Berger
Convert the struct pollfd *fds to be allocated rather than residing on the stack. This prepares it for the next patch where the size of the array of fds becomes dynamic. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- src/util/vircommand.c | 5 - 1 file changed, 4

[libvirt] [PATCH v2 6/7] tests: qemu: Add test case for pci-hostdev hotplug

2019-07-25 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/util/virprocess.h | 2 +- tests/Makefile.am | 7 +++ tests/qemuhotplugtest.c | 42 +-

[libvirt] [PATCH v2 5/7] virpcimock: Mock the SRIOV Virtual functions

2019-07-25 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat The softlink to physfn is the way to know if the device is VF or not. So, the patch softlinks 'physfn' to the parent function. The multifunction PCI devices dont have 'physfn' softlinks. The patch adds few Virtual functions to the mock environment and changes the

[libvirt] [PATCH v2 3/7] util/virhostdev: enhance VFIO device is in use detection

2019-07-25 Thread Daniel Henrique Barboza
The current virHostdevPreparePCIDevices code fails to detect an unmanaged VFIO device that is in the activePCIHostdevs, and active in the same domain name as dom_name, as a device in use. Considering a call to this function, when activePCIHostdevs has a VFIO deviceA in the list, and deviceA is

Re: [libvirt] [PATCH v6 10/19] utils: Implement function to pass a buffer to send via a fd to virCommand

2019-07-25 Thread Stefan Berger
On 7/25/19 1:34 PM, Daniel P. Berrangé wrote: On Thu, Jul 25, 2019 at 10:30:24AM -0400, Stefan Berger wrote: Implement virCommandSetSendBuffer() that allows the caller to pass a file descriptor and buffer to virCommand. virCommand will write the buffer into the file descriptor. That file

[libvirt] [PATCH v2 4/7] virpcitest: Change the stub driver to vfio from pci-stub

2019-07-25 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat The pci-stub is obsolete for a while now. Upcoming test cases try to test the VFIO hotplug/unplug cases. Change the default test driver to vfio-pci instead of pci-stub, and fail bind for pci-stub instead. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel

[libvirt] [PATCH v2 7/7] tests: Add a baseline test for multifunction pci device use case

2019-07-25 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat There are already good number of test cases with hostdevices, few have multifunction devices but none having more than one than one multifunction cards. This patch adds a case where there are two multifunction cards and two Virtual functions part of the same XML.

[libvirt] [PATCH v2 0/7] PCI Multifunction hotplug/unplug, part 1

2019-07-25 Thread Daniel Henrique Barboza
v2: - rebased without 3 patches from Michal that are under review in his NVMe patch series This is the first part of the feature discussed at [1]. These patches are mostly cleanup and fixes, thus it is beneficial to have them upstream right away. The whole feature can be checked out at [2]. All

[libvirt] [PATCH v2 1/7] tests: Fix the iommu group path in mock pci

2019-07-25 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat The mocked path falls into /sys/bus/kernel/iommu_groups instead of /sys/kernel/iommu_groups. Needed for adding some new test cases. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- tests/virpcimock.c | 4 ++-- 1 file changed, 2

[libvirt] [PATCH v2 2/7] tests: pci: Mock the iommu groups and vfio

2019-07-25 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat The iommu group, /dev/vfio/ behaviors of the host are mocked. This patch implements support for multifunction/multiple devices per iommu groups and emulates the /dev/vfio/ file correctly. This code helps adding necessary testcases for pci-hotplug code. Signed-off-by:

Re: [libvirt] [PATCH v6 10/19] utils: Implement function to pass a buffer to send via a fd to virCommand

2019-07-25 Thread Daniel P . Berrangé
On Thu, Jul 25, 2019 at 10:30:24AM -0400, Stefan Berger wrote: > Implement virCommandSetSendBuffer() that allows the caller to pass a > file descriptor and buffer to virCommand. virCommand will write the > buffer into the file descriptor. That file descriptor could be the > write end of a pipe or

Re: [libvirt] [PATCH 03/41] build: collapse rules adding augeas tests to CLEANFILES

2019-07-25 Thread Andrea Bolognani
On Tue, 2019-07-23 at 17:02 +0100, Daniel P. Berrangé wrote: > +++ b/src/locking/Makefile.inc.am > @@ -74,7 +74,7 @@ SYSCONF_FILES += locking/virtlockd.sysconf > PODFILES += locking/virtlockd.pod > MANINFILES += virtlockd.8.in > > -CLEANFILES += test_virtlockd.aug $(man8_MANS) > +CLEANFILES +=

Re: [libvirt] [PATCH 02/41] build: create all augeas test files in same dir as their source

2019-07-25 Thread Andrea Bolognani
On Tue, 2019-07-23 at 17:02 +0100, Daniel P. Berrangé wrote: > +++ b/src/bhyve/Makefile.inc.am > @@ -49,17 +49,18 @@ libvirt_driver_bhyve_impl_la_SOURCES = > $(BHYVE_DRIVER_SOURCES) > > conf_DATA += bhyve/bhyve.conf > augeas_DATA += bhyve/libvirtd_bhyve.aug > -augeastest_DATA +=

Re: [libvirt] [Qemu-devel] [PATCH v3] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-25 Thread John Snow
On 7/25/19 2:06 AM, Markus Armbruster wrote: > John Snow writes: > >> On 7/24/19 12:47 AM, Markus Armbruster wrote: >>> John Snow writes: >>> From: Vladimir Sementsov-Ogievskiy Let's add a possibility to query dirty-bitmaps not only on root nodes. It is useful when

Re: [libvirt] [PATCH 2/4] test_driver: implement virDomainDelIOThread

2019-07-25 Thread Erik Skultety
On Tue, Jul 23, 2019 at 12:17:55PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 72 ++ > 1 file changed, 72 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index

Re: [libvirt] [PATCH 4/4] test_driver: implement virDomainGetIOThreadInfo

2019-07-25 Thread Erik Skultety
On Tue, Jul 23, 2019 at 12:17:57PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 74 ++ > 1 file changed, 74 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index

Re: [libvirt] [PATCH 01/41] build: make augeas-gentest.pl write to stdout

2019-07-25 Thread Andrea Bolognani
On Tue, 2019-07-23 at 17:02 +0100, Daniel P. Berrangé wrote: > The augeas-gentest.pl program merges a config file into a augeas > file, saving the output to a new file. It is going to be useful > to further process the output file, and it would be easier if this can > be done with a pipeline, so

Re: [libvirt] [PATCH 36/41] remote: open secondary drivers via remote driver if needed

2019-07-25 Thread Daniel P . Berrangé
On Tue, Jul 23, 2019 at 05:03:14PM +0100, Daniel P. Berrangé wrote: > When the client has a connection to one of the hypervisor specific > daemons (eg virtqemud), the app may still expect to use the secondary > driver APIs (storage, network, etc). None of these will be registered in > the

Re: [libvirt] [PATCH] README: fix license typo

2019-07-25 Thread Ján Tomko
Your e-mail address in the From: field is in all caps. On Thu, Jul 25, 2019 at 02:55:05PM +, Jim Fehlig wrote: The README contains a reference to GPL 2.1, which does not exist. COPYING contains 2.0 so change the README to follow. Signed-off-by: Jim Fehlig --- README.md | 2 +- 1 file

Re: [libvirt] [PATCH] README: fix license typo

2019-07-25 Thread Daniel P . Berrangé
On Thu, Jul 25, 2019 at 02:55:05PM +, Jim Fehlig wrote: > The README contains a reference to GPL 2.1, which does not exist. > COPYING contains 2.0 so change the README to follow. > > Signed-off-by: Jim Fehlig > --- > README.md | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

[libvirt] [PATCH] README: fix license typo

2019-07-25 Thread Jim Fehlig
The README contains a reference to GPL 2.1, which does not exist. COPYING contains 2.0 so change the README to follow. Signed-off-by: Jim Fehlig --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1271843cb1..4d1e86259d 100644 ---

[libvirt] [PATCH v6 16/19] tpm: Pass migration key passphrase via fd to swtpm

2019-07-25 Thread Stefan Berger
This patch now passes the passphrase as a migration key to swtpm. This now encrypts the state of the TPM while a VM is migrated between hosts or when suspended into a file. Since the migration key secret is the same as the state encryption secret, this now requires that the migration destination

[libvirt] [PATCH v6 13/19] utils: Extend virCommandProcessIO to include the send buffers

2019-07-25 Thread Stefan Berger
Extend virCommandProcessIO to include the send buffers in the poll loop. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- src/util/vircommand.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/src/util/vircommand.c

[libvirt] [PATCH v6 19/19] docs: Extend TPM docs with new encryption element

2019-07-25 Thread Stefan Berger
Describe the encryption element in the TPM's domain XML. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- docs/formatdomain.html.in | 12 1 file changed, 12 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index

[libvirt] [PATCH v6 09/19] tpm: Parse the capabilities supported by swtpm and swtpm_setup

2019-07-25 Thread Stefan Berger
Run 'swtpm socket --print-capabilities' and 'swtpm_setup --print-capabilities' to get the JSON object of the features the programs are supporting and parse them into a bitmap. Signed-off-by: Stefan Berger --- include/libvirt/virterror.h | 2 + src/libvirt_private.syms| 2 +

[libvirt] [PATCH v6 07/19] tpm: Refactor virTPMEmulatorInit to use loop

2019-07-25 Thread Stefan Berger
Refactor virTPMEmulatorInit to use a loop with parameters. This allows for easier extension later on. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- src/util/virtpm.c | 82 +-- 1 file changed, 37 insertions(+), 45 deletions(-) diff

[libvirt] [PATCH v6 14/19] tests: Extend command test to transfer large data to process on multiple fds

2019-07-25 Thread Stefan Berger
Add a test case to commandtest.c to test the transfer of data to a process who received the read-end of pipes' file descriptors. Transfer large (128 kb) byte streams. Extend the commandhelper.c with support for --readfd command line parameter and convert the data receive loop to use poll and

[libvirt] [PATCH v6 00/19] Add support for vTPM state encryption

2019-07-25 Thread Stefan Berger
This series of patches addresses the RFE in BZ 172830: https://bugzilla.redhat.com/show_bug.cgi?id=1728030 This series of patches adds support for vTPM state encryption by passing the read-end of a pipe's file descriptor to 'swtpm_setup' and 'swtpm' where they can read a passphrase from and

[libvirt] [PATCH v6 04/19] tests: Add test for TPM XML encryption parser and formatter

2019-07-25 Thread Stefan Berger
Add a test case for the TPM XML encryption parser and formatter. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- .../tpm-emulator-tpm2-enc.xml | 32 + .../tpm-emulator-tpm2-enc.xml | 36

[libvirt] [PATCH v6 17/19] tpm: Check TPM XML device configuration changes after edit

2019-07-25 Thread Stefan Berger
Since swtpm does not support getting started without password once it was created with encryption enabled, we don't allow encryption to be removed. Similarly, we do not allow encryption to be added once swtpm has run. We also prevent chaning the type of the TPM backend since the encrypted state is

[libvirt] [PATCH v6 11/19] utils: Convert pollfd array to be allocated

2019-07-25 Thread Stefan Berger
Convert the struct pollfd *fds to be allocated rather than residing on the stack. This prepares it for the next patch where the size of the array of fds becomes dynamic. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- src/util/vircommand.c | 5 - 1 file changed, 4

[libvirt] [PATCH v6 18/19] docs: Extend Secret XML documentation with vtpm usage type

2019-07-25 Thread Stefan Berger
Extend the Secret XML documentation with vtpm usage type. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- docs/formatsecret.html.in | 61 +-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH v6 01/19] secret: Add support for usage type vTPM, extend schema and test case

2019-07-25 Thread Stefan Berger
Add support for usage type vTPM to secret. Extend the schema for the Secret to support the vTPM usage type and add a test case for parsing the Secret with usage type vTPM. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- docs/schemas/secret.rng

[libvirt] [PATCH v6 15/19] tpm: Use fd to pass password to swtpm_setup and swtpm

2019-07-25 Thread Stefan Berger
Allow vTPM state encryption when swtpm_setup and swtpm support passing a passphrase using a file descriptor. This patch enables the encryption of the vTPM state only. It does not encrypt the state during migration, so the destination secret does not need to have the same password at this point.

[libvirt] [PATCH v6 05/19] tests: Add tests for QEMU command line generation with encrypted TPM

2019-07-25 Thread Stefan Berger
The QEMU command line does not change when TPM state is encrypted compared to when it is plain. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- .../tpm-emulator-tpm2-enc.x86_64-latest.args | 35 +++ tests/qemuxml2argvtest.c

[libvirt] [PATCH v6 10/19] utils: Implement function to pass a buffer to send via a fd to virCommand

2019-07-25 Thread Stefan Berger
Implement virCommandSetSendBuffer() that allows the caller to pass a file descriptor and buffer to virCommand. virCommand will write the buffer into the file descriptor. That file descriptor could be the write end of a pipe or one of the file descriptors of a socketpair. The other file descriptor

[libvirt] [PATCH v6 02/19] tests: Add already existing test case tpm-emulator-tpm2

2019-07-25 Thread Stefan Berger
Add an already existing test case tpm-emulator-tpm2 to qemuxml2xmltest.c Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- tests/qemuxml2xmltest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemuxml2xmltest.c

[libvirt] [PATCH v6 12/19] utils: Mark inpipe as non-blocking

2019-07-25 Thread Stefan Berger
Mark a virCommand's inpipe (write-end of pipe) as non-blocking so that it will never block when we were to try to write too many bytes to it while it doesn't have the capacity to hold them. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- src/util/vircommand.c | 7 +++ 1

[libvirt] [PATCH v6 08/19] tpm: Check whether previously found executables were updated

2019-07-25 Thread Stefan Berger
Check whether previously found executables were updated and if so look for them again. This helps to use updated features of swtpm and its tools upon updating them. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau --- src/qemu/qemu_tpm.c | 1 + src/util/virtpm.c | 34

[libvirt] [PATCH v6 03/19] conf: Extend TPM XML parser with encryption support

2019-07-25 Thread Stefan Berger
Extend the TPM device XML parser and XML generator with emulator state encryption support. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé --- docs/schemas/domaincommon.rng | 11 +++ src/conf/domain_conf.c| 31 ++- src/conf/domain_conf.h

[libvirt] [PATCH v6 06/19] tpm: Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c

2019-07-25 Thread Stefan Berger
Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c and introduce a few functions to query the executables needed for virCommands. Add locking to protect the tool paths and return a copy of the tool paths to callers wanting to access them so that we can run the initialization function

[libvirt] [PATCH RFC 09/11] cpu: Validate ARM CPU features

2019-07-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/cpu/cpu_arm.c | 171 ++ 1 file changed, 171 insertions(+) diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index 65d69c00af..fd504c8aef 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -23,7 +23,9 @@

[libvirt] [PATCH RFC 11/11] news: Update for ARM CPU features

2019-07-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 1134309ec2..c8c2174e22 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -63,6 +63,15 @@ bochs-display device that was added in qemu

[libvirt] [PATCH RFC 06/11] qemu: Update query-cpu-model-expansion check

2019-07-25 Thread Andrea Bolognani
CPU features are available on ARM only wherever the query-cpu-model-expansion QMP command is available, same as on s390. Update qemuBuildCpuModelArgStr() to reflect this fact. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[libvirt] [PATCH RFC 08/11] cpu_map: Introduce ARM CPU features

2019-07-25 Thread Andrea Bolognani
The only feature we care about for the moment is SVE vector lengths. Signed-off-by: Andrea Bolognani --- src/cpu_map/arm_features.xml | 21 + src/cpu_map/index.xml| 4 2 files changed, 25 insertions(+) create mode 100644 src/cpu_map/arm_features.xml diff

[libvirt] [PATCH RFC 10/11] tests: Introduce tests for ARM CPU features

2019-07-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- .../aarch64-features-sve.aarch64-latest.args | 32 +++ .../qemuxml2argvdata/aarch64-features-sve.xml | 20 .../aarch64-features-wrong.xml| 17 ++ tests/qemuxml2argvtest.c | 7 4

[libvirt] [PATCH RFC 07/11] qemu: Perform full expansion on ARM

2019-07-25 Thread Andrea Bolognani
The ARM implementation of query-cpu-model-expansion only supports full expansion, so we have to make sure we're using that expansion mode if we want to obtain any useful data. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 7 +-

[libvirt] [PATCH RFC 04/11] qemu: Introduce QEMU_CAPS_ARM_MAX_CPU

2019-07-25 Thread Andrea Bolognani
Mirrors the existing QEMU_CAPS_X86_MAX_CPU. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +

[libvirt] [PATCH RFC 00/11] qemu: Introduce support for ARM CPU features

2019-07-25 Thread Andrea Bolognani
This series is RFC because the corresponding QEMU patches[1] have not been merged yet, and since QEMU is currently in the middle of the 4.1.0 freeze we can't really expect to merge them until 5.7.0 anyway. With that in mind, a few patches are somewhat independent of the rest and could, after some

[libvirt] [PATCH RFC 05/11] qemu: Query max-arm-cpu properties

2019-07-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 3 + .../caps_2.12.0.aarch64.replies | 159 ++-- .../caps_4.0.0.aarch64.replies| 159 ++-- .../caps_4.1.0.aarch64.replies| 235 -- 4

[libvirt] [PATCH RFC 01/11] tests: Update replies for QEMU 2.12.0 on aarch64

2019-07-25 Thread Andrea Bolognani
We have some early replies that don't quite match with how QEMU 2.12.0 as released behaves. Signed-off-by: Andrea Bolognani --- .../caps_2.12.0.aarch64.replies | 165 -- .../caps_2.12.0.aarch64.xml | 4 +- 2 files changed, 109 insertions(+), 60

[libvirt] [PATCH RFC 03/11] qemu: Rename virQEMUCapsObjectPropsMaxX86CPU

2019-07-25 Thread Andrea Bolognani
We're going to use it on non-x86 soon, so it needs a more generic name: virQEMUCapsObjectPropsMaxCPU. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

Re: [libvirt] [PATCH v5 14/20] utils: Extend virCommandProcessIO to include the send buffers

2019-07-25 Thread Stefan Berger
On 7/25/19 5:48 AM, Daniel P. Berrangé wrote: On Fri, Jul 12, 2019 at 12:23:48PM -0400, Stefan Berger wrote: Extend virCommandProcessIO to include the send buffers in the poll loop. Signed-off-by: Stefan Berger --- src/util/vircommand.c | 62 ++- 1

Re: [libvirt] [PATCH 1/4] test_driver: implement virDomainAddIOThread

2019-07-25 Thread Erik Skultety
On Tue, Jul 23, 2019 at 12:17:54PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- ... > + > +if (VIR_ALLOC(iothrid) < 0) > +goto cleanup; > + > +iothrid->iothread_id = iothread_id; > + > +if (VIR_APPEND_ELEMENT_COPY(def->iothreadids, def->niothreadids, >

[libvirt] [PATCH 4/6] conf: add support for Direct Mode for Hyper-V Synthetic timers

2019-07-25 Thread Vitaly Kuznetsov
Support 'Direct Mode' for Hyper-V Synthetic Timers in domain config. Make it 'stimer' enlightenment option as it is not a separate thing. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 10 ++- docs/schemas/domaincommon.rng | 16 +++- src/conf/domain_conf.c| 138

[libvirt] [PATCH 5/6] qemu: add support for Direct Mode for Hyper-V Synthetic timers

2019-07-25 Thread Vitaly Kuznetsov
QEMU-4.1 supports 'Direct Mode' for Hyper-V synthetic timers (hv-stimer-direct CPU flag): Windows guests can request that timer expiration notifications are delivered as normal interrupts (and not VMBus messages). This is used by Hyper-V on KVM. Signed-off-by: Vitaly Kuznetsov ---

[libvirt] [PATCH 1/6] docs: formatdomain: add synic flag to the example xml

2019-07-25 Thread Vitaly Kuznetsov
The example XML we have contains all other Hyper-V Enlightenments but 'stimer' is missing. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 1d57729394..0aedd9efbb 100644

[libvirt] [PATCH 6/6] news: mention Direct Mode for Hyper-V Synthetic timers support

2019-07-25 Thread Vitaly Kuznetsov
The QEMU driver now supports Direct Mode for Hyper-V Synthetic timers for Hyper-V guests. Signed-off-by: Vitaly Kuznetsov --- docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 1134309ec2..e4d8f1ecac 100644 --- a/docs/news.xml +++

[libvirt] [PATCH 3/6] docs: formatdomain: move 'msrs' out of Hyper-V Enlightenments

2019-07-25 Thread Vitaly Kuznetsov
'msrs' is a feature unrelated to Hyper-V Enlightenments, the commit message which added it and the test have it right: ... ... Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[libvirt] [PATCH 2/6] docs: formatdomain: fix 'SynIC' spelling

2019-07-25 Thread Vitaly Kuznetsov
SynIC stands for 'Synthetic Interrupt Controller', it is not a NIC. Fix the spelling in accordance with Hypervisor Top Level Functional Specification. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 0/6] Add support for Direct Mode for Hyper-V Synthetic timers

2019-07-25 Thread Vitaly Kuznetsov
QEMU-4.1 will bring us Direct Mode for Hyper-V Synthetic timers support, we need to support it in libvirt too. As this is not a new enlightenment but rather an enhancement of an existing one ('stimer'), support it in form. Backwards compatibility is (hopefully) preserved.

Re: [libvirt] [PATCH v5 17/20] tpm: Pass migration key passphrase via fd to swtpm

2019-07-25 Thread Stefan Berger
On 7/25/19 5:58 AM, Daniel P. Berrangé wrote: On Fri, Jul 12, 2019 at 12:23:51PM -0400, Stefan Berger wrote: This patch now passes the passphrase as a migration key to swtpm. This now encrypts the state of the TPM while a VM is migrated between hosts or when suspended into a file. Since the

Re: [libvirt] [PATCH 1/4] test_driver: implement virDomainAddIOThread

2019-07-25 Thread Erik Skultety
On Thu, Jul 25, 2019 at 02:09:01PM +0200, Erik Skultety wrote: > On Tue, Jul 23, 2019 at 12:17:54PM +0200, Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > > --- > > One more thing, this patch will break virsh-optparse again, more specifically > some of the cpu-stats tests (yeah, those

Re: [libvirt] [PATCH 2/3] conf: remove outdated comment

2019-07-25 Thread Peter Krempa
On Thu, Jul 25, 2019 at 14:09:11 +0200, Ján Tomko wrote: > When using the ENUM macros, the compiler guards that the declaration > and implementation are in sync. > > Signed-off-by: Ján Tomko > --- > src/conf/domain_conf.h | 1 - > 1 file changed, 1 deletion(-) ACK signature.asc Description:

Re: [libvirt] [PATCH 1/3] virsh: clean up includes

2019-07-25 Thread Peter Krempa
On Thu, Jul 25, 2019 at 14:09:10 +0200, Ján Tomko wrote: > We don't need domain_conf or libvirt-{qemu,lxc} in these generic files. > > Signed-off-by: Ján Tomko > --- > tools/virsh.c | 3 --- > tools/vsh.c | 3 --- > 2 files changed, 6 deletions(-) ACK signature.asc Description: PGP

Re: [libvirt] [PATCH 3/3] conf: remove reference to VIR_DOMAIN_RNG_BACKEND_POOL

2019-07-25 Thread Peter Krempa
On Thu, Jul 25, 2019 at 14:09:12 +0200, Ján Tomko wrote: > Sadly, this brilliant idea never got implemented: > https://www.fit.vutbr.cz/study/DP/DP.php.en?id=14418 > > Signed-off-by: Ján Tomko > --- ACK if you remove the irrelevant forgotten history from the commit message. signature.asc

[libvirt] [PATCH 3/3] conf: remove reference to VIR_DOMAIN_RNG_BACKEND_POOL

2019-07-25 Thread Ján Tomko
Sadly, this brilliant idea never got implemented: https://www.fit.vutbr.cz/study/DP/DP.php.en?id=14418 Signed-off-by: Ján Tomko --- src/conf/domain_conf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 00ff734ff0..822f9af265 100644 ---

Re: [libvirt] [PATCH] test_driver: implement virDomainGetCPUStats

2019-07-25 Thread Daniel P . Berrangé
On Thu, Jul 25, 2019 at 02:00:56PM +0200, Erik Skultety wrote: > On Thu, Jul 18, 2019 at 12:02:43PM +0200, Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > > --- > > src/test/test_driver.c | 131 + > > 1 file changed, 131 insertions(+) > > > >

[libvirt] [PATCH 1/3] virsh: clean up includes

2019-07-25 Thread Ján Tomko
We don't need domain_conf or libvirt-{qemu,lxc} in these generic files. Signed-off-by: Ján Tomko --- tools/virsh.c | 3 --- tools/vsh.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index b41304a888..c758e38cbd 100644 --- a/tools/virsh.c +++

[libvirt] [PATCH 0/3] domain_conf related trivial cleanups

2019-07-25 Thread Ján Tomko
Ján Tomko (3): virsh: clean up includes conf: remove outdated comment conf: remove reference to VIR_DOMAIN_RNG_BACKEND_POOL src/conf/domain_conf.h | 2 -- tools/virsh.c | 3 --- tools/vsh.c| 3 --- 3 files changed, 8 deletions(-) -- 2.19.2 -- libvir-list mailing

Re: [libvirt] [PATCH 1/4] test_driver: implement virDomainAddIOThread

2019-07-25 Thread Erik Skultety
On Tue, Jul 23, 2019 at 12:17:54PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- One more thing, this patch will break virsh-optparse again, more specifically some of the cpu-stats tests (yeah, those are very bad tests). The offending ones need to be removed in a standalone

[libvirt] [PATCH 2/3] conf: remove outdated comment

2019-07-25 Thread Ján Tomko
When using the ENUM macros, the compiler guards that the declaration and implementation are in sync. Signed-off-by: Ján Tomko --- src/conf/domain_conf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 48b0af4b04..00ff734ff0 100644 ---

Re: [libvirt] [PATCH] test_driver: implement virDomainGetCPUStats

2019-07-25 Thread Erik Skultety
On Thu, Jul 18, 2019 at 12:02:43PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 131 + > 1 file changed, 131 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index

Re: [libvirt] [RFC] New domain job control and stat APIs

2019-07-25 Thread Daniel P . Berrangé
On Thu, Jul 25, 2019 at 01:52:01PM +0200, Pavel Hrdina wrote: > On Wed, Jul 24, 2019 at 03:43:14PM +0100, Daniel P. Berrangé wrote: > > [...] > > > > +typedef struct _virDomainJob virDomainJob; > > > +typedef virDomainJob *virDomainJobPtr; > > > +struct _virDomainJob { > > > +char *name; > >

Re: [libvirt] [RFC] New domain job control and stat APIs

2019-07-25 Thread Pavel Hrdina
On Wed, Jul 24, 2019 at 03:43:14PM +0100, Daniel P. Berrangé wrote: [...] > > +typedef struct _virDomainJob virDomainJob; > > +typedef virDomainJob *virDomainJobPtr; > > +struct _virDomainJob { > > +char *name; > > +virDomainJobType type; > > +virDomainJobState state; > > + > > +

Re: [libvirt] [BUG] Hyper-V Enlightenments are broken in 5.5.0+

2019-07-25 Thread Vitaly Kuznetsov
Jiri Denemark writes: > On Thu, Jul 25, 2019 at 11:09:28 +0200, Vitaly Kuznetsov wrote: >> Jiri Denemark writes: >> >> > On Wed, Jul 24, 2019 at 18:48:38 +0200, Vitaly Kuznetsov wrote: >> >> Hi, >> >> >> >> when some Hyper-V enlightenments are added to the domain configuration, >> >> e.g. >>

Re: [libvirt] [PATCH v5 20/20] docs: Extend TPM docs with new encryption element

2019-07-25 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:54PM -0400, Stefan Berger wrote: > Describe the encryption element in the TPM's domain XML. > > Signed-off-by: Stefan Berger > --- > docs/formatdomain.html.in | 12 > 1 file changed, 12 insertions(+) Reviewed-by: Daniel P. Berrangé Regards, Daniel

Re: [libvirt] [PATCH v5 19/20] docs: Extend Secret XML documentation with vtpm usage type

2019-07-25 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:53PM -0400, Stefan Berger wrote: > Extend the Secret XML documentation with vtpm usage type. > > Signed-off-by: Stefan Berger > Reviewed-by: Marc-André Lureau > --- > docs/formatsecret.html.in | 61 +-- > 1 file changed, 59

  1   2   >