From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796386217; b=i5JmKNjujbsoXRwmpLwx93syT25m+yJpKJ5huT67nNFi84z5pcpqVFW0HXv/Rv7i9ebr qiT/ZVYS4NB0hs+EQFKhTMnZPE/VDaX83We4qT0UJKgI31PBLC4qXQiOYuQjFWeL9wmZr uMc9Q63R3qkRF8fwEP5x5Ai3UNVEWVjvDawJR4n6V0mIgSPstwZ1pGrshPeeB0WoYkWDh 4UVrCsBHVnDfHAkEU6T//+kQeu+tvN2nAg5QmBWXRFWMu6Kkx/aoITp9XjG4GWWpo4f0L 2ynGyiPcodD3D+/sGekGfQ9wITBK0yQvgU+OHDd3H5XmC/pnZgCbp3YNtfywcKpoPzw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796386217; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received: Received:Received:Received:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-TM-AS-GCONF:X-Proofpoint-Reinject:X-Proofpoint-Spam-Details-Enc: X-Authority-Analysis:X-Proofpoint-GUID:X-Proofpoint-Spam-Info: X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=kJbFnHyrotdCpqUKaxJ2MhZ5FDzKdc9wdzd89lzb6Iw=; b=LKnA7l9OOH1ltmprS4/45NRphOIUl+dr/uRpaJMfPwkPL3a+wt39KB4ORQlEAkt0JhoY zQcFcH4Lia2wwnhycvxegD5glZr2umg0hIZ8jmtRVacnXMeNpL+z/strdu69EJr6rR5lS fT71456q9hUSOmnSgJLAdbr38CL9XaUlR0QHO/fdJ9sTUF7bzZt4KDi+DP4tZd3O13scv drqwA8CWjuPy4JKYw8mLyFyB421yXe23rb2Eh4dfxRxAAk5/84gSh5iz3R+1cCmWWVVTo yHZj4CjPp+sBCvz9coOEgatgMqL3nJoMTFD/SsnYhY2bPu00wJsX6Wc29zKKGRvCbrQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=mKauep2F; arc=none smtp.remote-ip=148.163.156.1 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6436606A32D; Fri, 4 Dec 2026 12:10:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A6436606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=mKauep2F Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4BYZam2008452; Fri, 4 Dec 2026 12:09:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pp1; bh=kJbFnHyrotdCpqUKaxJ2MhZ5FDzK dc9wdzd89lzb6Iw=; b=mKauep2FCDQY+6S7KNhX1zULg9vqYWkHtAkZlqbxlPoq /YhK4SKItDyIXYw897vj9iQaBUfmNhd9Jx4Vm6q4tAZ3oa6ft8d434qRjxXiVwtB YANr9LfGGEJmCgq7P0hF92s/aVTdwQdHJSY9i5IRscpj+3gYa7dMnaSkBEruAFnD tY5qn0CYb+0avX8AEfZuVmK/5iWiSosmm5MqytX7jv0cIK8nhVqerb/+p6L3rE+t LZvtASkK0t1AOlSNxWj/YrW4SUIhBKVGjg/usEnojLf3Rszhnm/Hg6gnmMC3W3tH clgNxkqXTBCyGRfHIdxxFT3zq4ueDhS80vfJygZKJw== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4jbqgesfx4-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 12:09:57 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4BJLhW3120323; Fri, 4 Dec 2026 12:09:56 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([172.16.1.9]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4jbngghqdb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 12:09:56 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6B4C9sfA3932732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Dec 2026 12:09:55 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D238658050; Fri, 4 Dec 2026 12:09:54 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D7D358045; Fri, 4 Dec 2026 12:09:50 +0000 (GMT) Received: from a46lp21.lnxne.boe (unknown [9.87.84.240]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 4 Dec 2026 12:09:50 +0000 (GMT) From: Andreas Grapentin Subject: [PATCH 00/10] s390: Host interrupt handling for SAE guests Date: Fri, 04 Dec 2026 13:09:12 +0100 Message-Id: <20261204-host-irq-v1-0-a8387ee8a380@linux.ibm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yWNwQ6CMBBEf4X07Bpa2lI4+R+GQ0sX3URAumgwx n+34m3eZPLmLRgTIYu2eIuET2KapwzyUIj+6qcLAsXMQpXKSlVquM68AqUFtFUocTCNi0bk+T3 hQNuuOnd/Trg8snH9l2JEZr8b22L3SVUDvzjhBZ4aSvC2ki5K530wpxtNj+1IYTz28/g7CJ4Rc h5pbYtGVzWiC7YfbFmjc1WoLGodYm1MY130HkPUTnSfzxcTqn0/5QAAAA== X-Change-ID: 20261204-host-irq-462e1ef598d5 To: Steffen Eiden , Marc Zyngier , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Oleg Nesterov , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Grapentin X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5808; i=gra@linux.ibm.com; h=from:subject:message-id; bh=XciELUxnKVCiJJQ8CZfF/mHqfNYD934mK4mbR0wz4vg=; b=owEBbQKS/ZANAwAKAXUg1t0k8konAcsmYgBrEq14hHKhKN3Xpta2lv7jTK1TdxkxE84kjzRbL eaQoaMs8TaJAjMEAAEKAB0WIQRrKkreGscL2VvlPix1INbdJPJKJwUCaxKteAAKCRB1INbdJPJK J3jrEACAbKkJElLJiKak/5qT13OVgp6R+gKY5KMDYK+tjMgV4NH7f1X7SGi0iQGuKq6lXBKkvrp 6hcWxaQ7Ef9Cgir9BLC59QIyLiBqwPtbuhY2tfbC5Hs8iuwcg1ZUFsrDcG9j3M58u9wlHccQaSz wdbxV492UAImC/iZ1BArqv6vjvXZUpDqHqD6i6nsfibH7LCufKDZy8J7UsvdO6wpGhihFkMKm13 FpkfAD3sezF7MmMZjSm+7I7v/p1d88v7zE6xvTIoOSoVd9Dtp1yzQ3qZjT/36v24UgNitm2Zlgu s7Ri0If4kYpTpewb0P20BMrygeioITsIueNv97Xa1zlaEwOXXohEcMeh4UTtWyLIdT9qjfmr7LG YQP1gQtBJKeuNgFAEEuDlzgG+ISZ3iuDRfOJttUeheMtvgh9JM1wuLjUjkWsRbiePWiINWEG7BT V9WQLpfLaO+pkKaQak9dEaD28L9H3PdTPiikcxF39yrYrUrdLOL13O0JB29cQGZWjQ5gJRsJ2Ta BCzwMoq8AVyAlLnuaP0AajT/4igicvUYIbXH0uwJxPeAwznOhDY7qQ7tTZ6tUS3acQHMnR/nEnW zjJvyG3kYwdD6cVHBjSRqxK2hmn41iAF18bjdnjePzhu0FCvBbj61Nac6E6mMRVaWKmNZ+3LIxZ Eu210kMVlu3OmiA== X-Developer-Key: i=gra@linux.ibm.com; a=openpgp; fpr=3B910193D094AA78FD974A04D8BFC37DD553D93F X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA0OCBTYWx0ZWRfXxUVHuUnUJ5uV qHRISbGIcBupMt5uWY7s111982gBfpxqpGRvT/PyGpaiy91FAU7HAZopnBnb3IS5O1wZKYRwPjc YrAD1JaRcKe+osCDuvaCYlo5TarnvDp4br78gz2zu7PmrTEIBQ0WCmwR4NhIFjcIekNhNJFz78V 3UyqKVueju2TCYMjT7x/xQjeUFCEZ0dQv3Ik32JhTn9Vtgiez8cdZ6q92VfuykmcoAPN8mHpJc+ +F5ujVNeSSTDX6ARlBg1azTgTEmmYwLzilk6gGwpIELLCAZ5oeelGBHrBscKX0A6hLqPnqTfA2A fcTHiL31Df4pBGM58o+T2RmHCre90snRo4iQkDaQsoRyiWL3ZaMAN5w7arQogkE+OgAidVcDjd7 rk37B/58MUBIqT7vdVBdzaw1Fzq/VdS9ao+QTvAN49JUu8yLRU8aayITwAGaMzBNYNcKAm7xl2q vf5HP3zd6s60X6b4w+Q== X-Authority-Analysis: v=2.4 cv=Au17T+9P c=1 sm=1 tr=0 ts=6b12ad96 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=U7nrCbtTmkRpXpFmAIza:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=iNxEaKgtHvm4rNRWCYoA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-GUID: XgaEOw9AxkN1G960j-RiFyxA-nnjHPx_ X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA0OCBTYWx0ZWRfX4qMQSEaCJOKG rXXpa4gqNJ7lPF/tbN5ZO8bKetvLhTlbO9W2EtNNEfrCaJyI4l3bJxb4AeTFwnahQwkGITrEAHb 4wceJOYh2GlDjHBdMy98KkSciZCGMGc= X-Proofpoint-ORIG-GUID: qsrjbsFBBfY-FcVPpqY-Xsyt-vcNc8ka X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_02,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1011 impostorscore=0 spamscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040048 This series makes host interrupts that occur during SAE (Start Arm Execution) guest execution not terminating its host. It is based on the arm-on-s390 sysreg series 2 [1]. So far, SAE guests ran with host interrupts disabled, with a temporary raw_local_irq_enable()/disable() workaround in the C run loop, and machine checks during SAE execution were treated as host conditions. This means, that a guest triggering mccks killed the host. This series mirrors the SIE irq handling to SAE. The host interrupt mask is managed in assembly around the SAE instruction with stosm/stnsm, and the SAE stack frame carries the SAE control block, the vCPU pointer and the interrupt state (patches 1-2). The external and I/O interrupt entry code detects the SAE case with an address range check, fixes the return address to sae_exit, extracts the vCPU pointer from the stack frame and notifies KVM via a callback (patches 3-5). This mirrors the existing SIE handling in the same code paths. The arm64 equivalent of a machine check is an SError ("System Error") asynchronous exception. Its exception syndrome (ESR) classifies the error severity in the AET field; KVM injects it into the guest as a virtual SError with VSESR_EL2. Machine checks are handled the same way in the NMI entry code and are forwarded to the guest. The s390 machine check interruption code is translated to an arm64 SError ESR in mci_to_esr() and injected as a virtual SError, including HCR_EL2.VSE shadow register tracking so that a pended SError the guest has not yet taken stays pended (patches 6-9). mci_to_esr() will in this first iteration translate all machine checks forwarded to the guest as UEU (Uncorrected Error Unrecoverable): An uncorrected error was consumed and the affected context cannot continue; the data is wrong and retrying does not help. Lastly, Patch 10 lets perf recognize interrupted SAE guest execution via the saved SAE control block. Thanks, -A [1] https://lore.kernel.org/all/20261127-sysreg-v4-0-a6318d18aab5@linux.ibm.com Signed-off-by: Andreas Grapentin --- Andreas Grapentin (1): s390/perf: Recognize SAE guests Steffen Eiden (7): s390/sae: Prepare handling host interrupts during SAE execution s390/sae: Add sae_entry and sae_exit symbols KVM: s390: Share mcck_volatile_info between KVMs s390: Rename CIF_MCCK_GUEST to CIF_MCCK_SIE s390/nmi: Handle MCCKs for SAE guests KVM: s390: arm64: Enable SError injection KVM: s390: arm64: Enable mcck forwarding Sven Schnelle (2): s390/irq: Add kvm_exit callback for arm-on-s390 KVM: s390: arm64: Enable host irq arch/s390/include/asm/irq.h | 2 + arch/s390/include/asm/kvm_host.h | 3 + arch/s390/include/asm/kvm_host_arm64.h | 3 + arch/s390/include/asm/kvm_host_s390.h | 2 - arch/s390/include/asm/kvm_host_s390_types.h | 14 ---- arch/s390/include/asm/kvm_host_types.h | 14 ++++ arch/s390/include/asm/nmi.h | 6 +- arch/s390/include/asm/processor.h | 6 +- arch/s390/include/asm/ptrace.h | 3 + arch/s390/include/asm/sae.h | 2 +- arch/s390/include/asm/stacktrace.h | 3 + arch/s390/include/asm/thread_info.h | 8 ++- arch/s390/kernel/asm-offsets.c | 6 +- arch/s390/kernel/entry.S | 68 ++++++++++++++++--- arch/s390/kernel/irq.c | 9 +++ arch/s390/kernel/nmi.c | 58 +++++++++++++--- arch/s390/kernel/perf_event.c | 62 +++++++++++++---- arch/s390/kvm/arm64/arm.c | 100 +++++++++++++++++++++++----- arch/s390/kvm/arm64/inject_fault.c | 15 +++++ arch/s390/kvm/arm64/reset.c | 3 + 20 files changed, 317 insertions(+), 70 deletions(-) --- base-commit: 9437ee8b6cf607e883b36e44bd755968daaebd48 change-id: 20261204-host-irq-462e1ef598d5 prerequisite-message-id: 20261127-sysreg-v4-0-a6318d18aab5@linux.ibm.com prerequisite-patch-id: 4f6b2386967522be268f77ca6eb9487a3503dc96 prerequisite-patch-id: 539f1138a427fddb952a5f7a0691e8acd974d0fb prerequisite-patch-id: 3e9b8384f07ff18911f48eabe625a1c0507a5e96 prerequisite-patch-id: fc58c00a1006ecffd045728020ef01308022ac03 prerequisite-patch-id: 2c22bad7059a38c4ea01ca774d0c0b49cea27fba prerequisite-patch-id: c809f818609fed0a0f8ccb1721b96f5329505543 prerequisite-patch-id: b35581eba719557148ea84232698457adc8c8cc4 prerequisite-patch-id: 0b8792bac82c24bfac0b5912d2eec5da32413747 prerequisite-patch-id: 58fb40b78dd793ca3b24cadadad8868bc54aa20e prerequisite-patch-id: d986b0811f1feac0678eb135ce5c44140748431b prerequisite-patch-id: 0e3d84b8259a175fceb67b01bc37c1830805636b prerequisite-patch-id: 53a6741f3c6ec60c798995ccbf4d2b293619ec34 prerequisite-patch-id: b71ccf22e4cb8fccf4ca9eea558af14163b256db prerequisite-patch-id: bba91e0c077b1f308e2ec914a54399f775d9090d prerequisite-patch-id: 9be57897346558cd0bea61d946d85d3ba9a17f2e prerequisite-patch-id: f4ae3a54ce24b78e335eb1f019b971419d82720a prerequisite-patch-id: cc8dfe5b2b8a3f28b3c29b1a10827d99f987694d prerequisite-patch-id: f27d96dacb5c7dadc01f1cc72158b8b3f64d7053 prerequisite-patch-id: 1c69a0380267279633c8ba33bf1d30c13877e033 prerequisite-patch-id: 20ac948d6ec4bfd4b9c3d053bcb0fcb3fe067486 prerequisite-patch-id: db6b83091a6107dbfd9c4311af14fadf1534375f prerequisite-patch-id: af30d541a7cabea0981dfe79276d1e9991a8c91a prerequisite-patch-id: 5eead648d962cbdc9f45ce40538f174faedd5775 prerequisite-patch-id: 97589af6c7ac9efe15c371883511fc05d4f1c870 prerequisite-patch-id: f661ef5923e8026fab81d73e596006ac30d5cbac Best regards, -- Andreas Grapentin