[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xen/ARM - Query about a data abort seen while reading GICD registers
- To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxxxxx>
- From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxxxxx>
- Date: Tue, 16 Nov 2021 16:24:58 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=arm.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jfvvNpiAyBPJ3kM7RPfPC41lPRykZLvt3wo9b24Cc7s=; b=ZEQ+KhL0eGxQaLAmsmfGXQ7Rf2B5A4lBRJ6S5ga3eROQDufC2mZ5Kzl8VMpJ6s/ogQMipq3qx7f+kbOUPHNTFlbClq5AuU4EDqG5rw9/YpoDZfuk1q9DuzqdbuU/qTplkuqpB09ZpLiFz/83oaWCRpYuIn/wSDNNoFNNANx5vBC9j/ppldlxbn4c0HuG5hzYWJPFsyVbQEBI/zWKXJFu3dp5/ajPjwo30XnKA6/zU3ZkVu5eAVHX5880Jehe7bXCqFvhfrXSMtcgCUt4kXMo6b/hT6ehVJxNOWBOZ7aU+8OZWQV7AosmyIIgsfziu6q0PuITzfaQqvOEaws3MrwtOw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oQft9rkaip23hTwR8zPyk0S8SGzLM7DOTabsgmFu/nrL8IsOowz62JSE4+iad3i5vByAW1kk9vbSBZcwowtCy/qj+XL7/MJ8/NtUvrq/wZsCmU9NVrhJtY+UDTCBIAWdNyw256n8NobQU6/C9ytqSE5EUwhUrny3M+6Dwi2oQv606X21ftltkTpQUSWcJYQp669UDCcz4JTdVp1BokXbd6NCLg2RHzVh9nygjlQCtUaB3p6YOxnROXsyIq5Hu0wvhPCruM3IHA9g8LXX05NixUeM3dH1HABpfMJm779PwSUvX08hLCrM3T9njseTZJTa4SC5nKcA3E+67h95VxqNmA==
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 16 Nov 2021 16:25:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Bertrand,
Thanks for looking into it.
On 16/11/2021 15:36, Bertrand Marquis wrote:
Hi Ayan,
On 16 Nov 2021, at 15:27, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxxxxx>
wrote:
Hi Xen/Arm experts,
I am facing a very strange issue while running a baremetal application as a
DomU guest on arm64 platform.
The baremetal app tries to read the GICD register with post indexing as follows
:-
ldr x1, =0x3001000
ldr w2, [x1], #4 <<<------ PC = 0x40000ca8
Increment on on load is not supported by the emulation layer.
That is surprising. The reason being if I try to read the GICC register
(0x3002000) with post indexing then it works fine.
Can you point me in source where this limitation is set ?
Could you try with:
add x1, x1, #4
ldr w2, [x1]
This worked fine.
-Ayan
Regards
Bertrand
And then I get :-
HSR=0x92000005 pc=0x00000040000ca8 gva=0x3001000 gpa=0x00000003001000
This problem occurs only while reading the GICD registers with post indexing.
If I read the register with pre-indexing, then I do not see any abort.
Alternatively, if I read GICC register with post indexing, I don't see the
abort either.
From the HSR value, I interpret it as
EC = 100100b # Data abort from lower exception
IL = 1b # 32 bit instruction trapped
DFSC = 101 # Translation fault level 1
On debugging, I found that the abort is triggered from
try_handle_mmio()
{ ...
/* All the instructions used on emulated MMIO region should be valid */
if ( !dabt.valid ) {
return IO_ABORT;
}
...
}
From the Arm V8 Arm specs, I understand that dabt.valid is ISV, bit[24] in "ISS
encoding for an exception from a Data Abort".
I saw that the caller is
do_trap_guest_sync() "case HSR_EC_DATA_ABORT_LOWER_EL"
where dabt.valid is false.
In the success scenario, dabt.valid is true.
I could not find the caller for do_trap_guest_sync()
So, can anyone help me here
1. Who is the caller for do_trap_guest_sync() ?
2. Any idea on what the issue is and how I can debug it further ?
Kind regards,
Ayan
|