From: Xu Zhang <xzhang@cs.uic.edu>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "jeremy@goop.org" <jeremy@goop.org>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Xu Zhang <xzhang@cs.uic.edu>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"gm281@cam.ac.uk" <gm281@cam.ac.uk>,
Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: Re: [PATCH V2 0/6] mini-os: check and fix up against nested events in x86-64 kernel entry
Date: Mon, 22 Apr 2013 10:00:05 -0500 [thread overview]
Message-ID: <51755075.60601@cs.uic.edu> (raw)
In-Reply-To: <1366632029.22143.51.camel@zakaz.uk.xensource.com>
On 04/22/2013 07:00 AM, Ian Campbell wrote:
> On Sun, 2013-04-21 at 01:22 +0100, Samuel Thibault wrote:
>> Ian Campbell, le Wed 17 Apr 2013 16:14:51 +0100, a écrit :
>>> On Thu, 2013-04-11 at 05:46 +0100, Xu Zhang wrote:
>>>> mini-os almost always use direct iret to return from interrupt.
>>>> But this operation is not atomic because Xen uses event mask to
>>>> enable/disable event delivery. So there is a window for nested
>>>> events to happen after re-enabling event delivery and before
>>>> a direct iret.
>>>>
>>>> The issues come with such non-atomicity have been discussed in:
>>>> http://lists.xen.org/archives/html/xen-devel/2007-06/msg00142.html
>>>>
>>>> And also on Xen-devel:
>>>> http://markmail.org/message/jkzhzy6fyes6igcf
>>>>
>>>> This patch checks and fixes up against nested events in a similar
>>>> fashion of Linux 32bit pvops.
>>>> It checks against re-entrant of critical section in event handling
>>>> callback. Try to fix up by coalescing the two stack frames into
>>>> one when the a nested event came.
>>>> It then resumes execution as if the second event never happened.
>>>>
>>>> It also refactors mini-os's x86-64 kernel entry assembly code.
>>> Samuel are you now happy with this?
>> Yes.
> Thanks. George also Acked on IRC wrt the freeze so applied.
>
> Thanks Xu.
>
> Ian.
>
Thanks, Ian.
Another thing: mini-os x86-32bit fixes up against event re-entrant using
a look up table in the similar fashion of the initial version of these
patches. There is no problem correctness wise. But such table could be
hard to maintain, as Jeremy pointed out. So I can apply the similar
refinement on x86_32.S, too. It also makes mini-os 32bit kernel entry
consistent with 64bit's. Let me know if it is worth doing.
Thanks again.
--
xu
:q!
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-04-22 15:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 4:46 [PATCH V2 0/6] mini-os: check and fix up against nested events in x86-64 kernel entry Xu Zhang
2013-04-11 4:46 ` [PATCH V2 1/6] mini-os/x86-64 entry: code clean-ups; no functional changes Xu Zhang
2013-04-21 0:15 ` Samuel Thibault
2013-04-11 4:46 ` [PATCH V2 2/6] mini-os/x86-64 entry: define macros for registers partial save and restore; " Xu Zhang
2013-04-21 0:16 ` Samuel Thibault
2013-04-11 4:46 ` [PATCH V2 3/6] mini-os/x86-64 entry: code refactoring; " Xu Zhang
2013-04-21 0:14 ` Samuel Thibault
2013-04-11 4:46 ` [PATCH V2 4/6] mini-os/x86-64 entry: remove unnecessary event blocking Xu Zhang
2013-04-11 4:46 ` [PATCH V2 5/6] mini-os/x86-64 entry: defer RESTORE_REST until return Xu Zhang
2013-04-11 4:47 ` [PATCH V2 6/6] mini-os/x86-64 entry: check against nested events and try to fix up Xu Zhang
2013-04-21 0:22 ` Samuel Thibault
2013-04-17 15:14 ` [PATCH V2 0/6] mini-os: check and fix up against nested events in x86-64 kernel entry Ian Campbell
2013-04-21 0:22 ` Samuel Thibault
2013-04-22 12:00 ` Ian Campbell
2013-04-22 15:00 ` Xu Zhang [this message]
2013-04-22 15:06 ` 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=51755075.60601@cs.uic.edu \
--to=xzhang@cs.uic.edu \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=gm281@cam.ac.uk \
--cc=jeremy@goop.org \
--cc=samuel.thibault@ens-lyon.org \
--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 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.