From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387472; b=4sbEdU+NMFytZioEkJ45szKc/gA5qAjx70lOSho65nwiyqxMsrHNVmuhoTSaXuJ9yOQB MHU+qwWGi91BBJYs1z/kT+Ie43XfdfL2FoaeThTPk6dsAOhBS/Fswf3SYRued3gTVs0Wt TylLqYdzpUtvzL5pJ5MxNJR2Wzd7Jj/Kfum1/iXr4enNMODOSpsEg78Fzb3cCYLVJk3dR nFXBreR/8S7rxK0xx6yr8Bs7053hCMHdT5ufOn7M559vnkOOiOWN/ETPW/ADEkJjsE/n6 LHWhOd7uKn8BZb+/n2zDdu0G5AMzPktKJO/Z1H9TOc3fahFX1hH48WXH28dS2BbUjzQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387472; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=/uFj0azX3RKycUTQwGW2Z/FnakWgwPddH38vY82j0So=; b=4x2mJK7NNovZEGZ6H7nQ0fSZ//EgejHZqKzPydW5lMVtFEUwS9W8lmjtZAWQMDZ7snqO XVXrF0w9uOWE8VvIq3P269vtZkzUdTnGfCBTVbM2x3VDcj/WXu3DAMZcD8jqviAZt59Za zcdqib7/L0ChaiyVfJazFx4cqyiecMRxlZ4CAaxXXX7tGJOBGOQ/H/iBdaK2NlI8K80z4 W8wwmlGQml+vvVgQdxdoYTBnrmdiaegnSpOGfD/xSUVtNZpreZZ40aqsG+trLmQisZUTQ 5kkFLnYkVphSo/gVatSoSJhBhYynMv3Qd5qyEdKkQTJzjkKf2AF8dcpIsjih3sKZynQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=meJJhBw7; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91202606A32F; Fri, 4 Dec 2026 12:31:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=meJJhBw7 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 097D81F000CE; Fri, 4 Dec 2026 12:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796387472; bh=/uFj0azX3RKycUTQwGW2Z/FnakWgwPddH38vY82j0So=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=meJJhBw7d5Cq4iYujla4ICu/upRM2ZmZJmPu0PvHyeqG+LoZ7M+dQd09WTDiBOmir 8DiTZslrYqLJpVYXyuJhG038E+t+WPTlg5QlfpLNncXM1NzvbbIQOca7r0n8wgy9JW wkiKiW2voiU2pzscV4BEugNEzyEiBBXtVU/0x4IGw8eU2IlhDbVqp99hNiyt5npeBp gDXirUD7nvXV6NTAULrrEsUZET2RtKeETFbnLiRT94ylgzFcs4ciRWtCxlJKK3AqZo FKMngqHKFrGjB8zPplXoGPvpCWeFUNoIiTHOgoMqNhL2tAPyi3pQxHK8LnmOogZXmg v4Z0qNAN8/osQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 01/10] s390/sae: Prepare handling host interrupts during SAE execution Reply-To: sashiko-reviews@lists.linux.dev To: "Andreas Grapentin" Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-perf-users@vger.kernel.org, "Heiko Carstens" , "Vasily Gorbik" , "Alexander Gordeev" , "Christian Borntraeger" In-Reply-To: <20261204-host-irq-v1-1-a8387ee8a380@linux.ibm.com> References: <20261204-host-irq-v1-0-a8387ee8a380@linux.ibm.com> <20261204-host-irq-v1-1-a8387ee8a380@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 12:31:11 +0000 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] KVM: s390: arm64: virt_to_phys() called in noinstr arm_vcpu_enter_exit() -- commit fb3ea3faefcae4e47369e4eafbb03a10f1609380 Author: Steffen Eiden s390/sae: Prepare handling host interrupts during SAE execution This commit moves host interrupt enable/disable handling around SAE execution into entry.S and extends the SAE stack frame and sae() calling convention to carry the SAE control block, vCPU pointer, and IRQ state. > diff --git a/arch/s390/kvm/arm64/arm.c b/arch/s390/kvm/arm64/arm.c > index cd59a382a70ca..547f77be7e3cb 100644 > --- a/arch/s390/kvm/arm64/arm.c > +++ b/arch/s390/kvm/arm64/arm.c > @@ -425,23 +425,13 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct k= vm_irq_level *irq_level, > return -EINVAL; > } > =20 > -static noinstr void arm_vcpu_enter_exit(phys_addr_t sae_block) > +static noinstr void arm_vcpu_enter_exit(struct kvm_sae_block *sae_block, > + struct kvm_vcpu *vcpu) > { > guest_timing_enter_irqoff(); > guest_state_enter_irqoff(); > =20 > - /* > - * External interrupts may occur while the SAE instruction is executing > - * and must preempt guest execution to maintain responsiveness of the > - * host. > - * > - * As a temporary workaround, run SAE with interrupts enabled so that a= ny > - * interrupt is taken via the normal host interrupt path rather than > - * being subsumed inside the SAE window. > - */ > - raw_local_irq_enable(); > - sae(sae_block); > - raw_local_irq_disable(); > + sae(virt_to_phys(sae_block), sae_block, vcpu); > =20 > guest_state_exit_irqoff(); > guest_timing_exit_irqoff(); [Severity: Medium] Is it safe to call virt_to_phys() inside the noinstr arm_vcpu_enter_exit() window? With CONFIG_DEBUG_VIRTUAL enabled, virt_to_phys() expands via __pa() to the out-of-line __phys_addr() and is_vmalloc_or_module_addr(), neither of which is noinstr. At this point guest_state_enter_irqoff() has already marked lockdep hardirqs enabled while hardware IRQs remain disabled until sae(). If a tracer or kprobe on __phys_addr() or is_vmalloc_or_module_addr() takes a lockdep-tracked lock, check_flags() hits DEBUG_LOCKS_WARN_ON(lockdep_hardirqs_enabled()) and disables lockdep. Computing virt_to_phys(&vcpu->arch.sae_block) in kvm_arch_vcpu_ioctl_run() before calling arm_vcpu_enter_exit() would keep this window non-instrumentable. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-host-irq-v= 1-0-a8387ee8a380@linux.ibm.com?part=3D1