mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-18 15:28:43 +00:00
dm: rename ioctl command for hv-emulated management
Use add/remove device instead of create/destroy. Tracked-On: #5586 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -167,7 +167,7 @@ create_ivshmem_from_hv(struct vmctx *ctx, struct pci_vdev *vdev,
|
||||
dev.io_addr[IVSHMEM_MEM_BAR + 1] = addr;
|
||||
dev.io_size[IVSHMEM_MEM_BAR] = shm_size;
|
||||
strncpy((char*)dev.args, shm_name, 32);
|
||||
return vm_create_hv_vdev(ctx, &dev);
|
||||
return vm_add_hv_vdev(ctx, &dev);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -352,7 +352,7 @@ destroy_ivshmem_from_hv(struct vmctx *ctx, struct pci_vdev *vdev)
|
||||
emul_dev.dev_id.fields.vendor_id = IVSHMEM_VENDOR_ID;
|
||||
emul_dev.dev_id.fields.device_id = IVSHMEM_DEVICE_ID;
|
||||
emul_dev.slot = PCI_BDF(vdev->bus, vdev->slot, vdev->func);
|
||||
vm_destroy_hv_vdev(ctx, &emul_dev);
|
||||
vm_remove_hv_vdev(ctx, &emul_dev);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -122,7 +122,7 @@ pci_uart_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
vdev.io_addr[0] = pci_get_cfgdata32(dev, PCIR_BAR(0));
|
||||
vdev.io_addr[1] = pci_get_cfgdata32(dev, PCIR_BAR(1));
|
||||
*((uint32_t *)vdev.args) = vuart_idx;
|
||||
err = vm_create_hv_vdev(ctx, &vdev);
|
||||
err = vm_add_hv_vdev(ctx, &vdev);
|
||||
if (err) {
|
||||
pr_err("HV can't create vuart with vuart_idx=%d\n", vuart_idx);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ pci_uart_deinit(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
emul_dev.dev_id.fields.vendor_id = COM_VENDOR;
|
||||
emul_dev.dev_id.fields.device_id = COM_DEV;
|
||||
emul_dev.slot = PCI_BDF(dev->bus, dev->slot, dev->func);
|
||||
vm_destroy_hv_vdev(ctx, &emul_dev);
|
||||
vm_remove_hv_vdev(ctx, &emul_dev);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user