mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-19 12:12:16 +00:00
We could add MMIO device pass through by two ways: a) If the MMIO device only has MMIO regions and no ACPI Table touched, using "--mmiodev_pt MMIO_regions", b) If the MMIO device touches ACPI Table, using "--acpidev_pt HID" Now only support TPM2 MSFT0101 MMIO device pass through through launch script using "--acpidev_pt MSFT0101". When we want to pass through the TPM2 deivce, we would not allow to emulate the vTPM2 at the same time. This is becuase the ACRN-DM emulate the TPM2 as MSFT0101 too. Otherwise, the VM can't boot. Besides, we could only support one TPM2 device PT and one MMIO device PT. For TPM2 device PT, the MMIO resources are hard-coded. For the MMIO device PT, we could pass through the MMIO resources on the cmdline. ToDo: 1. We may use HID to discover the MMIO regions and ACPI Table instaed of hard-coded. 2. To identify a MMIO device only by MMIO regions. 3. To allocate virtual MMIO regions in a reserved guest MMIO regions. Tracked-On: #5053 Signed-off-by: Li Fei1 <fei1.li@intel.com>
18 lines
332 B
C
18 lines
332 B
C
/*
|
|
* Copyright (C) 2020 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
|
|
#ifndef _MMIO_DEV_H_
|
|
#define _MMIO_DEV_H_
|
|
|
|
int parse_pt_acpidev(char *arg);
|
|
int parse_pt_mmiodev(char *arg);
|
|
|
|
int init_mmio_devs(struct vmctx *ctx);
|
|
int deinit_mmio_devs(struct vmctx *ctx);
|
|
|
|
#endif /* _MMIO_DEV_H_ */
|