Skip to contentSkip to conversation

libxl: Handle non-ballooned, zero slackmem properly for pci passthru

PATCH In review George Dunlap 2 participants 2 messages Mar 27, 2012 – Apr 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: Handle non-ballooned, zero slackmem properly for pci passthru

The e820_sanitize() function in libxl_pci.c expects one of its arguments to be non-zero; but since a recent changeset, it can typically expect *to be* zero. Since the zero case is handled properly, just remove the check.

tools/libxl/libxl_pci.c +1 -1
diff -r d35a117afa2f -r f9ce45c9f984 tools/libxl/libxl_pci.c
@@ -1177,7 +1177,7 @@ static int e820_sanitize(libxl_ctx *ctx,
     uint32_t i, idx = 0, nr;
     struct e820entry e820[E820MAX];
 
-    if (!src || !map_limitkb || !balloon_kb || !nr_entries)
+    if (!src || !map_limitkb || !nr_entries)
         return ERROR_INVAL;
 
     nr = *nr_entries;
#1 lore raw

George Dunlap writes ("[Xen-devel] [PATCH] libxl: Handle non-ballooned, zero slackmem properly for pci passthru"):

Quoted 3 lines

The e820_sanitize() function in libxl_pci.c expects one of its arguments to be non-zero; but since a recent changeset, it can typically expect *to be* zero. Since the zero case is handled properly, just remove the check.