From: Keir Fraser Subject: Re: Detecting deadlocks with hypervisor.. Date: Fri, 7 Apr 2006 18:22:34 +0100 Message-ID: <10ef69c2c2859e3da371d0495a08625f@cl.cam.ac.uk> References: Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: T S Cc: rthelen@netapp.com, Xen-devel@lists.xensource.com, ewan@xensource.com, edwin.zhai@intel.com List-Id: xen-devel@lists.xenproject.org On 7 Apr 2006, at 18:11, T S wrote: > We took a look at the xc_linux_save() function ... and what we see is > that > the canonicalize action is actually done by the Dom-0 (and not by the > Dom-U); > Dom-0 is able to do this because it is able to access the page tables > of Dom-U > as well as the pfn2mfn list of the Dom-U. Based on this, we think the > Dom-0 can > actually save the 'context' of the deadlocked Dom-U. Please correct me > if this > claim is wrong. > > Also, given that Dom-0 can access the page tables and other structures > of the deadlocked guest, > can one of you be able to tell me what changes I need to do to > xm_linux_save( ) (and other related functions) to save the state of > the deadlocked guest without doing any handshake with the guest OS ? You can get at the consistent state of a guest by pausing it and then reading its state. However, the reason for the handshake is to ensure that the guest is not currently accessing pagetables or doing other critical operations. If it were then we could not safely translate its memory page addresses as it could have those addresses in places like its kernel stacks or register contexts, where they would not get translated and would cause a crash on restore. -- Keir