You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5d6ab1c
Browse filesBrowse the repository at this point in the historyBrowse files
x86: enable guest-managed Intel VT-d on Windows (#5143)
## Summary
- set the DMAR DMA-control platform opt-in flag for Intel VT-d guests
- mask only the Hyper-V hardware-feature bits that claim DMA and
interrupt remapping are hypervisor-managed
- apply that CPUID override only when an Intel VT-d unit is configured
- add focused DMAR and CPUID tests
## Motivation
When OpenVMM runs on WHP, the underlying Hyper-V CPUID hardware-features
leaf can report that DMA and interrupt remapping are already managed by
the hypervisor. A Windows guest then does not take control of the
emulated VT-d unit. Separately, Windows requires the DMAR DMA-control
platform opt-in flag before enabling DMA remapping.
The CPUID override is masked, so all unrelated hardware-feature bits
continue to come from the underlying hypervisor.
## Validation
- `cargo xtask fmt --fix --only-diffed`
- `cargo test -p vmm_core
guest_managed_iommu_leaf_clears_only_iommu_bits`
- `cargo test -p vmm_core test_dmar_basic`
- `cargo clippy -p acpi_spec -p vmm_core -p openvmm_core --all-targets`
- `cargo doc --no-deps -p acpi_spec -p vmm_core -p openvmm_core`
- `cargo build --release -p openvmm`
The resulting current-main binary was boot-smoked with a Windows guest
on WHP using emulated NVMe and Intel VT-d. Windows reported the DMAR
opt-in, selected native IOMMU policy, configured four-level IOMMU page
tables, and started the NVMe controller and disk.
---------
Co-authored-by: Jeff Bromberger <6789497+jeffbromberger@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bec97463-419f-4fb3-a9ae-e8d73e3257dc
Copilot-Session: ae062255-030e-4c06-861c-055fa337171c
0 commit comments