-
Notifications
You must be signed in to change notification settings - Fork 42
MINIBALL: add CPU virtualization docs #188
MINIBALL: add CPU virtualization docs #188
Conversation
Codecov Report
@@ Coverage Diff @@
## main #188 +/- ##
=======================================
Coverage 86.24% 86.24%
=======================================
Files 81 81
Lines 21404 21404
=======================================
Hits 18460 18460
Misses 2944 2944
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# CPU 虚拟化 | ||
|
||
## 概述 | ||
在配置 KVM、guest memory 后,开始配置 vCPU。通过 dbs-boot、dbs-arch、kvm-ioctls crates 完成。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls use English or Chinese&English
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I have discussed with @yaoyinnan, he should first finish all the virtualization-related documents in his preferred language. And he could translate it to English when he has extra time. The important part of this project is virtualization knowledge instead of language translation.
But @yaoyinnan, could you add an comment/tip here to tell potential readers why there is only Chinese here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as @studychao said. Since my current main task is to build a simple virtual machine to sort out the virtualization knowledge points, the document is in Chinese. After I have free time, I will sync it for translation.
|
||
为了获得处理器信息,操作系统有两种获取处理器信息的方式:一种是 Intel 的 Multi Processor Specification(后续简称 MP Spec)约定的方式;另外一种是 ACPI MADT(Multiple APIC Description Table)约定的方式。MP Spec 约定的核心数据结构包括两部分:MP Floating Pointer Structure(后续简称 MPF)和 MP Configuration Table(后续简称 MP Table)的地址,如下图所示。 | ||
|
||
![MPtable.png](img/MPTable.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redraw the picture by yourself and add not only the picture but the original file is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll revise it later.
Since my current main task is to build a simple virtual machine to sort out the virtualization knowledge points, the document is in Chinese. After I have free time, I will sync it for translation. |
.map_err(Error::MpTable)?; | ||
``` | ||
|
||
在 `setup_mptable()` 中,第 5~7 行,首先判断 boot_cpus 是否超过给定的 max_cpus,以及第 8~9 行,判断 max_cpus 是否大于系统支持的最大 CPU 数目(MAX_SUPPORTED_CPUS)。之后,kvmtool 将 MP Table 放置在主板 BIOS 所在的区域(0xF0000 ~ 0xFFFFF),在 BIOS 实际占据地址的末尾处。kvmtool 首先申请了一块内存区,在其中组织 MPF 和 MP Table,然后将组织好的数据结构复制到 Guest 中主板 BIOS 所在的区域。代码如下: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kvmtool is another VMM.
In this document, you should use miniball
Hi Yinnan, thanks for your amazing work. |
Add description document for CPU virtualization part. Modify the description of CPU virtualization in MiniBall's README.md. Fixes: openanolis#187 Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2b1d26b
to
16c8b74
Compare
Add description document for CPU virtualization part. Modify the description of CPU virtualization in MiniBall's README.md.
Fixes: #187
Signed-off-by: yaoyinnan yaoyinnan@foxmail.com