Git Product home page Git Product logo

extended_apis_example_control_registers's Introduction

Bareflank Hypervisor Control Registers Access Hooks Example

Description

This example demonstrates how to extend the Bareflank hypervisor to use the APIs for hooking store/load access to the control registers. For more information on how Bareflank extensions work, please see the following:

API Documentation

Compilation / Usage

To setup our extension, run the following (assuming Linux):

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

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

cd ~/
mkdir build
cd ~/build

~/hypervisor/configure -m ~/hypervisor_example_cr_access_hooks/bin/cr_access_hooks.modules -e ~/hypervisor_example_cr_access_hooks
make

To test out our 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

The debug output should be something like:

DEBUG: enabling mov to cr3 exits

DEBUG: success: host os is now in a vm on vcpuid = 0

DEBUG: enabling mov to cr3 exits

DEBUG: success: host os is now in a vm on vcpuid = 1

DEBUG: cr3 example store callback hook #100; got value: 63a37000

DEBUG: cr3 example store callback hook #c8; got value: 6fab4000

DEBUG: cr3 example load callback hook #3e8; got value: 8fe8f000

DEBUG: cr3 example store callback hook #12c; got value: 8fe8f000

DEBUG: cr3 example store callback hook #190; got value: b5fc3000

DEBUG: cr3 example store callback hook #1f4; got value: 63a61000

DEBUG: cr3 example load callback hook #7d0; got value: 8fe8f000

DEBUG: cr3 example store callback hook #258; got value: 6fb14000

extended_apis_example_control_registers's People

Contributors

rianquinn avatar ycscaly avatar

Watchers

 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.