From 2ab647c894e8525a94c7837db2df91afacb65951 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Tue, 24 May 2022 19:16:37 +1000 Subject: core: detect LPAR-per-core mode and report in dt Some firmware configurations boot in LPAR-per-core mode, which is not compatible with KVM on POWER9 and later machines. Detect which LPAR mode the boot core is in (all others will be set the same way), and if booted in LPAR-per-core mode then print a warning and add a device-tree entry that the OS can test for. Signed-off-by: Nicholas Piggin Signed-off-by: Reza Arbab --- hdata/test/hdata_to_dt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hdata/test') diff --git a/hdata/test/hdata_to_dt.c b/hdata/test/hdata_to_dt.c index 1729f1c..ead6e3c 100644 --- a/hdata/test/hdata_to_dt.c +++ b/hdata/test/hdata_to_dt.c @@ -104,6 +104,8 @@ static unsigned long fake_pvr = PVR_P8; unsigned int cpu_thread_count = 8; +bool lpar_per_core; + static inline unsigned long mfspr(unsigned int spr) { assert(spr == SPR_PVR); -- cgit v1.1