Supported TPM passthrough XML may look as follows: Signed-off-by: Stefan Berger Reviewed-by: Corey Bryant Tested-by: Corey Bryant --- docs/formatdomain.html.in | 58 ++++++++++++++++++++++++++++++++++++++++++ docs/schemas/domaincommon.rng | 43 +++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) Index: libvirt/docs/formatdomain.html.in =================================================================== --- libvirt.orig/docs/formatdomain.html.in +++ libvirt/docs/formatdomain.html.in @@ -4385,6 +4385,64 @@ qemu-kvm -net nic,model=? /dev/null +

TPM device

+ +

+ The TPM device enables a QEMU guest to have access to TPM + functionality. +

+

+ The TPM passthrough device type provides access to the host's TPM + for one QEMU guest. No other software may be is using the TPM device, + typically /dev/tpm0, at the time the QEMU guest is started. + 'passthrough' since 1.0.5 +

+ +

+ Example: usage of the TPM passthrough device +

+
+  ...
+  <devices>
+    <tpm model='tpm-tis'>
+      <backend type='passthrough'>
+        <backend path='/dev/tpm0'/>
+      </backend>
+    </tpm>
+  </devices>
+  ...
+
+
+
model
+
+

+ The model attribute specifies what device + model QEMU provides to the guest. If no model name is provided, + tpm-tis will automatically be chosen. +

+
+
backend
+
+

+ The backend element specifies the type of + TPM device. The following types are supported: +

+
    +
  • 'passthrough' — use the host's TPM device. +
+
+
backend type='passthrough'
+
+

+ This backend type requires exclusive access to a TPM device on + the host. + An example for such a device is /dev/tpm0. The filename is + specified as path attribute of the source element. + If no file name is specified then /dev/tpm0 is automatically used. +

+
+
+

Security label

Index: libvirt/docs/schemas/domaincommon.rng =================================================================== --- libvirt.orig/docs/schemas/domaincommon.rng +++ libvirt/docs/schemas/domaincommon.rng @@ -2847,6 +2847,48 @@ + + + + + + + tpm-tis + + + + + + + + + + + + + + + + passthrough + + + + + + + + + + + + + + + + + + + @@ -3157,6 +3199,7 @@ +