[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171218152926.682916108@linuxfoundation.org>
Date: Mon, 18 Dec 2017 16:49:36 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
"Guilherme G. Piccoli" <gpiccoli@...ux.vnet.ibm.com>,
Breno Leitao <leitao@...ian.org>,
Michael Ellerman <mpe@...erman.id.au>,
Sasha Levin <alexander.levin@...izon.com>
Subject: [PATCH 4.14 140/178] powerpc/xmon: Check before calling xive functions
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <leitao@...ian.org>
[ Upstream commit 402e172a2ce76210f2fe921cf419d12103851344 ]
Currently xmon could call XIVE functions from OPAL even if the XIVE is
disabled or does not exist in the system, as in POWER8 machines. This
causes the following exception:
1:mon> dx
cpu 0x1: Vector: 700 (Program Check) at [c000000423c93450]
pc: c00000000009cfa4: opal_xive_dump+0x50/0x68
lr: c0000000000997b8: opal_return+0x0/0x50
This patch simply checks if XIVE is enabled before calling XIVE
functions.
Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller")
Suggested-by: Guilherme G. Piccoli <gpiccoli@...ux.vnet.ibm.com>
Signed-off-by: Breno Leitao <leitao@...ian.org>
Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/powerpc/xmon/xmon.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2475,6 +2475,11 @@ static void dump_xives(void)
unsigned long num;
int c;
+ if (!xive_enabled()) {
+ printf("Xive disabled on this system\n");
+ return;
+ }
+
c = inchar();
if (c == 'a') {
dump_all_xives();
Powered by blists - more mailing lists