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=1796387702; b=LqPpvLtrlK4Fuhi+pzM3symHHqONuFDgz0uVrF7I4iopt4792hj/7/pzPjP1AIvZFziJ H8LA3PE+21Oc3oGYBlCsll2ttIvHXlMQbmKAT2qWwJ++Fm4Buqz7FX96+lXUCHEqp6iuF 7Z59jwLTmjES7Iw41dZx6Tq/mbmydqzKMxQSTNChTyzc4NYc5QVPCCwxLgY2iMI5GqS9D yjmg9Ct0jOofpwxzkpvsq+o2YUAtoHUSrB1klE2eqU0MQvPYCYLnoEAzEu1/n7SlmsEiF WQrRZHxntqhHkUwVoTKmLZcwLRZjGMrRnOXJXBulIOAHPx9Pzn6RcYAiBVDQfLnxrWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387702; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=+aO18kfzEO58ru4bcRe7FRndxv35Aun1/fIP9TWdof0=; b=c9jepP7JzsKUJ6u14Eg50Km+31Z0eEfLag+19KQlYBdu4p5L59L+cJrhuXDtsvGbie5R omdySPFbAsHaCN2uJfkTP+6Qj4FL+Br7WGiIueVW2p8/JZ8ViJXzemHq3BFJcx/MQ6Lsw UKvY87Uzn3UEg6B3rEntC/Fy9ABXMyXHF8UAGXk0MZ7vkICOHW0fsoATZSZ/TcC0R88Bm DCNVXCGBrj5CWpA/K8EBF9rLnwefmJCu8S+SfzYELhP4wbghoQbJt7Rzzq3vUBhpGWMkc H8szEH2w3SxaOtgOKOnOk3OPf6PSfE0D8G6R2HyFM2OJx3VcSldajc/eyHOTfxJ+Arg== 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=K8s33MkA; 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 3738C606A322; Fri, 4 Dec 2026 12:35:02 +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=K8s33MkA Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8E651F000C2; Fri, 4 Dec 2026 12:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796387702; bh=+aO18kfzEO58ru4bcRe7FRndxv35Aun1/fIP9TWdof0=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=K8s33MkAipIzazwReq9qYxe7NhBJnwvWa+7wq6WUCC7lbkjjwQ1sxzWAcXMrhD8MS NZWhFyU/UOMlcZQzAeq0GfVzvLUyD7v6krJKiYfeinlMxQep4BMG76sltbpJK/jEww BV2JtUJc2Bqjp/Tj1y7C5ktKGGUetNHLTwJinI6nYEK2vulxfdY2ekl7ar/Kfn7DB1 eFKsxCiNd7ZSMeD8ym2DNFSADWGEk3cl0SezPZIS53ssUZqdARVdMolVEfDePayDQA TzGzRNLf3ytY0W0IZoL3Iq8HWuL+ycuNDJJA8SfIE/L3PP04vIENrFIeDWKz1FL/QP gHJPE/wlwXuEA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 05/10] KVM: s390: arm64: Enable host irq 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-5-a8387ee8a380@linux.ibm.com> References: <20261204-host-irq-v1-0-a8387ee8a380@linux.ibm.com> <20261204-host-irq-v1-5-a8387ee8a380@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 12:35:01 +0000 X-Mailing-List: linux-s390@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: - [Low] KVM: s390: arm64: unmarked read of vcpu->mode in kvm_arch_vcpu_ioctl_run() -- commit cd099a1f6eb2106dc6e363b5d88e5f2fb9f40c3e Author: Sven Schnelle KVM: s390: arm64: Enable host irq This commit registers a KVM callback to set vcpu->mode to OUTSIDE_GUEST_MODE when a host interrupt exits a guest, and updates kvm_arch_vcpu_ioctl_run() = to call it if the vCPU is not already in OUTSIDE_GUEST_MODE. > diff --git a/arch/s390/kvm/arm64/arm.c b/arch/s390/kvm/arm64/arm.c > index 547f77be7e3cb..cc8453bd820c6 100644 > --- a/arch/s390/kvm/arm64/arm.c > +++ b/arch/s390/kvm/arm64/arm.c [ ... ] > @@ -517,7 +525,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) > vcpu->arch.ctxt.elr_el1 =3D _vcpu_read_sys_reg(vcpu, SYS_ELR_EL1); > vcpu->arch.ctxt.spsr_el1 =3D _vcpu_read_sys_reg(vcpu, SYS_SPSR_EL1); > =20 > - vcpu->mode =3D OUTSIDE_GUEST_MODE; > + if (vcpu->mode !=3D OUTSIDE_GUEST_MODE) > + kvm_sae_exit_handler((unsigned long)vcpu); > vcpu->stat.exits++; > =20 > local_irq_enable(); [Severity: Low] Can this unmarked read of vcpu->mode trigger a KCSAN data-race report? After a synchronous guest exit without a host interrupt, vcpu->mode is still IN_GUEST_MODE. Concurrently, another CPU can run kvm_flush_remote_tlbs() -> kvm_make_all_cpus_request() -> kvm_vcpu_exiting_guest_mode(), updating vcpu->mode from IN_GUEST_MODE to EXITING_GUEST_MODE via cmpxchg(). On s390 kernels built with CONFIG_KCSAN, racing this plain load against that cmpxchg() produces a data-race splat. Using READ_ONCE(vcpu->mode) or calli= ng kvm_sae_exit_handler() unconditionally avoids the race. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-host-irq-v= 1-0-a8387ee8a380@linux.ibm.com?part=3D5