From 5fd23f20e12a56e7ac2dabbe9570fb2f10d7c5b4 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Feb 2025 13:13:23 +0100 Subject: target/riscv: store RISCVCPUDef struct directly in the class Prepare for adding more fields to RISCVCPUDef and reading them in riscv_cpu_init: instead of storing the misa_mxl_max field in RISCVCPUClass, ensure that there's always a valid RISCVCPUDef struct and go through it. Reviewed-by: Alistair Francis Signed-off-by: Paolo Bonzini --- target/riscv/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/riscv/machine.c') diff --git a/target/riscv/machine.c b/target/riscv/machine.c index a1f70cc955..c97e9ce9df 100644 --- a/target/riscv/machine.c +++ b/target/riscv/machine.c @@ -170,7 +170,7 @@ static bool rv128_needed(void *opaque) { RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(opaque); - return mcc->misa_mxl_max == MXL_RV128; + return mcc->def->misa_mxl_max == MXL_RV128; } static const VMStateDescription vmstate_rv128 = { -- cgit 1.4.1