On Sun, Jul 25, 2010 at 4:52 AM, Avi Kivity <avi@xxxxxxxxxx> wrote: > On 07/23/2010 06:02 PM, Gu, Zhongshu wrote: >> >> Hi all: >> I have some confusion when looking at the code to process page >> fault. If there is vm exit caused by page fault, what is the timing of >> this vm exit? In my understanding that it will vm exit before entering >> the page fault handler in the kernel. > > Yes. Some page faults are delivered directly to the guest, though. These > are all guest faults with ept or npt enabled, and some not-present faults on > Intel in shadow mode. So if i set the module parameter of bypass_guest_pf to 0, all the page faults will cause vm exit. Is that right? > >> But when it enters vm again, >> will it enter the guest kernel's page fault handler again? > > What do you mean "again"? > > It will enter the guest fault handler if it is a guest fault. if there is guest fault, it means that the gpte is non-present. If the bypass_guest_pf is set to 1, there will be no possibility for this situation. > >> And another problem is that prefetch_page in paging_tmpl.h is >> used to optimize kvm to reduce the number of vm exit. Is there any >> possibility to bypass the guest page fault? I mean all the page faults >> are delegated to kvm to process, no matter it is the page fault of >> guest page table or shadow page table. > > Not all. See shadow_notrap_nonpresent_pte. > > -- > error compiling committee.c: too many arguments to function > > -- Zhongshu -- 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