-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rian Quinn
committed
Apr 19, 2017
1 parent
10d61d4
commit 86cff6d
Showing
14 changed files
with
162 additions
and
527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Change Log | ||
|
||
## [Unreleased] | ||
### Added | ||
- Updated the example to reflect the new build system | ||
- Updated documentation | ||
|
||
## [1.0.0] - 2016-04-05 | ||
### Added | ||
- Initial Example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,44 @@ | ||
# Bareflank Hypervisor Example | ||
# Bareflank Hypervisor MST Bitmap Example | ||
|
||
## Description | ||
|
||
This example demonstrates how to extend the Bareflank hypervisor to utilize the MSR bitmap feature of Intel virtualization. For more information on how Bareflank extensions work, please see the following: | ||
This example demonstrates how to extend the Bareflank hypervisor to use | ||
Intel's MSR Bitmap to increase performance. For more information on how | ||
Bareflank extensions work, please see the following: | ||
|
||
[API Documentation](http://bareflank.github.io/hypervisor/html/) | ||
|
||
## Compilation / Usage | ||
|
||
First, you must clone the repo into your existing Bareflank repo. To see instructions on how to setup Bareflank, please see the following: | ||
|
||
[Bareflank Hypervisor](https://github.com/Bareflank/hypervisor) | ||
|
||
At the moment, out-of-tree compilation is not supported. | ||
To setup our extension, run the following (assuming Linux): | ||
|
||
``` | ||
cd ~/ | ||
git clone https://github.com/Bareflank/hypervisor.git | ||
git clone https://github.com/Bareflank/hypervisor_example_msr_bitmap.git | ||
cd ~/hypervisor | ||
git clone https://github.com/Bareflank/hypervisor_example_msr_bitmap | ||
``` | ||
Once the example repo is cloned, you can now build the example. Bareflank automatically looks for the examples, or any folder that starts with "src_", and builds these folders along with Bareflank itself. | ||
./tools/scripts/setup-<xxx>.sh --no-configure | ||
sudo reboot | ||
``` | ||
cd ~/ | ||
mkdir build | ||
cd ~/build | ||
~/hypervisor/configure -m ~/hypervisor_example_msr_bitmap/bin/msr_bitmap.modules -e ~/hypervisor_example_msr_bitmap | ||
make | ||
``` | ||
|
||
Finally, you can run the example. This can be done by running bfm manually, and providing the path to your custom modules list: | ||
To test out our extended version of Bareflank, all we need to do is run the | ||
make shortcuts as usual: | ||
|
||
``` | ||
pushd bfm/bin/native | ||
sudo LD_LIBRARY_PATH=. ./bfm load hypervisor_example_msr_bitmap/bin/msr_bitmap.modules | ||
sudo LD_LIBRARY_PATH=. ./bfm start | ||
sudo LD_LIBRARY_PATH=. ./bfm status | ||
sudo LD_LIBRARY_PATH=. ./bfm dump | ||
popd | ||
``` | ||
|
||
or you can use the shortcuts: | ||
make driver_load | ||
make quick | ||
``` | ||
make load MODULES=hypervisor_example_msr_bitmap/bin/msr_bitmap.modules | ||
make start | ||
make status | ||
make dump | ||
make stop | ||
make driver_unload | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
################################################################################ | ||
# Default Modules # | ||
################################################################################ | ||
|
||
# Default Modules | ||
# | ||
# Note: The existing vcpu_factory module is commented out as we will be | ||
# providing our own. | ||
../../../bfvmm/bin/cross/libmemory_manager.so | ||
../../../bfvmm/bin/cross/libentry.so | ||
../../../bfvmm/bin/cross/libserial.so | ||
../../../bfvmm/bin/cross/libdebug_ring.so | ||
../../../bfvmm/bin/cross/libintrinsics.so | ||
../../../bfvmm/bin/cross/libvmxon.so | ||
../../../bfvmm/bin/cross/libvmcs.so | ||
../../../bfvmm/bin/cross/libvcpu.so | ||
#../../../bfvmm/bin/cross/libvcpu_factory.so | ||
../../../bfvmm/bin/cross/libexit_handler.so | ||
../../../bfvmm/bin/cross/libmisc.so | ||
../../../bfvmm/bin/cross/libc++.so | ||
|
||
# Custom Modules | ||
# | ||
# Note: This is where we provide our own vcpu_factory. | ||
../../../hypervisor_example_msr_bitmap/bin/cross/libvcpu_factory_msr_bitmap.so | ||
../../../hypervisor_example_msr_bitmap/bin/cross/libvmcs_intel_x64_msr_bitmap.so | ||
{ | ||
"modules" : | ||
[ | ||
"%BUILD_ABS%/sysroot_vmm/x86_64-vmm-elf/lib/libc++.so.1.0", | ||
"%BUILD_ABS%/sysroot_vmm/x86_64-vmm-elf/lib/libc++abi.so.1.0", | ||
"%BUILD_ABS%/sysroot_vmm/x86_64-vmm-elf/lib/libc.so", | ||
"%BUILD_ABS%/makefiles/bfunwind/bin/cross/libbfunwind.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/crt/bin/cross/libcrt.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/debug_ring/bin/cross/libdebug_ring.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/entry/bin/cross/libentry.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/exit_handler/bin/cross/libexit_handler.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/intrinsics/bin/cross/libintrinsics.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/memory_manager/bin/cross/libmemory_manager.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/misc/bin/cross/misc", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/pthread/bin/cross/libpthread.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/serial/bin/cross/libserial.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/syscall/bin/cross/libsyscall.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/vcpu/bin/cross/libvcpu.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/vmcs/bin/cross/libvmcs.so", | ||
"%BUILD_ABS%/makefiles/bfvmm/src/vmxon/bin/cross/libvmxon.so", | ||
"%BUILD_ABS%/makefiles/hypervisor_example_msr_bitmap/vcpu_factory_msr_bitmap/bin/cross/libvcpu_factory_msr_bitmap.so" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.