WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4 of 9] libxl: create pci backend only when there are pci devices
From: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 30 Sep 2011 14:43:04 +0200
Delivery-date: Fri, 30 Sep 2011 05:49:42 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to; bh=fsI9+eR1ebsTd99Kp1WVDUSTThkRST4St/9zPVP0lYE=; b=FAh2bazKbXej3OOD+Nyu7Q+ALTa8S0RvFkm3ZZyeiYVGfrcPXDdMji/UMQ64pGmWnV ZxL1ZVVLnTTBf/UkWoOk/TEK65pccLSQl93z+hQKIcA2feRe2hD+IhFdCC9yUB1jo+8a rO+87AxBUQwHnCq1ucDu8fWAoFEBj4M5tOggU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1317386580@loki>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1317386580@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.9.2
# 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