{"id":13648659,"url":"https://github.com/rcore-os/RVM","last_synced_at":"2025-04-22T11:32:55.830Z","repository":{"id":44334839,"uuid":"274089049","full_name":"rcore-os/RVM","owner":"rcore-os","description":"Rcore Virtual Machine","archived":false,"fork":false,"pushed_at":"2024-03-06T08:12:35.000Z","size":1293,"stargazers_count":114,"open_issues_count":1,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-11T09:11:07.627Z","etag":null,"topics":["hypervisor","virtual-machine"],"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/rcore-os.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-22T09:01:23.000Z","updated_at":"2025-03-26T09:47:34.000Z","dependencies_parsed_at":"2024-11-09T23:40:35.696Z","dependency_job_id":null,"html_url":"https://github.com/rcore-os/RVM","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/rcore-os%2FRVM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcore-os%2FRVM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcore-os%2FRVM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcore-os%2FRVM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcore-os","download_url":"https://codeload.github.com/rcore-os/RVM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232415,"owners_count":21396640,"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","virtual-machine"],"created_at":"2024-08-02T01:04:26.087Z","updated_at":"2025-04-22T11:32:55.392Z","avatar_url":"https://github.com/rcore-os.png","language":"Rust","readme":"# DEPRECATED\n\nYou can see recent projects in:\n\n* https://github.com/equation314/RVM-Tutorial\n* https://github.com/rcore-os/RVM1.5\n\n# RVM -- Rcore Virtual Machine\n\n[![CI](https://github.com/rcore-os/RVM/workflows/CI/badge.svg?branch=master)](https://github.com/rcore-os/RVM/actions)\n\nAn experimental hypervisor library written in Rust to build both type-1 and type-2 hypervisors.\n\nSupported architecture: x86_64 (Intel VMX).\n\n## rustc info\n- current rustc -- rustc 1.56.0-nightly (08095fc1f 2021-07-26)\n- current rust-toolchain -- nightly\n \n\n## Basic usage\n\nSee the [UEFI example](examples/uefi/src/main.rs) for more details.\n\n```rust\nuse rvm::*;\n\nconst ENTRY: u64 = 0x2000;\n\nfn run_hypervisor() -\u003e RvmResult {\n    // create a guest physical memory set.\n    let gpm = DefaultGuestPhysMemorySet::new();\n\n    // create a guest.\n    let guest = Guest::new(gpm)?;\n\n    // create a vcpu.\n    let mut vcpu = Vcpu::new(ENTRY, guest.clone())?;\n\n    // map the guest physical memory region [0, 0x8000) to the host phyical\n    // memory region [0xC0000, 0xC8000).\n    let host_paddr = 0xC0000;\n    guest.add_memory_region(0, 0x8000, Some(0xC0000))?;\n\n    // I/O instructions with port 0x233-0x234 can cause VM exit and `vcpu.resume()`\n    // to return.\n    guest.set_trap(TrapKind::GuestTrapIo, 0x233, 2, None, 0xdeadbeef)?;\n\n    // The bootstrap processor is in IA-32e mode and enabled paging, you need to\n    // setup guest page table.\n    setup_guest_page_table(host_paddr);\n\n    // run the VCPU and block, until the specified traps occurs.\n    let packet = vcpu.resume()?;\n\n    // get the VCPU state.\n    let state = vcpu.read_state()?;\n\n    Ok(())\n}\n```\n\n## More examples\n\nRVM is used as the hypervisor module of the following OSes:\n\n* [rCore](https://github.com/rcore-os/rCore)\n* [zCore](https://github.com/rcore-os/zCore)\n\nIt can also run in linux as a kernel module and replace the [KVM](https://www.linux-kvm.org/page/Main_Page) hypervisor to support simple guest OSes such as [uCore](https://github.com/chyyuu/os_kernel_lab/tree/master). See the [ko example](examples/ko) and [rcore-vmm](https://github.com/rcore-os/rcore-vmm) for more details.\n\n## Documents\n\n* [in Chinese](https://github.com/rcore-os/RVM/wiki)\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcore-os%2FRVM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcore-os%2FRVM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcore-os%2FRVM/lists"}