From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8F1CCC8EF for ; Fri, 28 Jul 2023 08:14:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1261DC433C7; Fri, 28 Jul 2023 08:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690532057; bh=TgbrsSIodcJ5oQpgb2KXk5Kf05RSeDOBNWG9zazZGUE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=h8h0kwaInyRmundtwkTkZ5qf57zaXKE+WOjbbH4/ktE/jVoXOK4wEEQJHIuuC32Vy 4Rt4Et8ccap9pCjQ6Mc86LsO2wnBWpGPJZHjqFr5iIWLPNk2a5ArtPFavyQZP3oCja k/au4gD8CYft+uGZT0GQrli+t9SwtUIa4oRcf9VVfNm5jH6Se9AZdtTF3oytezccsd MhRtFcg+9mU1Ovp7zPw4MtRsXER/o/o+Envnh3ctZhHIqgaT5h96SGVp5miizL6xpK bpozi8NQcxxt/udC6S1Uosz32L0+kL/J+Eh5yoi9bcz6nZo3dLoMJ/0D7JS5rl9v1s Xm6uAORgqlxIw== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qPIc2-00Hb1V-UK; Fri, 28 Jul 2023 09:14:15 +0100 Date: Fri, 28 Jul 2023 09:14:14 +0100 Message-ID: <87h6poqwq1.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.linux.dev, James Morse , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH] KVM: arm64: Skip instruction after emulating write to TCR_EL1 In-Reply-To: <20230728000824.3848025-1-oliver.upton@linux.dev> References: <20230728000824.3848025-1-oliver.upton@linux.dev> 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/28.2 (x86_64-pc-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: oliver.upton@linux.dev, kvmarm@lists.linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Fri, 28 Jul 2023 01:08:24 +0100, Oliver Upton wrote: > > Whelp, this is embarrassing. Since commit 082fdfd13841 ("KVM: arm64: > Prevent guests from enabling HA/HD on Ampere1") KVM traps writes to > TCR_EL1 on AmpereOne to work around an erratum in the unadvertised > HAFDBS implementation, preventing the guest from enabling the feature. > Unfortunately, I failed virtualization 101 when working on that change, > and forgot to advance PC after instruction emulation. > > Do the right thing and skip the MSR instruction after emulating the > write. > > Fixes: 082fdfd13841 ("KVM: arm64: Prevent guests from enabling HA/HD on Ampere1") > Signed-off-by: Oliver Upton Oh hum... I think it is high time for a new PR to Paolo! Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.