x86 MMU: RMap Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm a bit confused by the interface for interacting with the page rmap. For context, on a TDP-enabled x86-64 host, I'm logging each time a GFN->PFN mapping is created/modified/removed for a non-MMIO page (kernel version 5.4).

First, my understanding is that the page rmap is a mapping of non-MMIO PFNs back to the GFNs that use them. The interface for creating an rmap entry (and thus, a new GFN->PFN mapping) appears to be rmap_add() and is quite straightforward. However, rmap_remove() does not appear to be the (only) function for removing an entry from the page rmap. For instance, kvm_zap_rmapp()---used by the mmu_notifier for invalidations---jumps straight to pte_list_remove(), while drop_spte() uses rmap_remove(). Would it be fair to say that mmu_spte_clear_track_bits() is found on all paths for removing an entry from the page rmap?

Second, for updates to the frame numbers in an existing SPTE, there are both mmu_set_spte() and mmu_spte_set(). Could someone please clarify the difference between these functions?

Finally, much of the logic between the page rmap and parent PTE rmaps (understandably) overlaps. However, with TDP-enabled, I'm not entirely sure what the role of the parent PTE rmaps is relative to the page rmap. Could someone possibly clarify?

Thanks, and best wishes,

Kevin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux