HV: pci-vuart support create vdev hcall

Add cteate method for vmcs9900 vdev in hypercalls.

The destroy method of ivshmem is also suitable for other emulated vdev,
move it into hcall_destroy_vdev() for all emulated vdevs

Tracked-On: #5394
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Tao Yuhong
2020-10-23 17:43:45 -04:00
committed by wenlingz
parent a371815462
commit 996e8f680c
6 changed files with 76 additions and 27 deletions

View File

@@ -38,7 +38,7 @@ 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);
int32_t destroy_ivshmem_vdev(struct pci_vdev *vdev);
#endif /* CONFIG_IVSHMEM_ENABLED */
#endif /* IVSHMEM_H */

View File

@@ -12,5 +12,7 @@
extern const struct pci_vdev_ops vmcs9900_ops;
void trigger_vmcs9900_msix(struct pci_vdev *vdev);
int32_t create_vmcs9900_vdev(struct acrn_vm *vm, struct acrn_emul_dev *dev);
int32_t destroy_vmcs9900_vdev(struct pci_vdev *vdev);
#endif