diff options
| author | Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> | 2025-12-03 21:41:09 +0000 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2025-12-05 23:20:49 +0000 |
| commit | b9a66cd5ccbb9fade15d0e427e19470d8ad35b75 (patch) | |
| tree | d569131ef50646cd9ffccdedd1fcea7351c54aa5 /drivers/fpga | |
| parent | c39dda08286f4d5ce4d114f8d5dbfdb85effbd6a (diff) | |
mshv: Add support for movable memory regions
Introduce support for movable memory regions in the Hyper-V root partition
driver to improve memory management flexibility and enable advanced use
cases such as dynamic memory remapping.
Mirror the address space between the Linux root partition and guest VMs
using HMM. The root partition owns the memory, while guest VMs act as
devices with page tables managed via hypercalls. MSHV handles VP intercepts
by invoking hmm_range_fault() and updating SLAT entries. When memory is
reclaimed, HMM invalidates the relevant regions, prompting MSHV to clear
SLAT entries; guest VMs will fault again on access.
Integrate mmu_interval_notifier for movable regions, implement handlers for
HMM faults and memory invalidation, and update memory region mapping logic
to support movable regions.
While MMU notifiers are commonly used in virtualization drivers, this
implementation leverages HMM (Heterogeneous Memory Management) for its
specialized functionality. HMM provides a framework for mirroring,
invalidation, and fault handling, reducing boilerplate and improving
maintainability compared to generic MMU notifiers.
Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/fpga')
0 files changed, 0 insertions, 0 deletions
