arm/cpu: Fixed function undefined error at compile time under arm
This commit is contained in:
parent
1369fa9a7f
commit
69f71b8b94
68
arm-cpu-Fixed-function-undefined-error-at-compile-ti.patch
Normal file
68
arm-cpu-Fixed-function-undefined-error-at-compile-ti.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From 6d795b30ff09bc1f799daa454f776d682cc77197 Mon Sep 17 00:00:00 2001
|
||||
From: zhanghao1 <zhanghao1@kylinos.cn>
|
||||
Date: Tue, 11 May 2021 20:17:16 +0800
|
||||
Subject: [PATCH] arm/cpu: Fixed function undefined error at compile time under
|
||||
arm
|
||||
|
||||
Add the compilation option CONFIG_KVM while using
|
||||
"kvm_arm_cpu_feature_supported" and "kvm_arm_get_one_reg".
|
||||
In arm, the default value of CONFIG_KVM is no.
|
||||
|
||||
While the target is arm, the compilation fails because
|
||||
the function "kvm_arm_cpu_feature_supporte" is declared
|
||||
or the function "kvm_arm_get_one_reg" is not defined.
|
||||
|
||||
Signed-off-by: zhanghao1 <zhanghao1@kylinos.cn>
|
||||
---
|
||||
target/arm/helper.c | 4 ++++
|
||||
target/arm/kvm_arm.h | 4 ++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/target/arm/helper.c b/target/arm/helper.c
|
||||
index bddd355fa0..9d2b2659f6 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 49e80878f4..a223967d4d 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;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: qemu
|
||||
Version: 4.1.0
|
||||
Release: 56
|
||||
Release: 57
|
||||
Epoch: 2
|
||||
Summary: QEMU is a generic and open source machine emulator and virtualizer
|
||||
License: GPLv2 and BSD and MIT and CC-BY-SA-4.0
|
||||
@ -325,6 +325,7 @@ Patch0312: spapr_pci-add-spapr-msi-read-method.patch
|
||||
Patch0313: tz-ppc-add-dummy-read-write-methods.patch
|
||||
Patch0314: imx7-ccm-add-digprog-mmio-write-method.patch
|
||||
Patch0315: util-cacheinfo-fix-crash-when-compiling-with-uClibc.patch
|
||||
Patch0316: arm-cpu-Fixed-function-undefined-error-at-compile-ti.patch
|
||||
|
||||
BuildRequires: flex
|
||||
BuildRequires: bison
|
||||
@ -718,6 +719,9 @@ getent passwd qemu >/dev/null || \
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu 20 May 2021 zhouli57 <zhouli57@huawei.com>
|
||||
- arm/cpu: Fixed function undefined error at compile time under arm
|
||||
|
||||
* Wed May 19 2021 Ming Yang <yangming73@huawei.com>
|
||||
- add strip for block-iscsi.so, block-rbd.so and block-ssh.so.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user