Add VIR_STORAGE_ENCRYPTION_FORMAT_VTPM with string 'vtpm'
for
support of encrypting vTPM storage.
This is a little odd. The virStorageEncryption APIs are for use
with virtual disk backing file encryption, so I wouldn't expect
to see vtpm added there.
Signed-off-by: Stefan Berger <stefanb(a)linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
---
src/qemu/qemu_block.c | 1 +
src/util/virstorageencryption.c | 2 +-
src/util/virstorageencryption.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 0a6522577d..c3296c36f5 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1184,6 +1184,7 @@ qemuBlockStorageSourceGetCryptoProps(virStorageSourcePtr src,
encformat = "luks";
break;
+ case VIR_STORAGE_ENCRYPTION_FORMAT_VTPM:
case VIR_STORAGE_ENCRYPTION_FORMAT_DEFAULT:
case VIR_STORAGE_ENCRYPTION_FORMAT_LAST:
default:
diff --git a/src/util/virstorageencryption.c b/src/util/virstorageencryption.c
index 49df7fddd8..4c7356d47a 100644
--- a/src/util/virstorageencryption.c
+++ b/src/util/virstorageencryption.c
@@ -44,7 +44,7 @@ VIR_ENUM_IMPL(virStorageEncryptionSecret,
VIR_ENUM_IMPL(virStorageEncryptionFormat,
VIR_STORAGE_ENCRYPTION_FORMAT_LAST,
- "default", "qcow", "luks",
+ "default", "qcow", "luks",
"vtpm",
);
static void
diff --git a/src/util/virstorageencryption.h b/src/util/virstorageencryption.h
index 3e5485d88b..29bd00056c 100644
--- a/src/util/virstorageencryption.h
+++ b/src/util/virstorageencryption.h
@@ -59,6 +59,7 @@ typedef enum {
VIR_STORAGE_ENCRYPTION_FORMAT_DEFAULT = 0,
VIR_STORAGE_ENCRYPTION_FORMAT_QCOW, /* Both qcow and qcow2 */
VIR_STORAGE_ENCRYPTION_FORMAT_LUKS,
+ VIR_STORAGE_ENCRYPTION_FORMAT_VTPM,
VIR_STORAGE_ENCRYPTION_FORMAT_LAST,
} virStorageEncryptionFormatType;
--
2.20.1
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list