From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH v2 4/9] KVM: MMU: Update accessed and dirty bits after guest pagetable walk Date: Tue, 18 Sep 2012 14:37:36 +0800 Message-ID: <505816B0.8010107@linux.vnet.ibm.com> References: <1347797235-20732-1-git-send-email-avi@redhat.com> <1347797235-20732-5-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from e28smtp09.in.ibm.com ([122.248.162.9]:37310 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753321Ab2IRGiM (ORCPT ); Tue, 18 Sep 2012 02:38:12 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Sep 2012 12:08:09 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q8I6bdKf38732018 for ; Tue, 18 Sep 2012 12:07:39 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q8I6bcC4020306 for ; Tue, 18 Sep 2012 16:37:38 +1000 In-Reply-To: <1347797235-20732-5-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/16/2012 08:07 PM, Avi Kivity wrote: > While unspecified, the behaviour of Intel processors is to first > perform the page table walk, then, if the walk was successful, to > atomically update the accessed and dirty bits of walked paging elements. > > While we are not required to follow this exactly, doing so will allow us > to perform the access permissions check after the walk is complete, rather > than after each walk step. > > (the tricky case is SMEP: a zero in any pte's U bit makes the referenced > page a supervisor page, so we can't fault on a one bit during the walk > itself). Reviewed-by: Xiao Guangrong