mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-01 17:06:51 +00:00
hv: implement ivshmem device creation and destruction
For ivshmem vdev creation, the vdev vBDF, vBARs, shared memory region name and size are set by device model. The shared memory name and size must be same as the corresponding device configuration which is configured by offline tool. v3: add a comment to the vbar_base member of the acrn_vm_pci_dev_config structure that vbar_base is power-on default value Tracked-On: #4853 Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <logmsg.h>
|
||||
#include <ioapic.h>
|
||||
#include <mmio_dev.h>
|
||||
#include <ivshmem.h>
|
||||
|
||||
#define DBG_LEVEL_HYCALL 6U
|
||||
|
||||
@@ -36,7 +37,11 @@ struct emul_dev_ops {
|
||||
};
|
||||
|
||||
static struct emul_dev_ops emul_dev_ops_tbl[] = {
|
||||
{0, NULL, NULL}, /* implemented in next patch */
|
||||
#ifdef CONFIG_IVSHMEM_ENABLED
|
||||
{(IVSHMEM_VENDOR_ID | (IVSHMEM_DEVICE_ID << 16U)), create_ivshmem_vdev , destroy_ivshmem_vdev},
|
||||
#else
|
||||
{(IVSHMEM_VENDOR_ID | (IVSHMEM_DEVICE_ID << 16U)), NULL, NULL},
|
||||
#endif
|
||||
};
|
||||
|
||||
bool is_hypercall_from_ring0(void)
|
||||
|
Reference in New Issue
Block a user