Libvirt : support aarch64 vtpm with parameter tpm-tis-device
Signed-off-by: jiangfangjie <jiangfangjie@huawei.com>
This commit is contained in:
parent
883534c2f4
commit
6270529d77
102
libvirt-support-aarch64-vtpm-with-parameter-tpm-tis-.patch
Normal file
102
libvirt-support-aarch64-vtpm-with-parameter-tpm-tis-.patch
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
From 959bbbafc3ba59e2aa00b83c88fa84a32d500def Mon Sep 17 00:00:00 2001
|
||||||
|
From: jiangfangjie <jiangfangjie@huawei.com>
|
||||||
|
Date: Wed, 5 Aug 2020 12:54:43 +0800
|
||||||
|
Subject: [PATCH] libvirt: support aarch64 vtpm with parameter tpm-tis-device
|
||||||
|
|
||||||
|
Signed-off-by: jiangfangjie <jiangfangjie@huawei.com>
|
||||||
|
---
|
||||||
|
src/conf/domain_conf.c | 1 +
|
||||||
|
src/conf/domain_conf.h | 1 +
|
||||||
|
src/qemu/qemu_capabilities.c | 8 ++++++++
|
||||||
|
src/qemu/qemu_capabilities.h | 3 +++
|
||||||
|
src/qemu/qemu_domain.c | 3 +++
|
||||||
|
5 files changed, 16 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||||
|
index cf93a59..6192c08 100644
|
||||||
|
--- a/src/conf/domain_conf.c
|
||||||
|
+++ b/src/conf/domain_conf.c
|
||||||
|
@@ -1140,6 +1140,7 @@ VIR_ENUM_IMPL(virDomainTPMModel,
|
||||||
|
"tpm-tis",
|
||||||
|
"tpm-crb",
|
||||||
|
"tpm-spapr",
|
||||||
|
+ "tpm-tis-device",
|
||||||
|
);
|
||||||
|
|
||||||
|
VIR_ENUM_IMPL(virDomainTPMBackend,
|
||||||
|
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||||
|
index 33875d9..a40773a 100644
|
||||||
|
--- a/src/conf/domain_conf.h
|
||||||
|
+++ b/src/conf/domain_conf.h
|
||||||
|
@@ -1274,6 +1274,7 @@ typedef enum {
|
||||||
|
VIR_DOMAIN_TPM_MODEL_TIS,
|
||||||
|
VIR_DOMAIN_TPM_MODEL_CRB,
|
||||||
|
VIR_DOMAIN_TPM_MODEL_SPAPR,
|
||||||
|
+ VIR_DOMAIN_TPM_MODEL_TIS_DEVICE,
|
||||||
|
|
||||||
|
VIR_DOMAIN_TPM_MODEL_LAST
|
||||||
|
} virDomainTPMModel;
|
||||||
|
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
||||||
|
index 73a8856..18bf37b 100644
|
||||||
|
--- a/src/qemu/qemu_capabilities.c
|
||||||
|
+++ b/src/qemu/qemu_capabilities.c
|
||||||
|
@@ -568,6 +568,9 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
||||||
|
"blockdev-snapshot.allow-write-only-overlay",
|
||||||
|
"blockdev-reopen",
|
||||||
|
"storage.werror",
|
||||||
|
+
|
||||||
|
+ /* 360 */
|
||||||
|
+ "tpm-tis-device",
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1285,6 +1288,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
|
||||||
|
{ "rng-builtin", QEMU_CAPS_OBJECT_RNG_BUILTIN },
|
||||||
|
{ "tpm-spapr", QEMU_CAPS_DEVICE_TPM_SPAPR },
|
||||||
|
{ "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS },
|
||||||
|
+ { "tpm-tis-device", QEMU_CAPS_DEVICE_TPM_TIS_DEVICE },
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = {
|
||||||
|
@@ -3065,6 +3069,10 @@ const struct tpmTypeToCaps virQEMUCapsTPMModelsToCaps[] = {
|
||||||
|
.type = VIR_DOMAIN_TPM_MODEL_SPAPR,
|
||||||
|
.caps = QEMU_CAPS_DEVICE_TPM_SPAPR,
|
||||||
|
},
|
||||||
|
+ {
|
||||||
|
+ .type = VIR_DOMAIN_TPM_MODEL_TIS_DEVICE,
|
||||||
|
+ .caps = QEMU_CAPS_DEVICE_TPM_TIS_DEVICE,
|
||||||
|
+ },
|
||||||
|
};
|
||||||
|
|
||||||
|
static int
|
||||||
|
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
||||||
|
index 51ec1a5..8e16fc0 100644
|
||||||
|
--- a/src/qemu/qemu_capabilities.h
|
||||||
|
+++ b/src/qemu/qemu_capabilities.h
|
||||||
|
@@ -549,6 +549,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
||||||
|
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY, /* blockdev-snapshot has the 'allow-write-only-overlay' feature */
|
||||||
|
QEMU_CAPS_BLOCKDEV_REOPEN, /* 'blockdev-reopen' qmp command is supported */
|
||||||
|
QEMU_CAPS_STORAGE_WERROR, /* virtio-blk,scsi-hd.werror */
|
||||||
|
+
|
||||||
|
+ /* 360 */
|
||||||
|
+ QEMU_CAPS_DEVICE_TPM_TIS_DEVICE, /* -device tpm-tis-device */
|
||||||
|
|
||||||
|
QEMU_CAPS_LAST /* this must always be the last item */
|
||||||
|
} virQEMUCapsFlags;
|
||||||
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||||
|
index dd48b6f..b1a4647 100644
|
||||||
|
--- a/src/qemu/qemu_domain.c
|
||||||
|
+++ b/src/qemu/qemu_domain.c
|
||||||
|
@@ -8118,6 +8118,9 @@ qemuDomainDeviceDefValidateTPM(virDomainTPMDef *tpm,
|
||||||
|
case VIR_DOMAIN_TPM_MODEL_SPAPR:
|
||||||
|
flag = QEMU_CAPS_DEVICE_TPM_SPAPR;
|
||||||
|
break;
|
||||||
|
+ case VIR_DOMAIN_TPM_MODEL_TIS_DEVICE:
|
||||||
|
+ flag = QEMU_CAPS_DEVICE_TPM_TIS_DEVICE;
|
||||||
|
+ break;
|
||||||
|
case VIR_DOMAIN_TPM_MODEL_LAST:
|
||||||
|
default:
|
||||||
|
virReportEnumRangeError(virDomainTPMModel, tpm->model);
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -99,7 +99,7 @@
|
|||||||
Summary: Library providing a simple virtualization API
|
Summary: Library providing a simple virtualization API
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 6.2.0
|
Version: 6.2.0
|
||||||
Release: 7
|
Release: 8
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://libvirt.org/
|
URL: https://libvirt.org/
|
||||||
|
|
||||||
@ -131,6 +131,7 @@ Patch0020: libvirt-cpu_map-add-kunpeng-920-features-as-known-features.patch
|
|||||||
Patch0021: libvirt-Substitute-security_context_t-with-char.patch
|
Patch0021: libvirt-Substitute-security_context_t-with-char.patch
|
||||||
Patch0022: libvirt-conf-Don-t-format-http-cookies-unless-VIR_DOMAIN_DEF.patch
|
Patch0022: libvirt-conf-Don-t-format-http-cookies-unless-VIR_DOMAIN_DEF.patch
|
||||||
Patch0023: libvirt-virstoragetest-testBackingParse-Use-VIR_DOMAIN_DEF_F.patch
|
Patch0023: libvirt-virstoragetest-testBackingParse-Use-VIR_DOMAIN_DEF_F.patch
|
||||||
|
Patch0024: libvirt-support-aarch64-vtpm-with-parameter-tpm-tis-.patch
|
||||||
|
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
||||||
@ -1863,6 +1864,8 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 5 2020 Jiang Fangjie <jiangfangjie@huawei.com> - 6.2.0-8
|
||||||
|
- Libvirt supports aarch64 vtpm with parameter tpm-tis-device
|
||||||
* Tue Aug 4 2020 Xu Yandong <xuyandong2@huawei.com> - 6.2.0-7
|
* Tue Aug 4 2020 Xu Yandong <xuyandong2@huawei.com> - 6.2.0-7
|
||||||
- Substitute security_context_t with char pointer.
|
- Substitute security_context_t with char pointer.
|
||||||
* Tue May 26 2020 Xu Yandong <xuyandong2@huawei.com> - 6.2.0-6
|
* Tue May 26 2020 Xu Yandong <xuyandong2@huawei.com> - 6.2.0-6
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user