From: Tim Deegan Subject: Re: Is this a data corruption bug for p2m_ram_shared page in hvm_hap_nested_page_fault() Date: Thu, 2 Feb 2012 11:19:27 +0000 Message-ID: <20120202111927.GE48883@ocelot.phlegethon.org> References: <4F2A62A2.1010505@gmail.com> <4F2A64A7.9080902@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4F2A64A7.9080902@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "nai.xia" Cc: Joe Epstein , xen-devel@lists.xensource.com, Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org At 18:25 +0800 on 02 Feb (1328207143), nai.xia wrote: > On 2012???02???02??? 18:17, nai.xia wrote: > >In hvm_hap_nested_page_fault(), it seems that all valid write faults are > >now handled > >by p2m_mem_access_check(), right? Then when will mem_sharing_unshare_page() > >be called? And if p2m->access_required == false, the access restrictions > >is cleared > > Oh, sorry, I notice that with p2m_ram_shared, the write permissions is > always cleared. But, still, this seems cannot lead to the call of > mem_sharing_unshare_page() and this write fault will happen again and > again? There's an explicit call of mem_sharing_unshare_page() in hvm_hap_nested_page_fault(); the only thing that will skip that is if the fault is caused by a p2m_access violation, in which case we report the fault on the p2m_access ring and wait for the consumer of that ring to fix the problem. Cheers, Tim.