Re: EPT page fault procedure

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

 



Il 31/10/2013 10:07, Arthur Chunqi Li ha scritto:
> Sorry to disturb you with so many trivial questions in KVM EPT memory
> management and thanks for your patience.

No problem, please remain onlist though.  Adding back kvm@xxxxxxxxxxxxxxx.


> I got confused in the EPT
> page fault processing function (tdp_page_fault). I think when Qemu
> registers the memory region for a VM, physical memory mapped to this
> PVA region isn't allocated indeed. So the page fault procedure of EPT
> violation which maps GFN to PFN should allocate the real physical
> memory and establish the real mapping from PVA to PFA in Qemu's page

Do you mean HVA to PFN?  If so, you can look at function hva_to_pfn. :)

> table. What is the point in tdp_page_fault() handling such mapping
> from PVA to PFA?

The EPT page table entry is created in __direct_map using the pfn
returned by try_async_pf.  try_async_pf itself gets the pfn from
gfn_to_pfn_async and gfn_to_pfn_prot.  Both of them call __gfn_to_pfn
with different arguments.  __gfn_to_pfn first goes from GFN to HVA using
the memslots (gfn_to_memslot and, in __gfn_to_pfn_memslot,
__gfn_to_hva_many), then it calls hva_to_pfn.

Ultimately, hva_to_pfn_fast and hva_to_pfn_slow is where KVM calls
functions from the kernel's get_user_page family.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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