qemu-cr16/include/exec
Richard Henderson a05cee93f4 linux-user: Use ARRAY_SIZE with bitmask_transtbl
Rather than using a zero tuple to end the table, use a macro
to apply ARRAY_SIZE and pass that on to the convert functions.

This fixes two bugs in which the conversion functions required
that both the target and host masks be non-zero in order to
continue, rather than require both target and host masks be
zero in order to terminate.

This affected mmap_flags_tbl when the host does not support
all of the flags we wish to convert (e.g. MAP_UNINITIALIZED).
Mapping these flags to zero is good enough, and matches how
the kernel ignores bits that are unknown.

Fixes: 4b840f96 ("linux-user: Populate more bits in mmap_flags_tbl")
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-08-09 07:17:42 -07:00
..
user linux-user: Use ARRAY_SIZE with bitmask_transtbl 2023-08-09 07:17:42 -07:00
address-spaces.h
confidential-guest-support.h
cpu-all.h accel/tcg: Return bool from page_check_range 2023-07-15 08:02:32 +01:00
cpu-common.h
cpu-defs.h accel/tcg: Store some tlb flags in CPUTLBEntryFull 2023-06-26 17:33:00 +02:00
cpu_ldst.h accel/tcg/cputlb.c: Widen CPUTLBEntry access functions 2023-06-26 17:32:59 +02:00
cputlb.h
exec-all.h include/exec: Add WITH_MMAP_LOCK_GUARD 2023-07-23 17:57:10 +01:00
gdbstub.h
helper-gen-common.h
helper-gen.h
helper-gen.h.inc
helper-head.h
helper-info.c.inc
helper-proto-common.h tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
helper-proto.h
helper-proto.h.inc
hwaddr.h
ioport.h
log.h
memattrs.h include/exec/memattrs: Add two bits of space to MemTxAttrs 2023-06-23 11:15:44 +01:00
memop.h
memopidx.h
memory-internal.h
memory.h misc: Fix some typos in documentation and comments 2023-08-01 23:52:23 +02:00
memory_ldst.h.inc
memory_ldst_cached.h.inc
memory_ldst_phys.h.inc
page-vary.h
plugin-gen.h
poison.h
ram_addr.h
ramblock.h
ramlist.h
replay-core.h
target_long.h
target_page.h
tb-flush.h
tlb-common.h
translate-all.h
translation-block.h
translator.h accel/tcg: Replace target_ulong with vaddr in translator_*() 2023-06-26 17:33:00 +02:00
tswap.h