Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp122731rwb; Wed, 10 Aug 2022 05:58:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR7L1csibI+3u2xaIb1yhllfYH57bMRGC+J/ydr+ViOJ/QVxev+og6qhrFnbargf/iRlfNAE X-Received: by 2002:a17:903:2113:b0:16f:6ee:65f2 with SMTP id o19-20020a170903211300b0016f06ee65f2mr28014499ple.76.1660136326123; Wed, 10 Aug 2022 05:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660136326; cv=none; d=google.com; s=arc-20160816; b=0DZ/pEXzTI35I6Po8Oj4USzAL6AZ+YWyEjiv6urPHFkgEhlfXazRWu1vN90/kuSqPA kSqxsN+Tia58ErQ2Sl9nRMdfTfB+DLF9QWXm5TbU2hYmk/yfp5l+4bI9ku0+mGSBoyKg CZEP3GL1/4+lY8q3aNfPzuZdbIupfNhQ3Sff9eN5kU5VwrzYvmrkR7o53xkLxKwvLjRe I7e1mT3P064EbGbs/uAybprRNoqnyGq92RWCD7y/QdXfb4KRHQukrNdUQDbq3nU7Ejtm Q/cNAMF9Ge9CjJ+gdE3lnsBh+LPgGrYiPCJIEgEtKN71WARq1eP3P5CCIfeX/HeZ4WCy 74lQ== 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=V6rtpLyoj2p21V5xVcf7iAEm2EV2Yi51fN5ZdGNfEZU=; b=TR3YgR60tr2IiIulabJSwgkeDlbAiHKlvW+Tmvou6+AtOJscOyS17yBmGlOa2y5U6W QrqTNwKxi4RMDy8KChO0yzTJT3ivWIhBVKieUvhzbSQDmyYEicFsJ9PHpdRz+FafDdfZ WEfgK2jRRXiZXub+r39iNdUcWZyedYaKqPWywwj3galz8MOVquX9BkYczJPrpTN+fQfm 0Z+EQ3xe+T2imPgX/TLwqyuWMzlqt0GkeNzGYONhVZsPbh4Sy5ZTIHtGNcA/omXjgz/J 8D+8U3beP0p0kKr5pDAf4zcYvo1as7Pj2oSUIgvBwF+JsNZHfaEqyns/6JlriNWAFWqM E5mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=E8VXrJyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 85-20020a630158000000b0041d0259b81dsi16806374pgb.523.2022.08.10.05.58.31; Wed, 10 Aug 2022 05:58:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=E8VXrJyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232344AbiHJM4w (ORCPT + 99 others); Wed, 10 Aug 2022 08:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232286AbiHJM4g (ORCPT ); Wed, 10 Aug 2022 08:56:36 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCD435C349; Wed, 10 Aug 2022 05:56:34 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27ACoQHD012665; Wed, 10 Aug 2022 12:56:34 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=V6rtpLyoj2p21V5xVcf7iAEm2EV2Yi51fN5ZdGNfEZU=; b=E8VXrJyXmIJKdbLeNbUTad2a/C0bhQMMBXf+oto55P256oxK5Xt6FzHKK+JYANuJ+yOB qAQETbefoqQysT1sp4cvkC+Mq8JRKTOerHpfCtzfI48N8KthJhVFTceJrCMvOePME+6g SO5dcmzQ76ZIP8ALhto0sWHQVNDr85b80FSXMbUGYoy0E59N0OqCCRN+E9H3Zp5PEJS+ ywCIT3gRAlUTWGUaBlmqmE9izDsJGEvkrwF0wcyMAn+4My+U2caZ9dnvu502Sj8/kMwA poq+3yi56D++cIxkE1mDEVM3M1feAd1v/7zN2WvKYlNnopBPwhjPlUQCT0telkYgdyCY ZQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hv6dcw2e4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 12:56:34 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27AConlt016134; Wed, 10 Aug 2022 12:56:33 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hv6dcw2cv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 12:56:33 +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 27ACuJSL012766; Wed, 10 Aug 2022 12:56:31 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 3huww0ru71-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 12:56:31 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27ACrvai32375250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Aug 2022 12:53:57 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 210C64C046; Wed, 10 Aug 2022 12:56:28 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B8914C040; Wed, 10 Aug 2022 12:56:27 +0000 (GMT) Received: from p-imbrenda.bredband2.com (unknown [9.145.0.105]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 10 Aug 2022 12:56:27 +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, seiden@linux.ibm.com, nrb@linux.ibm.com Subject: [PATCH v13 2/6] KVM: s390: pv: api documentation for asynchronous destroy Date: Wed, 10 Aug 2022 14:56:21 +0200 Message-Id: <20220810125625.45295-3-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220810125625.45295-1-imbrenda@linux.ibm.com> References: <20220810125625.45295-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: OAwbhDxWgYD-uvt3LNOWZjSENNsX_Dba X-Proofpoint-GUID: mpdmHUIR2XFfigsR0O-Y2vHdM7WZhu5p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-10_07,2022-08-10_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 malwarescore=0 adultscore=0 impostorscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208100037 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Reviewed-by: Nico Boehr --- Documentation/virt/kvm/api.rst | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 9788b19f9ff7..5bd151b601b4 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -5163,8 +5163,11 @@ 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 set aside for asynchonous teardown + with KVM_PV_ASYNC_CLEANUP_PREPARE and not actually torn down with + KVM_PV_ASYNC_CLEANUP_PERFORM, 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 @@ -5287,6 +5290,29 @@ KVM_PV_DUMP authentication tag all of which are needed to decrypt the dump at a later time. +KVM_PV_ASYNC_CLEANUP_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. There can be at most + one protected VM set aside at any time. If a protected VM had + already been set aside without starting the asynchronous teardown + process, this call will fail. In that case, the userspace process + should issue a normal KVM_PV_DISABLE. The resources set aside with + this call will need to be cleaned up with a subsequent call to + KVM_PV_ASYNC_CLEANUP_PERFORM or KVM_PV_DISABLE, otherwise they will + be cleaned up when KVM terminates. + +KVM_PV_ASYNC_CLEANUP_PERFORM + Tear down the protected VM previously set aside with + KVM_PV_ASYNC_CLEANUP_PREPARE. The resources that had been set aside + will be freed 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, and the normal + KVM shutdown procedure will take care of cleaning up all remaining + protected VMs. + 4.126 KVM_X86_SET_MSR_FILTER ---------------------------- -- 2.37.1