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

Re: [Xen-devel] [PATCH v5 3/8] xen/arm: introduce kinfo->guest_phandle_gic



On Wed, 25 Sep 2019, Julien Grall wrote:
> Hi,
> 
> On 25/09/2019 19:49, Stefano Stabellini wrote:
> > Instead of always hard-coding the GIC phandle (GUEST_PHANDLE_GIC), store
> > it in a variable under kinfo. This way it can be dynamically chosen per
> > domain. Remove the fdt pointer argument to the make_*_domU_node
> > functions and oass a struct kernel_info * instead. The fdt pointer can
> > be accessed from kinfo->fdt. Remove the struct domain *d parameter to
> > the make_*_domU_node functions because it becomes unused.
> > 
> > Initialize guest_phandle_gic to GUEST_PHANDLE_GIC at the beginning of
> > prepare_dtb_domU. Later patches will change the value of
> > guest_phandle_gic depending on user provided information.
> > 
> > Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>
> > 
> > ---
> > Changes in v5:
> > - improve commit message
> > Changes in v4:
> > - new patch
> > ---
> >   xen/arch/arm/domain_build.c  | 36 +++++++++++++++++++++---------------
> >   xen/include/asm-arm/kernel.h |  3 +++
> >   2 files changed, 24 insertions(+), 15 deletions(-)
> > 
> > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> > index 21985628f0..32f85cd959 100644
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -627,7 +627,8 @@ static int __init fdt_property_interrupts(const struct 
> > kernel_info *kinfo,
> >   {
> >       int res;
> >       uint32_t phandle = is_hardware_domain(kinfo->d) ?
> > -                       dt_interrupt_controller->phandle : 
> > GUEST_PHANDLE_GIC;
> 
> Sorry, I only realized it now. But is there any reason to not set 
> guest_phandle_gic for the hwdom also?

Yes, I can do that for dom0 too


> > diff --git a/xen/include/asm-arm/kernel.h b/xen/include/asm-arm/kernel.h
> > index 33f3e72b11..760434369b 100644
> > --- a/xen/include/asm-arm/kernel.h
> > +++ b/xen/include/asm-arm/kernel.h
> > @@ -36,6 +36,9 @@ struct kernel_info {
> >       /* Enable pl011 emulation */
> >       bool vpl011;
> >   
> > +    /* GIC phandle */
> > +    uint32_t guest_phandle_gic;
> 
> This would also allow to drop the guest_ prefix.
> 
> > +
> >       /* loader to use for this kernel */
> >       void (*load)(struct kernel_info *info);
> >       /* loader specific state */
> > 
> 
> Cheers,
> 
> -- 
> Julien Grall
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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