Giter Site home page Giter Site logo

hvisor's Introduction

hvisor





README:中文 | English

Armv8 hypervisor based on Linux & implemented in Rust,porting from RVM1.5 & jailhouse.

🚧 Working In Progress.

Progress

  • Architecture: aarch64
  • Platform: Qemu virt aarch64
  • Exception
  • Gicv3
  • Memory
  • Enable non root linux
  • VirtIO device: block, net
  • Architecture: riscv64
  • Platform: nxp

Build & Run

For detailed build and running tutorials, including building the development environment and creating a file system, please refer to here.

To make it easy to get started, here (extraction code: sysH) provides a Linux kernel Image and a file system ubuntu-20.04-rootfs_ext4.img with the username arm64 and the password as a whitespace. The directories are organized as follows:

├── home
	├── arm64 
        ├── images: Contains a Linux Image and ramfs.
        ├── hvisor: Files required to run hvisor.
        ├── jailhouse: Files required to run jailhouse.

The following describes how to run a non-root-linux on jailhouse/hvisor based on ubuntu-20.04-rootfs_ext4.img:

  1. Build rvmarm.bin:

    make all

    Then copy target/aarch64/debug/rvmarm.bin to ~/hvisor/ in ubuntu-20.04-rootfs_ext4.img.

  2. Start QEMU:

    sudo qemu-system-aarch64 \
        -machine virt,gic_version=3 \
        -machine virtualization=true \
        -cpu cortex-a57 \
        -machine type=virt \
        -nographic \
        -smp 16  \
        -m 1024 \
        -kernel your-linux-Image-path/Image \
        -append "console=ttyAMA0 root=/dev/vda rw mem=768m" \
        -drive if=none,file=your-rootfs-path/ubuntu-20.04-rootfs_ext4.img,id=hd0,format=raw \
        -device virtio-blk-device,drive=hd0 \
        -net nic \
        -net user,hostfwd=tcp::2333-:22
  3. Enter the username arm64 and the password as a whitespace after startup.

  4. Go to the home directory and start non-root-linux:

    • For hvisor: go to the hvisor folder and run:

      ./setup.sh
      ./linux.sh
      
    • For Jailhouse: go to the jailhouse folder and run:

      ./linux.sh
      

Enable a second serial console

If someone wants non-root-linux and root-linux in two different terminals, add this line at the end of the qemu startup command:

-device virtio-serial-device -chardev pty,id=serial3 -device virtconsole,chardev=serial3

After starting qemu, the char device redirected to /dev/pts/num (label serial3) message will output by the first terminal, execute this in another terminal:

sudo screen /dev/pts/num

where num is a specific number.

hvisor's People

Contributors

likey99 avatar inquisitor-201 avatar kouweilee avatar comet959 avatar miaowulue avatar leeeastwood 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.