From patchwork Mon Jul 6 16:14:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Grimm X-Patchwork-Id: 1323722 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B0rNK0Kjfz9sRK for ; Tue, 7 Jul 2020 02:18:41 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4B0rNJ70gHzDr10 for ; Tue, 7 Jul 2020 02:18:40 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=grimm@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B0rL32m3xzDqR0 for ; Tue, 7 Jul 2020 02:16:43 +1000 (AEST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 066GDVXp108924 for ; Mon, 6 Jul 2020 12:16:41 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 322ndvf178-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Jul 2020 12:16:41 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 066Fttr2021178 for ; Mon, 6 Jul 2020 16:16:38 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01dal.us.ibm.com with ESMTP id 322hd8mwrv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 Jul 2020 16:16:38 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 066GGaQa27722014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 6 Jul 2020 16:16:36 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7E0D6BE051 for ; Mon, 6 Jul 2020 16:16:37 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2817ABE053 for ; Mon, 6 Jul 2020 16:16:37 +0000 (GMT) Received: from alain.ibm.com (unknown [9.85.164.109]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP for ; Mon, 6 Jul 2020 16:16:37 +0000 (GMT) From: Ryan Grimm To: skiboot@lists.ozlabs.org Date: Mon, 6 Jul 2020 12:14:38 -0400 Message-Id: <20200706161439.12635-12-grimm@linux.ibm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200706161439.12635-1-grimm@linux.ibm.com> References: <20200706161439.12635-1-grimm@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-06_12:2020-07-06, 2020-07-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=13 clxscore=1015 cotscore=-2147483648 mlxlogscore=999 impostorscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 priorityscore=1501 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007060119 Subject: [Skiboot] [RFC PATCH v7 11/12] skiboot/imc: Disable IMC node when UV enabled X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: Madhavan Srinivasan Don't create the IMC nodes when the ultravisor is enabled. Hypervisor IMC initialization requires access to HOMER and IMC scoms which are protected and only accessable via ultra calls. So, don't create them until the kernel supports the ultra calls. Signed-off-by: Madhavan Srinivasan [ grimm: move S bit check to beginning of function ] [ grimm: comments and commit message ] Signed-off-by: Ryan Grimm --- hw/imc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/imc.c b/hw/imc.c index 927fba0b..f6351225 100644 --- a/hw/imc.c +++ b/hw/imc.c @@ -527,6 +527,16 @@ void imc_init(void) struct dt_node *dev; int err_flag = -1; + /* + * If MSR(S) bit is set, HOMER and IMC scoms are only accessible via + * ultra call. The kernels lacks support, so don't create them. + * + * At this point uv_present can't be used since uv_init() + * is called much later, so check the MSR bit. + */ + if (is_msr_bit_set(MSR_S)) + return; + if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS) { dev = dt_find_compatible_node(dt_root, NULL, "ibm,opal-in-memory-counters");