Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1283124lfc; Wed, 1 Jun 2022 14:09:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTldJ0lkcNcg0hq9TJaK4Q5WC0IrnmH7V08mi8BtCrNv4PCVDnkk/RxMsIR8Zn/X2tROa+ X-Received: by 2002:a65:6e88:0:b0:382:3851:50c8 with SMTP id bm8-20020a656e88000000b00382385150c8mr1149850pgb.270.1654117792764; Wed, 01 Jun 2022 14:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654117792; cv=none; d=google.com; s=arc-20160816; b=FIfaeFsi7JP6HOzluf1jYEtwxf8xPaQLqmtKU+NBtZRXsF3i68hxWu3pffcsnOH2xc qhTBvKooAu8ufbViUnmOdv9Cu3G35kSUqnldkNNTEO6eSPmHNuQNTJirgZbrY1oqCqBU 7eA40s6pz4gyiYKo0JfJbx4dBlbb+v+1hEvyf3EGpnNwE6t4P+sr9UZF3IY2lRJSU6ka FALwRW95Z7Sa/R2/q98bsvstY9RWrE28WgR2+j8CyOIqiAlAgsNKRBYXCEdWnUgiXUd5 D54ymKlCBCqPETs/T2QyG/3nONJXlH3q7rbRUpQ28qpRkFkNjKIIzUr/2MJaeN+0C764 eCNw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=wK6/q36Gb8XJZO9BQ/uI6Vo7ghIK6y7J+vH6fv00uZI=; b=UCXvJeW9G4IgxfYDQyfSSEp7igVq/uNgIrH+IA7hV34imfUIPjEVl7b8ymgnyVzb/o bMBVXKZLYfXXIuGuffSYGQJkdB8LXuPEQLejamlt8CYQy+KAQ8bQQ4yl4KqkvzpblsTd iep/V7q0+HsEMjnLMawwLmNvKrhUY2aArquaLVIsDrbF/nnAw85CwY/tiyMM5/PeVi9X 4br7NElxzaS6RBm55GF/1+LRLTTwFfMpgsx8JghXHLBKLrNFr8QKaUm/hbk9zmCMyFUF Xg2wxcQ4qsJHEam2J/qK8l8zxF946h/NVwfPak3sZcii7D6YOg3dP/JgOnB4qoFg/mkm lvig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qWQjS4on; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id jd2-20020a170903260200b001640e9f63a2si3518105plb.294.2022.06.01.14.09.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:09:52 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qWQjS4on; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 14B342C7E68; Wed, 1 Jun 2022 13:01:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235480AbiE3LGg (ORCPT + 99 others); Mon, 30 May 2022 07:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbiE3LGc (ORCPT ); Mon, 30 May 2022 07:06:32 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15A7855483; Mon, 30 May 2022 04:06:31 -0700 (PDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24U91UOw026575; Mon, 30 May 2022 11:06:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=wK6/q36Gb8XJZO9BQ/uI6Vo7ghIK6y7J+vH6fv00uZI=; b=qWQjS4onfIvfEI+7GG+3Eik2am6ikgdxgtm/N7poDWQTsm20HkdbjWzbIYmsEPc9ae9A nGz9L2rOwPLNNFxWh3wvYtyb4FVvc8kOD5AF1rcIeivZg7d9h0o5cbdKrlHL5Qs4HRUO twoVaV3xAIBwCXPu0iGLPO4fb44PB66PdIRyipmc+nnD1Kw5Dfwu9hL3bYzRLe6caBuG iqtz4HkimRnJSmuYhL+z7kWAHlvv0WfdWBD8IdgkuV+cyeh7ZPrhh21ZzKVbzk0YlRZu YmCRQcn1GmbIteOV8sp1955BnsV3oByefsH5C+NfuoeoOWhHZ/w8rNXUraRgGJD7Dx7n hg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gcrgpw8mu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 11:06:30 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24UAlVuQ006005; Mon, 30 May 2022 11:06:29 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gcrgpw8kx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 11:06:29 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24UAok5M016575; Mon, 30 May 2022 11:06:28 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma02fra.de.ibm.com with ESMTP id 3gbcc69x5c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 11:06:27 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24UAq4Ik40829360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 May 2022 10:52:04 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8543211C078; Mon, 30 May 2022 11:06:24 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE86E11C064; Mon, 30 May 2022 11:06:23 +0000 (GMT) Received: from p-imbrenda (unknown [9.145.12.149]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 30 May 2022 11:06:23 +0000 (GMT) Date: Mon, 30 May 2022 13:06:21 +0200 From: Claudio Imbrenda To: Nico Boehr Cc: kvm@vger.kernel.org, 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, scgl@linux.ibm.com, mimu@linux.ibm.com Subject: Re: [PATCH v10 15/19] KVM: s390: pv: asynchronous destroy for reboot Message-ID: <20220530130621.5256a0b1@p-imbrenda> In-Reply-To: <49c2667ecfc2c628c13cae79796ffac4ddc2c0c3.camel@linux.ibm.com> References: <20220414080311.1084834-1-imbrenda@linux.ibm.com> <20220414080311.1084834-16-imbrenda@linux.ibm.com> <49c2667ecfc2c628c13cae79796ffac4ddc2c0c3.camel@linux.ibm.com> Organization: IBM X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 243vsKcxalx1whJALGpcdThRix-8ZFKf X-Proofpoint-ORIG-GUID: S04ELvEcyK5xQkai81T9A5vz7kbs2Jb8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-30_03,2022-05-30_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 priorityscore=1501 mlxlogscore=999 spamscore=0 clxscore=1015 bulkscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205300058 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 May 2022 11:46:26 +0200 Nico Boehr wrote: > On Thu, 2022-04-14 at 10:03 +0200, Claudio Imbrenda wrote: > [...] > > diff --git a/arch/s390/kvm/pv.c b/arch/s390/kvm/pv.c > > index b20f2cbd43d9..36bc107bbd7d 100644 > > --- a/arch/s390/kvm/pv.c > > +++ b/arch/s390/kvm/pv.c > [...] > > +/** > > + * kvm_s390_pv_deinit_vm_async - Perform an asynchronous teardown of > > a > > + * protected VM. > > + * @kvm the VM previously associated with the protected VM > > + * @rc return value for the RC field of the UVCB > > + * @rrc return value for the RRC field of the UVCB > > + * > > + * Tear down the protected VM that had previously been set aside > > using > > + * kvm_s390_pv_deinit_vm_async_prepare. > > + * > > + * Context: kvm->lock needs to be held > > ...and will be released... no, I decided to refactor this so that the lock won't be held at all when not needed (you'll see in the next respin), should be cleaner > > > + * > > + * Return: 0 in case of success, -EINVAL if no protected VM had been > > + * prepared for asynchronous teardowm, -EIO in case of other errors. > > + */ > > +int kvm_s390_pv_deinit_vm_async(struct kvm *kvm, u16 *rc, u16 *rrc) > > Do you also want to set rc and rrc as in kvm_s390_pv_deinit_vm_async_prepare()? oh... no I don't I should propagate the actual RC and RRC from the UVC, which I'm not doing (will fix)