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:
|
||
|---|---|---|
| .. | ||
| user | ||
| address-spaces.h | ||
| confidential-guest-support.h | ||
| cpu-all.h | ||
| cpu-common.h | ||
| cpu-defs.h | ||
| cpu_ldst.h | ||
| cputlb.h | ||
| exec-all.h | ||
| gdbstub.h | ||
| helper-gen-common.h | ||
| helper-gen.h | ||
| helper-gen.h.inc | ||
| helper-head.h | ||
| helper-info.c.inc | ||
| helper-proto-common.h | ||
| helper-proto.h | ||
| helper-proto.h.inc | ||
| hwaddr.h | ||
| ioport.h | ||
| log.h | ||
| memattrs.h | ||
| memop.h | ||
| memopidx.h | ||
| memory-internal.h | ||
| memory.h | ||
| 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 | ||
| tswap.h | ||