Skip to content

VFIO: Support per-region mmap for DMA mapping #3303

@will-j-wright

Description

@will-j-wright

Currently the VFIO resolver uses GuestMemory::full_mapping() to get a single contiguous VA for all guest memory, then identity-maps each shareable region via map_dma(gpa, base_va + gpa, size).

For future non-linear memory layouts (e.g., hotplug), this won't work. Instead, mmap each ShareableRegion's backing fd individually to get per-region VAs for map_dma. This would also support GuestMemorySharing change notifications when hotplug is implemented.

From PR #3248 discussion.

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