代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/qemu 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6a5a391c9c6f6c0cd105ce3495acc10868bad884 Mon Sep 17 00:00:00 2001
From: Dongxu Sun <sundongxu3@huawei.com>
Date: Tue, 15 Feb 2022 14:40:48 +0800
Subject: [PATCH] target/arm: Fix some compile errors
fix compile errors like:
"implicit declaration of function 'kvm_arm_cpu_feature_supported'";
"undefined reference to 'kvm_arm_get_one_reg'"
"undefined reference to 'kvm_arm_set_one_reg'"
"'kvmval' may be used uninitialized"
"'oldval' may be used uninitialized"
Signed-off-by: Dongxu Sun <sundongxu3@huawei.com>
---
target/arm/helper.c | 4 ++--
target/arm/kvm_arm.h | 23 ++++++++++++++++++++---
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 1dd5d64d96..80737a8d7b 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -168,8 +168,8 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync)
if (kvm_sync) {
if (is_id_reg(ri)) {
/* Only sync if we can sync to KVM successfully. */
- uint64_t oldval;
- uint64_t kvmval;
+ uint64_t oldval = 0;
+ uint64_t kvmval = 0;
if (kvm_arm_get_one_reg(cpu, cpu->cpreg_indexes[i], &oldval)) {
continue;
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index 82145607ec..8b644b3924 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -377,6 +377,9 @@ void kvm_arm_pvtime_init(CPUState *cs, uint64_t ipa);
int kvm_arm_set_irq(int cpu, int irqtype, int irq, int level);
+int kvm_arm_get_one_reg(ARMCPU *cpu, uint64_t regidx, uint64_t *target);
+int kvm_arm_set_one_reg(ARMCPU *cpu, uint64_t regidx, uint64_t *source);
+
#else
/*
@@ -403,6 +406,11 @@ static inline bool kvm_arm_steal_time_supported(void)
return false;
}
+static inline bool kvm_arm_cpu_feature_supported(void)
+{
+ return false;
+}
+
/*
* These functions should never actually be called without KVM support.
*/
@@ -451,6 +459,18 @@ static inline void kvm_arm_sve_get_vls(CPUState *cs, unsigned long *map)
g_assert_not_reached();
}
+static inline int kvm_arm_get_one_reg(ARMCPU *cpu, uint64_t regidx,
+ uint64_t *target)
+{
+ g_assert_not_reached();
+}
+
+static inline int kvm_arm_set_one_reg(ARMCPU *cpu, uint64_t regidx,
+ uint64_t *source)
+{
+ g_assert_not_reached();
+}
+
#endif
static inline const char *gic_class_name(void)
@@ -535,7 +555,4 @@ static inline const char *its_class_name(void)
}
}
-int kvm_arm_get_one_reg(ARMCPU *cpu, uint64_t regidx, uint64_t *target);
-int kvm_arm_set_one_reg(ARMCPU *cpu, uint64_t regidx, uint64_t *source);
-
#endif
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。