ARM 64 and GIC v3 build broken

9 views
Skip to first unread message

Nikhil Devshatwar

unread,
Jun 16, 2017, 5:26:34 AM6/16/17
to jailho...@googlegroups.com, Devshatwar, Nikhil
Hello,

I am trying to compile Jailhouse hypervisor for ARM64 architecture with
GIC_V3

I am facing following issues.

* gic_v3.h is not present in the arm-common directory

Fixed by moving to arm-common directory

* lvalue required in asm statement

This is happening in the gic_read_lr function


Following is the detailed error log:

In file included from
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/arch/arm64/include/asm/paging.h:19:0,
from
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/include/jailhouse/paging.h:18,
from
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/include/jailhouse/cell.h:17,
from
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/arch/arm64/include/asm/percpu.h:20,
from
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/include/jailhouse/control.h:14,
from
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/arch/arm64/../arm-common/irqchip.c:15:
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/arch/arm-common/include/asm/gic_v3.h:
In function ‘gic_read_lr’:
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/arch/arm64/include/asm/sysregs.h:153:2:
error: lvalue required in asm statement
asm volatile ("mrs %0, "#sysreg"\n" : "=r"((u64)(val)))
^
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/arch/arm-common/include/asm/gic_v3.h:197:3:
note: in expansion of macro ‘arm_read_sysreg’
arm_read_sysreg(ICH_LR##n, lr); \
^~~~~~~~~~~~~~~
/sdk/glsdk/workdir/nikhil/jailhouse/hypervisor/arch/arm-common/include/asm/gic_v3.h:201:2:
note: in expansion of macro ‘__READ_LR’
__READ_LR(0)
^~~~~~~~~




Has GIC_V3 been validated with arm64?

Please help how to solve this issue


Thanks & Regards,

Nikhil D

Jan Kiszka

unread,
Jun 16, 2017, 6:36:30 AM6/16/17
to Nikhil Devshatwar, jailho...@googlegroups.com, Devshatwar, Nikhil, Ralf Ramsauer
Nope, it's indeed no surprise that it doesn't work, and I would also be
unsurprised if it's broken on ARMv7 now as well - we lack hardware to
test this, see also [1]. If you have a recommendation or can even
organize access, let us know!

> Please help how to solve this issue
>

One of the issue to sort out first is the question of managing CPU IDs
on v7 vs. v8 on GICv3, see also Ralf's remark in [1]. This is needed to
develop a reasonable and maintainable abstraction. Then we need to
implement and test that on real hw, sorting out the breakages that we
likely collected since the last time GICv3 was tested (I suppose that
was only in the simulator).

BTW, once we got things running on original silicon, I would feel much
better trying out also latest QEMU which promises to provide virt
extension emulation for ARMv7 and v8, but only via GICv3 so far. That
would help maintaining the related Jailhouse code on the long run as
QEMU is freely available and easy to operate.

Jan

[1]
https://www.mail-archive.com/jailho...@googlegroups.com/msg02638.html

--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Nikhil Devshatwar

unread,
Jun 16, 2017, 11:08:32 AM6/16/17
to Jan Kiszka, jailho...@googlegroups.com, Devshatwar, Nikhil, Ralf Ramsauer
On Friday 16 June 2017 04:06 PM, Jan Kiszka wrote:
> On 2017-06-16 11:29, 'Nikhil Devshatwar' via Jailhouse wrote:
>> Hello,
>>
>> I am trying to compile Jailhouse hypervisor for ARM64 architecture with
>> GIC_V3
>>
>> I am facing following issues.
>>
>> * gic_v3.h is not present in the arm-common directory
>>
>> Fixed by moving to arm-common directory
>>
>> * lvalue required in asm statement
>>
>> This is happening in the gic_read_lr function
>>
>>
>> Following is the detailed error log:
>> [snipped]

>> note: in expansion of macro ‘__READ_LR’
>> __READ_LR(0)
>> ^~~~~~~~~
>>
>>
>>
>>
>> Has GIC_V3 been validated with arm64?
>>
> Nope, it's indeed no surprise that it doesn't work, and I would also be
> unsurprised if it's broken on ARMv7 now as well - we lack hardware to
> test this, see also [1]. If you have a recommendation or can even
> organize access, let us know!
>
>> Please help how to solve this issue
>>
> One of the issue to sort out first is the question of managing CPU IDs
> on v7 vs. v8 on GICv3, see also Ralf's remark in [1]. This is needed to
> develop a reasonable and maintainable abstraction. Then we need to
> implement and test that on real hw, sorting out the breakages that we
> likely collected since the last time GICv3 was tested (I suppose that
> was only in the simulator).
Ralf,
I went through the patch link [1]
I want to cherry-pick these patches
There is no patchwork for jailhouse.
I am not sure how do I pickup and apply patches from mail-archive.com

Let me know if there is a public git repo which I can pull your patches from
Or any other way.
Thanks
Nikhil D

Ralf Ramsauer

unread,
Jun 16, 2017, 11:23:00 AM6/16/17
to Nikhil Devshatwar, Jan Kiszka, jailho...@googlegroups.com, Devshatwar, Nikhil
No problem, find those patches here:

https://github.com/lfd/jailhouse/tree/arm-fixes

Ralf

Ralf Ramsauer

unread,
Jun 17, 2017, 7:40:59 AM6/17/17
to Nikhil Devshatwar, Jan Kiszka, jailho...@googlegroups.com, Devshatwar, Nikhil
Hi,

sorry, pointed you to the wrong branch, this is what Jan was talking about:

https://github.com/lfd/jailhouse/tree/arm-psci

Ralf
Reply all
Reply to author
Forward
0 new messages