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-changelog

[Xen-changelog] [xen-unstable] libxl: do not rely on guest to respond wh

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: do not rely on guest to respond when forcing pci device removal
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sun, 13 Mar 2011 07:05:13 +0000
Delivery-date: Sat, 12 Mar 2011 23:05:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1299781302 0
# Node ID c8947c24536a0cdc19c30ec3e435d82f85e38c4d
# Parent  a46101334ee21410a05434f9093138c914ba7a3d
libxl: do not rely on guest to respond when forcing pci device removal

This is consistent with the expected semantics of a forced device
removal and also avoids a delay when destroying an HVM domain which
either does not support hot unplug (does not respond to SCI) or has
crashed.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r a46101334ee2 -r c8947c24536a tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Thu Mar 10 18:17:16 2011 +0000
+++ b/tools/libxl/libxl_pci.c   Thu Mar 10 18:21:42 2011 +0000
@@ -865,7 +865,7 @@
 
         /* Remove all functions at once atomically by only signalling
          * device-model for function 0 */
-        if ( (pcidev->vdevfn & 0x7) == 0 ) {
+        if ( !force && (pcidev->vdevfn & 0x7) == 0 ) {
             xs_write(ctx->xsh, XBT_NULL, path, "pci-rem", strlen("pci-rem"));
             if (libxl__wait_for_device_model(ctx, domid, "pci-removed", NULL, 
NULL) < 0) {
                 LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model didn't respond 
in time");
@@ -873,8 +873,7 @@
                  * SCI, if it doesn't respond in time then we may wish to 
                  * force the removal.
                  */
-                if ( !force )
-                    return ERROR_FAIL;
+                return ERROR_FAIL;
             }
         }
         path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/state", 
domid);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: do not rely on guest to respond when forcing pci device removal, Xen patchbot-unstable <=