Skip to content

Commit

Permalink
Merge 01d84f7 into 2177d11
Browse files Browse the repository at this point in the history
  • Loading branch information
brendank310 committed Mar 4, 2016
2 parents 2177d11 + 01d84f7 commit fead3ad
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 188 deletions.
10 changes: 0 additions & 10 deletions bfvmm/include/vcpu/vcpu_intel_x64.h
Expand Up @@ -89,16 +89,6 @@ class vcpu_intel_x64 : public vcpu
///
virtual vcpu_error::type promote() override;

/// Request teardown
///
/// Call into the hypervisor to promote the vCPU
/// guest state to the host. Following this, the
/// hypervisor can be shut down from the promoted guest.
///
/// @return success on success, failure otherwise
///
virtual vcpu_error::type request_teardown() override;

private:
vmxon_intel_x64 *m_vmxon;
vmcs_intel_x64 *m_vmcs;
Expand Down
24 changes: 5 additions & 19 deletions bfvmm/src/exit_handler/src/exit_handler_dispatch.cpp
Expand Up @@ -365,24 +365,7 @@ exit_handler_dispatch::handle_rsm()

void
exit_handler_dispatch::handle_vmcall()
{
switch (g_guest_rax)
{
case VMCS_PROMOTION:
{
advance_rip();
g_guest_rax = 0x00;
g_vcm->promote_vcpu(0);
break;
}
default:
{
g_guest_rax = 0xFFFFFFFFFFFFFFFF;
advance_rip();
break;
}
}
}
{ unimplemented_handler(); }

void
exit_handler_dispatch::handle_vmclear()
Expand Down Expand Up @@ -414,7 +397,10 @@ exit_handler_dispatch::handle_vmwrite()

void
exit_handler_dispatch::handle_vmxoff()
{ unimplemented_handler(); }
{
g_guest_rax = 0x00;
g_vcm->promote_vcpu(0);
}

void
exit_handler_dispatch::handle_vmxon()
Expand Down
1 change: 0 additions & 1 deletion bfvmm/src/exit_handler/src/exit_handler_entry.asm
Expand Up @@ -92,7 +92,6 @@ promote_vmcs_to_root:
mov r10, [g_guest_r10]
mov r9, [g_guest_r09]
mov r8, [g_guest_r08]
mov rsp, [g_guest_rsp]

sti
ret
Expand Down
15 changes: 0 additions & 15 deletions bfvmm/src/vcpu/src/vcpu_intel_x64.cpp
Expand Up @@ -106,18 +106,3 @@ vcpu_intel_x64::promote()

return vcpu_error::success;
}

vcpu_error::type
vcpu_intel_x64::request_teardown()
{
if (vcpu_error::success == m_intrinsics->vmcall(VMCS_PROMOTION))
{
return vcpu_error::success;
}
else
{
return vcpu_error::success;
}

return vcpu_error::failure;
}
3 changes: 0 additions & 3 deletions bfvmm/src/vcpu/src/vcpu_manager.cpp
Expand Up @@ -85,9 +85,6 @@ vcpu_manager::stop(int64_t vcpuid)
if (!vc)
return vcpu_manager_error::invalid;

if (vc->request_teardown() != vcpu_error::success)
return vcpu_manager_error::failure;

if (vc->stop() != vcpu_error::success)
return vcpu_manager_error::failure;

Expand Down
141 changes: 1 addition & 140 deletions tools/scripts/create-cross-compiler.sh
Expand Up @@ -7,7 +7,7 @@
# is mainly used by Travis CI because it cannot handle all of the output
# that this scripts spits out.
#
# export KEEP_TMP=true
export KEEP_TMP=true
# Tells the script to keep the tmp directory when it's finished. This is
# used by developers of this script so that you can work on the script
# without having to recompile every step constantly. If you need to
Expand Down Expand Up @@ -164,47 +164,6 @@ set -x
# Fetch
# ------------------------------------------------------------------------------

if [ ! -d "binutils" ]; then
rm -Rf completed_build_binutils
wget --no-check-certificate $BINUTILS_URL
tar xvf binutils-*.tar.bz2
mv binutils-*/ binutils
fi

if [ ! -d "gcc" ]; then
rm -Rf completed_build_gcc
rm -Rf completed_patch_gcc
wget --no-check-certificate $GCC_URL
tar xvf gcc-*.tar.bz2
mv gcc-*/ gcc
fi

if [ ! -d "nasm" ]; then
rm -Rf completed_build_nasm
wget --no-check-certificate $NASM_URL
tar xvf nasm-*.tar.gz
mv nasm-*/ nasm
fi

if [ ! -d "newlib" ]; then
rm -Rf completed_build_newlib
wget --no-check-certificate $NEWLIB_URL
tar xvf newlib-*.tar.gz
mv newlib-*/ newlib
fi

if [ ! -d "cmake" ]; then
rm -Rf completed_build_cmake
wget --no-check-certificate $CMAKE_URL
tar xvf cmake-*.tar.gz
mv cmake-*/ cmake
fi

if [ ! -f "gcc_bareflank.patch" ]; then
wget $GCC_PATCH_URL
mv gcc-*_bareflank.patch gcc_bareflank.patch
fi

if [ ! -d "libbfc" ]; then
rm -Rf completed_build_libbfc
git clone --depth 1 https://github.com/Bareflank/libbfc.git
Expand All @@ -224,23 +183,6 @@ if [ ! -d "llvm" ]; then
git clone --depth 1 http://llvm.org/git/llvm
fi

# ------------------------------------------------------------------------------
# Patches
# ------------------------------------------------------------------------------

if [ ! -f "completed_patch_gcc" ]; then

pushd $TMPDIR/gcc/
patch -p1 < ../gcc_bareflank.patch
popd

touch completed_patch_gcc
fi

# ------------------------------------------------------------------------------
# Install Wrapper
# ------------------------------------------------------------------------------

if [ ! -f "installed_bareflank_gcc_wrapper" ]; then

rm -Rf $PREFIX/bin/x86_64-bareflank-gcc
Expand All @@ -254,65 +196,6 @@ if [ ! -f "installed_bareflank_gcc_wrapper" ]; then
touch installed_bareflank_gcc_wrapper
fi

# ------------------------------------------------------------------------------
# Cmake
# ------------------------------------------------------------------------------

if [ ! -f "completed_build_cmake" ]; then

rm -Rf build-cmake
mkdir -p build-cmake

pushd build-cmake
../cmake/configure
make -j2
sudo make -j2 install
popd

touch completed_build_cmake
fi

# ------------------------------------------------------------------------------
# Binutils
# ------------------------------------------------------------------------------

if [ ! -f "completed_build_binutils" ]; then

rm -Rf build-binutils
mkdir -p build-binutils

pushd build-binutils
../binutils/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
make -j2
make -j2 install
popd

touch completed_build_binutils
fi

# ------------------------------------------------------------------------------
# GCC
# ------------------------------------------------------------------------------

if [ ! -f "completed_build_gcc" ]; then

rm -Rf build-gcc
mkdir -p build-gcc

pushd build-gcc
../gcc/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers
make -j2 all-gcc
make -j2 all-target-libgcc
make -j2 install-gcc
make -j2 install-target-libgcc
popd

touch completed_build_gcc
fi

# ------------------------------------------------------------------------------
# Nasm
# ------------------------------------------------------------------------------

if [ ! -f "completed_build_nasm" ]; then

Expand Down Expand Up @@ -344,28 +227,6 @@ export LIBBFC_DEFINES="-DSYM_PROVIDED__WRITE -DSYM_PROVIDED__MALLOC -DSYM_PROVID
export CFLAGS="-fpic -ffreestanding -mno-red-zone $NEWLIB_DEFINES" 2> /dev/null
export CXXFLAGS="-fno-use-cxa-atexit -fno-threadsafe-statics $CFLAGS" 2> /dev/null

# ------------------------------------------------------------------------------
# Newlib
# ------------------------------------------------------------------------------

if [ ! -f "completed_build_newlib" ]; then

rm -Rf completed_build_libcxx

rm -Rf build-newlib
mkdir -p build-newlib

pushd build-newlib
../newlib/configure --target=$TARGET --prefix=$PREFIX
make -j2
make -j2 install
popd

touch completed_build_newlib
fi

# ------------------------------------------------------------------------------
# CRT
# ------------------------------------------------------------------------------

if [ ! -f "completed_build_crt" ]; then
Expand Down

0 comments on commit fead3ad

Please sign in to comment.