qemu/target
Daniel Henrique Barboza 6b10b25ddd target/riscv/kvm: turn u32/u64 reg functions into macros
This change is motivated by a future change w.r.t CSRs management. We
want to handle them the same way as KVM extensions, i.e. a static array
with KVMCPUConfig objs that will be read/write during init and so on.
But to do that properly we must be able to declare a static array that
hold KVM regs.

C does not allow to init static arrays and use functions as
initializers, e.g. we can't do:

.kvm_reg_id = kvm_riscv_reg_id_ulong(...)

When instantiating the array. We can do that with macros though, so our
goal is turn kvm_riscv_reg_ulong() in a macro. It is cleaner to turn
every other reg_id_*() function in macros, and ulong will end up using
the macros for u32 and u64, so we'll start with them.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250429124421.223883-4-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Cc: qemu-stable@nongnu.org
(cherry picked from commit b609610349)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-05-25 13:14:52 +03:00
..
alpha target/alpha: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:56 +00:00
arm target/arm: Don't assert() for ISB/SB inside IT block 2025-05-08 10:22:26 +03:00
avr target/avr: Improve decode of LDS, STS 2025-04-24 11:16:03 +03:00
hexagon target/hexagon: Use explicit little-endian LD/ST API 2024-10-15 11:55:09 -03:00
hppa target/hppa: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:54 +00:00
i386 target/i386: do not block singlestep for STI 2025-05-08 12:39:02 +03:00
loongarch target/loongarch: Fix vldi inst 2025-03-18 09:02:48 +03:00
m68k target/m68k: Initialize float_status fields in gdb set/get functions 2024-11-05 10:09:54 +00:00
microblaze Misc HW patch queue 2024-11-06 17:28:45 +00:00
mips target/mips: Fix MIPS16e translation 2025-04-29 10:03:15 +03:00
openrisc target/openrisc: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:57 +00:00
ppc hw/core: Get default_cpu_type calling machine_class_default_cpu_type() 2025-04-29 10:01:21 +03:00
riscv target/riscv/kvm: turn u32/u64 reg functions into macros 2025-05-25 13:14:52 +03:00
rx target/rx: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:57 +00:00
s390x target/s390x: Fix MVC not always invalidating translation blocks 2025-02-01 11:59:14 +03:00
sh4 license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
sparc target/sparc: Fix gdbstub incorrectly handling registers f32-f62 2025-02-19 14:01:02 +03:00
tricore target/tricore: Use tcg_constant_tl() instead of tcg_gen_movi_tl() 2024-10-15 12:13:59 -03:00
xtensa target/xtensa: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:55 +00:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00