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 C7D0623BD1D for ; Fri, 10 Oct 2025 09:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089053; cv=none; b=riKWZFN2RNU5b91vQfxhkAWxiDW7CfinI9GQGRAAuc8BiHWxmWY0MZ14dSeyR2LBSBUDI9+a7s+4As/AidxTNezeoRZwWYp8kfivp1eKLsZ7lxuNTPxzzdJUVMABiEMvmNdLJB5wUxcs14GSrjNn9bVn4zLmXBgl73C4VgFku6c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089053; c=relaxed/simple; bh=iFbyE8S7JFCS1yJrw7lORPs6Acrmbco1uJMtkn1k9Fw=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=dLs7aftWHneI8StawB8JYmH4R9rJd6m2M5OTm/ET8ESVlYmS4VUQxCBqAn4keb6eBW9iJ5nTyTkT80d6VUj1os5rbt+xgg86MTtBBznxbVNNmwatpOOUlS8wZ7nkEKD6npoyhbjTMG54JStn4LRT8C+hH5BxcNpYNRedA2j/8kQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IGnDeQNE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IGnDeQNE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C172C4CEF1; Fri, 10 Oct 2025 09:37:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760089053; bh=iFbyE8S7JFCS1yJrw7lORPs6Acrmbco1uJMtkn1k9Fw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IGnDeQNEm2wtJiFYq2hdKSZ+nc5nfR34R9tYxo+9+SeQlvT29/SX+zWoOpU9fVM+i eZHlnrA1DcrYJ9xLvcWjFiI+UP031K+CuetDsx5kUUdzrzwYSW4bmi4Asjrl4xADv1 dP/1ZFSgGOecVhhhQEPtbMPaxhEau4Vont/DtQ1B/LTJH8cCTqhO2LcVg3gYBM7iaS 5nxeWu3MPjuIG/lxM9Z7rPJF41VwGMgCG2LJF4p5+iOv4j73yCd9IXSdIuTiLbz7vP hwiKZ83FpqO8VuKfvqk9eC9K+M+UG/ITGlwrFL1uEaiwzxTxIsoBxOjBMvZH2Xlno8 7iwOo1iofKyKg== 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 1v79Z5-0000000Cs9A-20JD; Fri, 10 Oct 2025 09:37:31 +0000 Date: Fri, 10 Oct 2025 10:37:31 +0100 Message-ID: <86ikgnxfl0.wl-maz@kernel.org> From: Marc Zyngier To: Jan Kotas Cc: Oliver Upton , "kvmarm@lists.linux.dev" Subject: Re: HCR_EL2 GET_ONE_REG value difference In-Reply-To: <47FBDCE7-F8D8-4071-93D8-E4E494D41F34@global.cadence.com> References: <47FBDCE7-F8D8-4071-93D8-E4E494D41F34@global.cadence.com> 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=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: jank@cadence.com, oliver.upton@linux.dev, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Fri, 10 Oct 2025 09:30:12 +0100, Jan Kotas wrote: >=20 > Hello, >=20 > During NV debugging I noticed a difference in HCR_EL2 value. >=20 > The value I get from accessing this register, using KVM_GET_ONE_REG: > 0x30480000000 These bits are API, APK, E2H, RW. When did you access this? After the vcpu has run? Before it has run? What NV configuration did you use? > > However, X1 value after executing mrs x1, hcr_el2 in guest: > 0x100030080000000 You have ATA, API, APK, RW. Is that the *only* thing that has run in your guest? > I access both of these at the same place. "at the same place"? What do you mean? One is accessed from host userspace, and the other from the guest. How can that be the same place? > I get the list of available registers from KVM_GET_REG_LIST. >=20 > I double checked my encoding, and it seems to be correct. > HCR_EL2 3, 4, 1, 1, 0 >=20 > I can check other registers, but I first wanted to check, if this expecte= d? > Is there something I=E2=80=99m missing, when accessing emulated registers? Could you please start by clarifying what you are doing? Thanks, M. --=20 Without deviation from the norm, progress is not possible.