Aleksandar Markovic <email address hidden> writes:
> The problem may be in int_guest_commpage() - it returns false. > >>From gdb debugging session: > > (gdb) p addr > $1 = (void *) 0xb7ffd000 > (gdb) p want > $2 = (void *) 0xffff0000 > (gdb) n > 398 if (addr != want) { > (gdb) p qemu_host_page_size > $3 = 4096 > (gdb) l > 393 > 394 if (addr == MAP_FAILED) { > 395 perror("Allocating guest commpage"); > 396 exit(EXIT_FAILURE); > 397 } > 398 if (addr != want) { > 399 return false; > 400 } > 401 > 402 /* Set kernel helper versions; rest of page is 0. */ > (gdb)
I'm not totally convinced the calculation that we do to work out the extended size of the guest space in 32 bit:
11:10 alex@debian-buster-i386/i686 [arm/bugs/add-mmap-fallback@github] >./arm-linux-user/qemu-arm tests/tcg/arm-linux-user/sha1 pgb_static: loaddr: 10000 pgb_static: loaddr: ffff0000 pgb_find_hole: ffff0000:10809a8 (1000) pgb_find_hole: 0:10809a8 init_guest_commpage: 0xffff0000 -> 0xb7f48000 (4096) qemu-arm: /home/alex/lsrc/qemu.git/linux-user/elfload.c:2350: probe_guest_base: Assertion `have_guest_base' failed. Aborted (core dumped)
Or in fact why we don't do a MAP_FIXED ass we should have ensured we have enough space allocated for the guest. Richard any ideas?
-- Alex Bennée
Aleksandar Markovic <email address hidden> writes:
> The problem may be in int_guest_ commpage( ) - it returns false.
>
>>From gdb debugging session:
>
> (gdb) p addr
> $1 = (void *) 0xb7ffd000
> (gdb) p want
> $2 = (void *) 0xffff0000
> (gdb) n
> 398 if (addr != want) {
> (gdb) p qemu_host_page_size
> $3 = 4096
> (gdb) l
> 393
> 394 if (addr == MAP_FAILED) {
> 395 perror("Allocating guest commpage");
> 396 exit(EXIT_FAILURE);
> 397 }
> 398 if (addr != want) {
> 399 return false;
> 400 }
> 401
> 402 /* Set kernel helper versions; rest of page is 0. */
> (gdb)
I'm not totally convinced the calculation that we do to work out the
extended size of the guest space in 32 bit:
11:10 alex@debian- buster- i386/i686 [arm/bugs/ add-mmap- fallback@ github] >./arm- linux-user/ qemu-arm tests/tcg/ arm-linux- user/sha1 guest_commpage: 0xffff0000 -> 0xb7f48000 (4096) lsrc/qemu. git/linux- user/elfload. c:2350: probe_guest_base: Assertion `have_guest_base' failed.
pgb_static: loaddr: 10000
pgb_static: loaddr: ffff0000
pgb_find_hole: ffff0000:10809a8 (1000)
pgb_find_hole: 0:10809a8
init_
qemu-arm: /home/alex/
Aborted (core dumped)
Or in fact why we don't do a MAP_FIXED ass we should have ensured we
have enough space allocated for the guest. Richard any ideas?
--
Alex Bennée