xref: /openbmc/qemu/docs/system/arm/xenpvh.rst (revision dbdf841b)
1XENPVH (``xenpvh``)
2=========================================
3This machine creates a IOREQ server to register/connect with Xen Hypervisor.
4
5When TPM is enabled, this machine also creates a tpm-tis-device at a user input
6tpm base address, adds a TPM emulator and connects to a swtpm application
7running on host machine via chardev socket. This enables xenpvh to support TPM
8functionalities for a guest domain.
9
10More information about TPM use and installing swtpm linux application can be
11found at: docs/specs/tpm.rst.
12
13Example for starting swtpm on host machine:
14.. code-block:: console
15
16    mkdir /tmp/vtpm2
17    swtpm socket --tpmstate dir=/tmp/vtpm2 \
18    --ctrl type=unixio,path=/tmp/vtpm2/swtpm-sock &
19
20Sample QEMU xenpvh commands for running and connecting with Xen:
21.. code-block:: console
22
23    qemu-system-aarch64 -xen-domid 1 \
24    -chardev socket,id=libxl-cmd,path=qmp-libxl-1,server=on,wait=off \
25    -mon chardev=libxl-cmd,mode=control \
26    -chardev socket,id=libxenstat-cmd,path=qmp-libxenstat-1,server=on,wait=off \
27    -mon chardev=libxenstat-cmd,mode=control \
28    -xen-attach -name guest0 -vnc none -display none -nographic \
29    -machine xenpvh -m 1301 \
30    -chardev socket,id=chrtpm,path=tmp/vtpm2/swtpm-sock \
31    -tpmdev emulator,id=tpm0,chardev=chrtpm -machine tpm-base-addr=0x0C000000
32
33In above QEMU command, last two lines are for connecting xenpvh QEMU to swtpm
34via chardev socket.
35