Repository navigation
wip: sivm vbs bars - #5295
wip: sivm vbs bars#5295emirceski (emirceski) wants to merge 8 commits into
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
There was a problem hiding this comment.
🟡 Changes recommended
Unattested devices can reach Run yet fail isolation-resource queries, and the shared-MMIO test does not verify the acceptance hook needed to keep VBS BARs accessible.
2 open issues
What changed in this PR
This PR adds VBS support to OpenHCL’s PCI relay for SIVM hosts that lack TDISP attestation and cannot make device BARs private.
Changes:
- Add measured policy options for unattested devices and shared BARs, enabled in SIVM manifests.
- Implement VBS BAR acceptance and DMA authorization, with policy plumbing through the PCI relay.
- Extend policy and client tests and document the security implications.
| File | Description |
|---|---|
vm/loader/manifests/openhcl-x64-cvm-sivm-release.toml |
Enable unattested devices and shared BARs in release images. |
vm/loader/manifests/openhcl-x64-cvm-sivm-dev.toml |
Enable the same policy in development images. |
vm/loader/igvmfilegen/src/product_policy_initrd.rs |
Encode the new policy fields and extend round-trip tests. |
vm/loader/igvmfilegen_config/src/lib.rs |
Define manifest options with false defaults. |
vm/hv1/hvdef/src/lib.rs |
Define the VBS device-I/O authorization hypercall. |
vm/devices/pci/vpci_relay/src/tests.rs |
Update relay test initialization and probing arguments. |
vm/devices/pci/vpci_relay/src/lib.rs |
Pass policy and MMIO ranges through relay initialization. |
vm/devices/pci/vpci_client/src/tests.rs |
Update client tests for the new initialization options. |
vm/devices/pci/vpci_client/src/lib.rs |
Forward policy options and identify MSI-X BARs. |
openhcl/underhill_mem/src/lib.rs |
Preserve private visibility when accepting RAM pages. |
openhcl/underhill_core/src/worker.rs |
Supply measured policy and guest MMIO windows to the relay. |
openhcl/product_policy/src/lib.rs |
Add measured permissions and policy accessors. |
openhcl/openhcl_tdisp/src/vbs.rs |
Implement VBS BAR acceptance and DMA authorization. |
openhcl/openhcl_tdisp/src/lib.rs |
Register the VBS validator and shared-MMIO acceptance hook. |
openhcl/openhcl_tdisp/src/client.rs |
Add unattested-device and shared-BAR flows with unit tests. |
openhcl/openhcl_tdisp/Cargo.toml |
Add the GUID dependency for VBS device identification. |
openhcl/hcl/src/ioctl.rs |
Expose page-acceptance visibility and device-I/O authorization. |
Guide/src/reference/architecture/openhcl/product_policy.md |
Explain the new controls and their trust implications. |
Cargo.lock |
Record the added GUID dependency. |
Review effort: Balanced
Accept an unattested device's BARs shared under allow_unattested_devices, replacing the separate allow_shared_bars flag and the MSI-X intercept walk. Report its isolation as shared without a TDI report, record shared accepts in the no-op validator, and accept BARs again after unbind.
ef1ad01 to
33581ea
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved issues can monopolize the polling thread during BAR validation, enable guest-controlled log flooding, and cause initialization to panic when the mocked TDISP flow is enabled on SIVM.
3 open issues
2 resolved since last review
Review effort: Balanced
| let page = chunk.start() + output.elements_processed() as u64 * hvdef::HV_PAGE_SIZE; | ||
| let end = page + hvdef::HV_PAGE_SIZE; |
| let skipped = accept_mapped_pages(&self.hvcall, range) | ||
| .with_context(|| format!("failed to accept BAR {range_id} at {range}"))?; | ||
| let skipped = skipped.iter().map(|r| r.to_string()).collect::<Vec<_>>(); | ||
| tracing::info!( |
| resource_validator, | ||
| self.isolation_type, | ||
| hvdef::Vtl::Vtl0, | ||
| self.options.allow_unattested_devices, |


No description provided.