[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xl, e820_host, PV passthrough: Fix guests crashing when memory == maxmem
commit d21b46e9b723b860ab6e32f6ad96dd4c650596c7 Author: Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx> AuthorDate: Fri May 24 09:36:16 2013 -0400 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu May 30 09:01:24 2013 +0100 xl, e820_host, PV passthrough: Fix guests crashing when memory == maxmem The code had an obvious bug where it would assume that the balloon amount would always be _something_ and add an E820_RAM entry at the end of the E820 array. The added E820_RAM would contain the balloon amount plus the delta of memory that had to be subtracted b/c of the various E820 entries. That assumption is certainly true when maxmem != mem, but if guest config has maxmem = memory that is incorrect (as balloon value is zero). The end result is that the E820 that is constructed is missing a swath of "delta" memory and in most cases ends up with only one E820_RAM entry that is of 512MB size on many Intel systems. Reported-by: Christian Holpert <christian@xxxxxxxxxx> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl_x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c index a17f6ae..a78c91d 100644 --- a/tools/libxl/libxl_x86.c +++ b/tools/libxl/libxl_x86.c @@ -182,7 +182,7 @@ static int e820_sanitize(libxl_ctx *ctx, struct e820entry src[], idx++; } /* At this point we have the mapped RAM + E820 entries from src. */ - if (balloon_kb) { + if (balloon_kb || delta_kb) { /* and if we truncated the RAM region, then add it to the end. */ e820[idx].type = E820_RAM; e820[idx].addr = (uint64_t)(1ULL << 32) > last ? -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |