KVM page fault handling in case of EP

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

 



Hello,

I was trying to understand how page fault is handled with ept enabled
on host and I summarize what I understood as following -

Suppose page fault happens for guest virtual address(gva) x, if
gva->gpa mapping is not present then guest operating system handles
page fault and allocates physical page frame(guest physical page
frame).
Then when guest tries to access memory with that gpa, ept violation
occurs and control is transfered to hypervisor. If corresponding entry
is not present in ept, hypervisor allocates actual physical page on
host and updates ept entry.

Is my understanding correct?

If it is correct then in function handle_ept_violation() , gpa is obtained as
gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);
and gfn is obtained as
gfn_t gfn = gpa >> PAGE_SHIFT in tdp_page_fault()
Then let's assume for the sake of example that for gva x, if gfn
inside guest is 10 then will it also be 10 in tdp_page_fault() ? Is
there one to one correspondence between gfn obtained in tdp_page_fault
and gfn allocated inside guest?

Thanks,
Siddhesh
--
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