From patchwork Wed Aug 25 15:04:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Barrat X-Patchwork-Id: 1520818 Return-Path: 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=) 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=Or4z72tq; 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 4GvqC00VKjz9sW8 for ; Thu, 26 Aug 2021 01:09:32 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GvqBz5zhvz2xXG for ; Thu, 26 Aug 2021 01:09:31 +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=Or4z72tq; dkim-atps=neutral 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.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=fbarrat@linux.ibm.com; receiver=) 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=Or4z72tq; 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 4GvqBw55Z6z2yMG; Thu, 26 Aug 2021 01:09:28 +1000 (AEST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17PF8nKu061395; Wed, 25 Aug 2021 11:09:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=ep6JgDWjNnFr5cY5dkN0IaRYu+gCWb7c+T031agrncI=; b=Or4z72tqXHypBt99EbYlXXnSlD6uMUQjxUrtJP8tJRT6OXO2717+wfqP3EnmYUIjFzvp BKmtTjcsuGX4hfxjdxJeb+CJK98RfjX9fUi/SdFE64tXgZq63dIxhAc3w0oQlE6s/AWj rFK8FHz4PIkb+TPtVimuNUeh4bPiN3bcZyipXn3ljdsW15HIJOpiVZ4XDycHU3LRVvKl 3mCJrigEBQIWuqN5lDZfP9u+unM2qijtsDxeUuLPOa6ioithKWk6eWp+cNa6IbbyBvIx HhTavvDH1pzlNphW9tirQnwNCmY6wpuBaK0VWOuwxUq4Qsw+DCNtXfPCVqBX8ep7g+yw hA== Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 3anqp81918-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Aug 2021 11:09:23 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 17PF3Tpn012318; Wed, 25 Aug 2021 15:04:11 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06fra.de.ibm.com with ESMTP id 3ajrrhx6pp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Aug 2021 15:04:11 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 17PF49ZJ55247214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Aug 2021 15:04:09 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F0E2EA4059; Wed, 25 Aug 2021 15:04:08 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C1211A4040; Wed, 25 Aug 2021 15:04:08 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.145.93.83]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 25 Aug 2021 15:04:08 +0000 (GMT) From: Frederic Barrat To: skiboot@lists.ozlabs.org Date: Wed, 25 Aug 2021 17:04:08 +0200 Message-Id: <20210825150408.54367-1-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: cHsZvz8deQAV1aZ2W1BIz_nsSIOzgiPQ X-Proofpoint-ORIG-GUID: cHsZvz8deQAV1aZ2W1BIz_nsSIOzgiPQ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-25_06:2021-08-25, 2021-08-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1011 phishscore=0 priorityscore=1501 spamscore=0 bulkscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108250092 Subject: [Skiboot] [PATCH] phb4/5: Escalate page-level TCE kills 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: , Cc: skiboot-stable@lists.ozlabs.org Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" An hw issue was found on P10 (HW560152) where a page-level TCE kill can be dropped if there are enough TCE kill requests already being processed. The net effect is that data integrity is not guaranteed. The circumvention is to stay away from page-level kills and escalate those to PE kills. Which hurts performance. It also affects P9. Signed-off-by: Frederic Barrat --- hw/phb4.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/phb4.c b/hw/phb4.c index 79083d4a..ddaa18f8 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -1051,6 +1051,14 @@ static int64_t phb4_tce_kill(struct phb *phb, uint32_t kill_type, uint64_t val; int64_t rc; + /* + * HW560152: a page-level kill can be dropped if the + * processing queue is backed-up, which can cause data + * integrity issues + */ + if (kill_type == OPAL_PCI_TCE_KILL_PAGES) + kill_type = OPAL_PCI_TCE_KILL_PE; + sync(); switch(kill_type) { case OPAL_PCI_TCE_KILL_PAGES: