On Mon, Jul 22, 2024 at 7:10 PM Richard Henderson < richard.hender...@linaro.org> wrote:
> On 7/23/24 07:43, Warner Losh wrote: > > Only support 4k pages for aarch64 binaries. The variable page size stuff > > isn't working just yet, so put in this lessor-of-evils kludge until that > > is complete. > > Hmm. In what way is it not working? > > What if we limit this to bsd-user/main.c instead? > > set_preferred_target_page_bits(TARGET_PAGE_BITS_MIN); > It's a compile issue that this won't solve: In file included from ../bsd-user/aarch64/signal.c:21: ../bsd-user/qemu.h:146:20: warning: variable length array used [-Wvla] 146 | void *page[MAX_ARG_PAGES]; | ^~~~~~~~~~~~~ ../bsd-user/qemu.h:138:23: note: expanded from macro 'MAX_ARG_PAGES' 138 | #define MAX_ARG_PAGES (TARGET_ARG_MAX / TARGET_PAGE_SIZE) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../bsd-user/qemu.h:146:20: note: initializer of 'target_page' is unknown ../bsd-user/qemu.h:138:41: note: expanded from macro 'MAX_ARG_PAGES' 138 | #define MAX_ARG_PAGES (TARGET_ARG_MAX / TARGET_PAGE_SIZE) | ^ /dune/imp/git/qemu/include/exec/cpu-all.h:152:37: note: expanded from macro 'TARGET_PAGE_SIZE' 152 | # define TARGET_PAGE_SIZE (-(int)TARGET_PAGE_MASK) | ^ /dune/imp/git/qemu/include/exec/cpu-all.h:150:44: note: expanded from macro 'TARGET_PAGE_MASK' 150 | # define TARGET_PAGE_MASK ((target_long)target_page.mask) | ^ /dune/imp/git/qemu/include/exec/cpu-all.h:142:29: note: declared here 142 | extern const TargetPageBits target_page; | ^ In file included from ../bsd-user/aarch64/signal.c:21: ../bsd-user/qemu.h:146:15: error: fields must have a constant size: 'variable length array in structure' extension will never be supported 146 | void *page[MAX_ARG_PAGES]; | ^ 1 warning and 1 error generated. ninja: build stopped: subcommand failed. gmake: *** [Makefile:167: run-ninja] Error 1 that have a couple of additional levels after those issues are fixed... It's fixable, but will take a fair amount more time that I have before the deadline... Warner