From patchwork Fri Oct 25 14:14:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13850763 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33380D0C616 for ; Fri, 25 Oct 2024 14:15:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C309D6B0095; Fri, 25 Oct 2024 10:15:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBCCB6B0096; Fri, 25 Oct 2024 10:15:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5DF76B0098; Fri, 25 Oct 2024 10:15:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3DF7E6B0095 for ; Fri, 25 Oct 2024 10:15:20 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 472721C6800 for ; Fri, 25 Oct 2024 14:14:57 +0000 (UTC) X-FDA: 82712320908.09.7831FD4 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id 477581C0018 for ; Fri, 25 Oct 2024 14:15:09 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Ji8SCkuP; spf=pass (imf18.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729865563; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=c02jmCltsV6yISoJOqxBYZsRrdNBar2VI+HnnpDo3Tk=; b=wYnabtKyD0hdbOLJPvrLg9R2IHqR3p4k2kg4YOclMKmXya+JKhqGa5IX/1q1xGebt+zHKh Pevcm7eU8naxN6nJfGZA5xSJHbzzYB8DI2Q4KfOSVWcgezAjYfUHwX9JoBhVQWlfqX3BYe dNG6psrucHNkLfpbxIptS39J7n9RNlQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729865563; a=rsa-sha256; cv=none; b=gOkoxm8ZIv5ng4Rc8NDCGSfwP7p81x0TGybKaj3ZMW0dQ0Kdwn+dLqD7MpShA+PKlBtAnP zzWksfRW/IjoIbjnjcXJ5OtZggL9cJp1FONLAU3b8JKOqi4sf8BQYCCcvHQCcjtLtzz1+i U9wM4MYa3S3T7+89dwEUIj151he2zTI= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Ji8SCkuP; spf=pass (imf18.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729865717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c02jmCltsV6yISoJOqxBYZsRrdNBar2VI+HnnpDo3Tk=; b=Ji8SCkuPQz/v9qfGaUEDfTrnYrE8j0PN1REG3B5XiKBvtsL9WuH2RQ2FIEnzSUTh2egMPH CWwsKRrfE0iYzMW8coJA2M+8I3zF9Hh/iUKyurCfLbFpQMjieRnOgtCj62ikezKWRMytuL 22TXNl/E0PwtpbwBjiYmqNtYcHgqWjc= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-314-tzlcknbTOoqc6cAii0r6cA-1; Fri, 25 Oct 2024 10:15:13 -0400 X-MC-Unique: tzlcknbTOoqc6cAii0r6cA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B750C1955D47; Fri, 25 Oct 2024 14:15:10 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.22.65.27]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 44BD01955F3B; Fri, 25 Oct 2024 14:15:03 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-s390@vger.kernel.org, virtualization@lists.linux.dev, linux-doc@vger.kernel.org, kvm@vger.kernel.org, David Hildenbrand , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Huth , Cornelia Huck , Janosch Frank , Claudio Imbrenda , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , Eric Farman , Andrew Morton , Jonathan Corbet Subject: [PATCH v3 1/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall Date: Fri, 25 Oct 2024 16:14:46 +0200 Message-ID: <20241025141453.1210600-2-david@redhat.com> In-Reply-To: <20241025141453.1210600-1-david@redhat.com> References: <20241025141453.1210600-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 477581C0018 X-Stat-Signature: ht873syu3k4bub37oosbe3g9cff8o98z X-HE-Tag: 1729865709-247515 X-HE-Meta: U2FsdGVkX1/sX50fdlh6Rk8Q+85KlLCnVdhIkB1fLI74doPDsJ7zE1DJczwFi0CrHb1l1pTc6V0yGVAi6hbuso4BPE8sGSsl9P0hbULsfqza4ToWKwSVEfBG6thnDzl7Qd0/C4Y3rk2yzdLpdHet1nGW7cyYq9UvPcXZ1DbWxW2KI7Nx5J0cVWExFQI/dR6P1ERFw4+ec41O2/PpB8QPQgIN05DabxU7G+3/ud09A4jcL9xzPZNnu3eW2pYmAtq+lpZT86g17lYRY7bTxNTO7wVaXK6wbfO7aXHVPnXu+begUKV3YB4/wH7sMBO67lbCehGt1UC3LjOA+WWlbM/sMDW+BMWKPTYFAbk+ro1ypL8pNBzcRnx7WCbuJbzKvysyWB/Y6ANh8p/cEGsgIo5vSOJyDIXSr9C8d+R2/BJyq2Fukbdxr154WPjx0Vk1fyWVhe1gkyEfj8YuO7hHxZXaCCYCVsxYh58AzsFlHa/s6ewutP8wG2Avf0AaPobyeYbD6vzwb+amPTC5K7okN+Ge7yQfmzRVhjTPy/kmfp59zvnEAdj0Gaf/8NO1NBlUZpTjUghxoVEHq0yVG5GKLYppfE8CmNkbuHq9b7o7itFRB783WRd4wYgF56+DdjXiyyZfdiUF6SE6T+r0U2ZQ+yPFRUcxEzOX6MqABzR6eQZeWIZcwmMIPcAYsdM+tULw9ft6+qh08mFlcSAs/QaRpI/VLjgSv+6209xZ3iBzRJhVOzsOTSxdqqpUsGp+jDtjXwaq9DGv1yuOgNALbYEMtCIRQ8BCFiGayb39VrwibSqueF/mBwI9C+mQGnAGRRvkvcwpSldUPV0bf+7+fWHRe0u9MQSTSeUWSQMSH/10ToIChb/KEMHjIEZSAj+zmaikohSDNpqJO+PmIBCDWVbjoa1gKEB2xB3s1BSMpizum+rlLMdHjjygfjXKnmTKshj/y+xAz5trkMtYKA9zEt842Fa HW+PZ843 pR648fVzp9l52GvdIaz3RIhb1pQk1tCUzAuIOJ2TogyBRxPJJnBnKkqTWQtVw+4v+EGfHPz3nAtKaAWmYm9Nk8/3Ixv90YokYjcG69/+CEZu45BdvLAIXBm24xx1a1Ja7Fh6NvSR1v1tDa+e33OYEWqweCJJaMGkftSCD2eLIHSO93lv10LCVdXpo/gD4JPgypnykd9Qx23MQ1Gt79IBkwzdUTp7phsVCi57Kp/exLYtV4rTrpYCZYszPENjIFDDwpWar56Hz5wVocxGGe015LFaxf5cjnEyavGGx32UeM/v7Q9S+pHpeF++TCoBafc6Tf/CM/ohLIq8+NhM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Let's make it a generic KVM hypercall, allowing other subfunctions to be more independent of virtio. While at it, document that unsupported/unimplemented subfunctions result in a SPECIFICATION exception. This is a preparation for documenting a new hypercall. Signed-off-by: David Hildenbrand Reviewed-by: Heiko Carstens Reviewed-by: Eric Farman --- Documentation/virt/kvm/s390/s390-diag.rst | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Documentation/virt/kvm/s390/s390-diag.rst b/Documentation/virt/kvm/s390/s390-diag.rst index ca85f030eb0b..48a326d41cc0 100644 --- a/Documentation/virt/kvm/s390/s390-diag.rst +++ b/Documentation/virt/kvm/s390/s390-diag.rst @@ -35,20 +35,24 @@ DIAGNOSE function codes not specific to KVM, please refer to the documentation for the s390 hypervisors defining them. -DIAGNOSE function code 'X'500' - KVM virtio functions ------------------------------------------------------ +DIAGNOSE function code 'X'500' - KVM functions +---------------------------------------------- -If the function code specifies 0x500, various virtio-related functions -are performed. +If the function code specifies 0x500, various KVM-specific functions +are performed, including virtio functions. -General register 1 contains the virtio subfunction code. Supported -virtio subfunctions depend on KVM's userspace. Generally, userspace -provides either s390-virtio (subcodes 0-2) or virtio-ccw (subcode 3). +General register 1 contains the subfunction code. Supported subfunctions +depend on KVM's userspace. Regarding virtio subfunctions, generally +userspace provides either s390-virtio (subcodes 0-2) or virtio-ccw +(subcode 3). Upon completion of the DIAGNOSE instruction, general register 2 contains the function's return code, which is either a return code or a subcode specific value. +If the specified subfunction is not supported, a SPECIFICATION exception +will be triggered. + Subcode 0 - s390-virtio notification and early console printk Handled by userspace.