xen: Set max SCHEDOP_shutdown events to 3 #169
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
name: CI Tests for MicroV | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * 5' # Every Friday at 3am | |
jobs: | |
clang-format: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python clang clang-format cmake | |
shell: bash | |
- name: Validate Source Formatting | |
run: | | |
mkdir build && cd build | |
cp ../microv/scripts/cmake/config/config.cmake .. | |
echo 'set(ENABLE_BUILD_VMM OFF)' >> ../config.cmake | |
echo 'set(BUILD_XEN OFF)' >> ../config.cmake | |
echo 'set(BUILD_BUILDER OFF)' >> ../config.cmake | |
echo 'set(ENABLE_CLANG_FORMAT ON)' >> ../config.cmake | |
cmake ../microv/deps/hypervisor -DCONFIG=../config.cmake | |
make clang-format | |
cd ../microv | |
if [[ -n $(git diff) ]]; then | |
echo "You must run make clang-format before submitting a pull request" | |
echo "" | |
git diff | |
exit -1 | |
fi | |
shell: bash | |
build-efi: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python build-essential linux-headers-$(uname -r) nasm clang cmake libelf-dev | |
shell: bash | |
- name: Build EFI | |
run: | | |
mkdir build && cd build | |
cp ../microv/scripts/cmake/config/config.cmake .. | |
echo 'set(ENABLE_BUILD_USERSPACE OFF)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_VMM ON)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_EFI ON)' >> ../config.cmake | |
echo 'set(XEN_REGISTER_BASED_ABI ON)' >> ../config.cmake | |
echo 'set(ENABLE_SERIAL OFF)' >> ../config.cmake | |
cmake ../microv/deps/hypervisor -DCONFIG=../config.cmake -DCMAKE_CXX_FLAGS="--verbose " | |
make | |
shell: bash | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_efi | |
path: | | |
build/prefixes/x86_64-efi-pe/bin/bareflank.efi | |
build-efi-with-readconsole: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python build-essential linux-headers-$(uname -r) nasm clang cmake libelf-dev | |
shell: bash | |
- name: Build EFI with Xen readconsole | |
run: | | |
mkdir build && cd build | |
cp ../microv/scripts/cmake/config/config.cmake .. | |
echo 'set(ENABLE_BUILD_USERSPACE OFF)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_VMM ON)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_EFI ON)' >> ../config.cmake | |
echo 'set(XEN_REGISTER_BASED_ABI ON)' >> ../config.cmake | |
echo 'set(ENABLE_SERIAL OFF)' >> ../config.cmake | |
echo 'set(XEN_READCONSOLE_ROOTVM ON)' >> ../config.cmake | |
cmake ../microv/deps/hypervisor -DCONFIG=../config.cmake -DCMAKE_CXX_FLAGS="--verbose " | |
make | |
shell: bash | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_efi_xen_readconsole | |
path: | | |
build/prefixes/x86_64-efi-pe/bin/bareflank.efi | |
build-efi-debug: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python build-essential linux-headers-$(uname -r) nasm clang cmake libelf-dev | |
shell: bash | |
- name: Build EFI | |
run: | | |
mkdir build && cd build | |
cp ../microv/scripts/cmake/config/config.cmake .. | |
echo 'set(ENABLE_BUILD_USERSPACE OFF)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_VMM ON)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_EFI ON)' >> ../config.cmake | |
echo 'set(XEN_REGISTER_BASED_ABI ON)' >> ../config.cmake | |
echo 'set(XEN_READCONSOLE_ROOTVM ON)' >> ../config.cmake | |
echo 'set(USE_XUE ON)' >> ../config.cmake | |
echo 'set(ENABLE_SERIAL ON)' >> ../config.cmake | |
echo 'set(DEFAULT_COM_PORT 0x3F8U)' >> ../config.cmake | |
echo 'set(DEBUG_LEVEL 9)' >> ../config.cmake | |
cmake ../microv/deps/hypervisor -DCONFIG=../config.cmake -DCMAKE_CXX_FLAGS="--verbose " | |
make -j | |
shell: bash | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_efi_debug | |
path: | | |
build/prefixes/x86_64-efi-pe/bin/bareflank.efi | |
build-efi-noeth: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python build-essential linux-headers-$(uname -r) nasm clang cmake libelf-dev | |
shell: bash | |
- name: Build EFI | |
run: | | |
mkdir build && cd build | |
cp ../microv/scripts/cmake/config/config.cmake .. | |
echo 'set(ENABLE_BUILD_USERSPACE OFF)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_VMM ON)' >> ../config.cmake | |
echo 'set(ENABLE_BUILD_EFI ON)' >> ../config.cmake | |
echo 'set(XEN_REGISTER_BASED_ABI ON)' >> ../config.cmake | |
echo 'set(ENABLE_NOETH_PT ON)' >> ../config.cmake | |
echo 'set(ENABLE_SERIAL OFF)' >> ../config.cmake | |
cmake ../microv/deps/hypervisor -DCONFIG=../config.cmake -DCMAKE_CXX_FLAGS="--verbose " | |
make | |
shell: bash | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_efi_noeth | |
path: | | |
build/prefixes/x86_64-efi-pe/bin/bareflank.efi | |
build-userpace: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup MSBuild (PATH) | |
id: setup_msbuild_path | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup | |
run: | | |
$MSBUILD_PATH = "${{steps.setup_msbuild_path.outputs.msbuildPath}}" | |
echo msbuild path: $MSBUILD_PATH | |
echo $MSBUILD_PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
choco install nasm | |
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
shell: pwsh | |
- name: Build Userspace | |
run: | | |
mkdir build && cd build | |
cp ..\microv\scripts\cmake\config\config.cmake .. | |
Add-Content -Path ..\config.cmake -Value "set(ENABLE_BUILD_USERSPACE ON)" | |
Add-Content -Path ..\config.cmake -Value "set(ENABLE_BUILD_VMM OFF)" | |
Add-Content -Path ..\config.cmake -Value "set(UVCTL_WINDOWS_SERVICE_FORCE_BOOTENTRY ON)" | |
cmake ../microv/deps/hypervisor -DCONFIG=..\config.cmake -G "Visual Studio 16 2019" -A x64 | |
& msbuild /p:Configuration=Release /p:Platform=x64 /p:TargetVersion=Windows10 hypervisor.sln | |
shell: pwsh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_userspace | |
path: | | |
build/prefixes/x86_64-userspace-pe/bin/uvctl.exe | |
build-userpace-debug: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup MSBuild (PATH) | |
id: setup_msbuild_path | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup | |
run: | | |
$MSBUILD_PATH = "${{steps.setup_msbuild_path.outputs.msbuildPath}}" | |
echo msbuild path: $MSBUILD_PATH | |
echo $MSBUILD_PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
choco install nasm | |
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
shell: pwsh | |
- name: Build Userspace | |
run: | | |
mkdir build && cd build | |
cp ..\microv\scripts\cmake\config\config.cmake .. | |
Add-Content -Path ..\config.cmake -Value "set(ENABLE_BUILD_USERSPACE ON)" | |
Add-Content -Path ..\config.cmake -Value "set(ENABLE_BUILD_VMM OFF)" | |
Add-Content -Path ..\config.cmake -Value "set(XEN_READCONSOLE_ROOTVM ON)" | |
cmake ../microv/deps/hypervisor -DCONFIG=..\config.cmake -G "Visual Studio 16 2019" -A x64 | |
& msbuild /p:Configuration=Release /p:Platform=x64 /p:TargetVersion=Windows10 hypervisor.sln | |
shell: pwsh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_userspace_debug | |
path: | | |
build/prefixes/x86_64-userspace-pe/bin/uvctl.exe | |
build-drivers: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup MSBuild (PATH) | |
id: setup_msbuild_path | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup | |
run: | | |
# Get dependencies | |
$MSBUILD_PATH = "${{steps.setup_msbuild_path.outputs.msbuildPath}}" | |
echo "msbuild path: $MSBUILD_PATH" | |
echo $MSBUILD_PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
choco install nasm | |
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
# Set latest build number | |
$runs = Invoke-WebRequest -Headers @{"Authorization" = 'token ${{ secrets.GITHUB_TOKEN }}'} -Uri 'https://api.github.com/repos/bareflank/microv/actions/runs?branch=mono&status=success' | ConvertFrom-Json | |
Add-Content -Path $Env:GITHUB_ENV -Value "BUILD_NUMBER=$($runs.total_count + 10)" | |
shell: pwsh | |
- name: Build Drivers | |
run: | | |
cd .\microv\drivers | |
.\build-all.ps1 -RegisterBasedAbi | |
shell: pwsh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_drivers | |
path: | | |
microv/drivers/builder/windows/builder/x64/* | |
microv/drivers/builder/windows/vs2019/Windows10Release/x64/builder.cer | |
microv/drivers/visr/windows/visr/x64/* | |
microv/drivers/visr/windows/vs2019/Windows10Release/x64/visr.cer | |
microv/drivers/winpv/xenbus/xenbus/x64/* | |
microv/drivers/winpv/xenbus/vs2019/Windows10Release/x64/xenbus.cer | |
microv/drivers/winpv/xennet/xennet/x64/* | |
microv/drivers/winpv/xennet/vs2019/Windows10Release/x64/xennet.cer | |
microv/drivers/winpv/xenvif/xenvif/x64/* | |
microv/drivers/winpv/xenvif/vs2019/Windows10Release/x64/xenvif.cer | |
microv/drivers/winpv/xeniface/xeniface/x64/* | |
microv/drivers/winpv/xeniface/vs2019/Windows10Release/x64/xeniface.cer | |
microv/drivers/winpv/xeniface/include/xencontrol.h | |
microv/drivers/winpv/xeniface/include/xeniface_ioctls.h | |
build-drivers-nocerts: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: microv | |
- name: Setup MSBuild (PATH) | |
id: setup_msbuild_path | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup | |
run: | | |
# Get dependencies | |
$MSBUILD_PATH = "${{steps.setup_msbuild_path.outputs.msbuildPath}}" | |
echo "msbuild path: $MSBUILD_PATH" | |
echo $MSBUILD_PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
choco install nasm | |
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
# Set latest build number | |
$runs = Invoke-WebRequest -Headers @{"Authorization" = 'token ${{ secrets.GITHUB_TOKEN }}'} -Uri 'https://api.github.com/repos/bareflank/microv/actions/runs?branch=mono&status=success' | ConvertFrom-Json | |
Add-Content -Path $Env:GITHUB_ENV -Value "BUILD_NUMBER=$($runs.total_count + 10)" | |
shell: pwsh | |
- name: Build Drivers with Test Sign Off | |
run: | | |
cd .\microv\drivers | |
$SignOff = '<SignMode>Off</SignMode>' | |
$SignTest = '<SignMode>TestSign</SignMode>' | |
$Files = Get-ChildItem -Recurse | Select-String $SignTest -List | |
foreach ($f in $Files.Path) { (Get-Content $f) -replace $SignTest, $SignOff | Set-Content $f } | |
.\build-all.ps1 -RegisterBasedAbi | |
shell: pwsh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: microv_drivers_nocerts | |
path: | | |
microv/drivers/builder/windows/vs2019/Windows10Release/x64/package/* | |
microv/drivers/visr/windows/vs2019/Windows10Release/x64/package/* | |
microv/drivers/winpv/xenbus/vs2019/Windows10Release/x64/package/* | |
microv/drivers/winpv/xennet/vs2019/Windows10Release/x64/package/* | |
microv/drivers/winpv/xenvif/vs2019/Windows10Release/x64/package/* | |
microv/drivers/winpv/xeniface/vs2019/Windows10Release/x64/package/* | |
microv/drivers/winpv/xeniface/include/xencontrol.h | |
microv/drivers/winpv/xeniface/include/xeniface_ioctls.h |