1 Star 0 Fork 131

xiaoyuliang/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
arm-virt-Set-vcpus_count-of-CPU-as-1-to-compatible-w.patch 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-06-15 08:53 +08:00 . QEMU update to version 8.2.0-14;
From 85d1711807bc1ec0118cdc9f7cbf9a6e6b96db76 Mon Sep 17 00:00:00 2001
From: Keqian Zhu <zhukeqian1@huawei.com>
Date: Thu, 23 May 2024 15:51:35 +0800
Subject: [PATCH] arm/virt: Set vcpus_count of CPU as 1 to compatible with
libvirt
If vcpus_count is greater than 1, use libvirt to hotplug vcpu
will fail: "An error occurred, but the cause is unknown".
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
hw/arm/virt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index dfe4d9e129..a6e324c6f8 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3064,7 +3064,6 @@ static const CPUArchIdList *virt_possible_cpu_arch_ids(MachineState *ms)
{
int n;
unsigned int max_cpus = ms->smp.max_cpus;
- unsigned int smp_threads = ms->smp.threads;
VirtMachineState *vms = VIRT_MACHINE(ms);
MachineClass *mc = MACHINE_GET_CLASS(vms);
@@ -3078,7 +3077,7 @@ static const CPUArchIdList *virt_possible_cpu_arch_ids(MachineState *ms)
ms->possible_cpus->len = max_cpus;
for (n = 0; n < ms->possible_cpus->len; n++) {
ms->possible_cpus->cpus[n].type = ms->cpu_type;
- ms->possible_cpus->cpus[n].vcpus_count = smp_threads;
+ ms->possible_cpus->cpus[n].vcpus_count = 1;
ms->possible_cpus->cpus[n].arch_id =
virt_cpu_mp_affinity(vms, n);
--
2.41.0.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiao-yuliang/qemu.git
git@gitee.com:xiao-yuliang/qemu.git
xiao-yuliang
qemu
qemu
master

搜索帮助