Skip to content

VFIO: MsixEmulator should accept hardware table/PBA offsets #3301

@will-j-wright

Description

@will-j-wright

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions