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

Re: [Minios-devel] [PATCH v3 19/43] arm64: add shared_info support



On Wed, Apr 25, 2018 at 10:05:34AM +0100, Julien Grall wrote:
> 
> 
> On 04/25/2018 06:48 AM, Huang Shijie wrote:
> >On Mon, Apr 23, 2018 at 12:05:51PM +0100, Julien Grall wrote:
> >>Hi Shijie,
> >>
> >>On 23/04/18 09:49, Huang Shijie wrote:
> >>>On Wed, Apr 18, 2018 at 09:34:18PM +0100, Julien Grall wrote:
> >>>>Hi,
> >>>>
> >>>>On 16/04/2018 07:31, Huang Shijie wrote:
> >>>>>Add the shared_info page.
> >>>>>
> >>>>>Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
> >>>>>---
> >>>>>  arch/arm/arm64/arm64.S | 3 +++
> >>>>>  1 file changed, 3 insertions(+)
> >>>>>
> >>>>>diff --git a/arch/arm/arm64/arm64.S b/arch/arm/arm64/arm64.S
> >>>>>index 9eb7ea0..fa3406f 100644
> >>>>>--- a/arch/arm/arm64/arm64.S
> >>>>>+++ b/arch/arm/arm64/arm64.S
> >>>>>@@ -25,6 +25,7 @@
> >>>>>      .globl boot_l2_pgtable
> >>>>>      .globl idmap_l0_pgtable
> >>>>>      .globl idmap_l1_pgtable
> >>>>>+    .globl shared_info
> >>>>>      .align 12
> >>>>>  boot_l0_pgtable:
> >>>>>@@ -37,6 +38,8 @@ idmap_l0_pgtable:
> >>>>>      .fill  PAGE_SIZE,1,0
> >>>>>  idmap_l1_pgtable:
> >>>>>      .fill  PAGE_SIZE,1,0
> >>>>>+shared_info:
> >>>>>+    .fill  PAGE_SIZE,1,0
> >>>>
> >>>>Why does it have to be defined in assembly? Can't this be done in C? Or 
> >>>>even
> >>>I think we'd better keep it here.
> >>
> >>Assembly should really only be used when this is strictly necessary...
> >>
> >>>We used the shared_info at arch_init() which the memory system is not 
> >>>ready yet.
> >>
> >>... if it is used in arch_init() then it should be defined in C statically.
> >I found it is hard to code it in C.
> >
> >The following is what I did:
> >
> >   ----------------------------------------------------------
> >   shared_info_t shared_info __attribute__((aligned(PAGE_SIZE)));
> >   ----------------------------------------------------------
> >
> >But we need the shared_info to occupy a whole page which is
> >used in map_shared_info().
> >
> >Is there a good way to solve it?
> 
> char shared_info[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE));
okay, thanks.

Huang Shijie

_______________________________________________
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®.