]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commitdiff
target/arm: Restrict KVM-specific fields from ArchCPU
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 4 Apr 2023 09:12:38 +0000 (11:12 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 28 Jun 2023 12:27:59 +0000 (14:27 +0200)
These fields shouldn't be accessed when KVM is not available.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230405160454.97436-8-philmd@linaro.org>

target/arm/cpu.h

index 00e675f58f54565022428119a1c7a0879d258b1f..4d6c0f95d594275796afb718fdbe94ca6c3b1e48 100644 (file)
@@ -961,6 +961,7 @@ struct ArchCPU {
      */
     uint32_t kvm_target;
 
+#ifdef CONFIG_KVM
     /* KVM init features for this CPU */
     uint32_t kvm_init_features[7];
 
@@ -973,6 +974,7 @@ struct ArchCPU {
 
     /* KVM steal time */
     OnOffAuto kvm_steal_time;
+#endif /* CONFIG_KVM */
 
     /* Uniprocessor system with MP extensions */
     bool mp_is_up;