Synchronize upstream patches "Use correct tpm device for all non-x86"
Fix the exception of adding TPM devices via virt-manager by synchronizing upstream patches. Signed-off-by: lixianglai <lixianglai@loongson.cn> (cherry picked from commit 7e0d98bb1b1b0719ac595124afbd135781bb4115)
This commit is contained in:
parent
efa8c73d73
commit
9a98b0fdb4
32
qemu-command-Use-correct-tpm-device-for-all-non-x86.patch
Normal file
32
qemu-command-Use-correct-tpm-device-for-all-non-x86.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 4127f2c1599683af1de75574065f1942eea9ad88 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cole Robinson <crobinso@redhat.com>
|
||||||
|
Date: Sat, 18 Jun 2022 12:46:03 -0400
|
||||||
|
Subject: [PATCH] qemu: command: Use correct tpm device for all non-x86
|
||||||
|
|
||||||
|
The qemu `tpm-tis` device is an ISA device, so only really applicable
|
||||||
|
to x86 archs. For all non-x86 archs we should use `tpm-tis-device`
|
||||||
|
|
||||||
|
This fixes tpm-tis usage on armv7l and riscv
|
||||||
|
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_command.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||||
|
index dc7fb871e7..832c17b602 100644
|
||||||
|
--- a/src/qemu/qemu_command.c
|
||||||
|
+++ b/src/qemu/qemu_command.c
|
||||||
|
@@ -9311,7 +9311,7 @@ qemuBuildTPMDevStr(const virDomainDef *def,
|
||||||
|
virDomainTPMDef *tpm = def->tpm;
|
||||||
|
const char *model = virDomainTPMModelTypeToString(tpm->model);
|
||||||
|
|
||||||
|
- if (tpm->model == VIR_DOMAIN_TPM_MODEL_TIS && def->os.arch == VIR_ARCH_AARCH64)
|
||||||
|
+ if (tpm->model == VIR_DOMAIN_TPM_MODEL_TIS && !ARCH_IS_X86(def->os.arch))
|
||||||
|
model = "tpm-tis-device";
|
||||||
|
|
||||||
|
virBufferAsprintf(&buf, "%s,tpmdev=tpm-%s,id=%s",
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user