* Re: [Xen-users] ARM: Xen on Vexpress
[not found] ` <B69BE294631500448B6D3B9936E1743202D77121B687@GEORGE.Emea.Arm.com>
@ 2014-06-17 17:50 ` Julien Grall
2014-06-18 8:29 ` Ian Campbell
0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2014-06-17 17:50 UTC (permalink / raw)
To: Jeenu Viswambharan, Ian Campbell
Cc: xen-users, Julien Grall, stefano.stabellini@citrix.com, xen-devel
(CCing Xen-devel)
On 06/16/2014 05:32 PM, Jeenu Viswambharan wrote:
> On Thu, Jun 12, 2014 at 15:50:02, Jeenu Viswambharan wrote:
>>>> - What does DOM0 see as its PC at entry?
>>>
>>> The load address of the kernel image, since the zImage protocol
>>> requires us to enter the kernel at that offset.
>>
>> I managed to break at eret before guest entry, and the PC is
>> 0xafc00000 itself. It does fail to boot bare metal too from that
>> address. I'll see if I can find what's going wrong.
>
> I've been told that loading Linux at that high an offset from the memory
> base wouldn't work after all, even on bare metal. I therefore set
> kernel_addr_r to 0x80008000, which makes Xen load DOM0 at 0x8fc00000. I
> can see Linux starting to boot from this address on bare metal, but With
> Xen I'm seeing "uncompression error" (not printed on to the console, but
> through debugger inspection).
>
> I haven't pinned down why exactly it's throwing this. While I'm at it,
> I'd appreciate any helpful pointers.
Did you try to use CONFIG_VMSPLIT_3G rather than CONFIG_VMSPLIT_2G as I
suggested last week?
Using CONFIG_VMSPLIT_3G works correctly with 3.15. It looks like another
issue in the pa - virt delta when it's positive.
IIRC, it's because linux is assuming that delta is always negative (see
comment on __PV_BITS_31_24 in arch/arm/include/asm/memory.h).
At first glance, handling positive offset will be hard because, their
are rely on the compiler to provide the right layout for the
instruction. Positive number is not encoded the same way. I will have to
spend a bit more time to fully understand this code.
With Ian multiple bank support patch for DOM0, I think we can safely
assume that the delta will (nearly?) always be the same.
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xen-users] ARM: Xen on Vexpress
2014-06-17 17:50 ` [Xen-users] ARM: Xen on Vexpress Julien Grall
@ 2014-06-18 8:29 ` Ian Campbell
2014-06-18 8:40 ` Julien Grall
0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2014-06-18 8:29 UTC (permalink / raw)
To: Julien Grall
Cc: xen-users, xen-devel, Julien Grall, stefano.stabellini@citrix.com,
Jeenu Viswambharan
On Tue, 2014-06-17 at 18:50 +0100, Julien Grall wrote:
> (CCing Xen-devel)
>
> On 06/16/2014 05:32 PM, Jeenu Viswambharan wrote:
> > On Thu, Jun 12, 2014 at 15:50:02, Jeenu Viswambharan wrote:
> >>>> - What does DOM0 see as its PC at entry?
> >>>
> >>> The load address of the kernel image, since the zImage protocol
> >>> requires us to enter the kernel at that offset.
> >>
> >> I managed to break at eret before guest entry, and the PC is
> >> 0xafc00000 itself. It does fail to boot bare metal too from that
> >> address. I'll see if I can find what's going wrong.
> >
> > I've been told that loading Linux at that high an offset from the memory
> > base wouldn't work after all, even on bare metal. I therefore set
> > kernel_addr_r to 0x80008000, which makes Xen load DOM0 at 0x8fc00000. I
> > can see Linux starting to boot from this address on bare metal, but With
> > Xen I'm seeing "uncompression error" (not printed on to the console, but
> > through debugger inspection).
> >
> > I haven't pinned down why exactly it's throwing this. While I'm at it,
> > I'd appreciate any helpful pointers.
>
> Did you try to use CONFIG_VMSPLIT_3G rather than CONFIG_VMSPLIT_2G as I
> suggested last week?
>
> Using CONFIG_VMSPLIT_3G works correctly with 3.15. It looks like another
> issue in the pa - virt delta when it's positive.
>
> IIRC, it's because linux is assuming that delta is always negative (see
> comment on __PV_BITS_31_24 in arch/arm/include/asm/memory.h).
>
> At first glance, handling positive offset will be hard because, their
> are rely on the compiler to provide the right layout for the
> instruction. Positive number is not encoded the same way. I will have to
> spend a bit more time to fully understand this code.
>
> With Ian multiple bank support patch for DOM0, I think we can safely
> assume that the delta will (nearly?) always be the same.
That would be a coincidence of the implementation, not a guarantee which
we would make.
If there is an issue with the pa - virt delta handling then we should
raise it with Linux upstream.
Ian.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xen-users] ARM: Xen on Vexpress
2014-06-18 8:29 ` Ian Campbell
@ 2014-06-18 8:40 ` Julien Grall
2014-06-18 8:56 ` Ian Campbell
0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2014-06-18 8:40 UTC (permalink / raw)
To: Ian Campbell, Julien Grall
Cc: xen-users, xen-devel, stefano.stabellini@citrix.com,
Jeenu Viswambharan
On 18/06/14 09:29, Ian Campbell wrote:
> On Tue, 2014-06-17 at 18:50 +0100, Julien Grall wrote:
>> (CCing Xen-devel)
>>
>> On 06/16/2014 05:32 PM, Jeenu Viswambharan wrote:
>>> On Thu, Jun 12, 2014 at 15:50:02, Jeenu Viswambharan wrote:
>>>>>> - What does DOM0 see as its PC at entry?
>>>>>
>>>>> The load address of the kernel image, since the zImage protocol
>>>>> requires us to enter the kernel at that offset.
>>>>
>>>> I managed to break at eret before guest entry, and the PC is
>>>> 0xafc00000 itself. It does fail to boot bare metal too from that
>>>> address. I'll see if I can find what's going wrong.
>>>
>>> I've been told that loading Linux at that high an offset from the memory
>>> base wouldn't work after all, even on bare metal. I therefore set
>>> kernel_addr_r to 0x80008000, which makes Xen load DOM0 at 0x8fc00000. I
>>> can see Linux starting to boot from this address on bare metal, but With
>>> Xen I'm seeing "uncompression error" (not printed on to the console, but
>>> through debugger inspection).
>>>
>>> I haven't pinned down why exactly it's throwing this. While I'm at it,
>>> I'd appreciate any helpful pointers.
>>
>> Did you try to use CONFIG_VMSPLIT_3G rather than CONFIG_VMSPLIT_2G as I
>> suggested last week?
>>
>> Using CONFIG_VMSPLIT_3G works correctly with 3.15. It looks like another
>> issue in the pa - virt delta when it's positive.
>>
>> IIRC, it's because linux is assuming that delta is always negative (see
>> comment on __PV_BITS_31_24 in arch/arm/include/asm/memory.h).
>>
>> At first glance, handling positive offset will be hard because, their
>> are rely on the compiler to provide the right layout for the
>> instruction. Positive number is not encoded the same way. I will have to
>> spend a bit more time to fully understand this code.
>>
>> With Ian multiple bank support patch for DOM0, I think we can safely
>> assume that the delta will (nearly?) always be the same.
>
> That would be a coincidence of the implementation, not a guarantee which
> we would make.
>
> If there is an issue with the pa - virt delta handling then we should
> raise it with Linux upstream.
I will raise again the issue to Linux. But I start to think this is a
restriction by Linux but I can't find a clear comment about it. Not much
(maybe none of) ARM platform has the start physical address very high.
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xen-users] ARM: Xen on Vexpress
2014-06-18 8:40 ` Julien Grall
@ 2014-06-18 8:56 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2014-06-18 8:56 UTC (permalink / raw)
To: Julien Grall
Cc: Julien Grall, xen-users, Jeenu Viswambharan,
stefano.stabellini@citrix.com, xen-devel
On Wed, 2014-06-18 at 09:40 +0100, Julien Grall wrote:
>
> On 18/06/14 09:29, Ian Campbell wrote:
> > On Tue, 2014-06-17 at 18:50 +0100, Julien Grall wrote:
> >> (CCing Xen-devel)
> >>
> >> On 06/16/2014 05:32 PM, Jeenu Viswambharan wrote:
> >>> On Thu, Jun 12, 2014 at 15:50:02, Jeenu Viswambharan wrote:
> >>>>>> - What does DOM0 see as its PC at entry?
> >>>>>
> >>>>> The load address of the kernel image, since the zImage protocol
> >>>>> requires us to enter the kernel at that offset.
> >>>>
> >>>> I managed to break at eret before guest entry, and the PC is
> >>>> 0xafc00000 itself. It does fail to boot bare metal too from that
> >>>> address. I'll see if I can find what's going wrong.
> >>>
> >>> I've been told that loading Linux at that high an offset from the memory
> >>> base wouldn't work after all, even on bare metal. I therefore set
> >>> kernel_addr_r to 0x80008000, which makes Xen load DOM0 at 0x8fc00000. I
> >>> can see Linux starting to boot from this address on bare metal, but With
> >>> Xen I'm seeing "uncompression error" (not printed on to the console, but
> >>> through debugger inspection).
> >>>
> >>> I haven't pinned down why exactly it's throwing this. While I'm at it,
> >>> I'd appreciate any helpful pointers.
> >>
> >> Did you try to use CONFIG_VMSPLIT_3G rather than CONFIG_VMSPLIT_2G as I
> >> suggested last week?
> >>
> >> Using CONFIG_VMSPLIT_3G works correctly with 3.15. It looks like another
> >> issue in the pa - virt delta when it's positive.
> >>
> >> IIRC, it's because linux is assuming that delta is always negative (see
> >> comment on __PV_BITS_31_24 in arch/arm/include/asm/memory.h).
> >>
> >> At first glance, handling positive offset will be hard because, their
> >> are rely on the compiler to provide the right layout for the
> >> instruction. Positive number is not encoded the same way. I will have to
> >> spend a bit more time to fully understand this code.
> >>
> >> With Ian multiple bank support patch for DOM0, I think we can safely
> >> assume that the delta will (nearly?) always be the same.
> >
> > That would be a coincidence of the implementation, not a guarantee which
> > we would make.
> >
> > If there is an issue with the pa - virt delta handling then we should
> > raise it with Linux upstream.
>
> I will raise again the issue to Linux.
Thank you.
> But I start to think this is a
> restriction by Linux but I can't find a clear comment about it. Not much
> (maybe none of) ARM platform has the start physical address very high.
I wouldn't be terribly surprised if there were platforms with RAM
starting at 3GB, which would break with VMSPLIT_2G and VMSPLIT_1G and
I'm sure there are platforms with ram at 2GB which would fail with
VMSPLIT_1G (vexpress falls into this category, I think).
In the days before multiplatform this was fine -- the restriction could
be expressed in Kconfig, but these days I don't think that flies...
Ian.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-18 8:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <B69BE294631500448B6D3B9936E1743202D770C0CFE1@GEORGE.Emea.Arm.com>
[not found] ` <538F05E4.9040101@linaro.org>
[not found] ` <B69BE294631500448B6D3B9936E1743202D770C0D03B@GEORGE.Emea.Arm.com>
[not found] ` <538F1C49.7060704@linaro.org>
[not found] ` <B69BE294631500448B6D3B9936E1743202D770C0D04B@GEORGE.Emea.Arm.com>
[not found] ` <539083C6.7050200@linaro.org>
[not found] ` <B69BE294631500448B6D3B9936E1743202D77121B48B@GEORGE.Emea.Arm.com>
[not found] ` <1402496172.16332.27.camel@kazak.uk.xensource.com>
[not found] ` <B69BE294631500448B6D3B9936E1743202D77121B49C@GEORGE.Emea.Arm.com>
[not found] ` <1402499446.16332.36.camel@kazak.uk.xensource.com>
[not found] ` <B69BE294631500448B6D3B9936E1743202D77121B4AA@GEORGE.Emea.Arm.com>
[not found] ` <1402503889.16332.43.camel@kazak.uk.xensource.com>
[not found] ` <B69BE294631500448B6D3B9936E1743202D77121B4AE@GEORGE.Emea.Arm.com>
[not found] ` <1402504562.16332.49.camel@kazak.uk.xensource.com>
[not found] ` <B69BE294631500448B6D3B9936E1743202D77121B4F7@GEORGE.Emea.Arm.com>
[not found] ` <B69BE294631500448B6D3B99 36E1743202D77121B4F7@GEORGE.Emea.Arm.com>
[not found] ` <1402568263.9177.29.camel@kazak.uk.xensource.com>
[not found] ` <B69BE294631500448B6D3B9936E1743202D77121B687@GEORGE.Emea.Arm.com>
2014-06-17 17:50 ` [Xen-users] ARM: Xen on Vexpress Julien Grall
2014-06-18 8:29 ` Ian Campbell
2014-06-18 8:40 ` Julien Grall
2014-06-18 8:56 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.