[PATCH v7 08/10] qemu: build command line for the TPM Proxy device
Ján Tomko
jtomko at redhat.com
Tue Jun 23 13:46:09 UTC 2020
On a Wednesday in 2020, Daniel Henrique Barboza wrote:
>This patch wraps it up all the wiring done in previous patches,
>enabling a PPC64 guest to launch a guest using a TPM Proxy
>device.
>
>Note that device validation is already being done in qemu_validate.c,
>qemuValidateDomainDeviceDefTPM(), on domain define time. We don't
>need to verify QEMU capabilities for this device again inside
>qemu_command.c.
>
>Tested-by: Satheesh Rajendran <sathnaga at linux.vnet.ibm.com>
>Reviewed-by: Stefan Berger <stefanb at linux.ibm.com>
>Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
>---
> src/qemu/qemu_alias.c | 5 ++++-
> src/qemu/qemu_command.c | 27 ++++++++++++++++++++++++++-
> 2 files changed, 30 insertions(+), 2 deletions(-)
>
>diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c
>index 85fdb85940..bb7145d630 100644
>--- a/src/qemu/qemu_alias.c
>+++ b/src/qemu/qemu_alias.c
>@@ -408,7 +408,10 @@ qemuAssignDeviceTPMAlias(virDomainTPMDefPtr tpm,
> if (tpm->info.alias)
> return 0;
>
>- tpm->info.alias = g_strdup_printf("tpm%d", idx);
>+ if (tpm->model == VIR_DOMAIN_TPM_MODEL_SPAPR_PROXY)
>+ tpm->info.alias = g_strdup_printf("tpmproxy%d", idx);
>+ else
>+ tpm->info.alias = g_strdup_printf("tpm%d", idx);
This hunk seems wrong - we should not need a different alias for a
model, while the XML element is still called 'tpm'.
Instead, the patch converting this to an array should pass the real
index.
> return 0;
> }
>
To the rest:
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200623/4ef9ab0d/attachment-0001.sig>
More information about the libvir-list
mailing list