1 Star 0 Fork 131

chendexi/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
target-i386-cpu-Populate-CPUID-0x8000_001F-when-CSV3.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-12-12 17:01 +08:00 . QEMU update to version 8.2.0-26:
From 120d0b9e5c92de91c69fb9fbea038b51c820013d Mon Sep 17 00:00:00 2001
From: jiangxin <jiangxin@hygon.cn>
Date: Tue, 24 Aug 2021 17:31:28 +0800
Subject: [PATCH] target/i386: cpu: Populate CPUID 0x8000_001F when CSV3 is
active
On Hygon platform, bit 30 of EAX indicates whether
this feature is supported in hardware.
When CSV3 is active, CPUID 0x8000_001F provides
information for it.
Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
---
target/i386/cpu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index ca7e5337b0..36f7ad6460 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -29,6 +29,7 @@
#include "hvf/hvf-i386.h"
#include "kvm/kvm_i386.h"
#include "sev.h"
+#include "csv.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qapi/qapi-visit-machine.h"
@@ -6943,6 +6944,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
if (sev_enabled()) {
*eax = 0x2;
*eax |= sev_es_enabled() ? 0x8 : 0;
+ *eax |= csv3_enabled() ? 0x40000000 : 0; /* bit 30 for CSV3 */
*ebx = sev_get_cbit_position() & 0x3f; /* EBX[5:0] */
*ebx |= (sev_get_reduced_phys_bits() & 0x3f) << 6; /* EBX[11:6] */
}
--
2.41.0.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ccdxx/qemu.git
git@gitee.com:ccdxx/qemu.git
ccdxx
qemu
qemu
master

搜索帮助