powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL
authorCédric Le Goater <clg@kaod.org>
Wed, 14 Aug 2019 15:47:52 +0000 (17:47 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 19 Aug 2019 03:20:24 +0000 (13:20 +1000)
commitc3e0dbd7f780a58c4695f1cd8fc8afde80376737
tree6aad0dbf1ae834c3b4f25ec6891b3e4d4966fbf8
parent201ed7f327a17577debec52c33786d4b3259d0dc
powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL

Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in
the OPAL logs and also outputs some of the fields of the internal XIVE
structures in Linux. The OPAL calls can only be done on baremetal
(PowerNV) and they crash a pseries machine. Fix by checking the
hypervisor feature of the CPU.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190814154754.23682-2-clg@kaod.org
arch/powerpc/xmon/xmon.c