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

[RFC PATCH 0/1] Runstate error with KPTI


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Date: Thu, 28 May 2020 16:25:30 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xXajeLJr1xURQlu89ETkH/wIRtkinyHgRZNQgmvzHY0=; b=NyLTvQpKpWK1vLpgzSbsXeMeuDDvrIph8eLskaKukneuBI36+NX3E/sLL0M5Wc/uPSRTiEWjrGvyKxqGGW/tUNS1ykWYr+XAZwLxDbgxekx5d3KeHtRFTPwUY3Z9WjzQs0IoqrpUe2O4Cy44MC9Pv1cSznaTw668T7VObVoZTFhmt2UjrgVzC2zeAiWMjkuMezWfTdtgfCIL8sJlsBDucCcuG0AsTbArLTJTV0jOnZ0Nb/AhLsvXgG2fgzAVFmAV39E4BJPC0tyvD0YBaNQ+1kkMXPx8QNAx7cPU7dqs0JZ0eX5TH7W13uO3MgsHpF62WdKT5Sp5CWyGpEgysJuz7w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZJjlTUJWpswE6Jr6HeGueszjp6sZUixOSfWn0qBlB+cbxgZ3OrdwBLn8cfm/4C24A1Ii7mJYr4x4iC7UxYBq7/DktGeXZaf5hasL3syixkVJtx4Kdym4YIN5KS+fpL3vVTw9GGB0xZmUz4gl6OrqWAvJ3dGchpG9BaCnft3R3VfB98wZlA/kSSPow1x1JAiI2b6c40C5cOvH9TDTDaUtxXmm0WvXptGW0EhqbVUC08fVXPL2dGCfce1M6PiQq6XV8BFpmBnvcZgG9ECJfO6YjS0LK9l1o1vgEfO6eFkXdj5T3+JAiKTvYQp7CMm/zYz8FlnEA0x0FFwW2BEwRtQL4A==
  • Authentication-results-original: lists.xenproject.org; dkim=none (message not signed) header.d=none; lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, nd@xxxxxxx, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 28 May 2020 15:27:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=arm.com;

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(-)

-- 
2.17.1




 


Rackspace

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