From: Tim Deegan Subject: Re: shadow2 corrupting PV guest state Date: Fri, 20 Oct 2006 14:57:18 +0100 Message-ID: <20061020135718.GA8271@york.uk.xensource.com> References: <453020EE.4080603@goop.org> <200610201342.k9KDgdF01725@photon.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: <200610201342.k9KDgdF01725@photon.sky.yk.fujitsu.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Doi.Tsunehisa@jp.fujitsu.com Cc: Jeremy Fitzhardinge , Xen-devel , Tim Deegan , Chris Wright , Michael A Fetterman List-Id: xen-devel@lists.xenproject.org Hi, At 22:42 +0900 on 20 Oct (1161384159), Doi.Tsunehisa@jp.fujitsu.com wrote: > So, I found that: > > * Before shadow2 age, x86 and ia64 use same logic for domain > destruction. > - at first, release gnttab references > - destruct page table for VCPU > - destruct P2M table for domain > - relinquish memory for domain > > * After shadow2 age, x86 introduces delayed P2M table destruction. > - release gnttab references > - destruct page table for VCPU > - relinquish memory for domain > - destruct P2M table for domain in domain_destroy() > *** I don't have confidence in my investigation. > *** Am I right ? Yep. The P2M table can't be destroyed in domain_relinquish_resources, as it is needed when pulling down grant references, and foreign domains may have outstanding grant references to the dying domain's memory even after domain_relinquish_resources. > If my speculation is correct, shadow2 may occur a problem of memory > corruption. I don't follow quite why this would lead to memory corruption. Can you explain? Tim.