From: George Dunlap Subject: [PATCH] libxl: Handle non-ballooned, zero slackmem properly for pci passthru Date: Tue, 27 Mar 2012 16:01:43 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: george.dunlap@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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. Signed-off-by: George Dunlap diff -r d35a117afa2f -r f9ce45c9f984 tools/libxl/libxl_pci.c --- a/tools/libxl/libxl_pci.c Tue Mar 27 15:25:07 2012 +0200 +++ b/tools/libxl/libxl_pci.c Tue Mar 27 16:01:21 2012 +0100 @@ -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;