From nobody Tue May 7 04:45:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=de.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1585302338; cv=none; d=zohomail.com; s=zohoarc; b=OrFJD2TjwTyudZVwakVSIqhhbh9exIvb7olp7TmyuK3GJBgq8hhqfMVreR9YKJNyAocIlT3qfU1LR1cWUOVkoPiJhbuK6evfgGW70TJm6zWhLB0ThOpxMLvXRlOUFKtLboT0p2hX5PVJ+YdVI2ik9e+IHg08I1IpZXc2w1qXSh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585302338; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Sfm1d7Ed3av29+qZzXE4E+z4oDYaSVF2FPLT1CDh0YI=; b=U/tsD9Dg1N5xYLxdeW1doDDYnmK9gWPnKC9UhWAAcjJfYXNHh1r2cCc+0GSb8bgiSb055LU/TGPBVU5b6EyR4hxFXtlRHdylh8INMORUITuxtkWdbdBxn++HTQf6ODAaImaxotcZhkuhDRrq5WozIIGojgw+LfDrEqdHq4Mdyyw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1585302338610965.6529493656905; Fri, 27 Mar 2020 02:45:38 -0700 (PDT) Received: from localhost ([::1]:39110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHlYX-0001vp-4G for importer@patchew.org; Fri, 27 Mar 2020 05:45:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33080) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHlWs-0000Qx-KA for qemu-devel@nongnu.org; Fri, 27 Mar 2020 05:43:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHlWr-0000qa-Iu for qemu-devel@nongnu.org; Fri, 27 Mar 2020 05:43:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:7696 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jHlWr-0000lw-7A; Fri, 27 Mar 2020 05:43:53 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02R9YUaC103234; Fri, 27 Mar 2020 05:43:50 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ywbv03ad2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Mar 2020 05:43:50 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 02R9YZW0103872; Fri, 27 Mar 2020 05:43:49 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ywbv03acn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Mar 2020 05:43:49 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 02R9eD5J021624; Fri, 27 Mar 2020 09:43:49 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma02dal.us.ibm.com with ESMTP id 2ywaw2wgfn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Mar 2020 09:43:49 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02R9hkQv47972844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Mar 2020 09:43:46 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20E8F6A051; Fri, 27 Mar 2020 09:43:46 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 518556A058; Fri, 27 Mar 2020 09:43:42 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 27 Mar 2020 09:43:42 +0000 (GMT) From: Christian Borntraeger To: qemu-devel , Cornelia Huck Subject: [PATCH] s390x/pv: Retry ioctls on -EINTR Date: Fri, 27 Mar 2020 05:43:39 -0400 Message-Id: <20200327094339.26111-1-borntraeger@de.ibm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-27_02:2020-03-26, 2020-03-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 phishscore=0 impostorscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003270083 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Janosch Frank , David Hildenbrand , Halil Pasic , Christian Borntraeger , qemu-s390x , Marc Hartmayer , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" PV_ENABLE (and maybe others) might return -EINTR when a signal is pending. Let us retry the ioctl in that case. Fixes: 4d226deafc44 ("s390x: protvirt: Support unpack facility") Reported-by: Marc Hartmayer Tested-by: Marc Hartmayer Signed-off-by: Christian Borntraeger Acked-by: Janosch Frank --- hw/s390x/pv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 8cf5cd2c9b..2758b02c96 100644 --- a/hw/s390x/pv.c +++ b/hw/s390x/pv.c @@ -23,7 +23,11 @@ static int __s390_pv_cmd(uint32_t cmd, const char *cmdna= me, void *data) .cmd =3D cmd, .data =3D (uint64_t)data, }; - int rc =3D kvm_vm_ioctl(kvm_state, KVM_S390_PV_COMMAND, &pv_cmd); + int rc; + + do { + rc =3D kvm_vm_ioctl(kvm_state, KVM_S390_PV_COMMAND, &pv_cmd); + } while (rc =3D=3D -EINTR); =20 if (rc) { error_report("KVM PV command %d (%s) failed: header rc %x rrc %x " --=20 2.25.1