mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +00:00
hv: mmio_dev: add hypercall to support mmio device pass through
Add two hypercalls to support MMIO device pass through for post-launched VM. And when we support MMIO pass through for pre-launched VM, we could re-use the code in mmio_dev.c Tracked-On: #5053 Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -66,6 +66,8 @@
|
||||
#define HC_RESET_PTDEV_INTR_INFO BASE_HC_ID(HC_ID, HC_ID_PCI_BASE + 0x04UL)
|
||||
#define HC_ASSIGN_PCIDEV BASE_HC_ID(HC_ID, HC_ID_PCI_BASE + 0x05UL)
|
||||
#define HC_DEASSIGN_PCIDEV BASE_HC_ID(HC_ID, HC_ID_PCI_BASE + 0x06UL)
|
||||
#define HC_ASSIGN_MMIODEV BASE_HC_ID(HC_ID, HC_ID_PCI_BASE + 0x07UL)
|
||||
#define HC_DEASSIGN_MMIODEV BASE_HC_ID(HC_ID, HC_ID_PCI_BASE + 0x08UL)
|
||||
|
||||
/* DEBUG */
|
||||
#define HC_ID_DBG_BASE 0x60UL
|
||||
@@ -300,6 +302,26 @@ struct acrn_assign_pcidev {
|
||||
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
/**
|
||||
* @brief Info to assign or deassign a MMIO device for a VM
|
||||
*
|
||||
* the parameter for HC_ASSIGN_MMIODEV or HC_DEASSIGN_MMIODEV hypercall
|
||||
*/
|
||||
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)));
|
||||
|
||||
/**
|
||||
* Hypervisor api version info, return it for HC_GET_API_VERSION hypercall
|
||||
*/
|
||||
|
Reference in New Issue
Block a user