qemu/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 confidential guest support: Introduce cgs "ready" flag 2021-02-08 16:57:38 +11:00
cpu_ldst.h accel/tcg/cputlb.c: Widen CPUTLBEntry access functions 2023-06-26 17:32:59 +02:00
cpu-all.h accel/tcg: Return bool from page_check_range 2023-07-15 08:02:32 +01:00
cpu-common.h exec/memory: Introduce RAM_NAMED_FILE flag 2023-06-13 11:28:58 +02:00
cpu-defs.h accel/tcg: Store some tlb flags in CPUTLBEntryFull 2023-06-26 17:33:00 +02:00
cputlb.h overall/alpha tcg cpus|hppa: Fix Lesser GPL version number 2020-11-15 16:43:54 +01:00
exec-all.h include/exec: Add WITH_MMAP_LOCK_GUARD 2023-07-23 17:57:10 +01:00
gdbstub.h gdbstub: move syscall handling to new file 2023-03-07 20:44:08 +00:00
helper-gen-common.h tcg: Split helper-gen.h 2023-06-05 12:04:29 -07:00
helper-gen.h tcg: Split helper-gen.h 2023-06-05 12:04:29 -07:00
helper-gen.h.inc tcg: Split helper-gen.h 2023-06-05 12:04:29 -07:00
helper-head.h tcg: Move env defines out of NEED_CPU_H in helper-head.h 2023-06-05 12:04:29 -07:00
helper-info.c.inc tcg: Pass TCGHelperInfo to tcg_gen_callN 2023-06-05 12:04:29 -07:00
helper-proto-common.h tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
helper-proto.h tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
helper-proto.h.inc tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
hwaddr.h bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
ioport.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
log.h include/exec/log: Do not reference QemuLogFile directly 2022-04-20 10:51:11 -07:00
memattrs.h include/exec/memattrs: Add two bits of space to MemTxAttrs 2023-06-23 11:15:44 +01:00
memop.h include/exec/memop: Add MO_ATOM_* 2023-05-16 15:21:38 -07:00
memopidx.h Normalize header guard symbol definition 2022-05-11 16:50:26 +02:00
memory_ldst_cached.h.inc exec/memory_ldst_cached: Use correct type size 2021-05-26 08:35:51 -07:00
memory_ldst_phys.h.inc exec/memory_ldst_phys: Use correct type sizes 2021-05-26 08:35:51 -07:00
memory_ldst.h.inc exec/memory_ldst: Use correct type sizes 2021-05-26 08:35:51 -07:00
memory-internal.h exec/memory: Expose memory_region_access_valid() 2023-01-09 13:50:13 +01:00
memory.h misc: Fix some typos in documentation and comments 2023-08-01 23:52:23 +02:00
page-vary.h include: move target page bits declaration to page-vary.h 2022-04-06 14:31:43 +02:00
plugin-gen.h plugins: Drop unused headers from exec/plugin-gen.h 2023-06-05 12:04:29 -07:00
poison.h exec/poison: Do not poison CONFIG_SOFTMMU 2023-06-05 12:04:29 -07:00
ram_addr.h exec/ram_addr: Return number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() 2023-06-13 11:28:58 +02:00
ramblock.h hostmem-file: add offset option 2023-05-23 16:47:03 +02:00
ramlist.h qapi: introduce x-query-ramblock QMP command 2021-11-02 15:55:14 +00:00
replay-core.h replay: Extract core API to 'exec/replay-core.h' 2023-02-27 22:29:01 +01:00
target_long.h include: split target_long definition from cpu-defs 2023-03-07 20:44:09 +00:00
target_page.h softmmu: Introduce qemu_target_page_mask() helper 2023-06-23 02:54:44 -04:00
tb-flush.h includes: move tb_flush into its own header 2023-03-07 17:06:33 +00:00
tlb-common.h tcg: Add tlb_fast_offset to TCGContext 2023-06-05 12:04:28 -07:00
translate-all.h accel/tcg: Move remainder of page locking to tb-maint.c 2022-12-20 17:11:12 -08:00
translation-block.h tcg: Spit out exec/translation-block.h 2023-06-05 12:04:29 -07:00
translator.h accel/tcg: Replace target_ulong with vaddr in translator_*() 2023-06-26 17:33:00 +02:00
tswap.h include/exec: Provide the tswap() functions for target independent code, too 2023-04-20 11:25:32 +02:00