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 4 of 9] libxl: create pci backend only when there

To: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 4 of 9] libxl: create pci backend only when there are pci devices
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 18 Oct 2011 14:16:07 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Tue, 18 Oct 2011 06:40:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <156626fef95b36184ad4.1317386584@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>
Organization: Citrix Systems, Inc.
References: <patchbomb.1317386580@loki> <156626fef95b36184ad4.1317386584@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2011-09-30 at 13:43 +0100, Roger Pau Monne wrote:
> # 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.

I think since this change we need the following. This applies after my
big libxl API series:

Ian.

8<------------------------------------------------------


# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1318943709 -3600
# Node ID e6af32ecb4483457d5ad9a7b674c18aaf20cc085
# Parent  12ac478d1b56f0ff4d3242138b780c551a69f107
libxl: libxl__device_pci_destroy_all should succeed if there is no PCI bus on 
the domain

Since 23915:4c4b72c94bac "" it is possible that no bus exists and this is not
an error. Removes the following spurious warning when destroying a PV domain
with no PCI devices:
    libxl: error: libxl.c:759:libxl_domain_destroy: pci shutdown failed for 
domid 1005

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 12ac478d1b56 -r e6af32ecb448 tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Tue Oct 18 13:36:43 2011 +0100
+++ b/tools/libxl/libxl_pci.c   Tue Oct 18 14:15:09 2011 +0100
@@ -1098,7 +1098,7 @@ int libxl__device_pci_destroy_all(libxl_
 
     pcidevs = libxl_device_pci_list(ctx, domid, &num);
     if ( pcidevs == NULL )
-        return ERROR_FAIL;
+        return 0;
 
     for (i = 0; i < num; i++) {
         /* Force remove on shutdown since, on HVM, qemu will not always



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