@@ -1535,8 +1535,7 @@ void libxl__device_pci_add(libxl__egc *egc, uint32_t domid,
{
STATE_AO_GC(aodev->ao);
libxl_ctx *ctx = libxl__gc_owner(gc);
- libxl_device_pci *assigned;
- int num_assigned, rc;
+ int rc;
int stubdomid = 0;
pci_add_state *pas;
@@ -1575,19 +1574,6 @@ void libxl__device_pci_add(libxl__egc *egc, uint32_t domid,
goto out;
}
- rc = get_all_assigned_devices(gc, &assigned, &num_assigned);
- if ( rc ) {
- LOGD(ERROR, domid,
- "cannot determine if device is assigned, refusing to continue");
- goto out;
- }
- if ( is_pci_in_array(assigned, num_assigned, pci->domain,
- pci->bus, pci->dev, pci->func) ) {
- LOGD(ERROR, domid, "PCI device already attached to a domain");
- rc = ERROR_FAIL;
- goto out;
- }
-
libxl__device_pci_reset(gc, pci->domain, pci->bus, pci->dev, pci->func);
stubdomid = libxl_get_stubdom_id(ctx, domid);