[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 0/6] mini-os: check and fix up against nested events in x86-64 kernel entry

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:

And also on Xen-devel:

This patch checks and fixes up against nested events in a similar 
fashion of mini-os 32bit and Fitzhardinge's (whom is also CCed to).
It checks against re-entrant of critical section in event handling 
callback. Try to fix up by looking up the number of bytes restored 
when the second event came and coalescing the two stack frames into
one. And resume execution as if the second event never happened.

It also refactors mini-os's x86-64 kernel entry assembly code.

Xu Zhang (6):
  mini-os/x86-64 entry: code clean-ups
  mini-os/x86-64 entry: define macros for registers partial save and
  mini-os/x86-64 entry: code refactoring; no functional changes
  mini-os/x86-64 entry: remove unnecessary event block
  mini-os/x86-64 entry: defer RESTORE_REST until return
  mini-os/x86-64 entry: check against nested events and try to fix up

 extras/mini-os/arch/x86/x86_64.S |  261 +++++++++++++++++++++++++-------------
 1 files changed, 175 insertions(+), 86 deletions(-)


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.