]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Tue, 29 Apr 2025 12:44:16 +0000 (09:44 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 25 May 2025 10:14:52 +0000 (13:14 +0300)
commite2d4d3c2ac9e01bad0a734f3c51c93815eda9ffb
treec8276db4059a0c43775b744eb22ebc98d681b30f
parent6b10b25dddfb70a2df149dde4b2e09e97430ba9a
target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro

We need the reg_id_ulong() helper to be a macro to be able to create a
static array of KVMCPUConfig that will hold CSR information.

Despite the amount of changes all of them are tedious/trivial:

- replace instances of "kvm_riscv_reg_id_ulong" with
  "KVM_RISCV_REG_ID_ULONG";

- RISCV_CORE_REG(), RISCV_CSR_REG(), RISCV_CONFIG_REG() and
  RISCV_VECTOR_CSR_REG() only receives one 'name' arg. Remove unneeded
  'env' variables when applicable.

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-5-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Cc: qemu-stable@nongnu.org
(cherry picked from commit 11766e17616a5a4181d4a63f88adf67ac52c553b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/kvm/kvm-cpu.c