xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Xu Zhang <zhxwhu@gmail.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Nested events in 64bit mini-OS
Date: Tue, 23 Oct 2012 17:43:28 -0500	[thread overview]
Message-ID: <50871D90.50606@gmail.com> (raw)

Dear all,

I don't understand why 64-bit mini-OS doesn't check against nested Xen 
events (in entry.S). In 32-bit code, a critical section is defined and 
re-entrant is checked. A fix-up routine is executed to coalesce the 
stack frames if that's the case, because there is a window for nested 
events to happen after re-enabling event delivery and before a direct iret.

In 64-bit mini-OS, however, a critical section is defined but not used. 
My understanding is that ideally, one could
a) unmask event and do an direct iret, but check against nested events, 
try to fix stack frames if that happens; or
b) do not re-enable event and use hypercall iret to return (no need to 
fix-up stack frames).

64-bit mini-OS seems to adopt a mixed use of both (in HYPERVISOR_IRET). 
mini-OS doesn't have an userspace, so unless an NMI happened, it always 
perform interrupt/exception return with machine instruction iret, 
without checking against nested events. This is wrong to me. Am I 
missing something here?

Please advise.

Thank you,
Xu

-- 
xu

:q!

             reply	other threads:[~2012-10-23 22:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 22:43 Xu Zhang [this message]
2012-10-25 20:56 ` Nested events in 64bit mini-OS Samuel Thibault
2012-11-06  5:56   ` Xu Zhang
2012-11-10 13:52     ` Samuel Thibault
2012-11-11 15:36       ` Xu Zhang
2012-11-14  1:49         ` Xu Zhang
2012-11-18 17:43           ` Samuel Thibault
2012-11-19 10:22             ` Ian Campbell
2012-11-19 10:21       ` Ian Campbell

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=50871D90.50606@gmail.com \
    --to=zhxwhu@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /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).