diff options
author | Peter Maydell | 2012-03-09 15:33:20 +0100 |
---|---|---|
committer | Anthony Liguori | 2012-03-12 20:05:26 +0100 |
commit | 8d9dde9429d2b5b513bf92d94a257a00ea2da1bf (patch) | |
tree | 97742f39ae157d5893a9e266e9ea21cf93793247 /qmp-commands.hx | |
parent | implement vnc_dpy_setdata (diff) | |
download | qemu-8d9dde9429d2b5b513bf92d94a257a00ea2da1bf.tar.gz qemu-8d9dde9429d2b5b513bf92d94a257a00ea2da1bf.tar.xz qemu-8d9dde9429d2b5b513bf92d94a257a00ea2da1bf.zip |
cpu-all.h: Don't accidentally sign extend in g2h()
Cast the argument of the g2h() macro to a target_ulong so that
it isn't accidentally sign-extended if it is a signed 32 bit
type and long is a 64 bit type. In particular, this fixes a
bug where it would return the wrong value for 32 bit guests
on 64 bit hosts when passed in one of the arg* values from
do_syscall() [which are all abi_long and thus signed types].
This could result in spurious failure of mlock(), among others.
Reviewed-by: Andreas F=E4rber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qmp-commands.hx')
0 files changed, 0 insertions, 0 deletions