Re: [PATCH v2 2/8] qemu: Extend QEMU capabilities with 'spapr-tpm-proxy'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/13/20 10:10 AM, Daniel Henrique Barboza wrote:
Expose the TPM Proxy support for PPC64 guests by creating a new
cap called QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY.

This device is part of the machinery the guest need to orchestrate
with the PPC64 Ultravisor the transition to the Secure VM (SVM)
mode. Inside QEMU, this device will be used with the H_TPM_COMM
hypercall to connect with the TPM Resource Manager, enabling
the guest to open and close TPM sessions with the host TPM.

Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>

Reviewed-by: Stefan Berger <stefanb@xxxxxxxxxxxxx>


---
  src/qemu/qemu_capabilities.c                    | 4 ++++
  src/qemu/qemu_capabilities.h                    | 3 +++
  tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
  tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
  4 files changed, 9 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 7e711f22f8..d0d8b1ebf5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -582,6 +582,9 @@ VIR_ENUM_IMPL(virQEMUCaps,
                "tcg",
                "virtio-blk-pci.scsi.default.disabled",
                "pvscsi",
+
+              /* 370 */
+              "spapr-tpm-proxy",
      );
@@ -1304,6 +1307,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
      { "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS },
      { "tcg-accel", QEMU_CAPS_TCG },
      { "pvscsi", QEMU_CAPS_SCSI_PVSCSI },
+    { "spapr-tpm-proxy", QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY },
  };
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 6bfc7386e3..fa22856e12 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -564,6 +564,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
      QEMU_CAPS_VIRTIO_BLK_SCSI_DEFAULT_DISABLED, /* virtio-blk-pci.scsi disabled by default */
      QEMU_CAPS_SCSI_PVSCSI, /* -device pvscsi */
+ /* 370 */
+    QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY, /* -device spapr-tpm-proxy */
+
      QEMU_CAPS_LAST /* this must always be the last item */
  } virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index a68786ddc8..9df68ebfc1 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -185,6 +185,7 @@
    <flag name='machine.pseries.cap-ibs'/>
    <flag name='tcg'/>
    <flag name='pvscsi'/>
+  <flag name='spapr-tpm-proxy'/>
    <version>4001050</version>
    <kvmVersion>0</kvmVersion>
    <microcodeVersion>42900242</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index c8cc07d954..77f51fe4d8 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -201,6 +201,7 @@
    <flag name='tcg'/>
    <flag name='virtio-blk-pci.scsi.default.disabled'/>
    <flag name='pvscsi'/>
+  <flag name='spapr-tpm-proxy'/>
    <version>5000000</version>
    <kvmVersion>0</kvmVersion>
    <microcodeVersion>42900241</microcodeVersion>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux