From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Olszewski Subject: Re: KVM Page Fault Question Date: Fri, 02 Apr 2010 00:41:58 -0400 Message-ID: <4BB57596.6090109@csail.mit.edu> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from DMZ-MAILSEC-SCANNER-4.MIT.EDU ([18.9.25.15]:47495 "EHLO dmz-mailsec-scanner-4.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237Ab0DBEmD (ORCPT ); Fri, 2 Apr 2010 00:42:03 -0400 In-Reply-To: <4BA33833.8060703@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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? Also, what does the "direct" mmu page role mean? Thanks! Marek Avi Kivity wrote: > On 03/19/2010 01:50 AM, Marek Olszewski wrote: >> When using VMX without EPT, is it ever possible for a guest to >> receive a page fault without it first appearing (and being >> reinjected) in KVM? > > Yes. On Intel hosts only, and controlled by bypass_guest_pf. > >> I'm seeing some strange behavior where accesses to mprotected (but >> yet to be accessed) memory causes a fault in the guest OS, that I >> cannot see KVM intercepting. >> > > Look for 'shadow_trap_nonpresent_pte' (which will trap into kvm) and > 'shadow_notrap_nonpresent_pte' (which will not) in the code. >