From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM Page Fault Question Date: Fri, 02 Apr 2010 09:39:19 +0300 Message-ID: <4BB59117.2040903@redhat.com> References: <4B9726A7.7000800@csail.mit.edu> <4B976AA8.9030904@redhat.com> <4B9833EE.1070705@csail.mit.edu> <4B989035.4050109@redhat.com> <4B9916DE.30209@csail.mit.edu> <4B9B5225.2050604@redhat.com> <4BA2BC2A.8090803@csail.mit.edu> <4BA33833.8060703@redhat.com> <4BB57596.6090109@csail.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marek Olszewski Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40754 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757392Ab0DBGjY (ORCPT ); Fri, 2 Apr 2010 02:39:24 -0400 In-Reply-To: <4BB57596.6090109@csail.mit.edu> Sender: kvm-owner@vger.kernel.org List-ID: On 04/02/2010 07:41 AM, Marek Olszewski wrote: > When a guest OS writes to a shadowed (and therefore page protected) > guest page table, does the resulting page fault get handled in > paging_tmpl.h:xxx_page_fault or does it call some rmap related code > directly? page faults are dispatched to the page_fault callback. > Also, what does the "direct" mmu page role mean? > It means that the page maps the linear range (gfn << 12)..(((gfn + (1 << level*9))) << 12) instead of shadowing a guest page table at gfn. Useful for real mode, large pages, and tdp. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.