From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>,
"Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: current not very current (vs curr_vcpu)
Date: Fri, 19 Feb 2010 08:12:18 +0000 [thread overview]
Message-ID: <C7A3F862.A995%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <20100218202158.6e3aeda1@mantra.us.oracle.com>
On 19/02/2010 04:21, "Mukesh Rathor" <mukesh.rathor@oracle.com> wrote:
> I noticed while debugging something that current is not pointing to the
> current vcpu upon serial interrupt. The regs->SP clearly shows 64bit dom0
> stack, guest_mode(regs) returns 1, but current is pointing
> to idle vcpu. I'm not able to figure how this is possible. I can come up
> with scenario where dom0.vcpu yields cpu to idle vcpu in which case
> curr_vcpu will point to dom0.vcpu and current to idle vcpu. But in that
> case guest_mode(regs) will be false, and regs.SP will show hyp stack.
> Correct?
>
> Am I correct that if guest_mode() then current should always point to
> guest vcpu? If yes, then I will debug this further.
The behaviour you see is expected. Guest_mode() is meaningless when running
an idle vcpu. This is because the guest regs at the bottom of the stack are
junk for an idle vcpu (and also we do lazy state synchronisation, so they
may be the valid active regs for the last scheduled non-idle vcpu).
-- Keir
next prev parent reply other threads:[~2010-02-19 8:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 4:21 current not very current (vs curr_vcpu) Mukesh Rathor
2010-02-19 8:12 ` Keir Fraser [this message]
2010-02-19 19:23 ` Mukesh Rathor
2010-02-19 21:34 ` Keir Fraser
2010-02-20 3:50 ` Mukesh Rathor
2010-02-20 7:45 ` Keir Fraser
2010-02-22 18:59 ` Mukesh Rathor
2010-02-23 19:46 ` Mukesh Rathor
2010-02-23 21:03 ` Keir Fraser
2010-02-24 3:55 ` Mukesh Rathor
2010-02-24 10:45 ` Keir Fraser
2010-02-25 1:06 ` Mukesh Rathor
2010-02-25 8:07 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C7A3F862.A995%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=Xen-devel@lists.xensource.com \
--cc=mukesh.rathor@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).