From patchwork Tue Nov 2 20:11:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Farman X-Patchwork-Id: 12599609 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDF08C433F5 for ; Tue, 2 Nov 2021 20:13:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65E0261053 for ; Tue, 2 Nov 2021 20:13:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 65E0261053 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:40590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mi0A4-0008Hf-Ar for qemu-devel@archiver.kernel.org; Tue, 02 Nov 2021 16:13:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mi08G-0006E3-9A; Tue, 02 Nov 2021 16:11:44 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mi08E-0006ZZ-GN; Tue, 02 Nov 2021 16:11:44 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1A2IMZbv016776; Tue, 2 Nov 2021 20:11:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=UtrazYe88XuJJVet/eDSjP2WqcAcZQF5UEndMJtf0cI=; b=mXRyucifatBMkSQGuHLiozuw1/RT67UczRVFfT+dzeKFxKQd3e8oxYq5Z8vvaqt6mVTI aLOCh51Rs4G5gY+JS8pYveNTq76ADXdX2mA4X4q6ZPLmkhs/ctWrgimcnSelm0A7L8LM Q6h6DYjcav/hAD1wT2CuSAxCiE+/JegR82r4q7a23J8XyNJOr78y5J2bvDDXMHqBpZxV TemRQ38WX/C5uDfMkt0MJs8BZD7WqY1dex9fdeLC5I3INgczSpHujDORAQ/glsyz50PU s0BFzJB0JKCFeLFei5giSM2toDLNal3eB4xUJW32xz1/S2EAKydnwx8g98SfK9keQA7Y 7Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3c3aj7sxwr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Nov 2021 20:11:37 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1A2K4fkb006752; Tue, 2 Nov 2021 20:11:37 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3c3aj7sxw2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Nov 2021 20:11:36 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1A2K2mVO000877; Tue, 2 Nov 2021 20:11:34 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04fra.de.ibm.com with ESMTP id 3c0wpb5nhw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Nov 2021 20:11:34 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1A2KBVcb3015216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Nov 2021 20:11:31 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF116A4057; Tue, 2 Nov 2021 20:11:30 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB34EA404D; Tue, 2 Nov 2021 20:11:30 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 2 Nov 2021 20:11:30 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 4958) id 790B0E039C; Tue, 2 Nov 2021 21:11:30 +0100 (CET) From: Eric Farman To: Halil Pasic , Cornelia Huck , Christian Borntraeger , Thomas Huth Subject: [RFC PATCH v2 0/2] s390x: Improvements to SIGP handling [QEMU] Date: Tue, 2 Nov 2021 21:11:20 +0100 Message-Id: <20211102201122.3188108-1-farman@linux.ibm.com> X-Mailer: git-send-email 2.25.1 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: OJshIibn1CfMwSixz4eXAPKYHOA7Cgb8 X-Proofpoint-GUID: b4OCO9833eAH-mp3zQgCRKXKJTLvG_oO X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-02_08,2021-11-02_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0 suspectscore=0 impostorscore=0 clxscore=1015 bulkscore=0 malwarescore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111020106 Received-SPF: pass client-ip=148.163.156.1; envelope-from=farman@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Farman , qemu-s390x@nongnu.org, Richard Henderson , qemu-devel@nongnu.org, David Hildenbrand Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Here is an update to the SIGP handling I brought up a few weeks ago [1]. It doesn't share anything with v1, as one of the patches has already been pulled to master [2] and the other is now dropped in favor of this direction. Here, we take advantage of a new KVM ioctl [3] to indicate when userspace has completed processing a particular SIGP order, based on David's suggestion [4]. This code resets the "busy" situation for every order, regardless of whether the Principles of Operation dictates whether the order would mark the vcpu busy. It's not as graceful as I'd like, but it does what I expect it to. Maybe some more refactoring on this side would help matters. Thoughts? [1] https://lore.kernel.org/r/20211008203811.1980478-1-farman@linux.ibm.com/ [2] https://lore.kernel.org/r/20211015091622.1302433-1-thuth@redhat.com/ [3] https://lore.kernel.org/r/20211102194652.2685098-1-farman@linux.ibm.com/ [4] https://lore.kernel.org/r/3e3b38d1-b338-0211-04ab-91f913c1f557@redhat.com/ Eric Farman (2): Temporary linux-headers update s390x: Implement the USER_SIGP_BUSY capability linux-headers/linux/kvm.h | 4 ++++ target/s390x/cpu-sysemu.c | 7 +++++++ target/s390x/cpu.h | 4 ++++ target/s390x/kvm/kvm.c | 9 ++++++++ target/s390x/kvm/kvm_s390x.h | 1 + target/s390x/sigp.c | 40 ++++++++++++++++++++++++++++++++++++ 6 files changed, 65 insertions(+)