xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [help] rsp in case of interrupt/exception in ring0
@ 2010-02-24  3:39 Mukesh Rathor
  2010-02-24  8:35 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Mukesh Rathor @ 2010-02-24  3:39 UTC (permalink / raw)
  To: Xen-devel@lists.xensource.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [help] rsp in case of interrupt/exception in ring0
  2010-02-24  3:39 [help] rsp in case of interrupt/exception in ring0 Mukesh Rathor
@ 2010-02-24  8:35 ` Jan Beulich
  2010-02-25  4:42   ` Mukesh Rathor
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2010-02-24  8:35 UTC (permalink / raw)
  To: Xen-devel@lists.xensource.com, Mukesh Rathor

>>> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [help] rsp in case of interrupt/exception in  ring0
  2010-02-24  8:35 ` Jan Beulich
@ 2010-02-25  4:42   ` Mukesh Rathor
  0 siblings, 0 replies; 3+ messages in thread
From: Mukesh Rathor @ 2010-02-25  4:42 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Xen-devel@lists.xensource.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-25  4:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24  3:39 [help] rsp in case of interrupt/exception in ring0 Mukesh Rathor
2010-02-24  8:35 ` Jan Beulich
2010-02-25  4:42   ` Mukesh Rathor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).