Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1495954pxb; Thu, 14 Apr 2022 07:25:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0Y6XswHqYQcKh8stIdG/kTSBgmJuwa2MQXJGLdtlWeldenUWF1SsgbK4yiNB5ZtJIqZA/ X-Received: by 2002:a17:907:1b25:b0:6da:8206:fc56 with SMTP id mp37-20020a1709071b2500b006da8206fc56mr2485692ejc.81.1649946306780; Thu, 14 Apr 2022 07:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649946306; cv=none; d=google.com; s=arc-20160816; b=jZ5rFc0mDLnsBiw7cU7w+4FyZYgbuR5R33egtGfnwexFXB3QzzqcQJMCfh+JnBL924 L73+rtekY0CJ5YgvIZtVJqz0leY6orl+SLWP2Y6RNdSnp/hejUkMAJS4h/YPKPB+1njp ouTAc/vpCsYK6fEMoW9N4IRYvsM8ATUxmkGk3ldnBhveOnIoadxfXkUhpnztFq+mgmHH +sWpIHc5jwKOQCjtTL9qf3syRm9vFwbmUyb2N7C9PpC7Th+2FEIQmqQnBTGs7xutOhxb mYRHj4O8VNiFj+kmLn9CxROmWy32GTUBEg2BS3UOI33z5jC7JnkywBhrYZyKhiq03NlA jfYg== 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=qyzLOUlTl8XPZIt7j7ZdogbV4nZBkgZap2qQHhve+4k=; b=SeQ1i4POg/1iQIXVDh3xtKKLHvtmS+sH1KgwWsmx0rNt5o3fFNopbK6aH9E5jWtijF yHxvYzgswNenDfOACogYNpIG9li1Ye1ZWmOIcQZeEm/Spz8+Oq5ZYoMDGvzkcSoQ+Gz+ Mwsio60TFDe0F0DfHl6naUkZjBG8V5zV8Vp5B4ph+aNEaWp9IB7Bo+Zppoj0HYTtjahS hmcRh1KDRxWvNkmUW0Ucjhqt1qKXYjh9S7j8WBbMXKOdhLwUhESIVrugHzQJSyMDtWeJ HUsU4j1a0US7BRQL2dYeMIMlLkNMijNF3bMHJBTAppCs9vWCvNV16yRDaYBNhYJ+8TSJ EWWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ovrrTKSc; 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 w1-20020a056402268100b0041d6f8fc14dsi3975612edd.164.2022.04.14.07.24.40; Thu, 14 Apr 2022 07:25:06 -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=ovrrTKSc; 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 S241036AbiDNIHh (ORCPT + 99 others); Thu, 14 Apr 2022 04:07:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240804AbiDNIGF (ORCPT ); Thu, 14 Apr 2022 04:06:05 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E15F4EA06; Thu, 14 Apr 2022 01:03:33 -0700 (PDT) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23E4smIF026006; Thu, 14 Apr 2022 08:03:33 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=qyzLOUlTl8XPZIt7j7ZdogbV4nZBkgZap2qQHhve+4k=; b=ovrrTKScEEzDtq+OSOLQ7Yp1DOH5TW23kzjFh6LMzVunwzFNJs/ZDs4PPDLJPAUcJahO Ja6zO4YzfoVCBgupYFjTSiRPQS80AokDW9MaFukrI6uFxWZBl6bEHbhHpv/tY/vgmkOF fNQR7F2Axp2Hjh4ulioXC73UI0qokiCPUEIMI7nBCaD47KtGn3jMi6RqwA7585O92cyG sovdsIigAQncZSWXECPK27MPLPO92Xuxby1QlNMKrbuBNzgVVRYyS08GvKwy4McCYxbL fTK3cbB40dnB2w2TXH5CATkdXZGCKvU7CIr6AjWWVU+fzOepsIip0V9wQpKvICzBfvUu Rg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fed0kk9yg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Apr 2022 08:03:33 +0000 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23E7t2bH007037; Thu, 14 Apr 2022 08:03:32 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fed0kk9xq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Apr 2022 08:03:32 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23E7m62l029543; Thu, 14 Apr 2022 08:03:30 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3fb1dj7yhh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Apr 2022 08:03:30 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23E83RFf39256326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Apr 2022 08:03:27 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 13733AE053; Thu, 14 Apr 2022 08:03:27 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8444EAE059; Thu, 14 Apr 2022 08:03:26 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.1.140]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 14 Apr 2022 08:03:26 +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 v10 16/19] KVM: s390: pv: api documentation for asynchronous destroy Date: Thu, 14 Apr 2022 10:03:07 +0200 Message-Id: <20220414080311.1084834-17-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220414080311.1084834-1-imbrenda@linux.ibm.com> References: <20220414080311.1084834-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 24mr0riVb9X9jdkOk29q2XF6GJ7CLS75 X-Proofpoint-GUID: jVFDGUlt2TwiJDISwW0Vad6jPtH9j83l X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-14_01,2022-04-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 bulkscore=0 clxscore=1015 mlxlogscore=962 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204140040 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 --- 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 d13fa6600467..8d850598b4db 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -5077,11 +5077,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 @@ -5094,6 +5096,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