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 3FFE1C433F5 for ; Wed, 2 Mar 2022 18:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240888AbiCBSOS (ORCPT ); Wed, 2 Mar 2022 13:14:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244508AbiCBSMu (ORCPT ); Wed, 2 Mar 2022 13:12:50 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBF37D224B; Wed, 2 Mar 2022 10:11:59 -0800 (PST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 222GN2eR007709; Wed, 2 Mar 2022 18:11:59 GMT 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=hO5EJy2NguIsRA1+76Cy5qlbLhEO4svtRiigXQ+8450=; b=ABg23eGfKbPWt8YIfcc8ZUHwZjMvXQLOEJzImmOmaHGgWgvhj3Uwx9x0qYils1hMiPMo 25z5unFI3dEcFA316tWyU0SdzLrMvpNqSTmjE+8GkSBA63pDtQrLsXq92PDX8jGFMnIw rBW76e4OpNMqENhemlzx0wkD2LXMyu0mvAdFa5TpDEs0ocUFvePaKvjAaZVcVqJut/mL /rZLS7UJXIsbotAmUBWKMtPQrnkbRob4tKNrH3bXwTXlPSYJCZjTIVW0Q4KsUjCzwTIE aiE/QYul/r4m2NXxcaNl524YWk2SiN254VvD1kY2E80WwTbxMCVkmugZfzxZiWaCs4Df cg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ejc28t86n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Mar 2022 18:11:58 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 222GNfxV009807; Wed, 2 Mar 2022 18:11:58 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ejc28t860-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Mar 2022 18:11:58 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 222I8jNg010579; Wed, 2 Mar 2022 18:11:56 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06fra.de.ibm.com with ESMTP id 3efbfj6418-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Mar 2022 18:11:55 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 222IBqn449545696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Mar 2022 18:11:52 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C8BB752051; Wed, 2 Mar 2022 18:11:52 +0000 (GMT) Received: from p-imbrenda.ibmuc.com (unknown [9.145.5.37]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4B6FE52050; Wed, 2 Mar 2022 18:11:52 +0000 (GMT) From: Claudio Imbrenda To: kvm@vger.kernel.org Cc: 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, nrb@linux.ibm.com Subject: [PATCH v8 15/17] KVM: s390: pv: api documentation for asynchronous destroy Date: Wed, 2 Mar 2022 19:11:41 +0100 Message-Id: <20220302181143.188283-16-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220302181143.188283-1-imbrenda@linux.ibm.com> References: <20220302181143.188283-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 5Wrzne18s6lziYnaig9833Y2ajDGa0Lt X-Proofpoint-GUID: t8B_fWyevto8D2RVIU_c6tSVrKouHjOV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-02_12,2022-02-26_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 bulkscore=0 phishscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 mlxscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2203020078 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add documentation for the new commands added to the KVM_S390_PV_COMMAND ioctl. Signed-off-by: Claudio Imbrenda --- Documentation/virt/kvm/api.rst | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 9f3172376ec3..52ba1c52ae3c 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -5010,11 +5010,13 @@ KVM_PV_ENABLE ===== ============================= KVM_PV_DISABLE - Deregister the VM from the Ultravisor and reclaim the memory that had been donated to the Ultravisor, making it usable by the kernel - again. All registered VCPUs are converted back to non-protected - ones. + again. All registered VCPUs are converted back to non-protected + ones. If a previous VM had been prepared for asynchonous teardown + with KVM_PV_ASYNC_DISABLE_PREPARE and not actually torn down with + KVM_PV_ASYNC_DISABLE, it will be torn down in this call together with + the current VM. KVM_PV_VM_SET_SEC_PARMS Pass the image header from VM memory to the Ultravisor in @@ -5027,6 +5029,23 @@ KVM_PV_VM_VERIFY Verify the integrity of the unpacked image. Only if this succeeds, KVM is allowed to start protected VCPUs. +KVM_PV_ASYNC_DISABLE_PREPARE + Prepare the current protected VM for asynchronous teardown. Most + resources used by the current protected VM will be set aside for a + subsequent asynchronous teardown. The current protected VM will then + resume execution immediately as non-protected. If a protected VM had + already been prepared without starting the asynchronous teardown process, + this call will fail. In that case, the userspace process should issue a + normal KVM_PV_DISABLE. + +KVM_PV_ASYNC_DISABLE + Tear down the protected VM previously prepared for asynchronous teardown. + The resources that had been set aside will be freed asynchronously during + the execution of this command. + This PV command should ideally be issued by userspace from a separate + thread. If a fatal signal is received (or the process terminates + naturally), the command will terminate immediately without completing. + 4.126 KVM_X86_SET_MSR_FILTER ---------------------------- -- 2.34.1