diff mbox series

[RFC,8/8] skiboot/imc: Disable IMC node when UV enabled

Message ID 20190905132919.8765-9-grimm@linux.ibm.com
State Superseded
Headers show
Series PEF support in Skiboot | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (7b12d5489fcfd73ef7ec0cb27eff7f8a5f13b238)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Ryan Grimm Sept. 5, 2019, 1:29 p.m. UTC
From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>

Remove the IMC nodes when the ultravisor is enabled,
since both HOMER and IMC scoms are not accessable in
hypervisor state.

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
 hw/imc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/hw/imc.c b/hw/imc.c
index 46b93001..737ea843 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -603,6 +603,17 @@  imc_mambo:
 	if (pause_microcode_at_boot())
 		goto err;
 
+	/*
+	 * If MSR(S) bit is set, disable IMC nodes.
+	 * IMC nodes need access to specific scom and HOMER region
+	 * which are not accessible from hypervisor.
+	 *
+	 * At this point is_uv_present() cant be used since uv_init()
+	 * is called much later. Hencing checking for the MSR bit here.
+	 */
+	if (is_msr_bit_set(MSR_S))
+		goto err;
+
 	/*
 	 * If the dt_attach_root() fails, "imc-counters" node will not be
 	 * seen in the device-tree and hence OS should not make any