mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxl: create pci backend only when there are pci devices.
Creating empty pci entries made Linux DomUs under NetBSD Dom0 wait a very long time for devices to initialize during kernel boot. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
d0b1373b70
commit
8d7a87b20e
1 file changed
+8
-6
@@ -588,12 +588,14 @@ static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
|
||||
for (i = 0; i < d_config->num_pcidevs; i++)
|
||||
libxl__device_pci_add(gc, domid, &d_config->pcidevs[i], 1);
|
||||
|
||||
ret = libxl__create_pci_backend(gc, domid, d_config->pcidevs,
|
||||
d_config->num_pcidevs);
|
||||
if (ret < 0) {
|
||||
LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
|
||||
"libxl_create_pci_backend failed: %d", ret);
|
||||
goto error_out;
|
||||
if (d_config->num_pcidevs > 0) {
|
||||
ret = libxl__create_pci_backend(gc, domid, d_config->pcidevs,
|
||||
d_config->num_pcidevs);
|
||||
if (ret < 0) {
|
||||
LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
|
||||
"libxl_create_pci_backend failed: %d", ret);
|
||||
goto error_out;
|
||||
}
|
||||
}
|
||||
|
||||
if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_PV &&
|
||||
|
||||