mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
hv: mmio_dev: add mmio device pass through support
Add mmio device pass through support for pre-launched VM. When we pass through a MMIO device to pre-launched VM, we would remove its resource from the SOS. Now these resources only include the MMIO regions. Tracked-On: #5053 Acked-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <vm_uuids.h>
|
||||
#include <vm_configurations.h>
|
||||
#include <sgx.h>
|
||||
#include <acrn_hv_defs.h>
|
||||
|
||||
#define CONFIG_MAX_VM_NUM (PRE_VM_NUM + SOS_VM_NUM + MAX_POST_VM_NUM)
|
||||
|
||||
@@ -33,6 +34,8 @@
|
||||
#define PCI_DEV_TYPE_HVEMUL (1U << 1U)
|
||||
#define PCI_DEV_TYPE_SOSEMUL (1U << 2U)
|
||||
|
||||
#define MAX_MMIO_DEV_NUM 2U
|
||||
|
||||
#define CONFIG_SOS_VM .load_order = SOS_VM, \
|
||||
.uuid = SOS_VM_UUID, \
|
||||
.severity = SEVERITY_SOS, \
|
||||
@@ -174,6 +177,8 @@ struct acrn_vm_config {
|
||||
*/
|
||||
|
||||
struct vuart_config vuart[MAX_VUART_NUM_PER_VM];/* vuart configuration for VM */
|
||||
|
||||
struct acrn_mmiodev mmiodevs[MAX_MMIO_DEV_NUM];
|
||||
} __aligned(8);
|
||||
|
||||
struct acrn_vm_config *get_vm_config(uint16_t vm_id);
|
||||
|
Reference in New Issue
Block a user