microsoft / microsoft/openvmm

VFIO: MsixEmulator should accept hardware table/PBA offsets

Open
#3,301 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
1.9k
Forks
238
Avg merge
1d 15h
Merged PRs (30d)
100

Description

Currently MsixEmulator::new() hardcodes the MSI-X table at offset 0 within the BAR and PBA right after. The VFIO device keeps the physical hardware offsets separately and translates between them in msix_emulator_offset().

The emulator should accept the physical table and PBA offsets as constructor parameters so:

  • The capability DWORDs return the real hardware values (no partial DWORD 0 intercept needed)
  • read_u32/write_u32 work at the hardware offsets directly
  • The msix_emulator_offset() translation layer in vfio_assigned_device goes away

Other callers (NVMe, virtio, GDMA) pass offset 0 and work unchanged.

From PR #3248 review feedback.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with MsixEmulator::new(), read_u32, and write_u32, then inspect the msix_emulator_offset() translation layer in vfio_assigned_device. Check the NVMe, virtio, and GDMA callers, which should continue passing offset 0. Done means hardware table and PBA offsets are accepted directly, capability values use them, and the VFIO translation layer is removed without changing those callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.