]> 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>
Tue, 20 May 2025 07:03:44 +0000 (10:03 +0300)
commit90f7e23cb7baa6f836723c3ae44039e46fee2a6d
tree50d7d4a9a34dae8585ea0f38d21693f3c960daf7
parentea8eb871aba3a22ef4cbb2bacd3021e88da43434
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