Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5292106pxv; Wed, 28 Jul 2021 07:33:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr1RL08DYTSdzm5VkPArDedZvYoBoN30w5ikyRB5DJpI7lY+KVici0YR+3Tp9u2pxoa9Sc X-Received: by 2002:a05:6e02:114f:: with SMTP id o15mr92037ill.255.1627482781399; Wed, 28 Jul 2021 07:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627482781; cv=none; d=google.com; s=arc-20160816; b=hMyVbP/usuXLAtSKC/4P+FsFYUwjI485mns8Ed5Ir6tCPyL0dLFk5zGuIibnz1wFNM 4yVL7nTcnOQfUaJRnQpHKZ7g0A1Ip2dYkq9gKjQ0Lr+S7F/pCfQR7vk9IUbmYulYW0t1 B5yjqvlozLvUXPXSAXzD7Z2dFOE/VS8+YJQPasGEZz13luW2CdaUALKGdpKe1tO7I8Rw tbt1BhP+fwElVIkwF+NV+wMdcPtYJcShpf8qL55igRnlU0twQeeOTZfNQAJDld5iMyWp p/aI/i9EXdR4wlxt7Xmaa63/TsyVtir4DcW2oI2a85e+iblKQBjhWB9SOygFa66/YGDe aCKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TYoIRol9yl2qTCImcPN2bYvLHpbTGORySPpFzAkZxAQ=; b=pCAoaCSwnocTnLHveQnQksLxJqi2Ul682SA6BM1qb4mIcbEBRFRqFJMRci8Q/OQteR JVHVCTwonENtAeft1S1tkhIKFSJ0ySC6I6AqjQUlkinreIZRZjRKF3hpvB3iHceUAoL9 5nU0YgHNMtD6/nBsjHcdirpGpKVEhyG9NRa6WOEG98bRPhO78HcEGN4Qj234Ygur83ZR VRxGfXb4c5PMmtspJPmP3hCOvm/8kfd+D4w90SxM253DQGxExspjGrS35ZNbjhuEEs69 jcgrdvFCmfwEMirqz9B+NdJ6fZMGEY3rH8ruL6FwITdWICgXaOyM9mRCI1f1LdbItrC+ B9yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=FqOeSdm2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si7908860ill.122.2021.07.28.07.32.50; Wed, 28 Jul 2021 07:33:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=FqOeSdm2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236973AbhG1O10 (ORCPT + 99 others); Wed, 28 Jul 2021 10:27:26 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52288 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236891AbhG1O0v (ORCPT ); Wed, 28 Jul 2021 10:26:51 -0400 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 16SENRXS002250; Wed, 28 Jul 2021 10:26:49 -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-transfer-encoding; s=pp1; bh=TYoIRol9yl2qTCImcPN2bYvLHpbTGORySPpFzAkZxAQ=; b=FqOeSdm2qb7RKXeRnbwsDoET4nVW2ng5LU1nXa+eXptsRtrLP+Qsff6Jt++xVS0O06XU cy5IQdoTctGT5btUeD00EV/VdBRRPcDkkogW0UaxLYORyGfe9dBcV4uOjyW9EfJ5DT/p akAYkLSLSdVOAUkAc/BwOaiN4n7cf+pkT16gsZOqhVxIsDLJ1qtgP9eugpEAPOXTebTW 3CfVABcxpYUY9148LdrG2Ge/q8vxcNR7eDvHDJco9GC0hy9T7TJx3UOSpGfbHlDKReai DoL9iPzKdCN0NX/9AqTBDZ/g4wRrG8CWKU+NTOiAd3qXqonfYirl8ePkyEzmi+kq654u fQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a38u4rbfx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Jul 2021 10:26:48 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16SEOSHx006078; Wed, 28 Jul 2021 10:26:48 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a38u4rbf4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Jul 2021 10:26:48 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16SEJ6Tl013456; Wed, 28 Jul 2021 14:26:46 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 3a235m149j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Jul 2021 14:26:46 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16SEQhOn15729132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Jul 2021 14:26:43 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 04CE6A4057; Wed, 28 Jul 2021 14:26:43 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9978BA404D; Wed, 28 Jul 2021 14:26:42 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.9.194]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 28 Jul 2021 14:26:42 +0000 (GMT) From: Claudio Imbrenda To: kvm@vger.kernel.org Cc: cohuck@redhat.com, borntraeger@de.ibm.com, frankja@linux.ibm.com, thuth@redhat.com, pasic@linux.ibm.com, david@redhat.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 13/13] KVM: s390: pv: add support for UV feature bits Date: Wed, 28 Jul 2021 16:26:31 +0200 Message-Id: <20210728142631.41860-14-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210728142631.41860-1-imbrenda@linux.ibm.com> References: <20210728142631.41860-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: oUFudTQnZfpem5G6vQuiy6nKeDOhS0xb X-Proofpoint-ORIG-GUID: ipl4nIVJcp0apeOATzuSjzh5cIJhxzdX X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-28_08:2021-07-27,2021-07-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 mlxscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2107280079 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for Ultravisor feature bits, and take advantage of the functionality advertised to speed up the lazy destroy mechanism. Signed-off-by: Claudio Imbrenda --- arch/s390/kernel/uv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c index f0af49b09a91..6ec3d7338ec8 100644 --- a/arch/s390/kernel/uv.c +++ b/arch/s390/kernel/uv.c @@ -290,7 +290,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) { - return uvcb->cmd != UVC_CMD_UNPIN_PAGE_SHARED && + return !test_bit_inv(BIT_UV_FEAT_MISC, &uv_info.uv_feature_indications) && + uvcb->cmd != UVC_CMD_UNPIN_PAGE_SHARED && atomic_read(&mm->context.is_protected) > 1; } -- 2.31.1