From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E98E6242D89; Tue, 11 Aug 2026 13:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786454300; cv=none; b=DQ+DAiTp1H2wSom0YoPTZp9DOjiJNOgZLwGNVdeP8hPyVA/FIghfxJPP2dsPPlOIzha2MC430IOhtpRiWFdfHvnxoKmeqOduY9IRMwQEUmbqK2qN4hI/2d2r4DTzSeiwQy/wKok4KL3rE0Ug70Gf0gBB6nIZVwQgSpgLX7hrq6M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786454300; c=relaxed/simple; bh=55QPuokDAJ5Uv3vsu0E35cwzcW6DI+QqzNYGSWaOjCE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=gI69vl74ftui1CrwXKqU0kgsp07uodwhbxyvajF8oqSa7fRe9Z1KlApqRL9id9wnbL1n6E93WqpLpp34Q7aqr2LDeXcDo5WYtd7772fSrywAJfyxBcGZOpAVn+X/ZlKTSX8OdhJ5b8R+OT8WbAVuSLl5b0AlNEoTdK57HCJela0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OQ1B1dco; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OQ1B1dco" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9242A1F000E9; Tue, 11 Aug 2026 13:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786454298; bh=+gy08N6kbCHe6kby7HeEQfmfQ3sGXgbywI0Z22XRChE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=OQ1B1dcoObsuqR+mglBALcoe2R9Q8yY92QC/tpveI34WFC5NJE20HP74BHnw+eCNJ hcQN9EYyBvBicWu0Ji87JAvZ6T6NvIRkzywgqzOCdgPXKycht03lSdgVgdR3/9KReP e3lkyLiUXtj7+buo2FRfxKPZnDGsIj4bLqgx43AFUeAe4QNFGUQLlAHQD5G2luhyBr D6empFoS9ETRkQFHOaCCTuhYjXqY0y4qK/fGB7t4slba94NnDZPH9SiioqETa7tW61 DH4oPVivVKQ/yiZImuVH045HYVEaACTy8qKjszTl2qXnpnS3kUq5yvl0uTA7HYI2N5 om97O+WNb0kdQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wtmMy-0000000EW3O-0dFL; Tue, 11 Aug 2026 13:18:16 +0000 Date: Tue, 11 Aug 2026 14:18:15 +0100 Message-ID: <86pkzo23u0.wl-maz@kernel.org> From: Marc Zyngier To: Mostafa Saleh Cc: Oliver Upton , linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, seiden@linux.ibm.com, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, vdonnefort@google.com, tabba@google.com, sebastianene@google.com, keirf@google.com, yaoyuan@linux.alibaba.com Subject: Re: [PATCH v2 0/3] KVM: arm64: Fixes for timers and pKVM In-Reply-To: References: <20260808085824.732659-1-smostafa@google.com> <178621460524.381735.15023846552532101058.b4-ty@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: smostafa@google.com, oupton@kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, seiden@linux.ibm.com, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, vdonnefort@google.com, tabba@google.com, sebastianene@google.com, keirf@google.com, yaoyuan@linux.alibaba.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 11 Aug 2026 13:17:25 +0100, Mostafa Saleh wrote: >=20 > On Sat, Aug 8, 2026 at 7:44=E2=80=AFPM Oliver Upton w= rote: > > > > On Sat, 08 Aug 2026 08:58:21 +0000, Mostafa Saleh wrote: > > > What started as a small patch ended up as a 3 patch series thanks > > > to Sashiko. > > > > > > First patch from Marc to consolidate the offset calculation, > > > follow up patches fix issues with non-protected VM and timer > > > offset and protected VM running with broken CNTVOFF_EL2. > > > > > > [...] > > > > Dropped the unintended SOB in patch 3 you mentioned. > > > > Applied to next, thanks! > > > > [1/3] KVM: arm64: Make timer_get_offset() work in all contexts > > https://git.kernel.org/kvmarm/kvmarm/c/2858600ecd01 > > [2/3] KVM: arm64: Fix timer offsets for non-protected VMs > > https://git.kernel.org/kvmarm/kvmarm/c/47d3eef780e3 > > [3/3] KVM: arm64: Fix hvhe and broken CNTVOFF_EL2 > > https://git.kernel.org/kvmarm/kvmarm/c/2e813a6e8ebe > > >=20 > Thanks Oliver! I believe there is one more bug. I'm not sure where the > bug is or if it relates to the broken timers. > Before those patches I could not boot a protected VM because of the > panic, now after booting protected VMs, I sometimes get a system > reset. On this quality HW, this is usually an indication that you are taking an exception in a tight loop. > I confirmed that cntvoff_el2 does not get written to non-zero, I also > removed the sysreg write completely (rely on xzr value at init) so my > guess is that the HW might be allergic to more than just non-zero > values in cntvoff_el2. Is that in hVHE mode? Can you trap the access and route it to the existing handling code? > I do not have issues with non-protected VMs anymore. Do these run with an offset or not? M. --=20 Without deviation from the norm, progress is not possible.