openvmm icon indicating copy to clipboard operation
openvmm copied to clipboard

TDX: Support VTL0 IOMMU posted interrupts + interrupt relay

Open balajimc55 opened this issue 1 year ago • 2 comments

Implements tdx: Implement posted-interrupt support for DDA devices + relaying device interrupts from VTL2 to VTL0 #362

Has dependency on OHCL kernel and Hype-V changes

balajimc55 avatar Nov 22 '24 10:11 balajimc55

Can you rebase this change onto the latest main so I can review again?

chris-oo avatar May 29 '25 18:05 chris-oo

Can you rebase this change onto the latest main so I can review again?

Done

balajimc55 avatar May 29 '25 19:05 balajimc55

⚠️ Unsafe Code Detected

This PR modifies files containing unsafe Rust code. Extra scrutiny is required during review.

For more on why we check whole files, instead of just diffs, check out the Rustonomicon

github-actions[bot] avatar Oct 29 '25 22:10 github-actions[bot]

When do we unwind/unmap the interrupts? What does the guest do and what do we do in response?

chris-oo avatar Nov 13 '25 18:11 chris-oo

When do we unwind/unmap the interrupts? What does the guest do and what do we do in response?

The guest can only issue retarget calls, and no unmapping calls. Mapping and unmapping is owned by root partition during power on and shutdown respectively. So there is no specific unmapping done for the redirected vector mapping.

And if we get more than one retarget call for the same vector targeting same processor, the kernel ensures there is no duplicate mapping and should return the previously mapped vector. Tagging @ricardon confirm kernel behavior.

balajimc55 avatar Nov 14 '25 10:11 balajimc55

FYI i filed #2434 to track the test gap once we can update runners.

chris-oo avatar Nov 18 '25 18:11 chris-oo

Results from local testing shows expected results. Test config: 256VP, 512GB memory, NVMe DDA drive attached to VTL0

Guest build: Windows (29493 rs_prerelease), Linux (Ubuntu 24.04) FIO (linux) & Diskspd (Windows), random read, queue depth 64, thread count = 256

chose the very large thread count so that it forces nvme submission & completion queues on processors to be used in VTL0 and that way we can test all the proxy interrupt redirection mappings created in VTL2

balajimc55 avatar Nov 18 '25 18:11 balajimc55

Backported to release/1.7.2511 in #2451

benhillis avatar Nov 20 '25 16:11 benhillis