From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Detecting deadlocks with hypervisor.. Date: Fri, 07 Apr 2006 12:45:38 -0500 Message-ID: <4436A542.9000305@us.ibm.com> References: <10ef69c2c2859e3da371d0495a08625f@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <10ef69c2c2859e3da371d0495a08625f@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: rthelen@netapp.com, T S , Xen-devel@lists.xensource.com, ewan@xensource.com, edwin.zhai@intel.com List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: > > 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. I should add that this is a problem specific to writable page tables as the guest must be aware of the actual physical pages that it is using. With a VT/SVM guest or on an architecture that doesn't use writable page tables, this isn't an issue. Regards, Anthony Liguoi > -- Keir >