From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <522885DB.2090204@linux.vnet.ibm.com> Date: Thu, 05 Sep 2013 21:23:39 +0800 From: Xiao Guangrong MIME-Version: 1.0 To: Paolo Bonzini CC: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kvm@vger.kernel.org, Gleb Natapov Subject: Re: [PATCH v2] KVM: mmu: allow page tables to be in read-only slots References: <1378383714-9723-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1378383714-9723-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On 09/05/2013 08:21 PM, Paolo Bonzini wrote: > Page tables in a read-only memory slot will currently cause a triple > fault when running with shadow paging, because the page walker uses > gfn_to_hva and it fails on such a slot. > > TianoCore uses such a page table. The idea is that, on real hardware, > the firmware can already run in 64-bit flat mode when setting up the > memory controller. Real hardware seems to be fine with that as long as > the accessed/dirty bits are set. Thus, this patch saves whether the > slot is readonly, and later checks it when updating the accessed and > dirty bits. > > Note that this scenario is not supported by NPT at all, as explained by > comments in the code. Reviewed-by: Xiao Guangrong