WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] progress and a problem

To: ron minnich <rminnich@xxxxxxxx>
Subject: Re: [Xen-devel] progress and a problem
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sat, 26 Jun 2004 07:55:40 +0100
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 26 Jun 2004 08:00:04 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Fri, 25 Jun 2004 22:25:21 MDT." <Pine.LNX.4.44.0406252216170.28057-100000@xxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> So, it seems Xen has descheduled my Plan 9 guest but only the CS/IP is on 
> the stack. Is there any way at all this could happen? it's very puzzling.
> When Xen deschedules a domain does it force an interrupt or ...

Which stack are you talking about here? When Xen first deschedules
your while(1), the CPU should write CS,EIP,EFLAGS,SS,ESP onto Xen's
ring-0 stack.

When you get a callback, Xen should see that it is 'interrupting' an
existing ring-1 activation, and read the appropriate SS,ESP from its
own (ring-0) stack. When it writes the activation frame for teh
callback, it will only write CS,EIP,EFLAGS. SS,ESP will not be written
to your ring-1 stack because the IRET at the end of your callback
handler will not be changing privilege levels.

The same goes for your page fault: Xen will use the SS,ESP saved on it
own stack, and will not write a SS,ESP pair onto your stack.

> Also, I should mention: I have not done an LIDT or LTR because I was 
> hoping to just use the Xen default one for the domain (as I do for the 
> GDT). How much trouble could this cause? It seems to have been working 
> fine for a few weeks, so I assumed it was no harm done.

Task segments aren't virtualised, so there is no equivalent of
LTR. The quivalent of LIDT is set_trap_table() which you must have
called to be taking page faults.

 -- Keir


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel