Mailing List Archive

Xen with Cortex-A15 - Guest data abort: Translation fault
Hi,

I'm running the latest code from
http://xenbits.xen.org/gitweb/?p=people/sstabellini/xen-unstable.git/.git;a=shortlog;h=refs/heads/arm-tools-1.
I compiled both Dom0 and Xen. I use a Versatile Express board model
with a single CPU Cortex-A15.

For Dom0 I used the vexpress-dt branch of
git://xenbits.xen.org/people/dvrabel/linux.git and built it as
described here:
http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions

However, when Dom0 boots, I get a guest data abort translation fault
error. See the message below.

Has anyone else seen this?

Thanks
Jenny

 __  __            _  _    ____                     _        _     _
 \ \/ /___ _ __   | || |  |___ \    _   _ _ __  ___| |_ __ _| |__ | | ___
  \  // _ \ '_ \  | || |_   __) |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
  /  \  __/ | | | |__   _| / __/|__| |_| | | | \__ \ || (_| | |_) | |  __/
 /_/\_\___|_| |_|    |_|(_)_____|   \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

(XEN) Xen version 4.2-unstable (gcc version 4.6.1 (Sourcery CodeBench
Lite 2011.09-70) ) Fri Feb 10 16:12:09 GMT 2012
(XEN) Latest ChangeSet: unavailable
(XEN) Using generic timer at 100000000 Hz
(XEN) Domain heap initialised
(XEN) Set hyp vector base to 238160 (expected 00238160)
(XEN) GIC: 64 lines, 1 cpu, secure (IID 0000043b).
(XEN) GICH: 4 list registers available
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 16 KiB.
(XEN) Brought up 1 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Copying 0x8 bytes from flash 00000000001c9340 to
0029fc48Populate P2M 0x80000000->0x88000000
(XEN) Map CS2 MMIO regions 1:1 in the P2M 0x18000000->0x1bffffff
(XEN) Map CS3 MMIO regions 1:1 in the P2M 0x1c000000->0x1fffffff
(XEN) Map VGIC MMIO regions 1:1 in the P2M 0x2c008000->0x2dffffff
(XEN) mapping GICC at 0x2c002000 to 0x2c006000
(XEN) Routing peripheral interrupts to guest
(XEN) VTTBR dom0 = 10080bdffe000
(XEN) Loading 00000000001c9340 byte zImage from flash 0000000000000000
to 0000000080008000-00000000801d1340: [..]
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch
input to Xen)
(XEN) Freed 48kB init memory.
(XEN) context switch 32767:0 (idle) -> 0:0
(XEN) VTTBR dom0 = 10080bdffe000
Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 3.2.0-rc5+ (gcc version 4.6.1 (Sourcery
CodeBench Lite 2011.09-70) ) #3 Fri Feb 10 16:21:09 GMT 2012
[    0.000000] CPU: ARMv7 Processor [412fc0f0] revision 0 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine: ARM-Versatile Express
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: ECC disabled, Data cache writeback
(XEN) Guest data abort: Translation fault at level 2
(XEN)     gva=f8000084 gpa=0000000010000084
(XEN)     size=2 sign=0 write=0 reg=1
(XEN)     eat=0 cm=0 s1ptw=0 dfsc=6
(XEN) ----[ Xen-4.2-unstable  x86_64  debug=y  Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     c0326968
(XEN) CPSR:   600001d3 MODE:SVC
(XEN)      R0: c7ffd87c R1: 00000000 R2: f8000000 R3: c0361104
(XEN)      R4: c0338e84 R5: 00000000 R6: 87fff000 R7: c0339ae8
(XEN)      R8: c0341fe4 R9: 412fc0f0 R10:00000000 R11:00000000 R12:87ffd000
(XEN) USR: SP: 00000000 LR: 00000000 CPSR:600001d3
(XEN) SVC: SP: c0341f88 LR: c032521c SPSR:00000000
(XEN) ABT: SP: c0360f4c LR: c0360f4c SPSR:00000000
(XEN) UND: SP: c0360f58 LR: c0360f58 SPSR:00000000
(XEN) IRQ: SP: c0360f40 LR: c0360f40 SPSR:00000000
(XEN) FIQ: SP: 00000000 LR: 00000000 SPSR:00000000
(XEN) FIQ: R8: 00000000 R9: 00000000 R10:00000000 R11:00000000 R12:00000000
(XEN)
(XEN) TTBR0 80004059 TTBR1 80004059 TTBCR 00000000
(XEN) SCTLR 10c53c7d
(XEN) VTTBR 10080bdffe000
(XEN)
(XEN) HTTBR 80ffe91000
(XEN) HDFAR f8000084
(XEN) HIFAR 0
(XEN) HPFAR 100000
(XEN) HCR 00000031
(XEN) HSR   93810006
(XEN)
(XEN) DFSR 0 DFAR 0
(XEN) IFSR 0 IFAR 0
(XEN)
(XEN) GUEST STACK GOES HERE
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Unhandled guest data abort
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: Xen with Cortex-A15 - Guest data abort: Translation fault [ In reply to ]
On Fri, 2012-02-10 at 17:06 +0000, Jenny Smith wrote:
> Hi,
>
> I'm running the latest code from
> http://xenbits.xen.org/gitweb/?p=people/sstabellini/xen-unstable.git/.git;a=shortlog;h=refs/heads/arm-tools-1.
> I compiled both Dom0 and Xen. I use a Versatile Express board model
> with a single CPU Cortex-A15.
>
> For Dom0 I used the vexpress-dt branch of
> git://xenbits.xen.org/people/dvrabel/linux.git and built it as
> described here:
> http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions
>
> However, when Dom0 boots, I get a guest data abort translation fault
> error. See the message below.
>
> Has anyone else seen this?
> [...]
> Uncompressing Linux... done, booting the kernel.
> [ 0.000000] Linux version 3.2.0-rc5+ (gcc version 4.6.1 (Sourcery
> CodeBench Lite 2011.09-70) ) #3 Fri Feb 10 16:21:09 GMT 2012
> [ 0.000000] CPU: ARMv7 Processor [412fc0f0] revision 0 (ARMv7), cr=10c53c7d
> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
> [ 0.000000] Machine: ARM-Versatile Express
> [ 0.000000] bootconsole [earlycon0] enabled
> [ 0.000000] Memory policy: ECC disabled, Data cache writeback
> (XEN) Guest data abort: Translation fault at level 2
> (XEN) gva=f8000084 gpa=0000000010000084

This looks like an address you might get from
arch/arm/mach-vexpress/include/mach/debug-macro.S

In my tree kernel however this is supposed to be fixed up by:

commit ca6c58b68e98376b0372fca6ba55a279ec6f20fa
Author: David Vrabel <david.vrabel@citrix.com>
Date: Wed Jan 4 16:38:16 2012 +0000

HACK: fix DEBUG_LL macros for Cortex A15

Which exact kernel tree and changeset ID are you using? Can you confirm
that it includes this changeset? It appears that the tree+branched
referenced by the wiki page do include it.

Do you have CONFIG_DEBUG_LL enabled?

Ian.


_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: Xen with Cortex-A15 - Guest data abort: Translation fault [ In reply to ]
On 13/02/12 11:29, Ian Campbell wrote:
> On Fri, 2012-02-10 at 17:06 +0000, Jenny Smith wrote:
>> Hi,
>>
>> I'm running the latest code from
>> http://xenbits.xen.org/gitweb/?p=people/sstabellini/xen-unstable.git/.git;a=shortlog;h=refs/heads/arm-tools-1.
>> I compiled both Dom0 and Xen. I use a Versatile Express board model
>> with a single CPU Cortex-A15.
>>
>> For Dom0 I used the vexpress-dt branch of
>> git://xenbits.xen.org/people/dvrabel/linux.git and built it as
>> described here:
>> http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions
>>
>> However, when Dom0 boots, I get a guest data abort translation fault
>> error. See the message below.
>>
>> Has anyone else seen this?
>> [...]
>> Uncompressing Linux... done, booting the kernel.
>> [ 0.000000] Linux version 3.2.0-rc5+ (gcc version 4.6.1 (Sourcery
>> CodeBench Lite 2011.09-70) ) #3 Fri Feb 10 16:21:09 GMT 2012
>> [ 0.000000] CPU: ARMv7 Processor [412fc0f0] revision 0 (ARMv7), cr=10c53c7d
>> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
>> [ 0.000000] Machine: ARM-Versatile Express
>> [ 0.000000] bootconsole [earlycon0] enabled
>> [ 0.000000] Memory policy: ECC disabled, Data cache writeback
>> (XEN) Guest data abort: Translation fault at level 2
>> (XEN) gva=f8000084 gpa=0000000010000084
>
> This looks like an address you might get from
> arch/arm/mach-vexpress/include/mach/debug-macro.S

I don't think it's this as there is some early console output.

Which device tree is being used? Keep in mind that a) the model doesn't
implement all peripherals; and b) Xen only maps a subset of them into
dom0 (see xen/arch/arm/domain_build.c).

I would suggest using the AEMv7a device tree (vexpress-v2p-aem-v7a.dtb)
even if your model is for the Cortex A15.

David

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: Xen with Cortex-A15 - Guest data abort: Translation fault [ In reply to ]
My last git log shows this as the latest commit for my Dom0 tree:

commit 10252adc6138ae5d72bb189d80d0f9bd23127181
Author: David Vrabel <david.vrabel@citrix.com>
Date: Wed Feb 8 15:58:29 2012 +0000

arm: vexpress: increase RAM in AEM device tree

The versatile express model has 4 GiB of RAM of which 2 GiB is
accessible to non-LPAE kernels.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>

I looked for the DEBUG_LL fix and my tree has that in it.
I compiled Dom0 with both DEBUG_LL enabled and disabled, it doesn't
make a difference, so the problem must be something else.

I also tried both device trees, e.g. vexpress-v2p-aem-v7a.dts and
vexpress-v2p-ca15-tc1.dts - they also both give the same error.

Cheers
Jenny


On Mon, Feb 13, 2012 at 11:55 AM, David Vrabel <david.vrabel@citrix.com> wrote:
> On 13/02/12 11:29, Ian Campbell wrote:
>> On Fri, 2012-02-10 at 17:06 +0000, Jenny Smith wrote:
>>> Hi,
>>>
>>> I'm running the latest code from
>>> http://xenbits.xen.org/gitweb/?p=people/sstabellini/xen-unstable.git/.git;a=shortlog;h=refs/heads/arm-tools-1.
>>> I compiled both Dom0 and Xen. I use a Versatile Express board model
>>> with a single CPU Cortex-A15.
>>>
>>> For Dom0 I used the vexpress-dt branch of
>>> git://xenbits.xen.org/people/dvrabel/linux.git and built it as
>>> described here:
>>> http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions
>>>
>>> However, when Dom0 boots, I get a guest data abort translation fault
>>> error. See the message below.
>>>
>>> Has anyone else seen this?
>>> [...]
>>> Uncompressing Linux... done, booting the kernel.
>>> [    0.000000] Linux version 3.2.0-rc5+ (gcc version 4.6.1 (Sourcery
>>> CodeBench Lite 2011.09-70) ) #3 Fri Feb 10 16:21:09 GMT 2012
>>> [    0.000000] CPU: ARMv7 Processor [412fc0f0] revision 0 (ARMv7), cr=10c53c7d
>>> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
>>> [    0.000000] Machine: ARM-Versatile Express
>>> [    0.000000] bootconsole [earlycon0] enabled
>>> [    0.000000] Memory policy: ECC disabled, Data cache writeback
>>> (XEN) Guest data abort: Translation fault at level 2
>>> (XEN)     gva=f8000084 gpa=0000000010000084
>>
>> This looks like an address you might get from
>> arch/arm/mach-vexpress/include/mach/debug-macro.S
>
> I don't think it's this as there is some early console output.
>
> Which device tree is being used?  Keep in mind that a) the model doesn't
> implement all peripherals; and b) Xen only maps a subset of them into
> dom0 (see xen/arch/arm/domain_build.c).
>
> I would suggest using the AEMv7a device tree (vexpress-v2p-aem-v7a.dtb)
> even if your model is for the Cortex A15.
>
> David

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: Xen with Cortex-A15 - Guest data abort: Translation fault [ In reply to ]
On 13/02/12 12:49, Jenny Smith wrote:
> I also tried both device trees, e.g. vexpress-v2p-aem-v7a.dts and
> vexpress-v2p-ca15-tc1.dts - they also both give the same error.

These are the source files. You need to build them with make dtbs and
use the generated .dtb files.

I've also uploaded a pre-built DTB to:

http://xenbits.xen.org/people/dvrabel/xen-arm/vexpress-v2p-aem-v7a.dtb

You also need to have CONFIG_ARM_APPENDED_DTB and
CONFIG_ARM_ATAG_DTB_COMPAT enabled and to have appended the DTB to the
zImage (see wiki).

David

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: Xen with Cortex-A15 - Guest data abort: Translation fault [ In reply to ]
I have both CONFIG_ARM_APPENDED_DTB and CONFIG_ARM_ATAG_DTB_COMPAT set
in my .config.

However, you're right and my kernel build doesn't seem to build the
DTBs properly. It is not building anything when calling 'make dtbs'.

Regarding the architecture configuration, all that I need to enable is
CONFIG_ARCH_VEXPRESS=y
CONFIG_ARCH_VEXPRESS_DT=y

Or is there anything I'm missing here?

Booting with your pre-built DTB still falls over when starting Dom0.
__ __ _ _ ____ _ _ _
\ \/ /___ _ __ | || | |___ \ _ _ _ __ ___| |_ __ _| |__ | | ___
\ // _ \ '_ \ | || |_ __) |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
/ \ __/ | | | |__ _| / __/|__| |_| | | | \__ \ || (_| | |_) | | __/
/_/\_\___|_| |_| |_|(_)_____| \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

(XEN) Latest ChangeSet: unavailable
(XEN) Using generic timer at 100000000 Hz
(XEN) Domain heap initialised
(XEN) Set hyp vector base to 238160 (expected 00238160)
(XEN) GIC: 64 lines, 1 cpu, secure (IID 0000043b).
(XEN) GICH: 4 list registers available
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 16 KiB.
(XEN) Brought up 1 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Copying 0x8 bytes from flash 00000000001c8680 to
0029fc48Populate P2M 0x80000000->0x88000000
(XEN) Map CS2 MMIO regions 1:1 in the P2M 0x18000000->0x1bffffff
(XEN) Map CS3 MMIO regions 1:1 in the P2M 0x1c000000->0x1fffffff
(XEN) Map VGIC MMIO regions 1:1 in the P2M 0x2c008000->0x2dffffff
(XEN) mapping GICC at 0x2c002000 to 0x2c006000
(XEN) Routing peripheral interrupts to guest
(XEN) VTTBR dom0 = 10080bdffe000
(XEN) Loading 00000000001c9be4 byte zImage from flash 0000000000000000
to 0000000080008000-00000000801d1be4: [..]
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch
input to Xen)
(XEN) Freed 48kB init memory.
(XEN) context switch 32767:0 (idle) -> 0:0
(XEN) VTTBR dom0 = 10080bdffe000
Uncompressing Linux... done, booting the kernel.
(XEN) Xen BUG at gic.c:351
(XEN) Unexpected Trap: Undefined Instruction
(XEN) ----[ Xen-4.2-unstable x86_64 debug=y Not tainted ]----
(XEN) CPU: 0
(XEN) PC: 002369d4 __bug+0x2c/0x44
(XEN) CPSR: 200001da MODE:HYP
(XEN) R0: 0024b51c R1: 0000000a R2: 00000001 R3: 00000fff
(XEN) R4: 00248880 R5: 00248f60 R6: 0000015f R7: 7ffe6000
(XEN) R8: 7ffe403c R9: 00000000 R10:7fff7e08 R11:0029fee4 R12:00000000
(XEN) SP: 0029fedc LR: 002369d4
(XEN)
(XEN) HTTBR 80ffe91000
(XEN) HDFAR c8800104
(XEN) HIFAR 0
(XEN) HPFAR 2c0010
(XEN) HCR 00000031
(XEN) HSR 0
(XEN)
(XEN) DFSR 0 DFAR 0
(XEN) IFSR 0 IFAR 0
(XEN)
(XEN) Xen stack trace from sp=0029fedc:
(XEN) 00000000 0029feec 002396f8 0029ff14 0023d58c 7fff7ea0 00269180 7fff2000
(XEN) 00269194 00000022 00268080 00000000 0029ff50 0029ff3c 00239c30 000003ff
(XEN) 00000000 c03378fc c0480260 c03432b8 80004059 412fc0f0 00000000 0029ff44
(XEN) 002399d4 0029ff4c 0023c404 0029ff50 0023835c 0000002f ffff8ad0 ffff8ad0
(XEN) c0346688 00000000 c03378fc c0480260 c03432b8 80004059 412fc0f0 00000000
(XEN) 00000000 00000933 ffffffff 00000000 c0335268 60000153 00000000 00000000
(XEN) 00000000 00000000 00000000 00000000 00000000 c033ffb0 c035eeec c035eef8
(XEN) c035eee0 00000000 00000000 c0335260 c035eeec c035eef8 c035eee0 00000000
(XEN) 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7ffe6000
(XEN) e7f000f0
(XEN) Xen call trace:
(XEN) [<002369d4>] __bug+0x2c/0x44
(XEN) [<002396f8>] gic_set_guest_irq+0x2c/0x5c
(XEN) [<0023d58c>] vgic_vcpu_inject_irq+0x98/0x134
(XEN) [<00239c30>] do_IRQ+0xe8/0x190
(XEN) [<002399d4>] gic_interrupt+0x30/0x34
(XEN) [<0023c404>] do_trap_irq+0x10/0x14
(XEN) [<0023835c>] return_from_trap+0x0/0x10


On Mon, Feb 13, 2012 at 1:09 PM, David Vrabel <david.vrabel@citrix.com> wrote:
> On 13/02/12 12:49, Jenny Smith wrote:
>> I also tried both device trees, e.g. vexpress-v2p-aem-v7a.dts and
>> vexpress-v2p-ca15-tc1.dts - they also both give the same error.
>
> These are the source files.  You need to build them with make dtbs and
> use the generated .dtb files.
>
> I've also uploaded a pre-built DTB to:
>
> http://xenbits.xen.org/people/dvrabel/xen-arm/vexpress-v2p-aem-v7a.dtb
>
> You also need to have CONFIG_ARM_APPENDED_DTB and
> CONFIG_ARM_ATAG_DTB_COMPAT enabled and to have appended the DTB to the
> zImage (see wiki).
>
> David

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: Xen with Cortex-A15 - Guest data abort: Translation fault [ In reply to ]
On Tue, 14 Feb 2012, Jenny Smith wrote:
> Can you give me a clue where to change the List registers in the LISA model?

I have a fix cooking to support just 4 LRs, I am testing it right now so
I am hoping that your problem will be fixed in a day or two.


_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm