mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +00:00
hv: dm: Use new virtual device management ioctls
IC_ADD_HV_VDEV -> ACRN_IOCTL_CREATE_VDEV IC_REMOVE_HV_VDEV -> ACRN_IOCTL_DESTROY_VDEV struct acrn_emul_dev -> struct acrn_vdev Also, move struct acrn_vdev to acrn_common.h as this structure is used by both DM and HV. Tracked-On: #6282 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
@@ -361,7 +361,7 @@ static void deinit_ivshmem_vdev(struct pci_vdev *vdev)
|
||||
* @pre vm != NULL
|
||||
* @pre dev != NULL
|
||||
*/
|
||||
int32_t create_ivshmem_vdev(struct acrn_vm *vm, struct acrn_emul_dev *dev)
|
||||
int32_t create_ivshmem_vdev(struct acrn_vm *vm, struct acrn_vdev *dev)
|
||||
{
|
||||
uint32_t i;
|
||||
struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);
|
||||
|
@@ -163,7 +163,7 @@ const struct pci_vdev_ops vmcs9900_ops = {
|
||||
.read_vdev_cfg = read_vmcs9900_cfg,
|
||||
};
|
||||
|
||||
int32_t create_vmcs9900_vdev(struct acrn_vm *vm, struct acrn_emul_dev *dev)
|
||||
int32_t create_vmcs9900_vdev(struct acrn_vm *vm, struct acrn_vdev *dev)
|
||||
{
|
||||
uint32_t i;
|
||||
struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);
|
||||
|
@@ -114,7 +114,7 @@ static void init_ptm(struct pci_vdev *vdev, struct vrp_config *vrp_config)
|
||||
pci_vdev_write_vcfg(vdev, PCIR_SUBBUS_1, 1U, vrp_config->subordinate_bus);
|
||||
}
|
||||
|
||||
int32_t create_vrp(struct acrn_vm *vm, struct acrn_emul_dev *dev)
|
||||
int32_t create_vrp(struct acrn_vm *vm, struct acrn_vdev *dev)
|
||||
{
|
||||
struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);
|
||||
struct acrn_vm_pci_dev_config *dev_config = NULL;
|
||||
@@ -128,7 +128,7 @@ int32_t create_vrp(struct acrn_vm *vm, struct acrn_emul_dev *dev)
|
||||
pr_acrnlog("%s: virtual root port phy_bdf=0x%x, vbdf=0x%x, vendor_id=0x%x, dev_id=0x%x,\
|
||||
primary_bus=0x%x, secondary_bus=0x%x, sub_bus=0x%x.\n",
|
||||
__func__, vrp_config->phy_bdf, dev->slot,
|
||||
dev->dev_id.fields.vendor_id, dev->dev_id.fields.device_id,
|
||||
dev->id.fields.vendor, dev->id.fields.device,
|
||||
vrp_config->primary_bus, vrp_config->secondary_bus, vrp_config->subordinate_bus);
|
||||
|
||||
for (i = 0U; i < vm_config->pci_dev_num; i++) {
|
||||
|
Reference in New Issue
Block a user