From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Gu, Zhongshu" Subject: Some questions about processing page fault in kvm Date: Fri, 23 Jul 2010 11:02:22 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 To: kvm@vger.kernel.org Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:42523 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758336Ab0GWPCp (ORCPT ); Fri, 23 Jul 2010 11:02:45 -0400 Received: by qwh6 with SMTP id 6so3621267qwh.19 for ; Fri, 23 Jul 2010 08:02:44 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: 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. But when it enters vm again, will it enter the guest kernel's page fault handler again? 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. Thanks -- Zhongshu