{"id":13667944,"url":"https://github.com/KuangjuX/hypocaust","last_synced_at":"2025-04-26T18:30:51.351Z","repository":{"id":65718009,"uuid":"521277117","full_name":"KuangjuX/hypocaust","owner":"KuangjuX","description":"hypocaust, a S-mode trap and emulate type-1 hypervisor run on RISC-V machine.","archived":false,"fork":false,"pushed_at":"2023-02-20T07:20:46.000Z","size":2564,"stargazers_count":48,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T20:43:17.811Z","etag":null,"topics":["hypervisor","riscv","rust","vmm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KuangjuX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-08-04T13:26:57.000Z","updated_at":"2025-03-19T22:45:43.000Z","dependencies_parsed_at":"2024-01-14T16:14:48.267Z","dependency_job_id":"bbe1cc8a-51b7-4b1a-82c2-d99a10a9977b","html_url":"https://github.com/KuangjuX/hypocaust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangjuX%2Fhypocaust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangjuX%2Fhypocaust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangjuX%2Fhypocaust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangjuX%2Fhypocaust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KuangjuX","download_url":"https://codeload.github.com/KuangjuX/hypocaust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251035181,"owners_count":21526317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hypervisor","riscv","rust","vmm"],"created_at":"2024-08-02T07:00:55.375Z","updated_at":"2025-04-26T18:30:46.884Z","avatar_url":"https://github.com/KuangjuX.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Hypocaust \n**Note:**  \nCurrently developing the hardware-assisted virtualization project [**hypocaust-2**](https://github.com/KuangjuX/hypocaust-2)  \n\n## Overview\n**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 on [RustSBI](https://github.com/rustsbi/rustsbi) currently. It can boot and run `minikernel` now.   \n  \n\n\n![](docs/images/hypocaust.png)\n![](docs/images/run1.jpg)\n![](docs/images/debug1.jpg)\n\n## Environment\n- QEMU 7.0.0\n- rust 1.66.0\n\n## Build \n```\ngit clone https://github.com/KuangjuX/hypocaust.git\ncd hypocaust\ngit submodule update --init\n\nmake qemu\n```\n\n## Memory Region\n- DRAM Memory Region: 0x80000000 - 0x140000000 3GB   \n- hypervisor: 128MB  \n- Guest Kernel: 128MB \n\n### Hypervisor Memory Region\n| HVA Start | HVA End | HPA Start | HPA End | Memory Region |\n| --------------| ----------- | -------------- | ------------ | -------------  |\n| 0x80000000    | 0x80200000  | 0x80000000     | 0x80200000   |RustSBI        |\n| 0x80200000    | 0xC0000000  | 0x80200000     | 0x88000000   |hypervisor     |\n| 0x88000000    | 0x8FFFFFFF  | 0x88000000 | 0x8FFFFFFF | Guest Kernel 1   |\n| 0x90000000    | 0x97FFFFFF  | 0x90000000 | 0x97FFFFFF | Guest Kernel 2   |\n| 0x98000000    | 0x9FFFFFFF  | 0x98000000 | 0x9FFFFFFF | Guest Kernel 3   |\n| 0x100000000   | 0x17FFFFFFF | 0x100000000| 0x17FFFFFFF| Guest Kernel 1 Shadow Page Table |\n\n### Resvered Memory Region\n| VA Start | VA End | Memory Region |\n| ---------|--------| -------------- |\n| 0xFFFFFFFFFFFFF000 | 0xFFFFFFFFFFFFFFFF | Trampoline |\n| 0xFFFFFFFFFFFFE000 | 0xFFFFFFFFFFFFEFFF | Trap Context |\n\n### Guest Kernel Memory Region\n| GVA | GPA | HVA | Memory Region |  \n| ---- | ---- | ---- | ---- |  \n| 0x80000000 - 0x87FFFFFF | 0x80000000 - 0x87FFFFFF | 0x88000000 - 0x8FFFFFFF | Guest Kernel 1 | \n| 0x80000000 - 0x87FFFFFF | 0x80000000 - 0x87FFFFFF | 0x90000000 - 0x97FFFFFF | Guest Kernel 2|\n| 0x80000000 - 0x87FFFFFF | 0x80000000 - 0x87FFFFFF | 0x98000000 - 0x9FFFFFFF | Guest Kernel 3 |\n\n![](docs/images/layout.png)\n\n## Supported Platforms\n- QEMU virt machine type\n\n## RoadMap\n- [x] Load guest kernel \u0026\u0026 Run guest kernel\n- [x] Trap and emulate of privileged instructions(CSR related and SFENCE\u003eVMA)\n- [x] Shadow page tables\n- [x] Synchronize guest page table \u0026 shadow page table\n- [x] Foward Expections \u0026 Interrupts\n- [x] Timers\n- [ ] Serial IO emulate\n- [ ] Handle external interrupts\n- [ ] Expose and/or emulate peripherals\n- [ ] passthrough virtio block and networkd devices\n- [ ] multicore supported\n- [ ] multiguest supported\n\n## References\n- [rcore-os/rCore-Tutorial-v3](https://github.com/rcore-os/rCore-Tutorial-v3)\n- [mit-pdos/RVirt](https://github.com/mit-pdos/RVirt)\n\n## Questions\nSee also:\n- [Synchronize satp \u0026 SPT](https://github.com/KuangjuX/hypocaust/issues/1)\n\n## License\nMIT License\n\nCopyright (c) 2022 ChengXiang Qi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKuangjuX%2Fhypocaust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKuangjuX%2Fhypocaust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKuangjuX%2Fhypocaust/lists"}