1 Star 0 Fork 120

Jiabo Feng/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
kvm-arm-Fix-SVE-related-logic-for-vcpu-hotplug-featu.patch 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-05-10 16:44 . QEMU update to version 8.2.0-12:
From 1228f5c7cfcb78b19f163551aae0612602ac2d7d Mon Sep 17 00:00:00 2001
From: Keqian Zhu <zhukeqian1@huawei.com>
Date: Sun, 28 Apr 2024 13:01:48 +0800
Subject: [PATCH] kvm/arm: Fix SVE related logic for vcpu hotplug feature
1. Must finalize SVE setting before kvm_arch_init_vcpu().
2. Must not finalize KVM SVE repeatly for hotplugged vcpu.
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
target/arm/kvm.c | 1 +
target/arm/kvm64.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 12c1b4b328..1ceb72a1c1 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -704,6 +704,7 @@ void kvm_arm_create_host_vcpu(ARMCPU *cpu)
* later while setting device attributes of the GICR during GICv3
* reset
*/
+ arm_cpu_finalize_features(cpu, &error_abort);
ret = kvm_arch_init_vcpu(cs);
if (ret < 0) {
error_report("Failed to initialize host vcpu %ld", vcpu_id);
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 00b257bb4b..615e8bbbdf 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -647,7 +647,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
return ret;
}
- if (cpu_isar_feature(aa64_sve, cpu)) {
+ if (cpu_isar_feature(aa64_sve, cpu) && !DEVICE(cpu)->hotplugged) {
ret = kvm_arm_sve_set_vls(cs);
if (ret) {
return ret;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/JiaboFeng/qemu.git
git@gitee.com:JiaboFeng/qemu.git
JiaboFeng
qemu
qemu
master

搜索帮助