From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 2/7] KVM: MMU: cleanup for error mask set while walk guest page table Date: Tue, 28 Sep 2010 16:58:00 +0800 Message-ID: <4CA1AE18.7070200@cn.fujitsu.com> References: <4CA06BA4.4090303@cn.fujitsu.com> <4CA06BEF.7060401@cn.fujitsu.com> <4CA0AA7E.4090901@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , LKML , KVM To: Avi Kivity Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:58574 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753707Ab0I1Ixf (ORCPT ); Tue, 28 Sep 2010 04:53:35 -0400 In-Reply-To: <4CA0AA7E.4090901@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/27/2010 10:30 PM, Avi Kivity wrote: >> r = FNAME(walk_addr)(&walker, vcpu, vaddr, >> - !!(access& PFERR_WRITE_MASK), >> - !!(access& PFERR_USER_MASK), >> - !!(access& PFERR_FETCH_MASK)); >> + access& PFERR_WRITE_MASK, >> + access& PFERR_USER_MASK, >> + access& PFERR_FETCH_MASK); >> >> if (r) { >> gpa = gfn_to_gpa(walker.gfn); > > Interesting. Maybe a next step is to pass the page-fault error code > instead of the various bits? Yeah, it's a good idea, i'll post a patch to do it. > Not sure how that interacts with nested > ept (which has a different permission model). > Umm, we just move the error code parsing from the caller site to FNAME(walk_addr) function, i think it not make trouble for implement nested ept.