2. Configure and Build BitVisor
Select compile-time options, write runtime configuration (defconfig), and build
Compile-time Configuration (Kconfig)
Run the following from the source directory:
make config
Recommended options for getting started:
- 64
- CPU_MMU_SPT_1
- CPU_MMU_SPT_USE_PAE
- DBGSH
- ACPI_DSDT
- DISABLE_SLEEP
- ENABLE_ASSERT
- NET_DRIVER
- NET_PRO1000 (Intel NIC)
- NET_RE (Realtek NIC)
- NET_BNX (Broadcom NIC)
- NET_AQ (Aquantia NIC)
- NET_VIRTIO_NET (expose NIC to guest as virtio — recommended)
- ACPI_TIME_SOURCE
- TCG_BIOS
- BACKTRACE
- IP
- THREAD_1CPU
- ACPI_IGNORE_ERROR
- DISABLE_VTD
- DMAR_PASS_THROUGH
Compiler warnings from external or unmaintained research code can be safely ignored.
Runtime Configuration (defconfig)
Copy the template and edit it:
cp defconfig.tmpl defconfig
The defconfig file uses plain C struct initialization syntax.
See include/share/config.h for the full structure definition.
Minimal network and syslog configuration
struct config_data config = {
.vmm = {
.tty_mac_address = {
0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF /* MAC of syslog receiver */
},
.tty_syslog = {
.enable = 1,
.src_ipaddr = { 192, 168, 0, 7 }, /* BitVisor source IP */
.dst_ipaddr = { 192, 168, 0, 1 }, /* syslog receiver IP */
},
.driver = {
.pci = "driver=pro1000, net=ippass, tty=1, virtio=1",
},
},
.ip = {
.use_dhcp = 0,
.ipaddr = { 192, 168, 0, 7 },
.netmask = { 255, 255, 255, 0 },
.gateway = { 192, 168, 0, 1 },
},
};
net= option reference
| Value | Behavior |
|---|---|
net=pass |
No IP stack; traffic goes to guest only |
net=ip |
BitVisor runs IP stack; traffic does not reach the guest |
net=ippass |
BitVisor and guest both receive traffic |
net=ippassfilter |
Separates traffic when possible |
net=ippassfilter2 |
Like ippassfilter with spurious interrupt workaround (recommended for bnx, re, aq) |
pro1000 uses MSI interrupts and works fine with net=ippass.
bnx, re, and aq use pin interrupts, so ippassfilter2 is recommended.
NIC driver name reference
| NIC | driver= value |
|---|---|
| Intel | pro1000 |
| Broadcom | bnx |
| Realtek | re |
| Aquantia | aq |
Build the Hypervisor
make
On success, bitvisor.elf is generated in the source root.
Build the UEFI Loader
cd boot/uefi-loader
make
On success, boot/uefi-loader/loadvmm.efi is generated.
Cross-compiling for AArch64 (Experimental)
To cross-compile on an x86_64 host:
# Hypervisor core
CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 make
# UEFI loader
cd boot/uefi-loader
CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 make
Adjust CROSS_COMPILE to match your toolchain prefix.
Verify the output architecture:
file bitvisor.elf
# → ELF 64-bit LSB executable, ARM aarch64, ...
file boot/uefi-loader/loadvmm.efi
# → PE32+ executable (DLL) (EFI application) Aarch64, ...