diff --git a/target/arm/helper.c b/target/arm/helper.c index bddd355fa0203093ad9aa6ee925170beb5338cac..9d2b2659f69a04d88748e2d831d7b394ecb09030 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -284,6 +284,7 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync) newval = read_raw_cp_reg(&cpu->env, ri); if (kvm_sync) { +#ifdef CONFIG_KVM if (is_id_reg(ri)) { /* Only sync if we can sync to KVM successfully. */ uint64_t oldval; @@ -306,6 +307,7 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync) kvm_arm_set_one_reg(cpu, cpu->cpreg_indexes[i], &oldval); } else { +#endif /* * Only sync if the previous list->cpustate sync succeeded. * Rather than tracking the success/failure state for every @@ -324,7 +326,9 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync) } write_raw_cp_reg(&cpu->env, ri, newval); +#ifdef CONFIG_KVM } +#endif } cpu->cpreg_values[i] = newval; } diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 49e80878f42a71fede9c5b1d7c93e20addbc3537..a223967d4d52f25bd2bbe837017c3a46173e70e3 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -312,6 +312,10 @@ static inline void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu) static inline void kvm_arm_add_vcpu_properties(Object *obj) {} +static inline bool kvm_arm_cpu_feature_supported(void) { + return false; +} + static inline int kvm_arm_get_max_vm_ipa_size(MachineState *ms) { return -ENOENT;