- target/i386: Export RFDS bit to guests - target/i386: Add new CPU model SierraForest - target/i386: Introduce Icelake-Server-v7 to enable TSX - hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately - kvm/arm: Fix compatibility of cold-plug CPU with SVE - arm/virt/acpi: Extend cpufreq to support max_cpus - kvm/arm: Fix SVE related logic for vcpu hotplug feature - arm/virt: Don't modify smp.max_cpus when vcpu hotplug disabled - acpi/cpu: Fix detection of present cpu Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
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
|
|
|