From: Daniel Stodden <stodden@cs.tum.edu>
To: Ashish Bijlani <ashish.bijlani@gmail.com>
Cc: xen-devel@lists.xensource.com, Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: do_iret bug in xen
Date: Wed, 28 Nov 2007 02:37:53 +0100 [thread overview]
Message-ID: <1196213874.4632.64.camel@thinkpad.localdomain> (raw)
In-Reply-To: <ec55b17e0711271715t53aca278v733635818208eed2@mail.gmail.com>
On Tue, 2007-11-27 at 20:15 -0500, Ashish Bijlani wrote:
> current is extracted from per processor stack area. so are the
> registers. right?
yes.
> do_iret gets current and regs from the processor's stack area. so does
> ret_from_intr.
yes. but the latter from a different stack *frame* in the case you're
concerned about. same stack, though.
> so they both point to a fixed per processor stack area. there are not
> _different_ stack frames.
i see what you mean. let's look at the stack when an IPI occurs to
trigger a context switch.
--snip--
guest calls __HYPERVISOR_iret (saves guest cs)
do_iret tinkers with guest_cpu_user_regs
IPI caught (saves xen cs)
ret_from_intr tests xen (!!) cs, not guest cs
do_iret continues and finishes. same current.
test_all_events calls do_softirq. schedules. new current.
return to new current.
--snap--
UREGS_cs in entry.S refers to the interrupted context, not the saved
guest context. this may be the same: the IPI would have mattered if it
interrupted the guest. it did not. so the softirq will only be run
before returning to the guest, not in between.
regards,
daniel
--
Daniel Stodden
LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München D-85748 Garching
http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B
next prev parent reply other threads:[~2007-11-28 1:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Ix7Vw-000810-RL@host-192-168-0-1-bcn-london>
2007-11-27 21:50 ` do_iret bug in xen Andres Lagar-Cavilla
2007-11-27 22:41 ` Ashish Bijlani
2007-11-27 23:17 ` Ian Campbell
2007-11-27 23:30 ` Ashish Bijlani
2007-11-28 0:51 ` Daniel Stodden
2007-11-28 1:15 ` Ashish Bijlani
2007-11-28 1:37 ` Daniel Stodden [this message]
2007-11-27 18:59 Ashish Bijlani
2007-11-27 19:16 ` Daniel Stodden
2007-11-27 19:28 ` Ashish Bijlani
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=1196213874.4632.64.camel@thinkpad.localdomain \
--to=stodden@cs.tum.edu \
--cc=Ian.Campbell@citrix.com \
--cc=ashish.bijlani@gmail.com \
--cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.