qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 14/17] Revived GUEST_BASE support for usermode e


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH 14/17] Revived GUEST_BASE support for usermode emulation targets.
Date: Tue, 31 Mar 2009 21:51:36 +0000
User-agent: KMail/1.9.9

On Tuesday 31 March 2009, address@hidden wrote:
> +           "You can use -B option to load target binary into different\n"
> +           "address that is specified in elf headers.  This can be
> useful\n" +           "when target binary would be loaded to low addresses
> and\n" +           "/proc/sys/vm/mmap_min_addr is set to higher.  For
> example\n" +           "     qemu-" TARGET_ARCH " -B 0x100000 ...\n"
> +           "loads target binary starting from the first meg.\n"

This is wrong. -B is completely transparent to the guest application and 
offsets the whole guest address space. 

> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index c6b0b74..ef2bf55 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -2413,6 +2413,8 @@ static inline abi_long do_shmat(int shmid, abi_ulong
> shmaddr, int shmflg, }
>      }
>  
> +    *raddr = h2g(*raddr);
> +

This is wrong. host and guest addresses are different sizes.
This sort of bugfix should also be separated from the host support. Especially 
as the bogus code comes from one of your earlier patches.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]