mbox series

[RFC,0/1] Runstate error with KPTI

Message ID cover.1590675919.git.bertrand.marquis@arm.com (mailing list archive)
Headers show
Series Runstate error with KPTI | expand

Message

Bertrand Marquis May 28, 2020, 3:25 p.m. UTC
The following patch implements a solution to the bug occuring on Arm
with Linux with KPTI enabled during a context switch from user mode:
(XEN) p2m.c:1890: d1v0: Failed to walk page-table va 0xffffff837ebe0cd0

This is an answer to the discussion started here:
https://lists.xenproject.org/archives/html/xen-devel/2020-05/msg00735.html

and a modification of the patches submitted here:
https://lists.xenproject.org/archives/html/xen-devel/2019-05/msg02320.html

This is submitted as an RFC as the solution is only working on Arm and I
would need some help for the x86 implementation.
On x86 this needs at least a solution to implement an equivalent of
get_page_from_gva (see #error in domain.c) and implementation of the
different runstate_update functions.
Any help or suggestion on that would be nice.

I also added some XXX in different places as part of the code of the
original patch I started from are not completely clear to me.

Bertrand Marquis (1):
  xen: Use a global mapping for runstate

 xen/arch/arm/domain.c   | 32 +++++++++-------
 xen/arch/x86/domain.c   | 51 ++++++++++++++-----------
 xen/common/domain.c     | 84 ++++++++++++++++++++++++++++++++++-------
 xen/include/xen/sched.h | 11 ++++--
 4 files changed, 124 insertions(+), 54 deletions(-)