{"id":13830426,"url":"https://github.com/LekKit/RVVM","last_synced_at":"2025-07-09T11:33:05.292Z","repository":{"id":37021676,"uuid":"339248351","full_name":"LekKit/RVVM","owner":"LekKit","description":"The RISC-V Virtual Machine ","archived":false,"fork":false,"pushed_at":"2024-04-08T14:01:57.000Z","size":2308,"stargazers_count":800,"open_issues_count":22,"forks_count":54,"subscribers_count":20,"default_branch":"staging","last_synced_at":"2024-04-08T17:03:16.004Z","etag":null,"topics":["c","emulation","emulator","emulators","instruction-decoding","jit","linux","risc","risc-v","riscv","riscv-emulator","riscv-linux","riscv-simulator","riscv32","riscv64","rvvm","tracing-jit","translation","virtual-machine","vm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LekKit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-GPL","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-02-16T00:49:28.000Z","updated_at":"2024-04-15T15:24:25.063Z","dependencies_parsed_at":"2023-02-01T08:01:22.355Z","dependency_job_id":"494cc4da-42a7-4e26-a5e0-51c72543a7e0","html_url":"https://github.com/LekKit/RVVM","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LekKit%2FRVVM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LekKit%2FRVVM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LekKit%2FRVVM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LekKit%2FRVVM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LekKit","download_url":"https://codeload.github.com/LekKit/RVVM/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225539392,"owners_count":17485318,"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":["c","emulation","emulator","emulators","instruction-decoding","jit","linux","risc","risc-v","riscv","riscv-emulator","riscv-linux","riscv-simulator","riscv32","riscv64","rvvm","tracing-jit","translation","virtual-machine","vm"],"created_at":"2024-08-04T10:00:59.779Z","updated_at":"2025-07-09T11:33:05.278Z","avatar_url":"https://github.com/LekKit.png","language":"C","readme":"\u003cdiv align=\"center\"\u003e\n\n![RVVM Logo](https://github.com/user-attachments/assets/a8d241eb-ebe9-4ceb-a31f-8fd452db75e6 \"The “RISC-V” trade name is a registered trade mark of RISC-V International. AmazDooM font is licensed under CC BY-NC 3.0. If you're a designer and have a better logo idea, please open an issue!\")\n\n[![version](https://img.shields.io/badge/version-0.7--git-brightgreen?style=for-the-badge)](#-installing) [![Build](https://img.shields.io/github/actions/workflow/status/LekKit/RVVM/build.yml?branch=staging\u0026style=for-the-badge)](https://github.com/LekKit/RVVM/actions/workflows/build.yml) [![Codacy grade](https://img.shields.io/codacy/grade/c77cc7499a784cd293fde58641ce3e46?logo=codacy\u0026style=for-the-badge)](https://app.codacy.com/gh/LekKit/RVVM/dashboard)\n\n[![Demo](https://img.shields.io/badge/Check%20it%20out-WASM%20Demo-red?style=for-the-badge)](https://lekkit.github.io/test/index.html) [![Wiki](https://img.shields.io/badge/Wiki-brightgreen?style=for-the-badge)](https://github.com/LekKit/RVVM/wiki)\n\n\u003c/div\u003e\n\n# RVVM - The RISC-V Virtual Machine\nRVVM is a virtual machine / emulator for RISC-V guests, which emphasizes on performance, security, lean code and portability. It already runs a lot of guest operating systems, including Linux, Haiku, FreeBSD, OpenBSD, etc. It also aims to run RISC-V applications on a foreign-arch host without full OS guest \u0026 isolation (Userland emulation).\n\n## Main features\n- Fully spec-compliant **rv64imafdcb** instruction set, Zkr/Zicbom/Zicboz/Sstc extensions\n- Tracing JIT with x86_64, ARM64, RISC-V backends - Faster than QEMU TCG\n- Working OpenSBI \u0026 U-Boot, Linux, FreeBSD, OpenBSD, Haiku guests\n- Framebuffer display, HID mouse \u0026 keyboard, UART terminal\n- NVMe storage drives, TRIM support (Deallocate space on host), fast multi-threaded IO\n- Networking userland stack (Works on any host OS)\n- VFIO PCIe passthrough (For GPUs, etc)\n- Kernel-level isolation to prevent and contain vulnerability exploitation\n- Library API (**librvvm**) for machine/userland emulation, implementing new devices\n- Userland emulation (WIP)\n- Shadow pagetable acceleration (WIP)\n- See [wiki page](https://github.com/LekKit/RVVM/wiki) for full list of features\n\n## 📦 Installing\n[![Artifacts](https://img.shields.io/badge/BIN-Artifacts-brightgreen?style=for-the-badge)](https://nightly.link/LekKit/RVVM/workflows/build/staging) [![AUR](https://img.shields.io/badge/Arch%20Linux-AUR-blue?style=for-the-badge\u0026logo=archlinux)](https://aur.archlinux.org/packages/rvvm-git) [![Build](https://img.shields.io/badge/Build-Make-red?style=for-the-badge)](#-building)\n\n## 🛠 Building\nCurrently builds using GNU Make (recommended) or CMake and is extremely portable.\n```sh\ngit clone https://github.com/LekKit/RVVM\ncd RVVM\nmake\ncd release.linux.x86_64\n./rvvm_x86_64 -h\n```\n\nAlternatively, you can use CMake:\n```sh\ngit clone https://github.com/LekKit/RVVM\ncd RVVM\ncmake -S. -Bbuild\ncmake --build build --target all\ncd build\n./rvvm -h\n```\n\nSee the [wiki page](https://github.com/LekKit/RVVM/wiki/Building-\u0026-Installing) for advanced build manual like cross-compilation.\n\n## 🚀 Running\nExample: Launches a dual-core VM with 2 GiB of RAM, 1280x720 display.\n\nRuns OpenSBI + U-Boot firmware, EFI guest from `drive.img`. Forwards host `127.0.0.1:2022` into guest SSH port.\n```sh\nrvvm fw_payload.bin -i drive.img -m 2G -smp 2 -res 1280x720 -portfwd tcp/127.0.0.1:2022=22\n```\n\nArgument explanation:\n```\n[fw_payload.bin]    Initial M-mode firmware, OpenSBI + U-Boot in this case\n-i  drive.img       Attach preferred storage image (Currently as NVMe)\n-m 2G               Memory amount (may be suffixed by k/M/G), default 256M\n-smp 2              Amount of cores, single-core machine by default\n-res 1280x720       Set display(s) resolution\n-portfwd 8080=80    Port forwarding (Extended: tcp/127.0.0.1:8080=80)\n . . .\n-rv32               Enable 32-bit RISC-V, 64-bit by default\n-v                  Verbose mode\n-h                  Extended help\n```\n\nSee [wiki page](https://github.com/LekKit/RVVM/wiki/Running) for recommended guest firmware/images and full argument explanation.\n\n## ⚖️ License\nThe **librvvm** library is licensed under non-viral [**MPL 2.0**](https://github.com/LekKit/RVVM/blob/staging/LICENSE-MPL) license.\n\nIf you wish to use **librvvm** as a component of a larger, non-GPL compliant project (permissive, etc), you are free to do so in any form (Static linkage, binary distribution, modules) as long as you comply with the MPL 2.0 license. MPL 2.0 licensing applies to Java JNI bindings as well.\n\nThe RVVM Manager and Linux userland emulator (**rvvm** and **rvvm-user**) binaries are licensed under the copyleft [**GPL 3.0**](https://github.com/LekKit/RVVM/blob/staging/LICENSE-GPL) license, since they are intended for end-users. All the heavy lifting is done by **librvvm** anyways.\n\n## 🎉 Contributions\n[![PRs are welcome](https://img.shields.io/badge/Pull%20requests-welcome-8957e5?style=for-the-badge\u0026logo=github)](https://github.com/LekKit/RVVM/pulls?q=is%3Apr+is%3Aclosed)\n|                      | Achievements | Working on |\n|----------------------|-------------|------------|\n| [**LekKit**](https://github.com/LekKit)                     | RVVM API \u0026 infrastructure \u003cbr\u003e RV64IMAFDC interpreter, MMU/IRQs/Priv/etc \u003cbr\u003e RVJIT Compiler, X86/RISC-V backends \u003cbr\u003e NVMe, RTL8169, VFIO, many tiny devices \u003cbr\u003e Userspace networking | Networking, Userspace emulation \u003cbr\u003e COW blk-dedup image format \u003cbr\u003e New CPU features \u0026 JIT optimizations |\n| [**cerg2010cerg2010**](https://github.com/cerg2010cerg2010) | Important fixes, RV64 groundwork, FPU \u003cbr\u003e Initial PLIC \u0026 PCI, PS2 HID, ATA, OC Ethernet \u003cbr\u003e ARM/ARM64 RVJIT backends | Testing, Assistance |\n| [**Mr0maks**](https://github.com/Mr0maks)                   | Initial C/M/Zicsr extensions, initial UART, VM debugger \u003cbr\u003e ARM32 mul/div JIT intrinsics | - |\n| [**0xCatPKG**](https://github.com/0xCatPKG)                 | Userspace network \u0026 API improvements \u003cbr\u003e Extended testing \u0026 portability fixes \u003cbr\u003e Wayland support | HD Audio |\n| [**X547**](https://github.com/X547)                         | Haiku GUI, I2C HID, Userland API assistance | Guest Haiku support, UserlandVM |\n| [**iyzsong**](https://github.com/iyzsong)                   | OpenBSD \u0026 PLIC fixes, Chardev API | |\n| [**nebulka1**](https://github.com/nebulka1)                 | Relative input mode | |\n\n## ☕️ Support the project\nIf you'd like to support the project, thank you, here's what you can do:\n- Report any encountered issue you may find (Beware to check on staging branch)\n- Contribute features listed in [issues](https://github.com/LekKit/RVVM/issues) or [TODO](#-todo)\n- Give access to, or donate a useful piece of hardware for development (Milk-V Megrez would be very helpful for KVM) - contact at `@lekkit:matrix.org`\n- Monero: `43LXDwciXLhK26tKCKKdqWTSjHusuEGHK7y6s6BWLVKLGtZhgaN4NLLDbQEdvoGdVseq9P6icsiAbab5dGgo1XdCRr6etfS`\n- Bitcoin: `bc1qg02hthvfnrmsz2xd2lrgfgkwcvnt2509ynj4mh`\n\n## 🔍 TODO\n- Implement Svpbmt, Svnapot extensions\n- Sparse block image format with compression/deduplication [WIP]\n- Suspend/resume to file, VM migration\n- Linux userspace binary emulation [WIP]\n- USB3.0 XHCI, USB passthrough [WIP]\n- Sound (HD Audio or else) [WIP]\n- More RVJIT optimizations, shared caches\n- FPU JIT (Complicated AF to make a conformant one)\n- Vector extensions\n- Other peripherals from real boards (VisionFive 2: GPIO, SPI, flash...)\n- Virtio devices (For better QEMU interoperability; VirGL via Virtio-GPU)\n- Free page reporting via virtio-balloon\n- *A lot more...*\n- KVM hypervisor? Alternative CPU engines?\n\n\nThe RISC-V trade name is a registered trade mark of RISC-V International.\n","funding_links":[],"categories":["C","CPU RISC-V"],"sub_categories":["网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLekKit%2FRVVM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLekKit%2FRVVM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLekKit%2FRVVM/lists"}