From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 3yNVlG38NnzDrcC for ; Fri, 27 Oct 2017 15:10:01 +1100 (AEDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9R494nN137374 for ; Fri, 27 Oct 2017 00:10:00 -0400 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dusmwhpb2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 27 Oct 2017 00:09:59 -0400 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Oct 2017 22:09:58 -0600 From: "Aneesh Kumar K.V" To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au Cc: linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K.V" Subject: [PATCH 13/16] powerpc/mm/pseries: Use HASH_PROTECT hcall in guest Date: Fri, 27 Oct 2017 09:38:30 +0530 In-Reply-To: <20171027040833.3644-1-aneesh.kumar@linux.vnet.ibm.com> References: <20171027040833.3644-1-aneesh.kumar@linux.vnet.ibm.com> Message-Id: <20171027040833.3644-14-aneesh.kumar@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/platforms/pseries/lpar.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 52d2e3038c05..cd5cf5bd53f1 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c @@ -388,15 +388,20 @@ static long pSeries_lpar_hash_updatepp(unsigned long hash, unsigned long want_v; want_v = hpte_encode_avpn(vpn, psize, ssize); - pr_devel(" update: avpnv=%016lx, hash=%016lx, f=%lx, psize: %d ...", want_v, hash, flags, psize); + if (firmware_has_feature(FW_FEATURE_HASH_API)) { + lpar_rc = plpar_pte_hash_protect(flags, hash, want_v); + goto err_out; + } slot = __pSeries_lpar_hpte_find(hash, want_v); if (slot < 0) return -1; lpar_rc = plpar_pte_protect(flags, slot, want_v); + +err_out: if (lpar_rc == H_NOT_FOUND) { pr_devel("not found !\n"); return -1; -- 2.13.6