unicorn/qemu
Philippe Mathieu-Daudé 963beb216d
configure: Disable W^X on OpenBSD
Since OpenBSD 6.0 [1], W^X is enforced by default [2].
TCG requires WX access. Disable W^X if it is available.
This fixes:

\# lm32-softmmu/qemu-system-lm32
Could not allocate dynamic translator buffer

\# sysctl kern.wxabort=1
kern.wxabort: 0 -> 1
\# lm32-softmmu/qemu-system-lm32
mmap: Not supported
Abort trap (core dumped)
\# gdb -q lm32-softmmu/qemu-system-lm32 qemu-system-lm32.core
(gdb) bt
\#0 0x000017e3c156c50a in _thread_sys___syscall () at {standard input}:5
\#1 0x000017e3c15e5d7a in *_libc_mmap (addr=Variable "addr" is not available.) at /usr/src/lib/libc/sys/mmap.c:47
\#2 0x000017e17d9abc8b in alloc_code_gen_buffer () at /usr/src/qemu/accel/tcg/translate-all.c:1064
\#3 0x000017e17d9abd04 in code_gen_alloc (tb_size=0) at /usr/src/qemu/accel/tcg/translate-all.c:1112
\#4 0x000017e17d9abe81 in tcg_exec_init (tb_size=0) at /usr/src/qemu/accel/tcg/translate-all.c:1149
\#5 0x000017e17d9897e9 in tcg_init (ms=0x17e45e456800) at /usr/src/qemu/accel/tcg/tcg-all.c:66
\#6 0x000017e17d9891b8 in accel_init_machine (acc=0x17e3c3f50800, ms=0x17e45e456800) at /usr/src/qemu/accel/accel.c:63
\#7 0x000017e17d989312 in configure_accelerator (ms=0x17e45e456800, progname=0x7f7fffff07b0 "lm32-softmmu/qemu-system-lm32") at /usr/src/qemu/accel/accel.c:111
\#8 0x000017e17d9d8616 in main (argc=1, argv=0x7f7fffff06b8, envp=0x7f7fffff06c8) at vl.c:4325

[1] https://www.openbsd.org/faq/upgrade60.html
[2] https://undeadly.org/cgi?action=article&sid=20160527203200

Backports commit 7776ea6b49873ed18a2111e25ed8a6d94bd73db8 from qemu
2019-03-11 16:46:52 -04:00
..
accel cputlb: update TLB entry/index after tlb_fill 2019-02-12 11:48:48 -05:00
crypto
default-configs target/riscv: Initial introduction of the RISC-V target 2019-03-08 21:46:10 -05:00
docs docs/devel/memory.txt: Document _with_attrs accessors 2018-10-04 04:46:26 -04:00
fpu qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
hw target/riscv: Initial introduction of the RISC-V target 2019-03-08 21:46:10 -05:00
include qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
qapi qapi: Rewrite string-input-visitor's integer and list parsing 2018-12-18 04:57:25 -05:00
qobject
qom qom/cpu: Add cluster_index to CPUState 2019-01-30 12:59:59 -05:00
scripts qapi: Prepare for system modules other than 'builtin' 2019-02-21 09:58:54 -05:00
target i386: extended the cpuid_level when Intel PT is enabled 2019-03-11 16:40:23 -04:00
tcg target/riscv: Initial introduction of the RISC-V target 2019-03-08 21:46:10 -05:00
util mmap-alloc: fix hugetlbfs misaligned length in ppc64 2019-02-05 16:52:39 -05:00
aarch64.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
aarch64eb.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
accel.c clean-up: removed duplicate #includes 2018-02-28 08:51:56 -05:00
arm.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
armeb.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
CODING_STYLE
configure configure: Disable W^X on OpenBSD 2019-03-11 16:46:52 -04:00
COPYING
COPYING.LIB
cpus.c
exec.c exec.c: Use correct attrs in cpu_memory_rw_debug() 2019-01-29 17:05:50 -05:00
gen_all_header.sh
glib_compat.c target/arm: expose remaining CPUID registers as RAZ 2019-02-15 17:48:37 -05:00
HACKING
header_gen.py qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
ioport.c
LICENSE
m68k.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
Makefile
Makefile.objs
Makefile.target configure: Remove old -fno-gcse workaround for GCC 4.6.x and 4.7.[012] 2018-12-18 03:52:36 -05:00
memory_ldst.inc.c
memory_mapping.c
memory.c memory: learn about non-volatile memory region 2018-11-11 08:50:39 -05:00
mips64.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
mips64el.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
mips.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
mipsel.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
powerpc.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
qemu-timer.c
riscv32.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
riscv64.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
rules.mak
sparc64.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
sparc.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00
unicorn_common.h
VERSION Open 4.0 development tree 2018-12-11 20:33:45 -05:00
vl.c
vl.h
x86_64.h qemu/fpu: Synchronize with Qemu 2019-03-09 18:27:31 -05:00