[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: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 16 Nov 2021 15:36:12 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=xH6hEkRHRCnsDpQVM/w6/Vp65XyiVOeQulO2+x+2dF4=; b=WzU/lipieE2FT7Ii8zlo/SB7prg9KV8Ksj1kgivrvYqFwDzxxOwP1G3Ct15d1EuJhkPOW5pExRSyUzhr7HIlkYRI1EzOSQ7TkjdqGMYvcrYjVgIYTMB2fAdpMnSVvdSnR4sIpYHYsL4M8D36bpAHcq9EfYyNcVDCS3hMjy8D8nB3D62p5U+7leZV8bvpnndOjoDxTlo4LT7T4tK26NpPd83d0xFhbtJU6xBDLh+q5cIpAAZ688AareU6yVcbaj9zwHKVv0Ylj+WmqbJeV7pypjADnJaDwxqcFRjK6u1q3/W59cuAPtBsijOJLfqymVz4fJMm2MXg85A0nTWi6QEPLQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWrsiQvIhDtQcXi3PeuuvzVgeL5YqVipQ1Da6tZkvYUKBO4QuIZ99mjZfKNcLlMFH7h6Uf5ioolIKRHPidd7Ik2OEgdzBwa/396XYQtAulBVHQIGZbhN5tsDe6zU55QUcxKveDAPCG2fZXO0DFqdi+y4AJSp8SLNrJIj3fgTc4DVLVngjeIP2uHH9ymbu5hBpuMsF7LHpsfOe+VmUQogt5Sdi0Lf5nho/1OGMlC7mJwuXhbYswL4KZNSnDAg+CIQTc6J0zLeVV3FBQ2AdQhQGKe0Fuip1Oxw9nb488KV4oSmkiLQbX9N0pwgSlT1a4+TDNFVnMmG3AfjmteepeR+ig==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 16 Nov 2021 15:36:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHX2v69rH0Wb2BjYUqXheWDWZOLqqwGSWAA
  • Thread-topic: Xen/ARM - Query about a data abort seen while reading GICD registers

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.

Could you try with:
add x1, x1, #4
ldr w2, [x1]

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
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.