From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abUYI-0001Ui-90 for qemu-devel@nongnu.org; Thu, 03 Mar 2016 09:48:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abUYH-0005Ba-AE for qemu-devel@nongnu.org; Thu, 03 Mar 2016 09:48:30 -0500 References: <1456941872-8791-1-git-send-email-afarallax@yandex.ru> <56D73CB6.7040702@gmail.com> From: Sergey Fedorov Message-ID: <56D84EB5.30808@gmail.com> Date: Thu, 3 Mar 2016 17:48:21 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-arm: Fix translation level on early translation faults List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Sergey Sorokin , qemu-arm , QEMU Developers On 03.03.2016 16:49, Peter Maydell wrote: > On 2 March 2016 at 19:19, Sergey Fedorov wrote: >> On 02.03.2016 21:04, Sergey Sorokin wrote: >>> Qemu reports translation fault on 1st level instead of 0th level in case of >>> AArch64 address translation if the translation table walk is disabled or >>> the address is in the gap between the two regions. >> It's probably not a very clear description in the commit message. IIUC, >> level 0 fault is reported in case of any fault from TTBR in AArch64 state. > Yes (though you mean "under an AArch64 translation regime"). Conversely, the > only fault reported at level 0 under an AArch32 translation regime is > the AddressSize fault (for bad addresses in TTBR0/1), which we don't > currently implement. > > There's also a code path later in the function that does > level = va_size == 64 ? 0 : 1; > > but I'm not sure it's worth rearranging that code to avoid the > duplication of "what level do we report this kind of fault at?". Right, but actually I think this patch is going to fix the two "goto do_fault" cases which can happen before this "level = va_size == 64 ? 0 : 1", namely the EDP check and the check for virtual address which is in the gap between TTBR0 and TTBR1 regions. Best regards, Sergey