1 Star 0 Fork 109

panchenbo / qemu

forked from src-openEuler / qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
arm-virt-Correct-timing-of-executing-cpu_synchronize.patch 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
huiyingC 提交于 2023-03-28 20:53 . QEMU update to viersion 6.2.0-67(master)
From c3f86c199885506cfddde0dfc235c04e0897d591 Mon Sep 17 00:00:00 2001
From: Kunkun Jiang <jiangkunkun@huawei.com>
Date: Tue, 14 Feb 2023 20:33:40 +0800
Subject: [PATCH] arm/virt: Correct timing of executing
cpu_synchronize_post_init for hot-plugged cpus
When the CPU starts normally, cpu_synchronize_post_init is executed
after GICv3 is implemented. This order should be followed when dealing
with hot-plugged CPUs.
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
---
hw/arm/virt.c | 1 +
hw/core/cpu-common.c | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 4716f9baaa..7d5b332594 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2798,6 +2798,7 @@ static void virt_cpu_plug(HotplugHandler *hotplug_dev,
}
/* Register CPU reset and trigger it manually */
+ cpu_synchronize_post_init(cs);
cpu_synchronize_state(cs);
cpu_hotplug_register_reset(ncpu);
cpu_hotplug_reset_manually(ncpu);
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index b8d1d820cb..2213840260 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -206,14 +206,12 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp)
}
}
+#ifdef __aarch64__
if (dev->hotplugged) {
cpu_synchronize_post_init(cpu);
-
-#ifdef __aarch64__
- if (!kvm_enabled())
-#endif
cpu_resume(cpu);
}
+#endif
/* NOTE: latest generic point where the cpu is fully realized */
trace_init_vcpu(cpu);
--
2.27.0
1
https://gitee.com/panchenbo/qemu.git
git@gitee.com:panchenbo/qemu.git
panchenbo
qemu
qemu
master

搜索帮助