This repo includes the code for VeriSMo project.
- mid-2026 — Copilot-assisted refresh: verismo now builds and verifies against the latest Verus toolchain.
- ~10× faster verification: CI finishes the full proof in ~3 minutes (previously ~30 minutes).
- Soundness cleanup: dropped
assume()workarounds and unsound proofs that had been added to work around bugs in older Verus.
- The code here is a research prototype originally built between 2022-2024; The build and verification still work in this project. However it may not work with current HyperV due to ABI mismatch. The steps to run it in a VM is not tested in recent release;
- We recommend using this repository as a reference to explore what is possible for low-level verified code (rust-based kernel). For production or ongoing development, please refer to the Verus project for the latest features and tooling.
- The current implementation does not fully separate executable code from specification/proof code. We are actively exploring incremental verification of real-world systems. For example, COCONUT-SVSM is the first open-source project that successfully integrated Verus-based verification into an existing codebase without a full rewrite. You could expect it as a more developer-friendly Rust code with a better verification performance in the future.
- tools/ : includes verifier and compiler tools and scripts.
- deps/ : includes hacl package
- source/ : verismo code
- source/verismo : verified code for verismo
- source/verismo_main : main executable bin, which only defines a unverified Rust panic handler.
- source/verismo/src/arch : model
- source/verismo/src/entry.s : a small and unverified assembly code.
- source/target.json : target configuration
First, Install rust toolchain;
tools/install.sh
Install the Verus toolchain (verus, rust_verify, z3, cargo-verus, verusfmt) into ~/.cargo/bin.
By default this downloads the pinned prebuilt release:
tools/install_verus
Pass --verus-dir PATH (optionally with --verus-rev REV) to build Verus from a source checkout instead, or --force to reinstall when the expected version is already present. Run tools/install_verus --help for full usage.
Then, build verus-rustc (replacing rustc) and igvm tools and dependencies.
tools/activate.sh
Now, run verification checks and build the binary.
🍵 This step takes several minutes.
Run
cd source; cargo verus focus --release;
cd source; cargo verus focus --release -- --verify-module security::monitor
A fully verified result should have
verification results:: 852 verified, 0 errors
verification results:: 1280 verified, 0 errors
If no changes are made in source/verismo, we recommend to build without verification to speed up the build process.
make debugbuild
or
cd source/verismo_main; cargo verus build -- --no-verify;
- Download linux submodule:
git submodule update --init richos/snplinux - Build guest OS and drivers:
make fs -f Makefile.default - Run
sh source/target/target/release/verismo/igvm.shto generate the verismo in IGVM format for Hyper-V:source/target/target/release/verismo/verismo-rust.bin - Run
make fsto generate a vhdx file as filesystem for the VM:richos/test-fs/verismo.vhdx
- Hardware: A AMD SEV-SNP machine.
- OS: Windows with a Hypervisor released after 20230909. Earlier release may not support restricted interrupts in both VMPLs and thus will not work.
- Optional: A Debug machine with windows OS.
Move following files to your AMD SEV-SNP machine.
source/target/target/release/verismo/verismo-rust.binrichos/test-fs/verismo.vhdxtools/vm/*
build-vm.ps1 verismo verismo-rust.bin None verismo.vhdx
start-vm verismo
GUI-access is not supported and you need to use ssh to login into the guest OS.
The verismo.vhdx includes init process that will open sshd service without password.
Wait for a minute before connecting.
ssh root@192.168.0.103
Once the guest is booted, it has already talked to VeriSMo to wake up AP and update page permissions during its booting.
Inside the guest, we also provided a verismo driver and some tests, to talk to VeriSMo directly if you want.
- verismo.ko: driver
- decode_report: display the binary report to a readable format.
- test.sh: a testing script
cd verismo
insmod verismo.ko
sh test.sh
Refer to windows remote debug to enable both host and hypervisor debugging. VeriSMo boot log is not accessible from guest OS.
In source/.cargo/config.toml, we replaced rustc with verus-rustc.
verus-rustc will call verus to compile vstd (a verus library), verismo and verismo-main package, and call rustc to compile all other packages (hacl, core, etc.).
See source/verismo/build.rs
- noverify: build source without verification
- verifymodule: if ${VERUS_MODULE} is not empty, only verify the specified module.
Depends on cfg(debug_assertations) Debug mode prints additional messages for debug purpose via leak_debug; Release mode erase all leak_debug or debug informations;
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.