Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
acpi-cpu-Fix-cpu_hotplug_hw_init.patch 1.21 KB
Copy Edit Raw Blame History
Jiabo Feng authored 2024-04-10 20:59 . QEMU update to version 8.2.0-6:
From 14c4062c4acc7d417d163276b65e59073ba18eeb Mon Sep 17 00:00:00 2001
From: Keqian Zhu <zhukeqian1@huawei.com>
Date: Tue, 26 Mar 2024 14:51:18 +0800
Subject: [PATCH] acpi/cpu: Fix cpu_hotplug_hw_init()
For the present but disabled vCPUs, they will be released after
cpu_hotplug_hw_init(), we should not assign it to AcpiCpuStatus.
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
hw/acpi/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index c922c380aa..b258396e01 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -229,7 +229,6 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
for (i = 0; i < id_list->len; i++) {
struct CPUState *cpu = CPU(id_list->cpus[i].cpu);
if (qemu_present_cpu(cpu)) {
- state->devs[i].cpu = cpu;
state->devs[i].is_present = true;
} else {
if (qemu_persistent_cpu(cpu)) {
@@ -240,6 +239,7 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
}
if (qemu_enabled_cpu(cpu)) {
+ state->devs[i].cpu = cpu;
state->devs[i].is_enabled = true;
} else {
state->devs[i].is_enabled = false;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化