From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Detecting deadlocks with hypervisor.. Date: Sat, 08 Apr 2006 09:38:33 -0500 Message-ID: <4437CAE9.1040705@us.ibm.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable 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 T S wrote: >> Take a look at linux-2.6-sparse/drivers/core/reboot.c:__do_suspend().=20 >> Canonicalization is done both in Dom-0 and in the guest itself. Dom-0=20 >> attempts to do as much of it as it can but as I've said before, it=20 >> cannot do all of it. > > Anthony, > Thank you for your reply. > In linux-2.6-sparse/drivers/core/reboot.c:__do_suspend(), we see=20 > store_mfn and console_mfn being canonicalized before the guest-OS goes=20 > to sleep (as done in "xm save"). But before this canonicalization took=20 > place the python layer writes the store_mfn and console_mfn into the=20 > save-file (in the file's header area). Yes, although this strictly isn't necessary. > Does this mean the store_mfn and console_mfn values present in the=20 > header of the file are re-written at a later part of the file ? > > Other than the store & console mfn's are there any other parameters=20 > canoicalized BY the guest OS during "xm save" ? Not currently, although, as Keir pointed out, you still have to contend=20 with the fact that a guest may have a cached PFN somewhere (for=20 instance, because it's in the process of updating a page table). Regards, Anthony Liguori > thanks. > > >> >>> Also, given that Dom-0 can access the page tables and other=20 >>> structures of the deadlocked guest, >>> can one of you be able to tell me what changes I need to do to=20 >>> xm_linux_save( ) (and other related functions) to save the state of=20 >>> the deadlocked guest without doing any handshake with the guest OS ? >> >> If you want to attempt to futz with the state of a guest while it's=20 >> running without the guest cooperating, your best bet is to do as Keir=20 >> suggested and pause the domain, make your changes, and then unpause. >> >> Regards, >> >> Anthony Liguori >> >>> >>> thanks! >>> - T >>> >>> >>>> If the guest isn't responsive when you do a save, then it will=20 >>>> never canonicalize itself and there is no way to restore the domain. >>>> >>>> Regards, >>>> >>>> Anthony Liguori >>>> >>>>> thanks >>>>> TS >>>>> >>>>>> >>>>>> If a suspend completes correctly, Xend will see it (another watch=20 >>>>>> will fire), >>>>>> and xc_linux_save will be free to complete the save. >>>>>> >>>>>> > Also, does it seem viable to clone a copy of a deadlocked guest=20 >>>>>> OS in the >>>>>> > first place? >>>>>> >>>>>> If you have a byte-for-byte copy of a deadlocked guest, even if=20 >>>>>> you could >>>>>> suspend it, surely it will be deadlocked when it is resumed. How=20 >>>>>> do you >>>>>> intend to break the deadlock, and how is it easier to do that=20 >>>>>> from outside >>>>>> than it is to perform deadlock detection in the guest? >>>>>> >>>>>> Ewan. >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Xen-devel mailing list >>>>>> Xen-devel@lists.xensource.com >>>>>> http://lists.xensource.com/xen-devel >>>>> >>>>> _________________________________________________________________ >>>>> Express yourself instantly with MSN Messenger! Download today -=20 >>>>> it's FREE!=20 >>>>> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ >>>>> >>>>> >>>>> _______________________________________________ >>>>> Xen-devel mailing list >>>>> Xen-devel@lists.xensource.com >>>>> http://lists.xensource.com/xen-devel >>>> >>> >>> _________________________________________________________________ >>> Don=92t just search. Find. Check out the new MSN Search!=20 >>> http://search.msn.click-url.com/go/onm00200636ave/direct/01/ >>> >> > > _________________________________________________________________ > Don=92t just search. Find. Check out the new MSN Search!=20 > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ >