From: Richard Henderson Date: Thu, 5 Oct 2017 14:36:01 +0000 (-0400) Subject: linux-user/sh4: Reduce TARGET_VIRT_ADDR_SPACE_BITS to 31 X-Git-Tag: v2.11.0-rc0~42^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc1b3960a1a54125d2c87719fa945179bffbae68;p=thirdparty%2Fqemu.git linux-user/sh4: Reduce TARGET_VIRT_ADDR_SPACE_BITS to 31 The real kernel has TASK_SIZE as 0x7c000000, due to quirks with a couple of SH parts. But nominally user-space is limited to 2GB. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20170708025030.15845-4-rth@twiddle.net> Signed-off-by: Riku Voipio --- diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 79f85d33658..123f34783a0 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -45,7 +45,11 @@ #define TARGET_PAGE_BITS 12 /* 4k XXXXX */ #define TARGET_PHYS_ADDR_SPACE_BITS 32 -#define TARGET_VIRT_ADDR_SPACE_BITS 32 +#ifdef CONFIG_USER_ONLY +# define TARGET_VIRT_ADDR_SPACE_BITS 31 +#else +# define TARGET_VIRT_ADDR_SPACE_BITS 32 +#endif #define SR_MD 30 #define SR_RB 29