On Fri, 25 Jun 2004, ron minnich wrote:
> On Fri, 25 Jun 2004, Keir Fraser wrote:
>
> > If Xen interrupted a ring-1 activation then the hypervisor_callback
> > stack frame will be pushed onto the stack that was interrupted.
OK, I've confirmed that I have the following situation:
- Plan 9 in ring 1 in kernel mode (i.e. I really mean ring 1)
- running while(1); at end of main() with mask set to 0
- Xen deschedules Plan 9
- Xen decides to execute a callback to my Ring 1 Plan 9
- Xen is picking up a junk SS/SP pair from the stack
Reason is that there is not, on the Plan 9 Ring 1 stack,
an SS/SP pair! There is only the CS/IP as far as I can see
- Xen calls my Plan 9 callback in Ring 1, with the SS/SP wrong
- Plan 9 hypervisor_callback in Ring 1 does a PUSHAL and takes a
page fault
- Plan 9 page fault handler dumps the stack frame , and I see this:
o trap frame from Xen with good CS/IP, bogus SS/SP, good
DS/ES/etc.
o hypervisor callback page fault frame good CS/IP, bogus SS/IP
o frame from my while(1) with correct CS/IP but (important)
no valid SS/IP on the stack
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 ...
Note: I am handling page faults in both kernel and user mode (Ring 1 and
3) just fine. I can do console I/O. I'm just totally hung up on this
callback mess.
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.
thanks
ron
-------------------------------------------------------
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
|