Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp18499pxb; Wed, 30 Mar 2022 21:38:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsaZAuJbN7Bm5XsA0UW1p8sp9/IqL71b1wJ+JUQ7YTp1IIWVLyZKa/Y+ILvHdjJmYQ7Bz2 X-Received: by 2002:a17:90b:314b:b0:1c7:3023:c218 with SMTP id ip11-20020a17090b314b00b001c73023c218mr3985959pjb.167.1648701520151; Wed, 30 Mar 2022 21:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648701520; cv=none; d=google.com; s=arc-20160816; b=M4lRBJFsBh5ipc9NkrRPqTPJDhVAWLojDXyV+dGnQKi2U+QYQZ1tTga6KbzXxeP/S5 cMyXMGIyRd1nXC2vbwZeDlFdE89XtCrfols5w6fpqe+Z1cx1HsR3KFilb23M/PGlVk5c Di8pFJtNCLwZ33TSIhSsvJ5mchi5bq0CzKwz5z4SShhbmZ7ydYmqdR8dfELOwiHYdwt2 muFtvCP/KR3+Jbjw6RtYIHlUbrulwFp80r6lb9DoGrscOab1N50P9ieDKFpNfiJkwCDe +hnHL5fgNiklzlfPutuzF4e/8UZWTC1OD1CTaDcMQOurwyhr8Fof1EzhLWDIArQXbX9i lpIA== 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=hO5EJy2NguIsRA1+76Cy5qlbLhEO4svtRiigXQ+8450=; b=RL7xdOCXOd807Pk04Gtoy9VCyzRsDYoAfWwak952lzx5iv37MM89gL4kuxzIHHoxg8 zKXp8LQ/W0VHpJakpxk7OfvsAB8po+ocC7v9nTJmac1humHc93Ce+0fc5PeXg+M+MByu jaHCKH5wUG+h/DtedMYtsdsS/X34M7S5fidJok8JGVPXL0mw/4kkZIAfbjNx3hdXkMFk F7KZKgYWck7g97tzpTfTjApdsbAq8j3lDcrwko9/dN0zgWlWXEYDNKxDYxMt+B6IXw6Y 6ovlPn7iEzatwpVxUhEsXOam//s17BQX7GlBinzVHDv2LAiLrjEQMJFB7lu6wcjx9tMj tu6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=SSodbfNw; 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 w13-20020a63474d000000b00384b2898db2si23302600pgk.434.2022.03.30.21.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:38:40 -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=SSodbfNw; 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 5CE0120DB35; Wed, 30 Mar 2022 20:31:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344121AbiC3Mjt (ORCPT + 99 others); Wed, 30 Mar 2022 08:39:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344659AbiC3Mha (ORCPT ); Wed, 30 Mar 2022 08:37:30 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A5F91AFC; Wed, 30 Mar 2022 05:26:27 -0700 (PDT) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22UAFr7f030897; Wed, 30 Mar 2022 12:26:26 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=SSodbfNwcjL6j7lyEqWtOIhOuWjxH/938qzT+/+biZfkYkFNq2m3SgF2F5dblr/x5gII cVznwJAyjpZOXmRw1aPG52lxIOk9e4pfbRVThoBjI0aZaFt54OIPRRXNxoyTvwo667Gw R3oSfc9AzphYRgS2Jm2rXaV/0qUjqpzdAWH274CniwK9iHuycpw681VGrvkEHkKodN+h iUUP/AgCmMCKQEH8McnUThCl62xWHXq5LKDtZp8p+jmf0HosE3r4DYb/sxtawuW+umvy iZCKLfQJjwfgvxzbomps5T8NHe9Fmjf7Jk4jfXxNxHcoH/KNZN/z2k6ayzHmPeZzrm21 uQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3f4na5tpd9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Mar 2022 12:26:26 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 22UC1USa027687; Wed, 30 Mar 2022 12:26:25 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 3f4na5tpcq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Mar 2022 12:26:25 +0000 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 22UCMYxr030982; Wed, 30 Mar 2022 12:26:24 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 3f1tf90j54-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Mar 2022 12:26:23 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22UCQKOI35455402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Mar 2022 12:26:20 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B19611C04C; Wed, 30 Mar 2022 12:26:20 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA38F11C050; Wed, 30 Mar 2022 12:26:19 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.13.95]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 30 Mar 2022 12:26:19 +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 v9 15/18] KVM: s390: pv: api documentation for asynchronous destroy Date: Wed, 30 Mar 2022 14:26:02 +0200 Message-Id: <20220330122605.247613-16-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220330122605.247613-1-imbrenda@linux.ibm.com> References: <20220330122605.247613-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 0MMdN4kAnrUjVq6JfbSYCtT0VVUa-MCg X-Proofpoint-GUID: fe6v-Xlvl-xFgAjRsiEh3Z-2BozyNkV2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-30_04,2022-03-30_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203300062 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 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