1 Star 0 Fork 107

XuFei / src_openeuler_qemu

forked from src-openEuler / qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
i386-cpu-fix-compile-error-in-all-target-configure.patch 1.90 KB
一键复制 编辑 原始数据 按行查看 历史
From 11498c2d92e703923d373b64ad3f33aec5f383f2 Mon Sep 17 00:00:00 2001
From: Jiajie Li <lijiajie11@huawei.com>
Date: Thu, 17 Feb 2022 09:51:13 +0800
Subject: [PATCH] i386/cpu: fix compile error in all target configure
When compile with `./configure && make -j`, there will be
error: "unknown type name `ram_addr_t`", fix the error by
adding compilation macro to control it.
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
---
target/i386/cpu.c | 16 ++++++++--------
target/i386/cpu.h | 2 ++
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index a4732a7372..d9dca1dafb 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6711,14 +6711,6 @@ static bool x86_cpu_get_paging_enabled(const CPUState *cs)
return cpu->env.cr[0] & CR0_PG_MASK;
}
-#endif /* !CONFIG_USER_ONLY */
-
-static void x86_cpu_set_pc(CPUState *cs, vaddr value)
-{
- X86CPU *cpu = X86_CPU(cs);
-
- cpu->env.eip = value;
-}
/* At present, we check the vm is *LARGE* or not, i.e. whether
* the memory size is more than 4T or not.
@@ -6736,6 +6728,14 @@ void x86_cpu_adjuest_by_ram_size(ram_addr_t ram_size, X86CPU *cpu)
cpu->fill_mtrr_mask = true;
}
}
+#endif /* !CONFIG_USER_ONLY */
+
+static void x86_cpu_set_pc(CPUState *cs, vaddr value)
+{
+ X86CPU *cpu = X86_CPU(cs);
+
+ cpu->env.eip = value;
+}
int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request)
{
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 6f777fd6ca..d9296a9abc 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1842,10 +1842,12 @@ struct X86CPU {
extern const VMStateDescription vmstate_x86_cpu;
#endif
+#ifndef CONFIG_USER_ONLY
#define DEFAULT_VM_CPU_PHYS_BITS 42
#define LARGE_VM_CPU_PHYS_BITS 46
void x86_cpu_adjuest_by_ram_size(ram_addr_t ram_size, X86CPU *cpu);
+#endif
int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request);
--
2.27.0
1
https://gitee.com/flyking001/src_openeuler_qemu.git
git@gitee.com:flyking001/src_openeuler_qemu.git
flyking001
src_openeuler_qemu
src_openeuler_qemu
master

搜索帮助