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 64A9F1474CC; Sun, 14 Jun 2026 08:46:04 +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=1781426765; cv=none; b=LEEd2ru6KkozuFEGP2oenUAEpNQpkOCb5hTjwpR3qfSABkVHE3CNWMqkwrHsvCJmniTv566osWyDrAG8WJ2d7sKVHWdTxGcZxWQqkMHKda0IlrBavTt227bxipIXskiC98eoYD0xF+U1FuTKukF/7Mf1Q3RMYa4w2x5TdfsZAtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781426765; c=relaxed/simple; bh=wfs9Bo8vwsW1fnRXS+VbiF3roIH9YD1x+0PEu0MRg+g=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=Zgt1+Y3JJZTRYu2cm9PnoDKAmXlLAZDezGPgy7Cl1gxUE131cT17MrSrgZ3thYOjc+vOXWl2ij2R0bhrPTX9bDI+/QUOGJZ+PFtDKMi+RoahhpPm0Xa+TknBX1/LP02O22DPs2+cTvOJ67IHE5/v7fMQIC/tNOuiSv/+/yce3p0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gPFlpQfq; 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="gPFlpQfq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F059A1F000E9; Sun, 14 Jun 2026 08:46:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781426764; bh=lCUjsqHBobEFf4PCgWD95wW9m403kB/GflewUKsUwHc=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=gPFlpQfqCyJHMCr+dAL43B8gS+NNYPW6XL0mYI8b8xQPkx49tJghZiF3YrcXhVrqe 9ZTAeXVqsg1gp1hizbuguF1IogkSBoaRvRTy0hJeLbLpu89UOpr+KI/YBO4sN+aVrT u7+i3Cu0SUavkqC5Z/phzmCb/bAdkhl3jTzbbsx4Aybog/jV83EIxjY0Xvyj1+OZpd 6EmrSVWJ9piOpg1yymn54gQOdj5KBqgVmr0mDk7r1ad+87xcXVXjGVT8vqd7Wrq1r7 4HiYVIHValMAGRfRYcqtOSN5zFpKmkauQjGB2bpUAU2rJ79S9FkFcIkaRaWSkT2Gu0 OeMvXDpdXEqRQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-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 1wYgTh-0000000Cd7x-31Jd; Sun, 14 Jun 2026 08:46:01 +0000 Date: Sun, 14 Jun 2026 09:49:23 +0100 Message-ID: <87pl1t8q24.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba Cc: sashiko-reviews@lists.linux.dev, Oliver Upton , kvmarm@lists.linux.dev, Will Deacon Subject: Re: [PATCH] KVM: arm64: Sync SPSR_EL1 when injecting an exception into a pVM In-Reply-To: References: <20260612113414.1022901-1-tabba@google.com> <20260612115044.16E3B1F000E9@smtp.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: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tabba@google.com, sashiko-reviews@lists.linux.dev, oupton@kernel.org, kvmarm@lists.linux.dev, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Fri, 12 Jun 2026 14:19:10 +0100, Fuad Tabba wrote: > > On Fri, 12 Jun 2026 at 12:50, wrote: > > > > Could this cause the guest kernel's exception decoding logic to fail or > > panic? > > You're right -- the architecture mandates setting IL here. Like you > said, this is pre-existing, and I'll submit a separate patch to fix > it. But first, Marc: was there a specific reason for not setting it, > or is it just an omission? Just a plain bug. The normal KVM code is usually careful to construct the new ESR based on the source of the exception, meaning that we always convert ESR_EL2 into ESR_EL1, and propagate IL amongst other things. This is obviously not the case here. It'd be worth auditing the rest of the code and make sure this is the only case of IL not being correctly set. Thanks, M. -- Jazz isn't dead. It just smells funny.