From: Keir Fraser Subject: Re: garbage registers when domain killed by xen Date: Sat, 7 May 2005 15:56:18 +0100 Message-ID: <902dfdb94d996d7fc05e0c8313c10886@cl.cam.ac.uk> References: <1bea7043d407c09e23b119c6c278dbe3@cl.cam.ac.uk> Mime-Version: 1.0 (Apple Message framework v622) 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: Kip Macy Cc: xen-devel List-Id: xen-devel@lists.xenproject.org It's probably repeatedly reentering your p-f handler at address 0. This will not cause the iret in Xen to fault (the fault will appear to occur in ring 1, address 0), and so the failsafe handler will not be triggered. Yes, we should just domain_crash() if we see a callback to address 0. Even more helpful would be some extra crash context with an explanation (some way of stating it was a virtual 'double fault' of some kind), but I don;t know how you would represent that in a standard core dump file. -- Keir On 7 May 2005, at 15:23, Kip Macy wrote: > There is an odd relationship between hitting the send button and > epiphanies. > > Show_guest_stack says the eip is 0 and the stack has eflags, eip, and > CS over and over and over again. That would indicate that I'm running > off my stack by trapping over and over again. However, I don't have > traps or callback handlers installed. What may be happening is xen > setting up a trapframe and then jumping to failsafe callback - over > and over again because jumping to failsafe callback itself causes a > page fault. In this case the eip is legitimately 0 - but not because > of me but because xen isn't checking that I've actually set my > failsafe_callback. I'll go look at FLT14 again to see if I'm on the > right track. > > -Kip > > On 5/7/05, Kip Macy wrote: >> I'm not sure about ecx/edx but I know eip is bad. There are legitimate >> cases of trying to call a null function pointer, but I know from the >> context that that isn't the case. It appears to be a page fault - but >> I don't have trap handlers installed yet. >> >> -Kip >> >> On 5/7/05, Keir Fraser wrote: >>> >>> On 7 May 2005, at 02:26, Kip Macy wrote: >>> >>>> Is it really necessary for xen to overwrite part of a domain's >>>> context >>>> on a fatal trap? >>> >>> Which ones are overwritten -- ecx/edx? I'm not sure how that could >>> happen but it's clearly a bug rather than intentional. >>> >>> -- Keir >>> >>> >>