File: xenpvh.rst

package info (click to toggle)
qemu 1%3A10.0.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 413,648 kB
  • sloc: ansic: 4,733,433; pascal: 114,769; python: 105,506; asm: 68,406; sh: 52,878; makefile: 27,469; perl: 18,778; cpp: 11,435; xml: 3,404; objc: 2,877; yacc: 2,505; php: 1,299; tcl: 1,296; lex: 1,110; sql: 71; awk: 43; sed: 35; javascript: 7
file content (39 lines) | stat: -rw-r--r-- 1,571 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Xen Device Emulation Backend (``xenpvh``)
=========================================

This machine is a little unusual compared to others as QEMU just acts
as an IOREQ server to register/connect with Xen Hypervisor. Control of
the VMs themselves is left to the Xen tooling.

When TPM is enabled, this machine also creates a tpm-tis-device at a
user input tpm base address, adds a TPM emulator and connects to a
swtpm application running on host machine via chardev socket. This
enables xenpvh to support TPM functionalities for a guest domain.

More information about TPM use and installing swtpm linux application
can be found in the :ref:`tpm-device` section.

Example for starting swtpm on host machine:

.. code-block:: console

    mkdir /tmp/vtpm2
    swtpm socket --tpmstate dir=/tmp/vtpm2 \
      --ctrl type=unixio,path=/tmp/vtpm2/swtpm-sock &

Sample QEMU xenpvh commands for running and connecting with Xen:

.. code-block:: console

    qemu-system-aarch64 -xen-domid 1 \
      -chardev socket,id=libxl-cmd,path=qmp-libxl-1,server=on,wait=off \
      -mon chardev=libxl-cmd,mode=control \
      -chardev socket,id=libxenstat-cmd,path=qmp-libxenstat-1,server=on,wait=off \
      -mon chardev=libxenstat-cmd,mode=control \
      -xen-attach -name guest0 -vnc none -display none -nographic \
      -machine xenpvh -m 1301 \
      -chardev socket,id=chrtpm,path=tmp/vtpm2/swtpm-sock \
      -tpmdev emulator,id=tpm0,chardev=chrtpm -machine tpm-base-addr=0x0C000000

In above QEMU command, last two lines are for connecting xenpvh QEMU to swtpm
via chardev socket.