1 Star 0 Fork 120

卫少坤/qemu_src

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
i386-cpuid-Decrease-cpuid_i-when-skipping-CPUID-leaf.patch 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-03-23 09:20 . QEMU update to version 8.2.0-2
From 576170252c3cbd79ed918f688d088f1ccd15602a Mon Sep 17 00:00:00 2001
From: Xiaoyao Li <xiaoyao.li@intel.com>
Date: Wed, 24 Jan 2024 21:40:14 -0500
Subject: [PATCH] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F
commit 10f92799af8ba3c3cef2352adcd4780f13fbab31 upstream.
Existing code misses a decrement of cpuid_i when skip leaf 0x1F.
There's a blank CPUID entry(with leaf, subleaf as 0, and all fields
stuffed 0s) left in the CPUID array.
It conflicts with correct CPUID leaf 0.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by:Yang Weijiang <weijiang.yang@intel.com>
Message-ID: <20240125024016.2521244-2-xiaoyao.li@intel.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Zeng <jason.zeng@intel.com>
---
target/i386/kvm/kvm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 4ce80555b4..e68eb8f5e6 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -1914,6 +1914,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
}
case 0x1f:
if (env->nr_dies < 2) {
+ cpuid_i--;
break;
}
/* fallthrough */
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weishaokun/qemu_src.git
git@gitee.com:weishaokun/qemu_src.git
weishaokun
qemu_src
qemu_src
master

搜索帮助