From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: KVM: MMU: drop read-only large sptes when creating lower level sptes Date: Tue, 25 Feb 2014 10:13:21 -0300 Message-ID: <20140225131321.GA2939@amt.cnet> References: <20140224165932.GA15971@amt.cnet> <530C0E5D.4030308@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-devel , Paolo Bonzini To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48751 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752460AbaBYNNn (ORCPT ); Tue, 25 Feb 2014 08:13:43 -0500 Content-Disposition: inline In-Reply-To: <530C0E5D.4030308@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 25, 2014 at 11:30:37AM +0800, Xiao Guangrong wrote: > On 02/25/2014 12:59 AM, Marcelo Tosatti wrote: > > > > Read-only large sptes can be created due to read-only faults as > > follows: > > > > - QEMU pagetable entry that maps guest memory is read-only > > due to COW. > > - Guest read faults such memory, COW is not broken, because > > it is a read-only fault. > > - Enable dirty logging, large spte not nuked because it is read-only. > > - Write-fault on such memory causes guest to loop endlessly > > (which must go down to level 1 because dirty logging is enabled). > > Hi Marcelo, > > It surprised me that the large-readonly mapping was not dropped > by mmu-notifer as this is write fault on readonly mapping in Qemu. > Hmm... i missed something? You mean COW was not broken by gup? (that is the problem, so a read-only large spte is created). Don't see why mmu-notifier should invalidate the spte?