mirror of
https://github.com/mii443/qemu.git
synced 2025-12-09 22:18:23 +00:00
hw/arm: introduce xenpvh machine
Add a new machine xenpvh which creates a IOREQ server to register/connect with
Xen Hypervisor.
Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a
TPM emulator and connects to swtpm running on host machine via chardev socket
and support TPM functionalities for a guest domain.
Extra command line for aarch64 xenpvh QEMU to connect to swtpm:
-chardev socket,id=chrtpm,path=/tmp/myvtpm2/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-machine tpm-base-addr=0x0c000000 \
swtpm implements a TPM software emulator(TPM 1.2 & TPM 2) built on libtpms and
provides access to TPM functionality over socket, chardev and CUSE interface.
Github repo: https://github.com/stefanberger/swtpm
Example for starting swtpm on host machine:
mkdir /tmp/vtpm2
swtpm socket --tpmstate dir=/tmp/vtpm2 \
--ctrl type=unixio,path=/tmp/vtpm2/swtpm-sock &
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
committed by
Stefano Stabellini
parent
a4b4b40be8
commit
733766cd37
9
include/hw/arm/xen_arch_hvm.h
Normal file
9
include/hw/arm/xen_arch_hvm.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef HW_XEN_ARCH_ARM_HVM_H
|
||||
#define HW_XEN_ARCH_ARM_HVM_H
|
||||
|
||||
#include <xen/hvm/ioreq.h>
|
||||
void arch_handle_ioreq(XenIOState *state, ioreq_t *req);
|
||||
void arch_xen_set_memory(XenIOState *state,
|
||||
MemoryRegionSection *section,
|
||||
bool add);
|
||||
#endif
|
||||
@@ -1,3 +1,5 @@
|
||||
#if defined(TARGET_I386) || defined(TARGET_X86_64)
|
||||
#include "hw/i386/xen_arch_hvm.h"
|
||||
#elif defined(TARGET_ARM) || defined(TARGET_ARM_64)
|
||||
#include "hw/arm/xen_arch_hvm.h"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user