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.
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 inmsix_emulator_offset().The emulator should accept the physical table and PBA offsets as constructor parameters so:
read_u32/write_u32work at the hardware offsets directlymsix_emulator_offset()translation layer in vfio_assigned_device goes awayOther callers (NVMe, virtio, GDMA) pass offset 0 and work unchanged.
From PR #3248 review feedback.