diff mbox

libxl/libxl_pci.c: Fix reverse logic when detaching device

Message ID 20170223231208.GA18953@skl-2s3.sh.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chao Gao Feb. 23, 2017, 11:12 p.m. UTC
Commit 20b75251d97 ("libxl/libxl_pci.c: used LOG*D functions") reverses the
logic to call xc_deassign_device(). It makes the device unusable.

Signed-off-by: Chao Gao <chao.gao@intel.com>
---
 tools/libxl/libxl_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wei Liu Feb. 24, 2017, 11:09 a.m. UTC | #1
On Fri, Feb 24, 2017 at 07:12:10AM +0800, Chao Gao wrote:
> Commit 20b75251d97 ("libxl/libxl_pci.c: used LOG*D functions") reverses the
> logic to call xc_deassign_device(). It makes the device unusable.
> 
> Signed-off-by: Chao Gao <chao.gao@intel.com>

Acked + applied.

> ---
>  tools/libxl/libxl_pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
> index 8395352..b14df16 100644
> --- a/tools/libxl/libxl_pci.c
> +++ b/tools/libxl/libxl_pci.c
> @@ -1370,7 +1370,7 @@ static int do_pci_remove(libxl__gc *gc, uint32_t domid,
>      int hvm = 0, rc, num;
>      int stubdomid = 0;
>      uint32_t domainid = domid;
> -    bool isstubdom = !libxl_is_stubdom(ctx, domid, &domainid);
> +    bool isstubdom = libxl_is_stubdom(ctx, domid, &domainid);
>  
>  
>      assigned = libxl_device_pci_list(ctx, domid, &num);
> -- 
> 1.8.3.1
>
diff mbox

Patch

diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 8395352..b14df16 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -1370,7 +1370,7 @@  static int do_pci_remove(libxl__gc *gc, uint32_t domid,
     int hvm = 0, rc, num;
     int stubdomid = 0;
     uint32_t domainid = domid;
-    bool isstubdom = !libxl_is_stubdom(ctx, domid, &domainid);
+    bool isstubdom = libxl_is_stubdom(ctx, domid, &domainid);
 
 
     assigned = libxl_device_pci_list(ctx, domid, &num);