cputlb: cast size_t to target_ulong before using for address masks
commitab7a2009df66241a3742cbdfe8f9a1f66c6af21f
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 6 Jun 2019 15:38:19 +0000 (6 16:38 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 12 Jun 2019 16:53:23 +0000 (12 17:53 +0100)
tree7eef4ad53741dab2ba07ff21bb5623233efa378d
parentc7b3e866bbe361a8637cb20efea8a6839a719ae1
cputlb: cast size_t to target_ulong before using for address masks

While size_t is defined to happily access the biggest host object this
isn't the case when generating masks for 64 bit guests on 32 bit
hosts. Otherwise we end up truncating the address when we fall back to
our unaligned helper.

Fixes: https://bugs.launchpad.net/qemu/+bug/1831545

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Andrew Randrianasulu <randrianasulu@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
accel/tcg/cputlb.c