1 Star 0 Fork 121

luofeng14/src-openEuler

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
target-arm-Move-sve-probe-inside-kvm-4.15-branch.patch 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-12-14 15:50 . QEMU update to version 6.2.0-64
From d52674bfb6241316e436c8fe40dd5312950194dd Mon Sep 17 00:00:00 2001
From: Richard Henderson <richard.henderson@linaro.org>
Date: Mon, 1 Aug 2022 16:21:18 +0100
Subject: [PATCH 3/5] target/arm: Move sve probe inside kvm >= 4.15 branch
The test for the IF block indicates no ID registers are exposed, much
less host support for SVE. Move the SVE probe into the ELSE block.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220726045828.53697-4-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
---
target/arm/kvm64.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 5b15d0582d..0f67b8ba96 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -654,18 +654,18 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
dbgdidr |= (1 << 15); /* RES1 bit */
ahcf->isar.regs[DBGDIDR] = dbgdidr;
}
- }
- if (sve_supported) {
- /*
- * There is a range of kernels between kernel commit 73433762fcae
- * and f81cb2c3ad41 which have a bug where the kernel doesn't expose
- * SYS_ID_AA64ZFR0_EL1 via the ONE_REG API unless the VM has enabled
- * SVE support, which resulted in an error rather than RAZ.
- * So only read the register if we set KVM_ARM_VCPU_SVE above.
- */
- err |= read_sys_reg64(fdarray[2], &ahcf->isar.regs[ID_AA64ZFR0],
- ARM64_SYS_REG(3, 0, 0, 4, 4));
+ if (sve_supported) {
+ /*
+ * There is a range of kernels between kernel commit 73433762fcae
+ * and f81cb2c3ad41 which have a bug where the kernel doesn't
+ * expose SYS_ID_AA64ZFR0_EL1 via the ONE_REG API unless the VM has
+ * enabled SVE support, which resulted in an error rather than RAZ.
+ * So only read the register if we set KVM_ARM_VCPU_SVE above.
+ */
+ err |= read_sys_reg64(fdarray[2], &ahcf->isar.regs[ID_AA64ZFR0],
+ ARM64_SYS_REG(3, 0, 0, 4, 4));
+ }
}
kvm_arm_destroy_scratch_host_vcpu(fdarray);
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luofeng14/qemu2.git
git@gitee.com:luofeng14/qemu2.git
luofeng14
qemu2
src-openEuler
master

搜索帮助