From 31d53db0580257c887091a2f2f69a52252b82636 Mon Sep 17 00:00:00 2001 From: jipengfei Date: Fri, 30 Jun 2023 21:57:15 +0800 Subject: [PATCH] target/arm: Restrict KVM-specific fields from ArchCPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These fields shouldn't be accessed when KVM is not available. cheery-pick from cf43b5b69c0f4acee52e3648b88f4a0bf3de770b Signed-off-by: jipengfei_yewu Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230405160454.97436-8-philmd@linaro.org> --- target/arm/cpu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index eb804dffaa..387c028832 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -912,7 +912,8 @@ struct ARMCPU { * QEMU_KVM_ARM_TARGET_NONE if the kernel doesn't support this CPU type. */ uint32_t kvm_target; - + +#ifdef CONFIG_KVM /* KVM init features for this CPU */ uint32_t kvm_init_features[7]; @@ -925,7 +926,7 @@ struct ARMCPU { /* KVM steal time */ OnOffAuto kvm_steal_time; - +#endif /* CONFIG_KVM */ /* Uniprocessor system with MP extensions */ bool mp_is_up; -- Gitee