Git Product home page Git Product logo

extended_apis's Introduction

Extended APIs


GitHub version Build Status codecov CII Best Practices Join the chat at https://gitter.im/Bareflank-hypervisor/Lobby

Description

The Bareflank Hypervisor's main goal is to provide the "bare" minimum hypervisor. Since Bareflank supports C++ 11/14, multiple operating systems, and a full toolstack, it's not as simple as say SimpleVisor, but still adheres to the same basic principles of leaving out the complexity of a full blown hypervisor in favor of an implementation that is simple to read and follow.

It is our goal to provide a hypervisor that others can extend to create their own hypervisors. To this end, it is likely that when creating your own hypervisor, some tasks will be redundant. For example, Windows makes a lot of MSR accesses. When running Bareflank this is obvious as Windows takes a significant performance penalty since all MSR accesses are emulated. The first step most people will take on an Intel platform is to enable VPID and MSR bitmaps to increase performance. The process of setting up these resources is the same, regardless of what type of hypervisor you might be creating.

The purpose of this repository, is to provide an extended set of APIs to build your hypervisors from. Some of these APIs include:

  • MSR / IO Bitmaps
  • VPID / Extended Page Tables (EPT)
  • Monitor Traps
  • Virtual APIC / Interrupt Management
  • ACPI / Timers

Compilation / Usage

To setup the extended_apis, we must clone the extension into the Bareflank root folder and run make (the following assumes this is running on Linux).

cd ~/
git clone https://github.com/Bareflank/hypervisor.git
cd ~/hypervisor
git clone https://github.com/Bareflank/extended_apis.git

./tools/scripts/setup-<xxx>.sh --no-configure
sudo reboot

cd ~/hypervisor
./configure -m ./extended_apis/bin/extended_apis.modules

make
make test

To test out the extended version of Bareflank, all we need to do is run the make shortcuts as usual:

make driver_load
make quick

make status
make dump

make stop
make driver_unload

There are also a number of tests that can be run that demonstrate the various different vmcalls that are provided. For example:

cd ~/hypervisor
./extended_apis/tests/test_vpid.sh

The test_vpid.sh enables / disables VPID using JSON based vmcalls on all of the cores as follows

run_on_all_cores() {
    for (( core=0; core<$NUM_CORES; core++ ))
    do
        ARGS="--cpuid $core string json $1" make vmcall > /dev/null
    done
}

run_on_all_cores "'{\"command\":\"enable_vpid\", \"enabled\": false}'"
run_on_all_cores "'{\"command\":\"enable_vpid\", \"enabled\": true}'"

Links

Bareflank Hypervisor Website
Bareflank Hypervisor API Documentation

Roadmap

The project roadmap can be located here

License

The Bareflank Hypervisor is licensed under the GNU Lesser General Public License v2.1 (LGPL).

extended_apis's People

Contributors

alexisvl avatar jaredwright avatar jwzepf avatar no-realm avatar rianquinn 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.