dm: mmio_dev: add hypercall to support mmio device pass through

Add two hypercalls to support MMIO device pass through.

Tracked-On: #5053
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Li Fei1
2020-07-16 13:56:21 +08:00
committed by wenlingz
parent baf77a79ad
commit 158f3d17a2
3 changed files with 34 additions and 0 deletions

View File

@@ -107,6 +107,8 @@
#define IC_RESET_PTDEV_INTR_INFO _IC_ID(IC_ID, IC_ID_PCI_BASE + 0x04)
#define IC_ASSIGN_PCIDEV _IC_ID(IC_ID, IC_ID_PCI_BASE + 0x05)
#define IC_DEASSIGN_PCIDEV _IC_ID(IC_ID, IC_ID_PCI_BASE + 0x06)
#define IC_ASSIGN_MMIODEV _IC_ID(IC_ID, IC_ID_PCI_BASE + 0x07)
#define IC_DEASSIGN_MMIODEV _IC_ID(IC_ID, IC_ID_PCI_BASE + 0x08)
/* Power management */
#define IC_ID_PM_BASE 0x60UL
@@ -182,6 +184,24 @@ struct acrn_assign_pcidev {
} __attribute__((aligned(8)));
/**
* @brief Info to assign or deassign a MMIO device for a VM
*/
struct acrn_mmiodev {
/** the gpa of the MMIO region for the MMIO device */
uint64_t base_gpa;
/** the hpa of the MMIO region for the MMIO device */
uint64_t base_hpa;
/** the size of the MMIO region for the MMIO device */
uint64_t size;
/** reserved for extension */
uint64_t reserved[13];
} __attribute__((aligned(8)));
/**
* @brief pass thru device irq data structure
*/