xref: /qemu/docs/system/arm/xenpvh.rst (revision 06e0f098d612df79597de58121dadf6f5f375d04)
1 XENPVH (``xenpvh``)
2 =========================================
3 This machine creates a IOREQ server to register/connect with Xen Hypervisor.
4 
5 When TPM is enabled, this machine also creates a tpm-tis-device at a user input
6 tpm base address, adds a TPM emulator and connects to a swtpm application
7 running on host machine via chardev socket. This enables xenpvh to support TPM
8 functionalities for a guest domain.
9 
10 More information about TPM use and installing swtpm linux application can be
11 found at: docs/specs/tpm.rst.
12 
13 Example 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 
20 Sample 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 
33 In above QEMU command, last two lines are for connecting xenpvh QEMU to swtpm
34 via chardev socket.
35