diff options
| author | Daniel Henrique Barboza <dbarboza@ventanamicro.com> | 2025-04-29 09:44:15 -0300 |
|---|---|---|
| committer | Alistair Francis <alistair.francis@wdc.com> | 2025-05-19 13:41:35 +1000 |
| commit | b6096103494506514d9bfa442f62fef36ffc8fba (patch) | |
| tree | aa9b29bddebb1cb08367cec20910be7463420e24 /scripts/qapi/error.py | |
| parent | 906af6de9462c5192547cca0beac2c134659a437 (diff) | |
| download | focaccia-qemu-b6096103494506514d9bfa442f62fef36ffc8fba.tar.gz focaccia-qemu-b6096103494506514d9bfa442f62fef36ffc8fba.zip | |
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
Diffstat (limited to 'scripts/qapi/error.py')
0 files changed, 0 insertions, 0 deletions