Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5669542ybe; Tue, 17 Sep 2019 11:35:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHuhz6UZI9WG57iupxqGev5Hr0TQklbGWMKgCououyVIDvcxOeIWTo/bjhT+tQAKQpX+gl X-Received: by 2002:a50:d090:: with SMTP id v16mr6308138edd.176.1568745315921; Tue, 17 Sep 2019 11:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568745315; cv=none; d=google.com; s=arc-20160816; b=DZH0nCbEhy6vSytv/WzFOLpTH2JLOTuwcMpmU/kTEK6joe56FLzrRDJBTMPOzvv0s0 xCd989Kq5ec2GQNMTHXoqOVLXT3j7pYOeHa5QcZG3Yok5DyEmPeu5y4w2olwJQkGFXVl mepGiMo81JA9yXiBcaJGJzK1WD5j1jlII31Y8qma3R0MiflMZ9XTb18jxgU7ga9Hnrj6 HmoREFgMMzdjH17Vi8OZoamSTpTsWc78Zjrfw+ITK1Gx7uKXgT9laXjWfEYnz+9quS9F 7E3BgJw9cI79jl1SgchEcMSFCA9ZaPUEiS+FATxYIr1294jPZv0VU/+4vh86ra3nqra6 becg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=MLoTzpxGkW6FdpvZQTdUCbWS8s1JMQUKlOQTqd07Kkg=; b=mVxvlIkUP3ltonF+tMy28c4IUVSgJjQ3/Y9A1WK0p6dIkmtJ38+StjZ021Loo/XJFe 9vxnyKE0VNXZkPmIqn3/LWXNRcggXat0BXvcC0206aR0SSFLrEjOtAVyOL92Sav11HY3 5zdcxGnGtbHa2iWBhA3UrKAF8BSjhO6SXY7RoCIkM550DxDRdRWwPtUh6zlAQOceha99 YxJDplOdott7KQiyMDvmzoc8xHD20vbsFUEsCi51N1MZl+04bN5F7E2d9JIi/V5IyZnn soW7VJNmSpJdZFihIJfFzrMhDfDXCKuHKWXY0G5DUHR0DuJPWkcrQHekWvTXPRY5ZkrJ 3y1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h20si1984458edb.218.2019.09.17.11.34.52; Tue, 17 Sep 2019 11:35:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730243AbfIQQNh (ORCPT + 99 others); Tue, 17 Sep 2019 12:13:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:9928 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726215AbfIQQNh (ORCPT ); Tue, 17 Sep 2019 12:13:37 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8HGCJC3064345; Tue, 17 Sep 2019 12:13:03 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2v327r9n33-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Sep 2019 12:13:02 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8HGCK2k064389; Tue, 17 Sep 2019 12:13:02 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 2v327r9n2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Sep 2019 12:13:02 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8HGAZsW013676; Tue, 17 Sep 2019 16:13:01 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma04wdc.us.ibm.com with ESMTP id 2v0t9asvr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Sep 2019 16:13:01 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8HGCx3p45154578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Sep 2019 16:12:59 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 978C2136072; Tue, 17 Sep 2019 16:12:59 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2D0D513606E; Tue, 17 Sep 2019 16:12:57 +0000 (GMT) Received: from [9.199.41.201] (unknown [9.199.41.201]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 17 Sep 2019 16:12:56 +0000 (GMT) Subject: Re: [PATCH v2 0/2] powerpc/mm: Conditionally call H_BLOCK_REMOVE To: Laurent Dufour , mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20190916095543.17496-1-ldufour@linux.ibm.com> From: "Aneesh Kumar K.V" Message-ID: <1ba1bfc7-66c2-5298-2ef2-4117cb72ee13@linux.ibm.com> Date: Tue, 17 Sep 2019 21:42:55 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190916095543.17496-1-ldufour@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-17_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909170154 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/16/19 3:25 PM, Laurent Dufour wrote: > Since the commit ba2dd8a26baa ("powerpc/pseries/mm: call H_BLOCK_REMOVE"), > the call to H_BLOCK_REMOVE is always done if the feature is exhibited. > > However, the hypervisor may not support all the block size for the hcall > H_BLOCK_REMOVE depending on the segment base page size and actual page > size. > > When unsupported block size is used, the hcall H_BLOCK_REMOVE is returning > H_PARAM, which is triggering a BUG_ON check leading to a panic like this: > > The PAPR document specifies the TLB Block Invalidate Characteristics which > tells for each couple segment base page size, actual page size, the size of > the block the hcall H_BLOCK_REMOVE is supporting. > > Supporting various block sizes doesn't seem needed at that time since all > systems I was able to play with was supporting an 8 addresses block size, > which is the maximum through the hcall, or none at all. Supporting various > size would complexify the algorithm in call_block_remove() so unless this > is required, this is not done. > > In the case of block size different from 8, a warning message is displayed > at boot time and that block size will be ignored checking for the > H_BLOCK_REMOVE support. > > Due to the minimal amount of hardware showing a limited set of > H_BLOCK_REMOVE supported page size, I don't think there is a need to push > this series to the stable mailing list. > > The first patch is reading the characteristic through the hcall > ibm,get-system-parameter and record the supported block size for each page > size. The second patch is changing the check used to detect the > H_BLOCK_REMOVE availability to take care of the base page size and page > size couple. > > Changes since V1: > > - Remove penc initialisation, this is already done in > mmu_psize_set_default_penc() > - Add details on the TLB Block Invalidate Characteristics's buffer format > - Introduce #define instead of using direct numerical values > - Function reading the characteristics is now directly called from > pSeries_setup_arch() > - The characteristics are now stored in a dedciated table static to lpar.c > you can use Reviewed-by: Aneesh Kumar K.V for the series. -aneesh