From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: KVM: MMU: drop read-only large sptes when creating lower level sptes Date: Tue, 25 Feb 2014 11:30:37 +0800 Message-ID: <530C0E5D.4030308@linux.vnet.ibm.com> References: <20140224165932.GA15971@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini To: Marcelo Tosatti , kvm-devel Return-path: Received: from e23smtp05.au.ibm.com ([202.81.31.147]:54580 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752210AbaBYDag (ORCPT ); Mon, 24 Feb 2014 22:30:36 -0500 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Feb 2014 13:30:33 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 2406A2CE8047 for ; Tue, 25 Feb 2014 14:30:31 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1P3Ak341245564 for ; Tue, 25 Feb 2014 14:10:47 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1P3UU6n008821 for ; Tue, 25 Feb 2014 14:30:30 +1100 In-Reply-To: <20140224165932.GA15971@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: 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?