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

Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] plat/include: Define address offsets of boot stack and pagetable



Hi Simon,

> -----Original Message-----
> From: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> Sent: 2018年9月11日 17:01
> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; Julien Grall
> <Julien.Grall@xxxxxxx>; Julien Grall <julien.grall@xxxxxxxxxx>; minios-
> devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>
> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] plat/include: Define
> address offsets of boot stack and pagetable
> 
> Hey,
> 
> On 10.09.2018 11:51, Wei Chen (Arm Technology China) wrote:
> >
> >
> >> -----Original Message-----
> >> From: Julien Grall <julien.grall@xxxxxxx>
> >> Sent: 2018年9月10日 17:45
> >> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; Julien Grall
> >> <julien.grall@xxxxxxxxxx>; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>; minios-
> >> devel@xxxxxxxxxxxxxxxxxxxx
> >> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>
> >> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] plat/include: Define
> >> address offsets of boot stack and pagetable
> >>
> >> Hi Wei,
> >>
> >> On 10/09/18 10:42, Wei Chen (Arm Technology China) wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Julien Grall <julien.grall@xxxxxxxxxx>
> >>>> Sent: 2018年9月10日 17:35
> >>>> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; Julien Grall
> >>>> <Julien.Grall@xxxxxxx>; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>; minios-
> >>>> devel@xxxxxxxxxxxxxxxxxxxx
> >>>> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>
> >>>> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] plat/include: Define
> >>>> address offsets of boot stack and pagetable
> >>>>
> >>>>
> >>>>
> >>>> On 10/09/18 10:27, Wei Chen (Arm Technology China) wrote:
> >>>>>
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: Julien Grall <julien.grall@xxxxxxxxxx>
> >>>>>> Sent: 2018年9月10日 17:24
> >>>>>> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; Julien Grall
> >>>>>> <Julien.Grall@xxxxxxx>; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>;
> minios-
> >>>>>> devel@xxxxxxxxxxxxxxxxxxxx
> >>>>>> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>
> >>>>>> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] plat/include:
> Define
> >>>>>> address offsets of boot stack and pagetable
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On 10/09/18 09:18, Wei Chen (Arm Technology China) wrote:
> >>>>>>> Hi Julien,
> >>>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>>>> -----Original Message-----
> >>>>>>>> From: Julien Grall <julien.grall@xxxxxxx>
> >>>>>>>> Sent: 2018年9月7日 22:45
> >>>>>>>> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; Simon Kuenzer
> >>>>>>>> <simon.kuenzer@xxxxxxxxx>; minios-devel@xxxxxxxxxxxxxxxxxxxx
> >>>>>>>> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>
> >>>>>>>> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] plat/include:
> >> Define
> >>>>>>>> address offsets of boot stack and pagetable
> >>>>>>>>
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> On 09/07/2018 10:36 AM, Wei Chen (Arm Technology China) wrote:
> >>>>>>>>>> -----Original Message-----
> >>>>>>>>>> From: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> >>>>>>>>>> Sent: 2018年9月7日 17:29
> >>>>>>>>>> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; minios-
> >>>>>>>>>> devel@xxxxxxxxxxxxxxxxxxxx
> >>>>>>>>>> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>; nd
> >> <nd@xxxxxxx>
> >>>>>>>>>> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] plat/include:
> >>>> Define
> >>>>>>>>>> address offsets of boot stack and pagetable
> >>>>>>>>>>
> >>>>>>>>>> On 07.09.2018 07:14, Wei Chen (Arm Technology China) wrote:
> >>>>>>>>>>> Hi Simon,
> >>>>>>>>>>>
> >>>>>>>>>>>> -----Original Message-----
> >>>>>>>>>>>> From: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> >>>>>>>>>>>> Sent: 2018年9月6日 22:53
> >>>>>>>>>>>> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; minios-
> >>>>>>>>>>>> devel@xxxxxxxxxxxxxxxxxxxx
> >>>>>>>>>>>> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>; nd
> >>>> <nd@xxxxxxx>
> >>>>>>>>>>>> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 15/46] 
> >>>>>>>>>>>> plat/include:
> >>>>>> Define
> >>>>>>>>>>>> address offsets of boot stack and pagetable
> >>>>>>>>>>>>
> >>>>>>>>>>>> Hey Wei,
> >>>>>>>>>>>>
> >>>>>>>>>>>> These defines for the memory layout are specific for KVM for now,
> >>>> right?
> >>>>>>>>>>>> Wouldn't it then make sense to place this files to
> plat/kvm/include?
> >>>>>>>>>>>> Or do you know if this is going to be the same for Xen?
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> I want to use the same memory layout for KVM and Xen. I know that
> >>>>>> current
> >>>>>>>>>>> Code for Xen platform is ported from mini-os. But once, when code
> >> for
> >>>>>>>>>>> Arm/KVM becomes stable, I want reuse most of the code for these
> two
> >>>>>>>>>>> platforms.
> >>>>>>>>>>
> >>>>>>>>>> Okay, sounds reasonable. Could you add this as one sentence in the
> >>>>>>>>>> commit message to eplain why you decided to place this to common/?
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Ok, I will add similar comment in the commit message.
> >>>>>>>>
> >>>>>>>> I don't think this memory layout is going to work well with Xen
> because
> >>>>>>>> you can't assume there are free RAM after the kernel image.
> >>>>>>>>
> >>>>>>>
> >>>>>>> Why I can't assume that? I will design the link script and write the
> >> boot
> >>>>>>> code, I can tell kernel image how to use the RAM. Anything I had
> missed?
> >>>>>>
> >>>>>> The memory layout in Xen is not part of the ABI. This give Xen the
> >>>>>> freedom to shuffle the layout between versions if required.
> >>>>>>
> >>>>>> So you can't assume where the kernel will be positioned in memory nor
> if
> >>>>>> there is any space after.
> >>>>>>
> >>>>>
> >>>>> Ok, I understand now. I would apply this memory layout for KVM only.
> >>>>
> >>>> To be honest, I think it is also wrong to apply this for KVM. KVM is
> >>>> just the hypervisor part and will not care about the memory layout.
> >>>>
> >>>> You then have the monitor (e.g KVMtools, QEMU...) that will define the
> >>>> layout. Your layout here is *only* for QEMU KVM. So you will end up
> >>>> implementing n times KVM support (one for each monitor).
> >>>>
> >>>
> >>> Yes, you're right, it's for QEMU/KVM only.
> 
> It is fine that we initially support QEMU/KVM only. Follow-up series can
> make the code more flexible for other monitor tools.
> 

I agree with you.

> >>>
> >>>> Anyway, for Xen you will have to discover the memory layout at boot.
> >>>> This is something you might be able to use for KVM later on.
> >>>>
> >>>
> >>> Emm, I will place the memory layout discovery in my TODO list.
> >>
> >> TBH, you have most of it :). The only code that seem to be platform
> >> dependent is the creation of the page-table in the assembly code.
> >>
> >
> > Ha, yes, the page-table code is tight coupling with QEMU/KVM. It seems
> > I still need a lot of work to make page-table code become common.
> > I will consider it while I am going to enable Unikraft on Xen.
> 
> Hum, maybe it is then better to start moving the pieces to a common
> place together when implementing Xen support. We have then more details
> and can start shaping the common pieces. If it is QEMU/KVM for now, put
> it in plat/kvm instead of plat/common.
> 

I will move it ; )

> >
> >> Cheers,
> >>
> >> --
> >> Julien Grall
> > IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended 
> recipient,
> please notify the sender immediately and do not disclose the contents to any
> other person, use it for any purpose, or store or copy the information in any
> medium. Thank you.
> >
> 
> Cheers,
> 
> Simon
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.