GithubHelp home page GithubHelp logo

livstyle / rvm-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from equation314/rvm-tutorial

0.0 0.0 0.0 50 KB

Let's write an x86 hypervisor in Rust from scratch!

Home Page: https://www.bilibili.com/video/BV1n84y1V7a4/

Assembly 4.31% Rust 94.21% Makefile 1.49%

rvm-tutorial's Introduction

RVM-Tutorial

Let's write an x86 hypervisor in Rust from scratch!

Features

  • Lightweight enough, only 3K+ LoC
  • Supported guest OS: NimbOS
  • Guest/host memory isolation with nested paging
  • Device emulation:
    • serial port I/O
    • APIC timer
  • Currently, only supports single core single vCPU and single guest

Install Build Dependencies

Install cargo-binutils to use rust-objcopy and rust-objdump tools:

$ cargo install cargo-binutils

Your also need to install musl-gcc to build guest user applications.

Build Guest OS

$ git submodule init && git submodule update
$ cd guest/nimbos/kernel
$ make user
$ make GUEST=on

Build Guest BIOS

$ cd guest/bios
$ make

Build & Run Hypervisor

$ cd hypervisor
$ make run [LOG=warn|info|debug|trace]
......
Booting from ROM..

    RRRRRR  VV     VV MM    MM
    RR   RR VV     VV MMM  MMM
    RRRRRR   VV   VV  MM MM MM
    RR  RR    VV VV   MM    MM
    RR   RR    VVV    MM    MM
     ___    ____    ___    ___
    |__ \  / __ \  |__ \  |__ \
    __/ / / / / /  __/ /  __/ /
   / __/ / /_/ /  / __/  / __/
  /____/ \____/  /____/ /____/

arch = x86_64
build_mode = release
log_level = info
......
Running guest...

NN   NN  iii               bb        OOOOO    SSSSS
NNN  NN       mm mm mmmm   bb       OO   OO  SS
NN N NN  iii  mmm  mm  mm  bbbbbb   OO   OO   SSSSS
NN  NNN  iii  mmm  mm  mm  bb   bb  OO   OO       SS
NN   NN  iii  mmm  mm  mm  bbbbbb    OOOO0    SSSSS
              ___    ____    ___    ___
             |__ \  / __ \  |__ \  |__ \
             __/ / / / / /  __/ /  __/ /
            / __/ / /_/ /  / __/  / __/
           /____/ \____/  /____/ /____/

arch = x86_64
platform = rvm-guest-x86_64
build_mode = release
log_level = warn
......

Documents

rvm-tutorial's People

Contributors

equation314 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.