Message ID | 20210804072137.1147875-35-hegdevasant@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=o5nyo61g; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 4GfjtM6XtTz9sX5 for <incoming@patchwork.ozlabs.org>; Wed, 4 Aug 2021 17:24:43 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GfjtM5Nytz3dRS for <incoming@patchwork.ozlabs.org>; Wed, 4 Aug 2021 17:24:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=o5nyo61g; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=o5nyo61g; dkim-atps=neutral Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 4GfjrX3nB1z3cXT for <skiboot@lists.ozlabs.org>; Wed, 4 Aug 2021 17:23:08 +1000 (AEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1747M72T179195; Wed, 4 Aug 2021 03:23:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=CIjSUC0kgu4FedSh4XNE0NY4WKGmVE3/Lelu4AL60G4=; b=o5nyo61gKTrisHmb3m9+7dN/TL7SWan93i3Jfblun0AVp3ow9ahG8uC2RSxIOTyH6rGQ vMTTe5t+ojyaIGtxkLYUX9yaxt8LvzHL3JdUhP3MI8rsXPg5n7qRHViJAeGq8Gwhlfpd DxW/VnqNx0fEVaUvViUe796lV/G9PUMUpjxtpLGiAhnJZ9aK5ry2b3w+59WO7WtFm1tS zjxz6RTd66NbQOtIW0wwuN4AtstPOFZU/KzU9b4ESpm/dfvNwJsCqh4hKJvOEZzx/4Kz j6braI9amJmhIKUeV+ZoocAJsJ+VKtY/ByIaO/z7uuDI+RMPGt0hhmT6xVOzIl8e/prc eQ== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a7pehr0rr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Aug 2021 03:23:04 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1746lMsF007974; Wed, 4 Aug 2021 07:23:03 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06ams.nl.ibm.com with ESMTP id 3a4wshrre3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Aug 2021 07:23:03 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1747N0ht56558012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Aug 2021 07:23:00 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC63EAE04D; Wed, 4 Aug 2021 07:23:00 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 701ABAE057; Wed, 4 Aug 2021 07:22:59 +0000 (GMT) Received: from hegdevasant.in.ibm.com (unknown [9.85.83.73]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 4 Aug 2021 07:22:59 +0000 (GMT) From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> To: skiboot@lists.ozlabs.org Date: Wed, 4 Aug 2021 12:51:12 +0530 Message-Id: <20210804072137.1147875-35-hegdevasant@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210804072137.1147875-1-hegdevasant@linux.vnet.ibm.com> References: <20210804072137.1147875-1-hegdevasant@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: TDM0QdyhpLe40NMOzvCB3yuzEPWHYjDD X-Proofpoint-GUID: TDM0QdyhpLe40NMOzvCB3yuzEPWHYjDD X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-04_02:2021-08-03, 2021-08-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 phishscore=0 mlxscore=0 spamscore=0 suspectscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108040036 Subject: [Skiboot] [PATCH v2 34/59] xive/p10: Add option flags to the XIVE exploitation mode X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
P10 Enablement
|
expand
|
diff --git a/hw/xive2.c b/hw/xive2.c index a7bfdcbde..4ddcf184f 100644 --- a/hw/xive2.c +++ b/hw/xive2.c @@ -171,6 +171,14 @@ static enum { XIVE_MODE_NONE, } xive_mode = XIVE_MODE_NONE; +/* + * The XIVE exploitation mode options indicates the active features and + * is part of the mode parameter of the opal_xive_reset() call + */ +static uint64_t xive_expl_options; + +#define XIVE_EXPL_ALL_OPTIONS 0 + /* * Each source controller has one of these. There's one embedded in * the XIVE struct for IPIs @@ -3896,11 +3904,11 @@ void xive2_cpu_reset(void) in_be64(xs->tm_ring1 + TM_SPC_PULL_POOL_CTX); } -static int64_t __xive_reset(uint64_t version) +static int64_t __xive_reset(uint64_t mode) { struct proc_chip *chip; - xive_mode = version; + xive_mode = mode; /* Mask all interrupt sources */ irq_for_each_source(xive_reset_mask_source_cb, NULL); @@ -3938,13 +3946,20 @@ int64_t xive2_reset(void) return __xive_reset(XIVE_MODE_EXPL); } -static int64_t opal_xive_reset(uint64_t version) +static int64_t opal_xive_reset(uint64_t mode) { - prlog(PR_DEBUG, "XIVE reset, version: %d...\n", (int)version); + prlog(PR_DEBUG, "XIVE reset. mode = %llx\n", mode); - if (version != XIVE_MODE_EXPL) { - prerror("ignoring version %lld at reset. " - "XIVE exploitation mode is the default\n", version); + if (!(mode & XIVE_MODE_EXPL)) { + prlog(PR_NOTICE, "No emulation mode. XIVE exploitation mode " + "is the default\n"); + } + + xive_expl_options = mode & ~XIVE_MODE_EXPL; + if (xive_expl_options & ~XIVE_EXPL_ALL_OPTIONS) { + prerror("invalid XIVE exploitation mode option %016llx\n", + xive_expl_options); + return OPAL_PARAMETER; } return __xive_reset(XIVE_MODE_EXPL);