- Notifications
You must be signed in to change notification settings - Fork3
hypocaust, a S-mode trap and emulate type-1 hypervisor run on RISC-V machine.
License
KuangjuX/hypocaust
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Note:
Currently developing the hardware-assisted virtualization projecthypocaust-2
Hypocaust is an experimental S-mode trap and emulate type-1 hypervisor for RISC-V. It is currently targeted at QEMU's virt machine type. It can run onRustSBI currently. It can boot and runminikernel
now.
- QEMU 7.0.0
- rust 1.66.0
git clone https://github.com/KuangjuX/hypocaust.gitcd hypocaustgit submodule update --initmake qemu
- DRAM Memory Region: 0x80000000 - 0x140000000 3GB
- hypervisor: 128MB
- Guest Kernel: 128MB
HVA Start | HVA End | HPA Start | HPA End | Memory Region |
---|---|---|---|---|
0x80000000 | 0x80200000 | 0x80000000 | 0x80200000 | RustSBI |
0x80200000 | 0xC0000000 | 0x80200000 | 0x88000000 | hypervisor |
0x88000000 | 0x8FFFFFFF | 0x88000000 | 0x8FFFFFFF | Guest Kernel 1 |
0x90000000 | 0x97FFFFFF | 0x90000000 | 0x97FFFFFF | Guest Kernel 2 |
0x98000000 | 0x9FFFFFFF | 0x98000000 | 0x9FFFFFFF | Guest Kernel 3 |
0x100000000 | 0x17FFFFFFF | 0x100000000 | 0x17FFFFFFF | Guest Kernel 1 Shadow Page Table |
VA Start | VA End | Memory Region |
---|---|---|
0xFFFFFFFFFFFFF000 | 0xFFFFFFFFFFFFFFFF | Trampoline |
0xFFFFFFFFFFFFE000 | 0xFFFFFFFFFFFFEFFF | Trap Context |
GVA | GPA | HVA | Memory Region |
---|---|---|---|
0x80000000 - 0x87FFFFFF | 0x80000000 - 0x87FFFFFF | 0x88000000 - 0x8FFFFFFF | Guest Kernel 1 |
0x80000000 - 0x87FFFFFF | 0x80000000 - 0x87FFFFFF | 0x90000000 - 0x97FFFFFF | Guest Kernel 2 |
0x80000000 - 0x87FFFFFF | 0x80000000 - 0x87FFFFFF | 0x98000000 - 0x9FFFFFFF | Guest Kernel 3 |
- QEMU virt machine type
- Load guest kernel && Run guest kernel
- Trap and emulate of privileged instructions(CSR related and SFENCE>VMA)
- Shadow page tables
- Synchronize guest page table & shadow page table
- Foward Expections & Interrupts
- Timers
- Serial IO emulate
- Handle external interrupts
- Expose and/or emulate peripherals
- passthrough virtio block and networkd devices
- multicore supported
- multiguest supported
See also:
MIT License
Copyright (c) 2022 ChengXiang Qi
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.