Skip to content
This repository has been archived by the owner on Oct 7, 2018. It is now read-only.
/ tlb-split Public archive

TLB splitting module for the Bareflank Hypervisor.

Notifications You must be signed in to change notification settings

no-realm/tlb-split

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLB splitting module for the Bareflank Hypervisor

OUTDATED: New version can be found here: ept_split

Description

This module adds TLB splitting to the Bareflank Hypervisor by providing an IOCTL and VMCALL interface.
This module also makes use of the Extended APIs module.
For further information about the Bareflank Hypervisor and how to create extensions, please see the following documentation.

API Documentation

Compilation / Usage

This example uses both the Bareflank Hypervisor, as well as a modified version of the Extended APIs module.
The instructions below are for Windows and should be executed from inside Cygwin64.
Replace <bareflank path> with your Bareflank path!

# Change directory to the bareflank dir
cd <bareflank path>

# Clone the Bareflank hypervisor repo and cd into it
git clone https://github.com/Bareflank/hypervisor.git && cd hypervisor

# Clone both the extended_apis and the tlb-split repo
git clone https://github.com/Randshot/extended_apis.git
git clone https://github.com/Randshot/tlb-split.git src_tlb_split

# Setup Cygwin, but don't configure Bareflank yet
./tools/scripts/setup_cygwin.sh --no-configure

# Create the extensions.mk file
touch extensions.mk

# Not needed, I think...
#./configure -m ./extended_apis/bin/extended_apis.modules

# Create the build directory and cd into it
cd .. && mkdir build && cd build

# Configure the Bareflank hypervisor and define the tlp-split repo as module
../hypervisor/configure -m ../hypervisor/src_tlb_split/bin/tlb_split.modules --compiler clang --linker $HOME/usr/bin/x86_64-elf-ld.exe

# Execute make
make

To run the monitor application, we need to first load the hypervisor and then run the monitor app that will output information about page flips.

make driver_load
make quick

makefiles/src_tlb_split/app/bin/native/hook.exe

make stop
make driver_unload

For more information about the monitor application use the --help option.

makefiles/src_tlb_split/app/bin/native/hook.exe --help

Aliases

These are the aliases that I have defined in my .bashrc (/home/<username>/.bashrc) file.
Replace <bareflank path> with your Bareflank path!

# Bareflank aliases
alias bfdir='cd <bareflank path>/build'
alias bfmake='make'
alias bfstart='make quick'
alias bfstop='make stop'
alias bfload='make driver_load'
alias bfunload='make driver_unload'
alias bfrestart='bfstop && bfstart'
alias bfrecompile='bfstop && bfunload && bfmake && bfload && bfstart'
alias bfmonitor='makefiles/src_tlb_split/app/bin/native/hook.exe'

Troubleshooting

Missing extensions.mk

Makefile:108: <bareflank path>/hypervisor/extensions.mk: No such file or directory
make[1]: *** No rule to make target '<bareflank path>/hypervisor/extensions.mk'.  Stop.
make: *** [Makefile:6: all] Error 2

If you get the above error after starting configure, just copy the extensions.mk file from the build directory into the hypervisor and then try it again.

About

TLB splitting module for the Bareflank Hypervisor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published