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=1796468035; b=ra/j386ThZMk9K/f9E1L49sbuKkam2jM1aXz3MoDBenBQ6+yKl4T+ExMTa7XXPV3xztq SF8RxoA3xh4WHElQofc6eo2HEK9xsapTFo5ArevTbfN2zzAY+LDBI0aERUSbjemppikda JVFTECMYrqX1C7mCRauSRbGu+6Q+0hRF5Fmwy4qCR8VdF2vo/XcZ1H8wDdq2WNy0ipWUc OFb8nOnwEg7v9+S0Hf6z594fJ+Wr/7bxx8PPNQaMKTCRwqenV8fx72gyLtp8C92TRaNzf xhkiTdp3c6eeofMYd5oSi9K6p8pOl1bXJsEhDWDYWwz3w8HHuO0TQ4w9o/S5IIA6J+w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796468035; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=KxVR+X11i1qwPdrG4wHwCqPZrTcPO6B+n9syYUhgtiA=; b=h6+muefmGYRRNcseTWaXCclUO6uisiJaxd+7Y5ZY8z5uWWyZ8b0cNwbPv/uorufKFwOs /CTWzPgm9jQi33qIHYcBtk3zYb19Hg4WHD6Q5DuHZkPVmHz3zuNj7E/e1GbvAScyqkuRk rLgVjcvnuUHjG0YidwbsUGq73gDjh+LNfdmKTHVhS6ln1+7lJkX41zOGIVQqWFJRh6bUt lOv84ULxRrikXljddk68Ed1G6hRAubxS0kQDw+H/uQIPjStnqU+H6Iw1b6Q0U3qO6H4ZL ueA0ucL6E3D2s4SATUhEh/XEj+uo5cfTw1D+0xOpHLNT24FKfkSjYMhzqWa2+/JrZdA== 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=I8HH5i8H; 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 B9753606A322; Sat, 5 Dec 2026 10:53:55 +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=I8HH5i8H Received: by smtp.kernel.org (Postfix) with ESMTPSA id 118661F00936; Sat, 5 Dec 2026 10:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796468035; bh=KxVR+X11i1qwPdrG4wHwCqPZrTcPO6B+n9syYUhgtiA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=I8HH5i8HH23YKHVHs3f/aY5gqh4jRVz8tdXMKTrSJZJEYPaKn4yAyD34gSh21YfsT cG5cbYucHLyKo9/BFJKBNWXyir7o9rMgXUQOMTtm9DGqks6XElBlT91jHVCwO6DBj1 NNWMEXhZjHdFSNjTI+lacCVuc6vYLSA4m00XexKgS1PUlXOIi5pLLYoIqCPwkhxuTr Okh3lc0/H/6iEqhs9rEG4k5Ghm1K+0Lsa3OLPZi+Y7i72RdXJRUOjr1nohp2FiYe89 NoDwLIP5Nrt5E92vFcGEl4WpMkHlZc1MFKYCQx0FGRWykskryFcwpx/pJvUZpSuelf Lm7UHhV8DO1tA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 3/3] KVM: arm64: selftests: Add a test for VNCR_EL2 translation faults Reply-To: sashiko-reviews@lists.linux.dev To: "Jia He" Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, "Oliver Upton" , "Marc Zyngier" In-Reply-To: <20261205103844.3405166-4-justin.he@arm.com> References: <20261205103844.3405166-1-justin.he@arm.com> <20261205103844.3405166-4-justin.he@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 10:53:54 +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: - [Low] KVM: selftests: unconditional timed_out check races with SIGALRM in run_test() -- commit 71d18da73eeef8268f65e690d36a5bf0724d34b9 Author: Jia He KVM: arm64: selftests: Add a test for VNCR_EL2 translation faults This commit adds a new arm64 KVM selftest, nv_vncr_abort, that exercises VNCR_EL2 translation faults from a nested context with read-write and read-only page tables and hardware access-flag management. > diff --git a/tools/testing/selftests/kvm/arm64/nv_vncr_abort.c b/tools/te= sting/selftests/kvm/arm64/nv_vncr_abort.c > new file mode 100644 > index 0000000000000..017bc63cf99c4 > --- /dev/null > +++ b/tools/testing/selftests/kvm/arm64/nv_vncr_abort.c > @@ -0,0 +1,260 @@ [ ... ] > + timed_out =3D 0; > + TEST_ASSERT(!setitimer(ITIMER_REAL, &arm, NULL), "setitimer failed"); > + do { > + ret =3D __vcpu_run(vcpu); > + err =3D errno; > + } while (ret && err =3D=3D EINTR && !timed_out); > + TEST_ASSERT(!setitimer(ITIMER_REAL, &disarm, NULL), > + "setitimer disarm failed"); > + > + if (timed_out) > + TEST_FAIL("%s: vCPU made no progress in %ds (%lu exits)", > + mode_name[mode], TIMEOUT_SEC, > + vcpu_get_stat(vcpu, exits)); > + errno =3D err; > + TEST_ASSERT(!ret, KVM_IOCTL_ERROR(KVM_RUN, ret)); [Severity: Low] Can a late SIGALRM falsely fail a completed __vcpu_run() here? ITIMER_REAL stays armed until the second setitimer() call completes, so SIGALRM can still fire after __vcpu_run() has already returned 0 (or a non-EINTR error): run_test() ret =3D __vcpu_run(vcpu) /* returns 0 */ sigalrm_handler() timed_out =3D 1 setitimer(ITIMER_REAL, &disarm, NULL) if (timed_out) TEST_FAIL(...) <-- false timeout failure Checking (ret && err =3D=3D EINTR && timed_out) ensures a timeout is only reported when __vcpu_run() was actually interrupted by the timer, and avoids masking a non-EINTR KVM_RUN error. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205103844.3405= 166-1-justin.he@arm.com?part=3D3