1 Star 0 Fork 109

panchenbo / qemu

forked from src-openEuler / qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hw-i386-Use-device_cold_reset-to-reset-the-APIC.patch 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-11-22 17:45 . Qemu update to version 6.2.0-59
From b65da0b1f73a47754a5056b89948d06d9eeaf596 Mon Sep 17 00:00:00 2001
From: jianchunfu <jianchunfu_yewu@cmss.chinamobile.com>
Date: Fri, 25 Nov 2022 11:00:24 +0800
Subject: [PATCH 24/29] hw/i386: Use device_cold_reset() to reset the APIC
The semantic difference between the deprecated device_legacy_reset()
function and the newer device_cold_reset() function is that the new
function resets both the device itself and any qbuses it owns,
whereas the legacy function resets just the device itself and nothing
else.
The pc_machine_reset() and microvm_machine_reset() functions use
device_legacy_reset() to reset the APIC; this is an APICCommonState
and does not have any qbuses, so for this purpose the two functions
behave identically and we can stop using the deprecated one.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: jianchunfu <jianchunfu_yewu@cmss.chinamobile.com>
---
hw/i386/microvm.c | 2 +-
hw/i386/pc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 4b3b1dd262..3ee95f9b4d 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -486,7 +486,7 @@ static void microvm_machine_reset(MachineState *machine)
cpu = X86_CPU(cs);
if (cpu->apic_state) {
- device_legacy_reset(cpu->apic_state);
+ device_cold_reset(cpu->apic_state);
}
}
}
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a2ef40ecbc..4870ce0f96 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1642,7 +1642,7 @@ static void pc_machine_reset(MachineState *machine)
cpu = X86_CPU(cs);
if (cpu->apic_state) {
- device_legacy_reset(cpu->apic_state);
+ device_cold_reset(cpu->apic_state);
}
}
}
--
2.27.0
1
https://gitee.com/panchenbo/qemu.git
git@gitee.com:panchenbo/qemu.git
panchenbo
qemu
qemu
master

搜索帮助