Mukesh Rathor
2010-Feb-24 03:39 UTC
[Xen-devel] [help] rsp in case of interrupt/exception in ring0
Hi, can someone help me understand this. When a cpu is in hyp code and int/exception comes in, how/where is rsp saved? According to intel manual if there''s no ring transition, then the cpu doesn''t save ss/rsp. Following trail from entry.S to show_registers(), I don''t see where regs->rsp is loaded, yet show_registers() displays it happily. show_stack() uses it. This also means that regs->rsp is actually going to prev frame where orig hyp function was executing. thanks, Mukesh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2010-Feb-24 08:35 UTC
Re: [Xen-devel] [help] rsp in case of interrupt/exception in ring0
>>> Mukesh Rathor <mukesh.rathor@oracle.com> 24.02.10 04:39 >>> >When a cpu is in hyp code and int/exception comes in, how/where is rsp >saved? According to intel manual if there''s no ring transition, then >the cpu doesn''t save ss/rsp.As you''re apparently talking about x86-64, you probably simply read the wrong (32-bit) part of the manual. On 64-bits, ss:rsp are always getting saved, no matter whether there''s a ring transition. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mukesh Rathor
2010-Feb-25 04:42 UTC
Re: [Xen-devel] [help] rsp in case of interrupt/exception in ring0
On Wed, 24 Feb 2010 08:35:31 +0000 "Jan Beulich" <JBeulich@novell.com> wrote:> >>> Mukesh Rathor <mukesh.rathor@oracle.com> 24.02.10 04:39 >>> > >When a cpu is in hyp code and int/exception comes in, how/where is > >rsp saved? According to intel manual if there''s no ring transition, > >then the cpu doesn''t save ss/rsp. > > As you''re apparently talking about x86-64, you probably simply read > the wrong (32-bit) part of the manual. On 64-bits, ss:rsp are always > getting saved, no matter whether there''s a ring transition. >You are right, few pages later, it talks about 64. Usually, they''ll say something about things being different on 64bit. Anyways. I''ll email intel docs to fix it... thanks, Mukesh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel