[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xen/ARM - Query about a data abort seen while reading GICD registers


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxxxxx>
  • Date: Tue, 16 Nov 2021 15:27:10 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=lists.xenproject.org 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=axw6WAFNmhkvoC3udJ+IHjNnRrtN8h0mwO/xm2If9nI=; b=CPu9phRrEaNywKYiKqLD1XIExf8wYUdZ+aP3/YsEsSgZibeHYHpwjlce71qaoDlJT3vPtWlREAiY5TmnKVWMxgKOCvoFYwvefDvW4S9DM7sIYgveHv1upk5fsDJTasI9aSIsmMnK4RM0q3fTcexoNeW+m8DGZSAE04qyVeqhiysmAQLYp1vdgum05hlTPEdZfjeleE5k7GbrBAGtECfhk7T0ZM025hNw8xcozqVP5dbe99vF84lXOLL6xmrpUMuPav4EYLwbYB9os7TD6XYZdzHk//yxIesVkUGF6R2tebQSCFl3ZGA/E0eGe+nif0gE+3+I8DrX7x1M6ohPkjR54A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nMExD0YLdexr+7al4TL9MScA8iMjhaAgQp79I2Wq/eKTwm4lF2Qy469G6uei9fs3NHXvM/XdCW38CNig7cv5DJyINok4Y66uBrzEjJDwdukAGplVFgR1MumwirtQ2sdsZMc6xEsQnVgOqYm8q5c6rgdzATh3wnjl0WTRijd3YFZa9VXWVh5x0KHhbZCFviFaj/dTl74X6kFOF9ssiAkhZsInrdiKxNFffiRkhccqxuo1sU3S0rrafg/5LK2K6AE/QCUcsf9nx5GCdWe5XztGQ2XHvSfKgZwSHpOS2Et25j/U616EAYbd1FIhlEacdzysFnVT/MzX3rqDoiieojDmrA==
  • Delivery-date: Tue, 16 Nov 2021 15:29:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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

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®.