From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tamas K Lengyel Subject: Re: [for-4.7 2/2] xen/arm: traps: Correctly interpret the content of the register HPFAR_EL2 Date: Wed, 13 Apr 2016 13:11:07 -0600 Message-ID: References: <1460562931-19858-1-git-send-email-julien.grall@arm.com> <1460562931-19858-3-git-send-email-julien.grall@arm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9117881085273312085==" Return-path: In-Reply-To: <1460562931-19858-3-git-send-email-julien.grall@arm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Julien Grall Cc: andre.przywara@arm.com, sstabellini@kernel.org, Xen-devel List-Id: xen-devel@lists.xenproject.org --===============9117881085273312085== Content-Type: multipart/alternative; boundary=001a114b1d583c35de0530628ab7 --001a114b1d583c35de0530628ab7 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 13, 2016 at 9:55 AM, Julien Grall wrote: > The register HPFAR_EL2 (resp. HPFAR on arm32) contains the bits [47:12] > (resp. [39:12]) of the faulting IPA. Unlike other registers that represent > an address, the upper bits of the IPA are stored in the register bits > [4:39] (resp. [4:21]). > > However, Xen assumes that the register contains the faulting IPA correctly > offsetted. This will result to get a wrong IPA when the fault is happening > during a translation table walk. Note this is only affecting memaccess. > > Introduce a new helper to get the faulting IPA from HPFAR_EL2 and > replace direct read from the register by the helper. > > Signed-off-by: Julien Grall > Thanks for the fix, I totally missed that. I did notice not getting any events for translation table-walks so at least now I know why. Tamas --001a114b1d583c35de0530628ab7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Apr 13, 2016 at 9:55 AM, Julien Grall <julien.grall@arm.com= > wrote:
The register HPFAR= _EL2 (resp. HPFAR on arm32) contains the bits [47:12]
(resp. [39:12]) of the faulting IPA. Unlike other registers that represent<= br> an address, the upper bits of the IPA are stored in the register bits
[4:39] (resp. [4:21]).

However, Xen assumes that the register contains the faulting IPA correctly<= br> offsetted. This will result to get a wrong IPA when the fault is happening<= br> during a translation table walk. Note this is only affecting=C2=A0 memacces= s.

Introduce a new helper to get the faulting IPA from HPFAR_EL2 and
replace direct read from the register by the helper.

Signed-off-by: Julien Grall <jul= ien.grall@arm.com>

Thanks for the fix, I total= ly missed that. I did notice not getting any events for translation table-w= alks so at least now I know why.

Tamas
--001a114b1d583c35de0530628ab7-- --===============9117881085273312085== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============9117881085273312085==--