mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +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:
@@ -7,6 +7,8 @@
|
||||
#ifndef IVSHMEM_H
|
||||
#define IVSHMEM_H
|
||||
|
||||
#define IVSHMEM_VENDOR_ID 0x1af4U
|
||||
#define IVSHMEM_DEVICE_ID 0x1110U
|
||||
#ifdef CONFIG_IVSHMEM_ENABLED
|
||||
struct ivshmem_shm_region {
|
||||
char name[32];
|
||||
@@ -25,6 +27,8 @@ extern const struct pci_vdev_ops vpci_ivshmem_ops;
|
||||
*/
|
||||
void init_ivshmem_shared_memory(void);
|
||||
|
||||
int32_t create_ivshmem_vdev(struct acrn_vm *vm, struct acrn_emul_dev *dev);
|
||||
int32_t destroy_ivshmem_vdev(struct acrn_vm *vm, struct acrn_emul_dev *dev);
|
||||
#endif /* CONFIG_IVSHMEM_ENABLED */
|
||||
|
||||
#endif /* IVSHMEM_H */
|
||||
|
||||
Reference in New Issue
Block a user