Skip to content

oss-garage/bedrock

Repository files navigation

Bedrock

An experimental x86-64 hypervisor purpose-built for deterministic software testing.

Bedrock uses Intel VT-x to run guest VMs with fully emulated time (TSC), controlled randomness (RDRAND/RDSEED), various other device emulation, and copy-on-write VM forking - enabling reproducible execution for deterministic testing.

Architecture

┌────────────────────────────────────────────────────┐
│                    User Space                      │
│                                                    │
│  bedrock-vm      Rust library for VM control       │
│                                                    │
│                        │ ioctl                     │
├────────────────────────┼───────────────────────────┤
│                        ▼                           │
│                   Kernel Space                     │
│                                                    │
│  bedrock.ko      Kernel module (/dev/bedrock)      │
│                  - VMX setup and VM execution      │
│                  - EPT memory virtualization       │
│                  - Deterministic device emulation  │
│                  - ...                             │
│                                                    │
└────────────────────────────────────────────────────┘

Requirements

  • Linux 6.18 host kernel with CONFIG_RUST=y

  • Patched linux 6.18 guest kernel (see guest-patches/)

  • Bedrock requires a modern Intel CPU, due to a required feature called EPT-friendly PEBS, which was introduced in the Ice Lake-SP microarchitecture. Therefore, Ice Lake-SP CPUs (or newer) should work.

    The following CPUs have been confirmed to work:

    • Intel(R) Xeon(R) Gold 5412U (rented on Hetzner)
    • Intel(R) Xeon(R) Silver 4310 (rented on Worldstream)
    • {r,m}7i.metal-24xl instances on AWS.

CI

CI uses RunsOn with m7i AWS instances.


This project was created with heavy assistance from LLMs. Might freeze/hang or otherwise corrupt host machine, run at your own risk.

About

Experimental Hypervisor Purpose-Built for Deterministic Software Testing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors