Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp461454pxb; Wed, 18 Aug 2021 06:29:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjlFkVdponK7ixZeXazTT0ZDDp8HK+HsBiSnyV/bKBkFPk7xQ1rTenOMQpb8PDytG+uz/4 X-Received: by 2002:a92:d9ce:: with SMTP id n14mr6262592ilq.9.1629293357631; Wed, 18 Aug 2021 06:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629293357; cv=none; d=google.com; s=arc-20160816; b=PS2g7YOaGWEkvb+Ilfr8mkLp1eorlrZM5Hlwix7maDpMBYEyBFvsRHOZ+mRNt5qMGi nROKklGEeUgo/l423Sa+FO70NyCiNCCCFC+4odok+Pq8kvCzU4HEB3Zbu1XmsxjQ/+w/ E25DQ0Y5PJ/Az0Pia/roXDk4QTPyH36UkZ1+mmD4iktFNaZFIPn7r/ZlhSIILxS83ths kOZR6io6YCm42xZD5W4JV1c35SLUfUOgUxd0B5Ve0+cTqZQ3IgaSC+Mo5jkdmJzmYOK5 GGQ9+C7AukvcuKM9u16fct63ypLtaE/L7HXLj/cJ/P1NJNMQqD5NRvY9JIYQFZfQDUUd jPuQ== 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=7+Ov499k98yNQW3tAfGB6KM/dMLeVNCmT1E1PXA+leo=; b=VbDb1SufZwwRj6bDWWrWMHV+yInvWILkFDdtACnonEcFR/1LSu2oELtl5HlSO5UMhb Xi+qiQdGhphup5IPbJN0PYQOb34BUSbUu8b+RyGbjSwxmq3JVA4oTqnQiWre1DUmIsvO gaWLBLfZibILZLQpYOvcuql4Xq9WQ3inHJi1RVX7b+eg7PxBeZG2OCHI5h2eM0a/S64H /JOrifWAg/bQPKWaYuAvWWUjaqyctFRw+P8I4Exo2o8vZT7erSgRqux6H2rKxMshgRqM nfU3bif27iYUbbGY1A2Wlff22ZkmcoJV83M8qG+jrLrzxXqV6VIkf2sP24VWaPVQIYdh nRtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=TgeMKpVS; 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 y15si5498756ily.49.2021.08.18.06.29.04; Wed, 18 Aug 2021 06:29:17 -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=TgeMKpVS; 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 S238063AbhHRN13 (ORCPT + 99 others); Wed, 18 Aug 2021 09:27:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43890 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236899AbhHRN1G (ORCPT ); Wed, 18 Aug 2021 09:27:06 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17ID34KU003999; Wed, 18 Aug 2021 09:26:32 -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=7+Ov499k98yNQW3tAfGB6KM/dMLeVNCmT1E1PXA+leo=; b=TgeMKpVSN5nF//2d7TeFY8gJhyHU2KkUyfPgp5USfhd1g8+rfMzglXg2UNBi2/e/6kF9 VDtS0AeSQlRf2ez+pC1NALgm0q5E57wmoLNITcp1nKJ0ciHuPXZlGptHMZp+iXJ3/wjO VopN84zhTfWDXUeqBDSWlZFh31FxRPxr4zqYSOez6QxlveujMQNk1gbaKz93WPdZvtMl qVD9YhJDZ9WBl1p3CrgafUAAGusI3thDG+TizPZDSWunlup0s5ClH/I+JbzCOQh1Ek4A Fme4AGkv3j7awwM2hlIJs3qne4HiE/+U2Kk75oVMn/VuilPqV1LZ6Ly40ku4OIqATQQn iA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ah1mt2qp5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Aug 2021 09:26:31 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 17ID48sG010849; Wed, 18 Aug 2021 09:26:31 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ah1mt2qmp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Aug 2021 09:26:31 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 17IDCZQB013968; Wed, 18 Aug 2021 13:26:28 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma05fra.de.ibm.com with ESMTP id 3afwrhtehd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Aug 2021 13:26:27 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 17IDMrog56754678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Aug 2021 13:22:53 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 182124C052; Wed, 18 Aug 2021 13:26:23 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8003D4C058; Wed, 18 Aug 2021 13:26:22 +0000 (GMT) Received: from p-imbrenda.bredband2.com (unknown [9.145.14.177]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 18 Aug 2021 13:26:22 +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, Ulrich.Weigand@de.ibm.com Subject: [PATCH v4 03/14] KVM: s390: pv: avoid stalls for kvm_s390_pv_init_vm Date: Wed, 18 Aug 2021 15:26:09 +0200 Message-Id: <20210818132620.46770-4-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210818132620.46770-1-imbrenda@linux.ibm.com> References: <20210818132620.46770-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: iyYZcB4yqmI2L0Y9Zyl9BX4Nekw_EBTK X-Proofpoint-GUID: ewHY3zqXYdMgaFB2jmHqNf7akEqMVyd_ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-08-18_04:2021-08-17,2021-08-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 bulkscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108180082 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the system is heavily overcommitted, kvm_s390_pv_init_vm might generate stall notifications. Fix this by using uv_call_sched instead of just uv_call. This is ok because we are not holding spinlocks. Signed-off-by: Claudio Imbrenda Fixes: 214d9bbcd3a672 ("s390/mm: provide memory management functions for protected KVM guests") --- arch/s390/kvm/pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kvm/pv.c b/arch/s390/kvm/pv.c index 0a854115100b..00d272d134c2 100644 --- a/arch/s390/kvm/pv.c +++ b/arch/s390/kvm/pv.c @@ -195,7 +195,7 @@ int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc) uvcb.conf_base_stor_origin = (u64)kvm->arch.pv.stor_base; uvcb.conf_virt_stor_origin = (u64)kvm->arch.pv.stor_var; - cc = uv_call(0, (u64)&uvcb); + cc = uv_call_sched(0, (u64)&uvcb); *rc = uvcb.header.rc; *rrc = uvcb.header.rrc; KVM_UV_EVENT(kvm, 3, "PROTVIRT CREATE VM: handle %llx len %llx rc %x rrc %x", -- 2.31.1