All of lore.kernel.org
 help / color / mirror / Atom feed
* Initial Mini-OS port to ARM64
@ 2014-02-16 15:51 Chen Baozi
  2014-02-16 20:44 ` Julien Grall
  2014-02-18 15:54 ` Ian Campbell
  0 siblings, 2 replies; 8+ messages in thread
From: Chen Baozi @ 2014-02-16 15:51 UTC (permalink / raw)
  To: List Developer Xen; +Cc: Ian Campbell, Samuel Thibault

Hi all,

It is much later than I used to expect. I guess it might be help
to publish my work, though it is still not finished (and might not
be finished very soon...). 

I began to try to port mini-os to ARM64 since last summer. Since
the 64-bit guest support is not quite well at that time, this
work had been stopped for a long time until two months ago.

Though it is still at very early stage, it at least can be built,
setup a early page table for booting, parse the DTB passed by the
hypervisor, and be debugged by printk at present. So I put it
on github in case someone might be interested in it. Here is the
url: https://github.com/baozich/minios-arm64

Right now, there are some troubles to make GIC work properly,
as I didn’t consider mapping GIC’s interface in address space and
follows x86’s memory layout which make the kernel virtual address
starts at 0x0. I’ll fix it as soon as possible.

Besides, there is still lots of work to be done. So any comments
or patches are welcome.

Regards,

Baozi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initial Mini-OS port to ARM64
  2014-02-16 15:51 Initial Mini-OS port to ARM64 Chen Baozi
@ 2014-02-16 20:44 ` Julien Grall
  2014-02-24 14:30   ` Julien Grall
       [not found]   ` <CAOTdubvBf9Ce=MZJQs639sOt+718CsgDv2D+oO1_B7XXu+SgGw@mail.gmail.com>
  2014-02-18 15:54 ` Ian Campbell
  1 sibling, 2 replies; 8+ messages in thread
From: Julien Grall @ 2014-02-16 20:44 UTC (permalink / raw)
  To: Chen Baozi, List Developer Xen; +Cc: Samuel Thibault, Ian Campbell

On 16/02/14 15:51, Chen Baozi wrote:
> Hi all,

Hello Chen,

> It is much later than I used to expect. I guess it might be help
> to publish my work, though it is still not finished (and might not
> be finished very soon...).
>
> I began to try to port mini-os to ARM64 since last summer. Since
> the 64-bit guest support is not quite well at that time, this
> work had been stopped for a long time until two months ago.
>
> Though it is still at very early stage, it at least can be built,
> setup a early page table for booting, parse the DTB passed by the
> hypervisor, and be debugged by printk at present. So I put it
> on github in case someone might be interested in it. Here is the
> url: https://github.com/baozich/minios-arm64

Good job!

> Right now, there are some troubles to make GIC work properly,
> as I didn’t consider mapping GIC’s interface in address space and
> follows x86’s memory layout which make the kernel virtual address
> starts at 0x0. I’ll fix it as soon as possible.

I think you should try to sync up with Karim (in CC). He has started to 
port mini-OS on arm32. Except assembly code (which should be fairly 
small) everything can be shared between the both architecture.

If I remember correctly, Karim already wrote a GIC support but without 
FDT support.

> Besides, there is still lots of work to be done. So any comments
> or patches are welcome.

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initial Mini-OS port to ARM64
  2014-02-16 15:51 Initial Mini-OS port to ARM64 Chen Baozi
  2014-02-16 20:44 ` Julien Grall
@ 2014-02-18 15:54 ` Ian Campbell
  2014-02-23 14:41   ` Chen Baozi
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2014-02-18 15:54 UTC (permalink / raw)
  To: Chen Baozi; +Cc: Samuel Thibault, List Developer Xen

On Sun, 2014-02-16 at 23:51 +0800, Chen Baozi wrote:
> Hi all,
> 
> It is much later than I used to expect. I guess it might be help
> to publish my work, though it is still not finished (and might not
> be finished very soon...). 
> 
> I began to try to port mini-os to ARM64 since last summer. Since
> the 64-bit guest support is not quite well at that time, this
> work had been stopped for a long time until two months ago.
> 
> Though it is still at very early stage, it at least can be built,
> setup a early page table for booting, parse the DTB passed by the
> hypervisor, and be debugged by printk at present. So I put it
> on github in case someone might be interested in it. Here is the
> url: https://github.com/baozich/minios-arm64

Cool. Thank you very much for sharing.

> Right now, there are some troubles to make GIC work properly,
> as I didn’t consider mapping GIC’s interface in address space and
> follows x86’s memory layout which make the kernel virtual address
> starts at 0x0. I’ll fix it as soon as possible.

Actually, having virtual memory start at 0x0 seems quite reasonable to
me, what is the problem?

Someone somewhere was thinking of making minios run without the MMU
enabled on ARM -- to save on the overhead IIRC. But it occurs to me here
that this would be problematic if we were to move the guest memory map
around -- which we are planning to do for 4.5. I think this means that
minios must use the MMU, at least by default.

I wouldn't necessarily object to the presence of an option to build an
MMU-less variant for specific use cases, so long as it was clear to
those enabling it that there VMs might only work on a single version of
Xen.

> Besides, there is still lots of work to be done. So any comments
> or patches are welcome.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initial Mini-OS port to ARM64
  2014-02-18 15:54 ` Ian Campbell
@ 2014-02-23 14:41   ` Chen Baozi
  2014-02-24  1:35     ` Chen Baozi
  2014-02-24 11:27     ` Ian Campbell
  0 siblings, 2 replies; 8+ messages in thread
From: Chen Baozi @ 2014-02-23 14:41 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Samuel Thibault, List Developer Xen


On Feb 18, 2014, at 23:54, Ian Campbell <Ian.Campbell@citrix.com> wrote:

> On Sun, 2014-02-16 at 23:51 +0800, Chen Baozi wrote:
>> Hi all,
>> 
>> It is much later than I used to expect. I guess it might be help
>> to publish my work, though it is still not finished (and might not
>> be finished very soon...). 
>> 
>> I began to try to port mini-os to ARM64 since last summer. Since
>> the 64-bit guest support is not quite well at that time, this
>> work had been stopped for a long time until two months ago.
>> 
>> Though it is still at very early stage, it at least can be built,
>> setup a early page table for booting, parse the DTB passed by the
>> hypervisor, and be debugged by printk at present. So I put it
>> on github in case someone might be interested in it. Here is the
>> url: https://github.com/baozich/minios-arm64
> 
> Cool. Thank you very much for sharing.
> 
>> Right now, there are some troubles to make GIC work properly,
>> as I didn’t consider mapping GIC’s interface in address space and
>> follows x86’s memory layout which make the kernel virtual address
>> starts at 0x0. I’ll fix it as soon as possible.
> 
> Actually, having virtual memory start at 0x0 seems quite reasonable to
> me, what is the problem?

Hmmm, I don’t think it is a big problem. I just didn’t realise it is 
necessary to map GIC’s interface after MMU on, which leads a exception
when I try to program GIC by the physical address populated by DT. 
I used to think about making mini-os kernel address start at 0x80000000
and leave the address below 0x80000000 to be 1:1 mapping, which
seems to be able to make things easier when initialising GIC.

> 
> Someone somewhere was thinking of making minios run without the MMU
> enabled on ARM -- to save on the overhead IIRC. But it occurs to me here
> that this would be problematic if we were to move the guest memory map
> around -- which we are planning to do for 4.5. I think this means that
> minios must use the MMU, at least by default.
> 
> I wouldn't necessarily object to the presence of an option to build an
> MMU-less variant for specific use cases, so long as it was clear to
> those enabling it that there VMs might only work on a single version of
> Xen.

Actually, I’ve already enabled MMU in my current implementation. 

Cheers,

Baozi

> 
>> Besides, there is still lots of work to be done. So any comments
>> or patches are welcome.
> 
> Ian.
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initial Mini-OS port to ARM64
  2014-02-23 14:41   ` Chen Baozi
@ 2014-02-24  1:35     ` Chen Baozi
  2014-02-24 11:27     ` Ian Campbell
  1 sibling, 0 replies; 8+ messages in thread
From: Chen Baozi @ 2014-02-24  1:35 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Samuel Thibault, List Developer Xen


On Feb 23, 2014, at 22:41, Chen Baozi <baozich@gmail.com> wrote:

> 
> On Feb 18, 2014, at 23:54, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> 
>> On Sun, 2014-02-16 at 23:51 +0800, Chen Baozi wrote:
>>> Hi all,
>>> 
>>> It is much later than I used to expect. I guess it might be help
>>> to publish my work, though it is still not finished (and might not
>>> be finished very soon...). 
>>> 
>>> I began to try to port mini-os to ARM64 since last summer. Since
>>> the 64-bit guest support is not quite well at that time, this
>>> work had been stopped for a long time until two months ago.
>>> 
>>> Though it is still at very early stage, it at least can be built,
>>> setup a early page table for booting, parse the DTB passed by the
>>> hypervisor, and be debugged by printk at present. So I put it
>>> on github in case someone might be interested in it. Here is the
>>> url: https://github.com/baozich/minios-arm64
>> 
>> Cool. Thank you very much for sharing.
>> 
>>> Right now, there are some troubles to make GIC work properly,
>>> as I didn’t consider mapping GIC’s interface in address space and
>>> follows x86’s memory layout which make the kernel virtual address
>>> starts at 0x0. I’ll fix it as soon as possible.
>> 
>> Actually, having virtual memory start at 0x0 seems quite reasonable to
>> me, what is the problem?
> 
> Hmmm, I don’t think it is a big problem. I just didn’t realise it is 
> necessary to map GIC’s interface after MMU on, which leads a exception
> when I try to program GIC by the physical address populated by DT. 
> I used to think about making mini-os kernel address start at 0x80000000
> and leave the address below 0x80000000 to be 1:1 mapping, which
> seems to be able to make things easier when initialising GIC.

Well, I think we need a fixmap region for mini-os on arm/arm64, which is not
included in original x86 version.

> 
>> 
>> Someone somewhere was thinking of making minios run without the MMU
>> enabled on ARM -- to save on the overhead IIRC. But it occurs to me here
>> that this would be problematic if we were to move the guest memory map
>> around -- which we are planning to do for 4.5. I think this means that
>> minios must use the MMU, at least by default.
>> 
>> I wouldn't necessarily object to the presence of an option to build an
>> MMU-less variant for specific use cases, so long as it was clear to
>> those enabling it that there VMs might only work on a single version of
>> Xen.
> 
> Actually, I’ve already enabled MMU in my current implementation. 
> 
> Cheers,
> 
> Baozi
> 
>> 
>>> Besides, there is still lots of work to be done. So any comments
>>> or patches are welcome.
>> 
>> Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initial Mini-OS port to ARM64
  2014-02-23 14:41   ` Chen Baozi
  2014-02-24  1:35     ` Chen Baozi
@ 2014-02-24 11:27     ` Ian Campbell
  1 sibling, 0 replies; 8+ messages in thread
From: Ian Campbell @ 2014-02-24 11:27 UTC (permalink / raw)
  To: Chen Baozi; +Cc: Samuel Thibault, List Developer Xen

On Sun, 2014-02-23 at 22:41 +0800, Chen Baozi wrote:
> On Feb 18, 2014, at 23:54, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> 
> > On Sun, 2014-02-16 at 23:51 +0800, Chen Baozi wrote:
> >> Hi all,
> >> 
> >> It is much later than I used to expect. I guess it might be help
> >> to publish my work, though it is still not finished (and might not
> >> be finished very soon...). 
> >> 
> >> I began to try to port mini-os to ARM64 since last summer. Since
> >> the 64-bit guest support is not quite well at that time, this
> >> work had been stopped for a long time until two months ago.
> >> 
> >> Though it is still at very early stage, it at least can be built,
> >> setup a early page table for booting, parse the DTB passed by the
> >> hypervisor, and be debugged by printk at present. So I put it
> >> on github in case someone might be interested in it. Here is the
> >> url: https://github.com/baozich/minios-arm64
> > 
> > Cool. Thank you very much for sharing.
> > 
> >> Right now, there are some troubles to make GIC work properly,
> >> as I didn’t consider mapping GIC’s interface in address space and
> >> follows x86’s memory layout which make the kernel virtual address
> >> starts at 0x0. I’ll fix it as soon as possible.
> > 
> > Actually, having virtual memory start at 0x0 seems quite reasonable to
> > me, what is the problem?
> 
> Hmmm, I don’t think it is a big problem. I just didn’t realise it is 
> necessary to map GIC’s interface after MMU on, which leads a exception
> when I try to program GIC by the physical address populated by DT. 
> I used to think about making mini-os kernel address start at 0x80000000
> and leave the address below 0x80000000 to be 1:1 mapping, which
> seems to be able to make things easier when initialising GIC.

Remember that we are likely to rework the guest (pseudo)physical address
space in 4.5 and in any case will not make any guarantees about the
layout going forward.

It is not impossible that the GIC might move out of the 0x0-0x80000000
region (e.g. we might move it up to just below 4GB for example).

You will need to parse the DTB in order to figure out the appropriate
address and then create virtual address mappings to those addresses.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initial Mini-OS port to ARM64
  2014-02-16 20:44 ` Julien Grall
@ 2014-02-24 14:30   ` Julien Grall
       [not found]   ` <CAOTdubvBf9Ce=MZJQs639sOt+718CsgDv2D+oO1_B7XXu+SgGw@mail.gmail.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Julien Grall @ 2014-02-24 14:30 UTC (permalink / raw)
  To: Chen Baozi, List Developer Xen; +Cc: Samuel Thibault, Lars Kurth, Ian Campbell

Somehow, my gmail account claimed it sent the mail with Karim CCed, but
it was not in the thread. Adding Karim back.

Thanks Lars for spotting it!

On 02/16/2014 08:44 PM, Julien Grall wrote:
> On 16/02/14 15:51, Chen Baozi wrote:
>> Hi all,
> 
> Hello Chen,
> 
>> It is much later than I used to expect. I guess it might be help
>> to publish my work, though it is still not finished (and might not
>> be finished very soon...).
>>
>> I began to try to port mini-os to ARM64 since last summer. Since
>> the 64-bit guest support is not quite well at that time, this
>> work had been stopped for a long time until two months ago.
>>
>> Though it is still at very early stage, it at least can be built,
>> setup a early page table for booting, parse the DTB passed by the
>> hypervisor, and be debugged by printk at present. So I put it
>> on github in case someone might be interested in it. Here is the
>> url: https://github.com/baozich/minios-arm64
> 
> Good job!
> 
>> Right now, there are some troubles to make GIC work properly,
>> as I didn’t consider mapping GIC’s interface in address space and
>> follows x86’s memory layout which make the kernel virtual address
>> starts at 0x0. I’ll fix it as soon as possible.
> 
> I think you should try to sync up with Karim (in CC). He has started to
> port mini-OS on arm32. Except assembly code (which should be fairly
> small) everything can be shared between the both architecture.
> 
> If I remember correctly, Karim already wrote a GIC support but without
> FDT support.
> 
>> Besides, there is still lots of work to be done. So any comments
>> or patches are welcome.
> 
> Regards,
> 


-- 
Julien Grall

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initial Mini-OS port to ARM64
       [not found]   ` <CAOTdubvBf9Ce=MZJQs639sOt+718CsgDv2D+oO1_B7XXu+SgGw@mail.gmail.com>
@ 2014-02-24 15:49     ` Julien Grall
  0 siblings, 0 replies; 8+ messages in thread
From: Julien Grall @ 2014-02-24 15:49 UTC (permalink / raw)
  To: karim.allah.ahmed; +Cc: Samuel Thibault, Chen Baozi, Ian Campbell, xen-devel

You forget to reply all.

On 02/24/2014 03:30 PM, karim.allah.ahmed@gmail.com wrote:
> On Sun, Feb 16, 2014 at 8:44 PM, Julien Grall <julien.grall@linaro.org> wrote:
>> On 16/02/14 15:51, Chen Baozi wrote:
>>>
>>> Hi all,
>>
>>
>> Hello Chen,
>>
>>
>>> It is much later than I used to expect. I guess it might be help
>>> to publish my work, though it is still not finished (and might not
>>> be finished very soon...).
>>>
>>> I began to try to port mini-os to ARM64 since last summer. Since
>>> the 64-bit guest support is not quite well at that time, this
>>> work had been stopped for a long time until two months ago.
>>>
>>> Though it is still at very early stage, it at least can be built,
>>> setup a early page table for booting, parse the DTB passed by the
>>> hypervisor, and be debugged by printk at present. So I put it
>>> on github in case someone might be interested in it. Here is the
>>> url: https://github.com/baozich/minios-arm64
>>
>>
>> Good job!
>>
>>
>>> Right now, there are some troubles to make GIC work properly,
>>> as I didn't consider mapping GIC's interface in address space and
>>> follows x86's memory layout which make the kernel virtual address
>>> starts at 0x0. I'll fix it as soon as possible.
>>
>>
>> I think you should try to sync up with Karim (in CC). He has started to port
>> mini-OS on arm32. Except assembly code (which should be fairly small)
>> everything can be shared between the both architecture.
> 
> +1
> 
> I totally agree with Julien.
> 
> I don't know how far are you at the moment, but would it be easy to
> rebase your work on top of mine ( or the other way around ? ).
> Let me know what can I do to sync up with your work
> 
>>
>> If I remember correctly, Karim already wrote a GIC support but without FDT
>> support.
> 
> Yes, that's correct. All addresses ( not just for GIC ) at the moment
> are fixed, so once the memory layout changes everything will crash :)
> 
>>
>>
>>> Besides, there is still lots of work to be done. So any comments
>>> or patches are welcome.
>>
>>
>> Regards,
>>
>> --
>> Julien Grall
> 
> 
> 


-- 
Julien Grall

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-24 15:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-16 15:51 Initial Mini-OS port to ARM64 Chen Baozi
2014-02-16 20:44 ` Julien Grall
2014-02-24 14:30   ` Julien Grall
     [not found]   ` <CAOTdubvBf9Ce=MZJQs639sOt+718CsgDv2D+oO1_B7XXu+SgGw@mail.gmail.com>
2014-02-24 15:49     ` Julien Grall
2014-02-18 15:54 ` Ian Campbell
2014-02-23 14:41   ` Chen Baozi
2014-02-24  1:35     ` Chen Baozi
2014-02-24 11:27     ` 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.