From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 857A5C433EF for ; Mon, 20 Jun 2022 09:56:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239464AbiFTJ4p (ORCPT ); Mon, 20 Jun 2022 05:56:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239550AbiFTJ4o (ORCPT ); Mon, 20 Jun 2022 05:56:44 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39A3213E3F; Mon, 20 Jun 2022 02:56:43 -0700 (PDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25K9pnSM028801; Mon, 20 Jun 2022 09:56:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=9hLAQH8d2Pu6NsRPkayv9KkCnxOXLlLavHC0XUOzo8o=; b=QrelhGp4gEv1CZyklX4916U6Hg7J8+XFaJopdN9iKSAxdgazuZgfnqCemQ4UAEDAHBu6 Xwpt4BgnNZtJfabODX1C6ytdwSOIAAZuovQpqE8+sx1Jfx2moFQzo7y5Xi2r/i0wE0cy aPQqlX44Me1Kikl3QWozE2TnULgmOOUGK2hPmweWeK+cbaCLuWdyre8cfYXEnyR4yZOM kxCuPUdQCbBS3du4lHJ+pd+Aahj2njhDhS4hd0tc13l/rFHOpIU+0SQ7f0WbPtTWONUA NBQWHLg0oVZJUU9tIrBMJ4sFNuxoF0/ehEXGYeLLgvdHb7/mQcbqvxPglNp+1ZCbqNd3 EQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gsr1amdx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jun 2022 09:56:42 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 25K9r0j4004051; Mon, 20 Jun 2022 09:56:42 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gsr1amdwc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jun 2022 09:56:42 +0000 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 25K9olsn024196; Mon, 20 Jun 2022 09:56:39 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 3gs5yhj9yv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jun 2022 09:56:39 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25K9uak620709674 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Jun 2022 09:56:36 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DE9211C04C; Mon, 20 Jun 2022 09:56:36 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A1C4F11C04A; Mon, 20 Jun 2022 09:56:35 +0000 (GMT) Received: from [9.145.19.23] (unknown [9.145.19.23]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 20 Jun 2022 09:56:35 +0000 (GMT) Message-ID: <9d6bd8a6-3640-a0f2-d203-773c43825fcc@linux.ibm.com> Date: Mon, 20 Jun 2022 11:56:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v11 18/19] KVM: s390: pv: avoid export before import if possible Content-Language: en-US To: Claudio Imbrenda , kvm@vger.kernel.org Cc: borntraeger@de.ibm.com, thuth@redhat.com, pasic@linux.ibm.com, david@redhat.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, scgl@linux.ibm.com, mimu@linux.ibm.com, nrb@linux.ibm.com References: <20220603065645.10019-1-imbrenda@linux.ibm.com> <20220603065645.10019-19-imbrenda@linux.ibm.com> From: Janosch Frank In-Reply-To: <20220603065645.10019-19-imbrenda@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: dG98nUTKzO4OzC7H-ReN_JlmBklCgF_c X-Proofpoint-GUID: Jbvk93xKXZCeyG6aEaZz45jwYCKN5w3R X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-20_05,2022-06-17_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 spamscore=0 phishscore=0 impostorscore=0 malwarescore=0 suspectscore=0 adultscore=0 mlxscore=0 clxscore=1015 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206200044 Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On 6/3/22 08:56, Claudio Imbrenda wrote: > If the appropriate UV feature bit is set, there is no need to perform > an export before import. > > Signed-off-by: Claudio Imbrenda > --- > arch/s390/kernel/uv.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c > index 02aca3c5dce1..c18c3d6a4314 100644 > --- a/arch/s390/kernel/uv.c > +++ b/arch/s390/kernel/uv.c > @@ -249,6 +249,8 @@ static int make_secure_pte(pte_t *ptep, unsigned long addr, > */ > static bool should_export_before_import(struct uv_cb_header *uvcb, struct mm_struct *mm) > { > + if (test_bit_inv(BIT_UV_FEAT_MISC, &uv_info.uv_feature_indications)) > + return false; This needs a comment explaining, that this is only an option for shared pages. > if (uvcb->cmd == UVC_CMD_UNPIN_PAGE_SHARED) > return false; > return atomic_read(&mm->context.protected_count) > 1;