[PATCH v3 07/10] docs/specs/tpm: Document TPM_TIS sysbus device for ARM

Eric Auger posted 10 patches 5 years, 8 months ago
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Thomas Huth <thuth@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Stefan Berger <stefanb@linux.ibm.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Igor Mammedov <imammedo@redhat.com>
There is a newer version of this series
[PATCH v3 07/10] docs/specs/tpm: Document TPM_TIS sysbus device for ARM
Posted by Eric Auger 5 years, 8 months ago
Update the documentation with recent changes related to the
sysbus TPM_TIS device addition and add the command line
to be used with arm VIRT.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
 docs/specs/tpm.rst | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
index 2bdf637f55..932cb57049 100644
--- a/docs/specs/tpm.rst
+++ b/docs/specs/tpm.rst
@@ -18,9 +18,15 @@ The TIS interface makes a memory mapped IO region in the area
 0xfed40000-0xfed44fff available to the guest operating system.
 
 QEMU files related to TPM TIS interface:
- - ``hw/tpm/tpm_tis.c``
+ - ``hw/tpm/tpm_tis_common.c``
+ - ``hw/tpm/tpm_tis_isa.c``
+ - ``hw/tpm/tpm_tis_sysbus.c``
  - ``hw/tpm/tpm_tis.h``
 
+Both an ISA device and a sysbus device are available. The former is
+used with pc/q35 machine while the later can be instantiated in the
+ARM virt machine.
+
 CRB interface
 -------------
 
@@ -325,6 +331,23 @@ In case a pSeries machine is emulated, use the following command line:
     -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0 \
     -drive file=test.img,format=raw,if=none,id=drive-virtio-disk0
 
+In case an ARM virt machine is emulated, use the following command line:
+
+.. code-block:: console
+
+  qemu-system-aarch64 -machine virt,gic-version=3,accel=kvm \
+    -cpu host -m 4G \
+    -nographic -no-acpi \
+    -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
+    -tpmdev emulator,id=tpm0,chardev=chrtpm \
+    -device tpm-tis-device,tpmdev=tpm0 \
+    -device virtio-blk-pci,drive=drv0 \
+    -drive format=qcow2,file=hda.qcow2,if=none,id=drv0 \
+    -drive if=pflash,format=raw,file=flash0.img,readonly \
+    -drive if=pflash,format=raw,file=flash1.img
+
+  On ARM, ACPI boot with TPM is not yet supported.
+
 In case SeaBIOS is used as firmware, it should show the TPM menu item
 after entering the menu with 'ESC'.
 
-- 
2.20.1


Re: [PATCH v3 07/10] docs/specs/tpm: Document TPM_TIS sysbus device for ARM
Posted by Stefan Berger 5 years, 8 months ago
On 2/26/20 5:25 AM, Eric Auger wrote:
> Update the documentation with recent changes related to the
> sysbus TPM_TIS device addition and add the command line
> to be used with arm VIRT.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> ---
>   docs/specs/tpm.rst | 25 ++++++++++++++++++++++++-
>   1 file changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
> index 2bdf637f55..932cb57049 100644
> --- a/docs/specs/tpm.rst
> +++ b/docs/specs/tpm.rst
> @@ -18,9 +18,15 @@ The TIS interface makes a memory mapped IO region in the area
>   0xfed40000-0xfed44fff available to the guest operating system.
>   
>   QEMU files related to TPM TIS interface:
> - - ``hw/tpm/tpm_tis.c``
> + - ``hw/tpm/tpm_tis_common.c``
> + - ``hw/tpm/tpm_tis_isa.c``
> + - ``hw/tpm/tpm_tis_sysbus.c``
>    - ``hw/tpm/tpm_tis.h``
>   
> +Both an ISA device and a sysbus device are available. The former is
> +used with pc/q35 machine while the later can be instantiated in the

s/later/latter


> +ARM virt machine.
> +
>   CRB interface
>   -------------
>   
> @@ -325,6 +331,23 @@ In case a pSeries machine is emulated, use the following command line:
>       -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0 \
>       -drive file=test.img,format=raw,if=none,id=drive-virtio-disk0
>   
> +In case an ARM virt machine is emulated, use the following command line:
> +
> +.. code-block:: console
> +
> +  qemu-system-aarch64 -machine virt,gic-version=3,accel=kvm \
> +    -cpu host -m 4G \
> +    -nographic -no-acpi \
> +    -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
> +    -tpmdev emulator,id=tpm0,chardev=chrtpm \
> +    -device tpm-tis-device,tpmdev=tpm0 \
> +    -device virtio-blk-pci,drive=drv0 \
> +    -drive format=qcow2,file=hda.qcow2,if=none,id=drv0 \
> +    -drive if=pflash,format=raw,file=flash0.img,readonly \
> +    -drive if=pflash,format=raw,file=flash1.img
> +
> +  On ARM, ACPI boot with TPM is not yet supported.
> +
>   In case SeaBIOS is used as firmware, it should show the TPM menu item
>   after entering the menu with 'ESC'.
>   

With the spelling fixed:

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>