考核任务,写一份中文指南:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
参照wiki boot Host/Guest Linux
make lkvm-static
出现问题Makefile:357: *** No libfdt found. Please install libfdt-dev package. Stop.
, 但不论是通过手动编译还是apt下载安装都无法使之检测到libfdt。尝试找出昨天出错的问题,在运行Ubuntu操作系统的机器上进行昨日的步骤。
No libfdt found.
错误或因此导致。$ egrep -c '(vmx|svm)' /proc/cpuinfo
0
rmmod kvm
指令卸载kvm module
apt install gcc-riscv64-linux-gnu
解决了libfdt
无法用于kvmtool
编译的问题(后续qemu x-h=true
问题解决,应该可以正常运行,还未尝试)apt install gcc-riscv64-linux-gnu
安装工具链的可用性。推测或许因为桌面环境以及已有配置较为复杂,apt
安装和本地编译并不能完全支持后续步骤:
apt install gcc-riscv64-linux-gnu
安装的工具链缺乏ld
,无法链接程序riscv64-unknown-linux-gnu-gcc
足够齐全,但是头文件配置出现问题(busybox build rootFS step)Linux Lab 中已经完整支持所有的工具链的,也是一种候选的方式,一开始就是推荐搭建统一使用这个环境,对齐后续实验的环境。Ubuntu 20.04 + Qemu v6.2.0 + RISC-V toolchains + Linux Kernel 源码 + riscv64/virt 虚拟开发板,全部是一应俱全的。Linux Lab Disk 则连安装都不需要,直接可用。
如下是我ubuntu上安装的riscv相关的编译软件:
binutils-riscv64-linux-gnu
cpp-9-riscv64-linux-gnu
cpp-riscv64-linux-gnu
gcc-9-riscv64-linux-gnu
gcc-9-riscv64-linux-gnu-base:amd64
gcc-riscv64-linux-gnu
libatomic1-riscv64-cross
libc6-dev-riscv64-cross
libc6-riscv64-cross
libgcc-9-dev-riscv64-cross
libgcc-s1-riscv64-cross
libgomp1-riscv64-cross
linux-libc-dev-riscv64-cross
riscv-privileged
8.1-8.2.1mstatus, hstatus, sstatus
),产出原始文档
提交分析文章 20220723-virt-mode.md Pull Request.
提交 20220729-kvm-hello-world.md
Upload an introduction about Risc-V virtualization plans
Update 20220729-kvm-user-app.md with kvmtool and QEMU analysis.
Commit PR.
DONE:
SFENCE
, HFENCE
指令解析mstatus
, hstatus
, sstatus
, vsstatus
对应关系解析HALF DONE:
status
CSR 比较(field 划分及其在两级地址转换中的功能)atp
CSR 比较(satp
与 hgatp
, vsatp
对应关系)S | Status | H | Status | INVAL | Status | CSRs | Status |
---|---|---|---|---|---|---|---|
SFENCE | DONE | HFENCE | DONE | INVAL... | TODO | status | Ongoing |
Basic Page-Based Address Translation | TODO | 2-Stage | Ongoing | atp | Ongoing | ||
Simulator Implementation | TODO | Simulator Implementation | TODO | Simulator Implementation | TODO | trap | TODO |
interrupt | TODO | ||||||
exception | TODO | ||||||
time | TODO | ||||||
config/performance/security | TODO |
Half Done:Basic Page-Based Address Translation in S-Mode
DONE:CSR xstatus
Ongoing: Basic Page-Based Address Translation, 2-Stage AT
Reviewed 20220802-kvm-user-app.md.
PR of 20220812-mem-virt-rv-1.md.
Half done 20220812-mem-virt-rv-2.md
Status | Address Translation | 2-Stage AT |
---|---|---|
Done | Mechanism Flowchart | |
Ongoing | Spike implementation analysis | G-Stage |
Update 20220802-kvm-user-app.md and 20220812-mem-virt-rv-1.md.
Verify the method of inserting URL.
Optimize the commit log of PR.
Ongoing: Implementation of PTW in Spike.
Done: Sinval extension.
这个虚拟化的专栏可以关注一下:https://zhuanlan.zhihu.com/p/565787442
Modify last article about memory management.
Finish part of h-extension trap mechanism analysis (basic CSR, instructions).
TODO:
Figure out the function of MIP/MIE, SIP/SIE, HVIP/HIP/HIE and HGEIP/HGEIE.
Analyse how H-Ext. CSR HIP/HIE work with SIP/SIE to finish S-level trap handling.
TODO:
The hardware difference between machines that have H-Support and not. (QEMU)
Simulator implementation of extra hypervisor related trap. (Spike)
Figure out the function of hardware, OS (including KVM module), kvmtool and guest OS in the process of 2-stage address translation.
Figure out the function of hardware, OS (including KVM module), kvmtool and guest OS in the process of trap handling.
Modification of last article about Memory Management of H-Mode. Submit PR.
Finish an analysis article of trap handling. Submit PR.
Try tinycorrect to auto review articles, find out several shortcuts:
tinycorrect.sh
, but failed because of:
cd path/to/tico && . tinycorrect.sh
: to be solvedimages/riscv-kvm/mem-virt-2/mermaid-riscv-kvm-mem-virt-2-1.png
for article named riscv-kvm-mem-virt-2.md
. I think it's necessary to validate the specific partition mechanism: to be solved.Future work plan: KVM Implementation of
Today update:
Go through the inner function calling situation in KVM.
Refer to memory allocation implementation of Linux Buddy memory manager.
kvmtool/riscv/
Week Update
登录 后才可以发表评论