[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 4 of 9] libxl: create pci backend only when there are pci devices



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1317386335 -7200
# Node ID 156626fef95b36184ad44dfcb049bae2545435f0
# Parent  31b3caad18ac904a242c5bd1ea2bb0e574cd0453
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@xxxxxxxxxxxxx>

diff -r 31b3caad18ac -r 156626fef95b tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Fri Sep 30 14:38:55 2011 +0200
+++ b/tools/libxl/libxl_create.c        Fri Sep 30 14:38:55 2011 +0200
@@ -584,12 +584,14 @@ static int do_domain_create(libxl__gc *g
     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 &&

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.