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

Re: [Xen-devel] [PATCH] libxl: create pci backend only when there are pc

To: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxl: create pci backend only when there are pci devices
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Wed, 14 Sep 2011 15:49:11 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 14 Sep 2011 06:51:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <63e254468d6e8d81baea.1316002763@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: <63e254468d6e8d81baea.1316002763@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.2.17) Gecko/20110523 Lightning/1.0b3pre Thunderbird/3.1.10

If you want to have this patch applied to xen-4.1 then please
mention this explicitely.

Christoph

On 09/14/11 14:19, Roger Pau Monne wrote:
# HG changeset patch
# User Roger Pau Monne<roger.pau@xxxxxxxxxxxxx>
# Date 1316002720 -7200
# Node ID 63e254468d6e8d81baeafaed68f05791dc21eb4e
# Parent  ac33d68e89767d49113824e5661c49a5465a18e7
libxl: create pci backend only when there are pci devices.

Signed-off-by: Roger Pau Monne<roger.pau@xxxxxxxxxxxxx>

diff -r ac33d68e8976 -r 63e254468d6e tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Thu Sep 08 15:13:06 2011 +0100
+++ b/tools/libxl/libxl_create.c        Wed Sep 14 14:18:40 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&&


--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


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