RE: [Xen-devel] BUG: unable to handle kernel paging request - balloon_in
> Scott Garron wrote:
> > Just for kicks, I tried hexediting balloon.o and changing that
> > instruction to "imul $0x1,%rdx,%rcx" (since multiplying by 1 will
> > essentially nullify the instruction), but the end result was still
> > the same crash, even though the value for "page" ended up being
> > 0x0000000000100000.
That multiply is correct. In C, when you add an integer X to
a pointer to a struct of size N, the result is the same as
if you were accessing the Xth element of an array of those structs.
struct foo *pfoo;
N = sizeof(struct foo);
pfoo + X == (unsigned long)pfoo + (N * X) /* is always true */
> My deduction so far is that "page = pfn_to_page(pfn);" is somehow
> returning a location that isn't quite "correct", but removing the
> "multipliply by 0x38" instruction only returned something partially
> usable and it took a dump all over the memory pages.
> Admittedly, I really know little about how all of this works, so
> debugging process is like taking stabs in the dark. It's somewhat
> intriguing to me, so I'm pretty much just playing with it until someone
> who knows more can reproduce it. It's hard to imagine that I'm the
> one having this problem with the current "xen/stable-2.6.32.x" branch.
A couple thoughts:
1) Is your guest an HVM or PV? IIRC, earlier versions of the balloon
driver did not run properly in an HVM guest. Compare your source
with a latest upstream balloon_init.
2) Are you building xen/stable-2.6.32.x as the kernel in a guest? Any
chance you might be loading a balloon module that doesn't match
the kernel you built?
3) I think developers generally use the xen/stable-2.6.32.x for dom0
and use distro kernels (or newer upstream kernels) for guest
kernels. So it is very possible that you are the only one having
this problem because you are the only one using a balloon driver
on a xen/stable-2.6.32.x kernel in a non-dom0 (HVM?) guest.
4) The latest upstream balloon driver does some magic with the
E820 memory map. Perhaps your machine has an odd or incorrect
E820 map from the BIOS? (This is outside of my area of expertise
so apologies if this doesn't make sense.)
Hope that helps!
Xen-devel mailing list