i386 CPU detection fails if the TSFFS SIMICS object is not named `"tsffs"`

未关闭 适合新手
#515 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
backend

调研方向

打开 src/arch/x86.rs,查看第 57-60、97-100 行和 119 行附近的三处 trace!(get_object(CLASS_NAME)?, ...) 调用;与 src/arch/x86_64.rs 比较,后者从不调用 get_object(CLASS_NAME)?。将每一处替换为针对 cpu 对象的日志(或删除 get_object 调用),然后构建并确认 i386 检测不再依赖于 SIMICS 对象名为 tsffs。该 issue 指出这是通过阅读发现的,并未在 SIMICS 下复现,因此实际运行才是验证方式。

由索引模型根据 Issue 内容生成。

描述

Where

Problem
X86ArchitectureOperations::new calls trace!(get_object(CLASS_NAME)?, ...) three times during CPU detection, where CLASS_NAME is "tsffs". None of the other architecture backends call get_object(CLASS_NAME)?. If the user instantiated the TSFFS class under any other SIMICS object name, get_object("tsffs")? returns Err, causing X86ArchitectureOperations::new to fail and Architecture::new to fall through to "Unsupported architecture".

Impact
i386 CPU auto-detection fails solely because of a trace! log call whenever the TSFFS object is not named literally "tsffs".

Suggested fix
Log against cpu (or remove the get_object(CLASS_NAME)? calls to match x86_64.rs).

Status
Found by reading the code at ed67e1c; not reproduced under SIMICS.

主要语言
Rust
星标
337
派生
26
平均合并
5 小时 33 分钟
30 天内合并 PR
30

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

intel/tsffs 的其他 Issue

查看 intel/tsffs 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。