[PATCH v2 2/4] qemu_domain.c: NUMA CPUs auto-fill for incomplete topologies

2020-06-10 Thread Daniel Henrique Barboza
2019-June/msg00263.html Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 47 ++ src/qemu/qemu_domain.h | 4 src/qemu/qemu_driver.c | 9 3 files changed, 60 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu

[PATCH v2 1/4] numa_conf.c: add helper functions for cpumap operations

2020-06-10 Thread Daniel Henrique Barboza
These helpers will be used in an auto-fill feature for incomplete NUMA topologies in the next patch. Signed-off-by: Daniel Henrique Barboza --- src/conf/numa_conf.c | 46 src/conf/numa_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files

[PATCH v7 02/10] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy'

2020-06-10 Thread Daniel Henrique Barboza
H_TPM_COMM hypercall to connect with the TPM Resource Manager, enabling the guest to open and close TPM sessions with the host TPM. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Reviewed-by: Ján Tomko Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c

[PATCH v7 08/10] qemu: build command line for the TPM Proxy device

2020-06-10 Thread Daniel Henrique Barboza
QEMU capabilities for this device again inside qemu_command.c. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_alias.c | 5 - src/qemu/qemu_command.c | 27 ++- 2 files changed, 30 insertions(+), 2 dele

[PATCH v7 07/10] tests: add XML schema tests for the TPM Proxy device

2020-06-10 Thread Daniel Henrique Barboza
This tests aims to exercise how a TPM Proxy device can be added in the domain, either alone or with a regular TPM device. It also ensures that we do not allow bogus scenarios to slip by. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- tests

[PATCH v7 01/10] docs: documentation and schema for the new TPM Proxy model

2020-06-10 Thread Daniel Henrique Barboza
for the 'passthrough' backend. An example of a TPM Proxy device connected to a TPM Resource Manager '/dev/tpmrm0' will look like this: Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in

[PATCH v7 04/10] qemu_tpm, security, tests: change 'switch' clauses for 'if'

2020-06-10 Thread Daniel Henrique Barboza
clause instead. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_tpm.c | 44 + src/security/security_selinux.c | 16 ++-- src/security/virt-aa-helper.c | 7 +- tests/qemuxml2

[PATCH v7 09/10] tests/qemuxml2argvtest.c: add TPM Proxy command line tests

2020-06-10 Thread Daniel Henrique Barboza
Add tests for both supported scenarios: a single TPM Proxy and a TPM Proxy with a regular TPM device in the same domain. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- .../ppc64-tpmproxy-single.ppc64-latest.args | 34

[PATCH v7 06/10] qemu: add validations after TPM Proxy model introduction

2020-06-10 Thread Daniel Henrique Barboza
single TPM Proxy devices And these combinations in the same domain are NOT valid: - 2 or more TPM devices - 2 or more TPM Proxy devices Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c

[PATCH v7 10/10] NEWS.rst: update for the new TPM Proxy device

2020-06-10 Thread Daniel Henrique Barboza
Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- NEWS.rst | 13 + 1 file changed, 13 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index a16903c7c3..9feb09b6bc 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -21,6 +21,19 @@ v6.5.0

[PATCH v7 05/10] conf, qemu, security, tests: introducing 'def->tpms' array

2020-06-10 Thread Daniel Henrique Barboza
adapted to handle the new array instead. virDomainDefParseXML() TPM related code was adapted to handle the parsing of an extra TPM device. TPM validations after this new scenario will be updated in the next patch. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henriq

[PATCH v7 00/10] TPM Proxy (H_TPM_COMM) support for PPC64

2020-06-10 Thread Daniel Henrique Barboza
archives/libvir-list/2020-May/msg00604.html v1 link: https://www.redhat.com/archives/libvir-list/2020-May/msg00351.html Daniel Henrique Barboza (10): docs: documentation and schema for the new TPM Proxy model qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' qemu_extdevic

[PATCH v7 03/10] qemu_extdevice.c: remove unneeded 'ret' variable

2020-06-10 Thread Daniel Henrique Barboza
qemuExtDevicesInitPaths() does not need 'ret'. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_extdevice.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_extdevice.c

Re: [libvirt PATCH] network: add private chains only if there are networks adding iptables rules

2020-06-08 Thread Daniel Henrique Barboza
On 6/8/20 5:19 PM, Laine Stump wrote: On 6/8/20 2:39 PM, Daniel Henrique Barboza wrote: On 6/5/20 2:56 PM, Laine Stump wrote: Juan Quintela noticed that when he restarted libvirt he was getting extra iptables rules added by libvirt even though he didn't have any libvirt networks that

Re: [libvirt PATCH] network: add private chains only if there are networks adding iptables rules

2020-06-08 Thread Daniel Henrique Barboza
e extraneous (but harmless) private chains would want to backport this patch (along with the other two if they aren't already there)) Signed-off-by: Laine Stump --- Reviewed-by: Daniel Henrique Barboza

[PATCH 1/1] formatdomain.html.in: link to firewall page

2020-06-08 Thread Daniel Henrique Barboza
Put a link to the firewall page in the "Virtual network" section, mentioning that the forward types 'nat', 'route' and 'isolated' will change firewall settings in the host. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 7 ++

Re: [libvirt PATCH] network: add private chains only if there are networks adding iptables rules

2020-06-08 Thread Daniel Henrique Barboza
On 6/5/20 2:56 PM, Laine Stump wrote: Juan Quintela noticed that when he restarted libvirt he was getting extra iptables rules added by libvirt even though he didn't have any libvirt networks that used iptables rules. It turns out this also happens if the firewalld service is restarted. The ex

Re: bugifx: fix some wrong usage of ATTRIBUTE_NONNULL

2020-06-08 Thread Daniel Henrique Barboza
For the attached patch: Reviewed-by: Daniel Henrique Barboza On 6/6/20 7:30 AM, Bihong Yu wrote: There are some wrong usage of ATTRIBUTE_NONNULL, which may cause the compilation fail. The ATTRIBUTE_NONNULL is the define of __attribute__((__nonnull__(m))), which declares that the input

Re: [libvirt PATCH v2] Fix some wrong usage of ATTRIBUTE_NONNULL

2020-06-08 Thread Daniel Henrique Barboza
On 6/6/20 7:52 AM, Bihong Yu wrote: There are some wrong usage of ATTRIBUTE_NONNULL, which may cause the compilation fail. The ATTRIBUTE_NONNULL is the define of __attribute__((__nonnull__(m))), which declares that the input pointer parameter of funciton should not be NULL. If we declare som

Re: [PATCH 0/5] NUMA CPUs 'auto-fill' for incomplete topologies

2020-06-08 Thread Daniel Henrique Barboza
Ping On 6/1/20 2:50 PM, Daniel Henrique Barboza wrote: Hi, This series implements a convenience feature for the case where the user defines an incomplete NUMA topology in the domain, when the sum of all cpus in each NUMA cell is less than the maximum vcpus count of the domain. This is an

Re: [PATCH v6 00/10] Introducing TPM Proxy device support for PPC64

2020-06-08 Thread Daniel Henrique Barboza
Ping On 6/2/20 10:30 AM, Daniel Henrique Barboza wrote: No functional changes made from the previous version. Just a rebase and a trivial conflict fix in news.xml after Libvirt 6.4.0 release. changes in v6: - fixed news.xml conflict after 6.4.0 release, moved the change to 6.5.0 - added

Re: [libvirt PATCH] qemu: don't reject interface update when switching to/from bridged network

2020-06-05 Thread Daniel Henrique Barboza
use a tap device connected to a bridge. Signed-off-by: Laine Stump --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 5/5] qemu_validate.c: revert NUMA CPU range user warning

2020-06-03 Thread Daniel Henrique Barboza
On 6/2/20 5:53 AM, Igor Mammedov wrote: On Mon, 1 Jun 2020 17:14:20 -0300 Daniel Henrique Barboza wrote: [...] An ideal situation would be QEMU to never accept incomplete NUMA topologies in the first place. At least with your series I can safely drop deprecated incomplete NUMA

[PATCH v6 05/10] conf, qemu, security, tests: introducing 'def->tpms' array

2020-06-02 Thread Daniel Henrique Barboza
adapted to handle the new array instead. virDomainDefParseXML() TPM related code was adapted to handle the parsing of an extra TPM device. TPM validations after this new scenario will be updated in the next patch. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henriq

[PATCH v6 00/10] Introducing TPM Proxy device support for PPC64

2020-06-02 Thread Daniel Henrique Barboza
ibvir-list/2020-May/msg00642.html v2 link: https://www.redhat.com/archives/libvir-list/2020-May/msg00604.html v1 link: https://www.redhat.com/archives/libvir-list/2020-May/msg00351.html Daniel Henrique Barboza (10): docs: documentation and schema for the new TPM Proxy model qemu: Extend QEMU ca

[PATCH v6 06/10] qemu: add validations after TPM Proxy model introduction

2020-06-02 Thread Daniel Henrique Barboza
single TPM Proxy devices And these combinations in the same domain are NOT valid: - 2 or more TPM devices - 2 or more TPM Proxy devices Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c

[PATCH v6 09/10] tests/qemuxml2argvtest.c: add TPM Proxy command line tests

2020-06-02 Thread Daniel Henrique Barboza
Add tests for both supported scenarios: a single TPM Proxy and a TPM Proxy with a regular TPM device in the same domain. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- .../ppc64-tpmproxy-single.ppc64-latest.args | 34

[PATCH v6 10/10] docs/news.xml: update for the new TPM Proxy device

2020-06-02 Thread Daniel Henrique Barboza
Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 17 + 1 file changed, 17 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 18d96af048..fc41e53d1d 100644 --- a/docs/news.xml +++ b/docs/news.xml

[PATCH v6 08/10] qemu: build command line for the TPM Proxy device

2020-06-02 Thread Daniel Henrique Barboza
QEMU capabilities for this device again inside qemu_command.c. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_alias.c | 5 - src/qemu/qemu_command.c | 27 ++- 2 files changed, 30 insertions(+), 2 dele

[PATCH v6 07/10] tests: add XML schema tests for the TPM Proxy device

2020-06-02 Thread Daniel Henrique Barboza
This tests aims to exercise how a TPM Proxy device can be added in the domain, either alone or with a regular TPM device. It also ensures that we do not allow bogus scenarios to slip by. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- tests

[PATCH v6 03/10] qemu_extdevice.c: remove unneeded 'ret' variable

2020-06-02 Thread Daniel Henrique Barboza
qemuExtDevicesInitPaths() does not need 'ret'. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_extdevice.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_extdevice.c

[PATCH v6 04/10] qemu_tpm, security, tests: change 'switch' clauses for 'if'

2020-06-02 Thread Daniel Henrique Barboza
clause instead. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_tpm.c | 44 + src/security/security_selinux.c | 16 ++-- src/security/virt-aa-helper.c | 7 +- tests/qemuxml2

[PATCH v6 02/10] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy'

2020-06-02 Thread Daniel Henrique Barboza
H_TPM_COMM hypercall to connect with the TPM Resource Manager, enabling the guest to open and close TPM sessions with the host TPM. Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Reviewed-by: Ján Tomko Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c

[PATCH v6 01/10] docs: documentation and schema for the new TPM Proxy model

2020-06-02 Thread Daniel Henrique Barboza
for the 'passthrough' backend. An example of a TPM Proxy device connected to a TPM Resource Manager '/dev/tpmrm0' will look like this: Tested-by: Satheesh Rajendran Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in

Re: [PATCH 5/5] qemu_validate.c: revert NUMA CPU range user warning

2020-06-01 Thread Daniel Henrique Barboza
On 6/1/20 4:40 PM, Peter Krempa wrote: On Mon, Jun 01, 2020 at 14:50:41 -0300, Daniel Henrique Barboza wrote: Now that we have the auto-fill code in place, and with proper documentation to let the user know that (1) we will auto-fill the NUMA cpus up to the number to maximum VCPUs number if

[PATCH 5/5] qemu_validate.c: revert NUMA CPU range user warning

2020-06-01 Thread Daniel Henrique Barboza
. This reverts commit 38d2e033686b5cc274f8f55075ce1985b71e329a. CC: Maxiwell S. Garcia Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c

[PATCH 1/5] numa_conf.c: add helper functions for cpumap operations

2020-06-01 Thread Daniel Henrique Barboza
These helpers will be used in an auto-fill feature for incomplete NUMA topologies in the next patch. Signed-off-by: Daniel Henrique Barboza --- src/conf/numa_conf.c | 46 src/conf/numa_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files

[PATCH 0/5] NUMA CPUs 'auto-fill' for incomplete topologies

2020-06-01 Thread Daniel Henrique Barboza
added to node 0: 16 [...] POWER9 [1] https://www.redhat.com/archives/libvir-list/2019-June/msg00263.html Daniel Henrique Barboza (5): numa_conf.c: add helper functions for cpumap operations qemu_domain.c: NUMA CPUs auto-fill for incom

[PATCH 4/5] formatdomain.html.in: document the NUMA cpus auto fill feature

2020-06-01 Thread Daniel Henrique Barboza
ss of QEMU changes in the future. The idea is to encourage the user to provide a complete NUMA CPU topology, not relying on the CPU auto fill mechanic. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --

[PATCH 2/5] qemu_domain.c: NUMA CPUs auto-fill for incomplete topologies

2020-06-01 Thread Daniel Henrique Barboza
2019-June/msg00263.html Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 47 ++ src/qemu/qemu_domain.h | 4 src/qemu/qemu_driver.c | 9 3 files changed, 60 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu

[PATCH 3/5] qemuxml2xmltest.c: add NUMA vcpus auto fill tests

2020-06-01 Thread Daniel Henrique Barboza
Add a unit test to verify the NUMA vcpus autocomplete implemented in the previous patch. Signed-off-by: Daniel Henrique Barboza --- .../numavcpus-topology-mismatch.xml | 37 ++ ...avcpus-topology-mismatch.x86_64-latest.xml | 38 +++ tests

Re: [PATCH v5 05/10] conf, qemu, security, tests: introducing 'def->tpms' array

2020-05-27 Thread Daniel Henrique Barboza
On 5/27/20 3:42 PM, Stefan Berger wrote: On 5/21/20 9:07 AM, Daniel Henrique Barboza wrote: A TPM Proxy device can coexist with a regular TPM, but the [...] diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 07431343ed..4c26070022 100644 --- a/src/qemu

Re: [PATCH v5 00/10] Introducing TPM Proxy device support for PPC64

2020-05-27 Thread Daniel Henrique Barboza
Ping On 5/21/20 10:07 AM, Daniel Henrique Barboza wrote: changes in v5: - rebased and fixed commits to master at d265171b5784 - moved two TPMs validation from domain_conf.c (patch 05) to qemu_domain.c (patch 06) Gitlab tree: https://gitlab.com/danielhb/libvirt/tree/spapr_tpm_proxy_v5 v4

[PATCH v2 1/1] qemuProcessRefreshCPU: skip 'host-model' logic for pSeries guests

2020-05-25 Thread Daniel Henrique Barboza
that PSeries is currently the only exception to this logic. Let's make it official. https://bugzilla.redhat.com/show_bug.cgi?id=1660711 Suggested-by: Jiri Denemark Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 9 + 1 file changed, 9 insertions(+) diff --git a/

[PATCH v2 0/1] qemuProcessRefreshCPU: skip 'host-model' code

2020-05-25 Thread Daniel Henrique Barboza
changes in v2: - resending only patch 5/5 - changed the 'if' placement to qemuProcessRefreshCPU as suggested by Jiri Denemark - changed the commit msg to reflect the new intention of the patch link to v1: https://www.redhat.com/archives/libvir-list/2020-May/msg01049.html Daniel Henriq

Re: [PATCH 5/5] qemuProcessUpdateCPU: do not change 'fallback' to ALLOW for pSeries guests

2020-05-25 Thread Daniel Henrique Barboza
On 5/25/20 7:38 AM, Jiri Denemark wrote: On Fri, May 22, 2020 at 16:56:20 -0300, Daniel Henrique Barboza wrote: Commit v3.10.0-182-g237f045d9a ("qemu: Ignore fallback CPU attribute on reconnect") forced CPU 'fallback' to ALLOW, regardless of user choice. This fixed

[PATCH 2/5] cpu_arm.c: modernize virCPUarmUpdate

2020-05-22 Thread Daniel Henrique Barboza
Use automatic cleanup of variables. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_arm.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index 6f6c6a1479..cd4f720c95 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu

[PATCH 4/5] qemu_process.c: modernize qemuProcessUpdateCPU code path

2020-05-22 Thread Daniel Henrique Barboza
Use automatic cleanup on qemuProcessUpdateCPU and the functions called by it. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 50 ++--- 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu

[PATCH 0/5] qemuProcessUpdateCPU: do not change 'fallback' for pSeries guests

2020-05-22 Thread Daniel Henrique Barboza
Hi, Patch 5/5 contains a fix for [1]. The first 4 patches are g_auto() cleanups I made along the way while investigating the bug. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1660711 Daniel Henrique Barboza (5): cpu_conf.c: modernize virCPUDefCopyWithoutModel and virCPUDefCopy

[PATCH 5/5] qemuProcessUpdateCPU: do not change 'fallback' to ALLOW for pSeries guests

2020-05-22 Thread Daniel Henrique Barboza
PSeries is currently the only exception to this logic. Let's make it official. https://bugzilla.redhat.com/show_bug.cgi?id=1660711 CC: Jiri Denemark Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/s

[PATCH 1/5] cpu_conf.c: modernize virCPUDefCopyWithoutModel and virCPUDefCopy

2020-05-22 Thread Daniel Henrique Barboza
Use automatic cleanup of variables. Signed-off-by: Daniel Henrique Barboza --- src/conf/cpu_conf.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 07404c6fb0..c6d36e0cb5 100644 --- a/src/conf/cpu_conf.c

[PATCH 3/5] cpu_s390.c: modernize virCPUs390Update

2020-05-22 Thread Daniel Henrique Barboza
Use automatic cleanup of variables. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_s390.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c index dd030c5a11..c1c5686244 100644 --- a/src/cpu/cpu_s390.c +++ b

[PATCH v5 10/10] docs/news.xml: update for the new TPM Proxy device

2020-05-21 Thread Daniel Henrique Barboza
Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 17 + 1 file changed, 17 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4cef804aac..c22a0f0a18 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,23

[PATCH v5 08/10] qemu: build command line for the TPM Proxy device

2020-05-21 Thread Daniel Henrique Barboza
QEMU capabilities for this device again inside qemu_command.c. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_alias.c | 5 - src/qemu/qemu_command.c | 27 ++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src

[PATCH v5 05/10] conf, qemu, security, tests: introducing 'def->tpms' array

2020-05-21 Thread Daniel Henrique Barboza
adapted to handle the new array instead. virDomainDefParseXML() TPM related code was adapted to handle the parsing of an extra TPM device. TPM validations after this new scenario will be updated in the next patch. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_audit.c | 4 +--

[PATCH v5 04/10] qemu_tpm, security, tests: change 'switch' clauses for 'if'

2020-05-21 Thread Daniel Henrique Barboza
This trivial rework is aimed to reduce the amount of line changes made by the next patch, when 'def->tpm' will become a 'def->tpms' array. Instead of using a 'switch' where only the VIR_DOMAIN_TPM_TYPE_EMULATOR label does something, use an 'if' c

[PATCH v5 09/10] tests/qemuxml2argvtest.c: add TPM Proxy command line tests

2020-05-21 Thread Daniel Henrique Barboza
Add tests for both supported scenarios: a single TPM Proxy and a TPM Proxy with a regular TPM device in the same domain. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- .../ppc64-tpmproxy-single.ppc64-latest.args | 34 + .../ppc64-tpmproxy-with-tpm.ppc64

[PATCH v5 01/10] docs: documentation and schema for the new TPM Proxy model

2020-05-21 Thread Daniel Henrique Barboza
for the 'passthrough' backend. An example of a TPM Proxy device connected to a TPM Resource Manager '/dev/tpmrm0' will look like this: Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 19 ++- docs/schemas/domaincommon.rn

[PATCH v5 07/10] tests: add XML schema tests for the TPM Proxy device

2020-05-21 Thread Daniel Henrique Barboza
This tests aims to exercise how a TPM Proxy device can be added in the domain, either alone or with a regular TPM device. It also ensures that we do not allow bogus scenarios to slip by. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- tests/qemuxml2argvdata/ppc64-tpm

[PATCH v5 03/10] qemu_extdevice.c: remove unneeded 'ret' variable

2020-05-21 Thread Daniel Henrique Barboza
qemuExtDevicesInitPaths() does not need 'ret'. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_extdevice.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index

[PATCH v5 06/10] qemu: add validations after TPM Proxy model introduction

2020-05-21 Thread Daniel Henrique Barboza
single TPM Proxy devices And these combinations in the same domain are NOT valid: - 2 or more TPM devices - 2 or more TPM Proxy devices Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 37 + src/qemu/qemu_validate.c | 19

[PATCH v5 02/10] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy'

2020-05-21 Thread Daniel Henrique Barboza
H_TPM_COMM hypercall to connect with the TPM Resource Manager, enabling the guest to open and close TPM sessions with the host TPM. Reviewed-by: Stefan Berger Reviewed-by: Ján Tomko Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c| 4 src/qemu

[PATCH v5 00/10] Introducing TPM Proxy device support for PPC64

2020-05-21 Thread Daniel Henrique Barboza
/msg00814.html v3 link: https://www.redhat.com/archives/libvir-list/2020-May/msg00642.html v2 link: https://www.redhat.com/archives/libvir-list/2020-May/msg00604.html v1 link: https://www.redhat.com/archives/libvir-list/2020-May/msg00604.html Daniel Henrique Barboza (10): docs: documentation and

Re: [PATCH v4 00/10] Introducing TPM Proxy device support for PPC64

2020-05-21 Thread Daniel Henrique Barboza
y domain_conf.c will only handle the XML parsing. Only patches 05 and 06 will be affected. Thanks, DHB On 5/15/20 7:24 PM, Daniel Henrique Barboza wrote: changes in v4: - patch 1: added missing tags - comma-escaped the path string in qemu_command.c (patch 8) - moved validations not-XML-parsi

[PATCH v3 17/21] qemu: hotplug: Prevent updates to multifunction device

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat PCI hostdevs once part of the domain can't be changed. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_dri

[PATCH v3 16/21] qemu: hotplug: Implement multifunction device hotplug

2020-05-20 Thread Daniel Henrique Barboza
changes in regular device hotplug mechanics were made. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c| 74 +++ src/qemu/qemu_domain_address.h| 4 + src/qemu/qemu_driver.c

[PATCH v3 20/21] qemu_hotplug: do not hotplug/hotunplug 'unassigned' hostdevs

2020-05-20 Thread Daniel Henrique Barboza
ed devices when setting or evaluating aggregateSlotIdx and when we're about to execute device_add/device_del in QEMU. For hotplug we'll also skip adress assignment. For unplug we won't mark the device for removal since we won't be executing device_del on it. Signed-off-by: Dan

[PATCH v3 18/21] qemu: hotplug: Implement multifunction device unplug

2020-05-20 Thread Daniel Henrique Barboza
vices. DetachMultifunctionDevice() is not considering the new multifunction unplug mechanics for the Pseries guest, present in QEMU 4.2 (the newest release ATM), to not break compatibility with older QEMU versions. This will be done properly in a later patch. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Hen

[PATCH v3 15/21] domain: addr: Introduce virDomainPCIAddressEnsureMultifunctionAddress

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/conf/device_conf.h | 6 +++ src/conf/domain_addr.c | 84 +++- src/conf/domain_addr.h | 5 +++ src/libvirt_private.syms | 1 + src/util

[PATCH v3 21/21] qemu_hotplug.c: use enhanced multifunction unplug if available

2020-05-20 Thread Daniel Henrique Barboza
code in qemuDomainDetachMultifunctionDevice() can be simplified if the domain is running with QEMU 4.2.0 or newer. [1] https://github.com/qemu/qemu/commit/02a1536eee333123c7735cd36484da53b860fbb7 Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 39

[PATCH v3 19/21] qemu_hotplug.c: tune unplugTimeout for multifunction detach

2020-05-20 Thread Daniel Henrique Barboza
the number of naliases to be unplugged when calculating unplugTimeout. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

[PATCH v3 07/21] qemu: hostdev: Move the hostdev preparation to a separate function

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat No functional change. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 80 ++--- src/qemu/qemu_hotplug.h | 5 +++ 2 files changed, 56 insertions(+), 29 deletions(-) diff --git

[PATCH v3 09/21] qemu: hotplug: move assignment outside qemuDomainAttachHostPCIDevice

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat No functional change. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[PATCH v3 14/21] qemu: hotplug: Queue and wait for multiple devices

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat With multifunction devices, multiple delete requests are sent to qemu and all the requests should be queued up. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.h | 3 ++- src/qemu/qemu_hotplug.c | 41

[PATCH v3 03/21] virhostdev: Introduce virHostdevPCIDevicesBelongToSameSlot

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/hypervisor/virhostdev.c | 29 + src/hypervisor/virhostdev.h | 2 ++ src/libvirt_private.syms| 1 + 3 files changed, 32 insertions(+) diff --git a/src

[PATCH v3 08/21] qemu: hotplug: Move the detach of PCI device to the beginning of live hotplug

2020-05-20 Thread Daniel Henrique Barboza
aniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 172747b2e2..d88a0922d4 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotp

[PATCH v3 11/21] Introduce qemuDomainDeviceParseXMLMany

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 74 ++ src/qemu/qemu_domain.h | 7 2 files changed, 81 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu

[PATCH v3 00/21] PCI Multifunction hotplug/unplug support

2020-05-20 Thread Daniel Henrique Barboza
://www.redhat.com/archives/libvir-list/2020-January/msg01377.html link to v1: https://www.redhat.com/archives/libvir-list/2020-January/msg01377.html Daniel Henrique Barboza (4): utils: PCI multifunction detection helpers qemu_hotplug.c: tune unplugTimeout for multifunction detach qemu_hotplug: do not

[PATCH v3 13/21] qemu: refactor qemuDomain[Attach|Detach]DeviceLive

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat Helps calling multiple time per device. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu

[PATCH v3 02/21] utils: PCI multifunction detection helpers

2020-05-20 Thread Daniel Henrique Barboza
This patch introduces two helpers that will be used in the next patches, virPCIDeviceIsMultifunction() and virHostdevIsPCIMultifunctionDevice(). Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 31 +++ src/conf/domain_conf.h | 3 +++ src

[PATCH v3 04/21] qemu: address: Enable auto addressing multifunction cards

2020-05-20 Thread Daniel Henrique Barboza
w the test suit to recognize the 0005:90:01.N test device as multifunction. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.h| 11 ++ src/qemu/qemu_domain_address.c| 150 +- tests/qemuhot

[PATCH v3 01/21] qemu: address: Separate the slots into multiple aggregates

2020-05-20 Thread Daniel Henrique Barboza
1 is reserved for the pcie-root-ports and >= 2 for the the PCI Multifunction cards(coming..). Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/conf/device_conf.h | 1 + src/conf/domain_addr.c | 46 +-- src/conf/domai

[PATCH v3 12/21] qemu: refactor qemuDomain[Attach|Detach]DeviceConfig

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat This helps calling the routines with a list of devices. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 45 +- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a

[PATCH v3 06/21] conf: Add helper to get active functions of a slot of domain

2020-05-20 Thread Daniel Henrique Barboza
: Daniel Henrique Barboza --- src/conf/domain_conf.c | 27 +++ src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 31 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0d289fbab5..fcd390ace4 100644 --- a/src/conf

[PATCH v3 10/21] Introduce virDomainDeviceDefParseXMLMany

2020-05-20 Thread Daniel Henrique Barboza
we'll use virDomainDeviceDefListPtr lists to call (almost) the same hotplug/unplug mechanics we have today for each hostdev in the list. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 166 +++ src/con

[PATCH v3 05/21] conf: qemu: validate multifunction hostdevice domain configs

2020-05-20 Thread Daniel Henrique Barboza
From: Shivaprasad G Bhat It is invalid to have secondary functions without the primary functions part of the domain. Prevents new domain define, but existing ones would not vanish. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c

[PATCH trivial v2 1/1] logging.html.in: fix number of output formats available

2020-05-19 Thread Daniel Henrique Barboza
There are 4 formats available (x:stderr, x:syslog:name, x:file:file_path, x:journald), not 3. Use "the following" instead of the actual number to avoid the need to update the number every time a new form is added/removed. Suggested-by: Pino Toscano Signed-off-by: Daniel Henriq

Re: [PATCH trivial 1/1] logging.html.in: fix number of output formats available

2020-05-19 Thread Daniel Henrique Barboza
On 5/19/20 6:27 PM, Pino Toscano wrote: On Tuesday, 19 May 2020 21:55:19 CEST Daniel Henrique Barboza wrote: There are 4 formats available (x:stderr, x:syslog:name, x:file:file_path, x:journald), not 3. Signed-off-by: Daniel Henrique Barboza --- docs/logging.html.in | 2 +- 1 file

[PATCH trivial 1/1] logging.html.in: fix number of output formats available

2020-05-19 Thread Daniel Henrique Barboza
There are 4 formats available (x:stderr, x:syslog:name, x:file:file_path, x:journald), not 3. Signed-off-by: Daniel Henrique Barboza --- docs/logging.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/logging.html.in b/docs/logging.html.in index 65c13e8a19

Re: [libvirt PATCH 0/2] fix a leak in virQEMUDriverConfigLoadMemoryEntry

2020-05-18 Thread Daniel Henrique Barboza
On 5/18/20 10:40 AM, Ján Tomko wrote: Thanks to valgrind Ján Tomko (2): qemu: do not leak the directory in virQEMUDriverConfigLoadMemoryEntry qemu: only return two values in virQEMUDriverConfigLoadMemoryEntry Reviewed-by: Daniel Henrique Barboza src/qemu/qemu_conf.c | 4

Re: [PATCH v3 5/9] domain_conf.c: XML parsing for VIR_DOMAIN_TPM_MODEL_SPAPR_PROXY

2020-05-15 Thread Daniel Henrique Barboza
On 5/14/20 10:07 PM, Daniel Henrique Barboza wrote: On 5/14/20 11:32 AM, Daniel Henrique Barboza wrote: On 5/14/20 11:09 AM, Ján Tomko wrote: On a Wednesday in 2020, Daniel Henrique Barboza wrote: Aside from trivial XML parsing/format changes, this patch adds additional rules for TPM

[PATCH v4 09/10] tests/qemuxml2argvtest.c: add TPM Proxy command line tests

2020-05-15 Thread Daniel Henrique Barboza
Add tests for both supported scenarios: a single TPM Proxy and a TPM Proxy with a regular TPM device in the same domain. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- .../ppc64-tpmproxy-single.ppc64-latest.args | 34 + .../ppc64-tpmproxy-with-tpm.ppc64

[PATCH v4 04/10] qemu_tpm, security, tests: change 'switch' clauses for 'if'

2020-05-15 Thread Daniel Henrique Barboza
This trivial rework is aimed to reduce the amount of line changes made by the next patch, when 'def->tpm' will become a 'def->tpms' array. Instead of using a 'switch' where only the VIR_DOMAIN_TPM_TYPE_EMULATOR label does something, use an 'if' c

[PATCH v4 10/10] docs/news.xml: update for the new TPM Proxy device

2020-05-15 Thread Daniel Henrique Barboza
Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 17 + 1 file changed, 17 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4cef804aac..c22a0f0a18 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,23

[PATCH v4 07/10] tests: add XML schema tests for the TPM Proxy device

2020-05-15 Thread Daniel Henrique Barboza
This tests aims to exercise how a TPM Proxy device can be added in the domain, either alone or with a regular TPM device. It also ensures that we do not allow bogus scenarios to slip by. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- tests/qemuxml2argvdata/ppc64-tpm

[PATCH v4 05/10] conf, qemu, security, tests: introducing 'def->tpms' array

2020-05-15 Thread Daniel Henrique Barboza
in are NOT valid: - 2 or more TPM devices - 2 or more TPM Proxy devices Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_audit.c | 4 +- src/conf/domain_conf.c | 72 - src/conf/domain_conf.h | 6 ++- src/qemu/qemu_alias.c

[PATCH v4 08/10] qemu: build command line for the TPM Proxy device

2020-05-15 Thread Daniel Henrique Barboza
QEMU capabilities for this device again inside qemu_command.c. Reviewed-by: Stefan Berger Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_alias.c | 5 - src/qemu/qemu_command.c | 27 ++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src

[PATCH v4 06/10] qemu_validate.c: add validation for TPM Proxy model

2020-05-15 Thread Daniel Henrique Barboza
Previous patch handled the conversion of def->tpm to the array def->tpms. What we're missing now is the validation code to make the VIR_DOMAIN_TPM_MODEL_SPAPR_PROXY model exclusive to PPC64 guests and VIR_DOMAIN_TPM_TYPE_PASSTHROUGH backend. Signed-off-by: Daniel Henrique Barboza --

[PATCH v4 03/10] qemu_extdevice.c: remove unneeded 'ret' variable

2020-05-15 Thread Daniel Henrique Barboza
qemuExtDevicesInitPaths() does not need 'ret'. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_extdevice.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index 2096272761..2ff3f68f5d 100644 ---

[PATCH v4 00/10] Introducing TPM Proxy device support for PPC64

2020-05-15 Thread Daniel Henrique Barboza
msg00604.html v1 link: https://www.redhat.com/archives/libvir-list/2020-May/msg00604.html Daniel Henrique Barboza (10): docs: documentation and schema for the new TPM Proxy model qemu: Extend QEMU capabilities with 'spapr-tpm-proxy' qemu_extdevice.c: remove unneeded 'ret'

<    4   5   6   7   8   9   10   11   12   13   >