From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 14/17] xen/arm: ITS: Add domain specific ITS initialization Date: Wed, 15 Jul 2015 19:41:22 +0200 Message-ID: <55A69B42.6010503@citrix.com> References: <1436514172-3263-1-git-send-email-vijay.kilari@gmail.com> <1436514172-3263-15-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436514172-3263-15-git-send-email-vijay.kilari@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: vijay.kilari@gmail.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, stefano.stabellini@citrix.com, tim@xen.org, xen-devel@lists.xen.org Cc: Prasun.Kapoor@caviumnetworks.com, Vijaya Kumar K , manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org Hi Vijay, On 10/07/2015 09:42, vijay.kilari@gmail.com wrote: > +void its_domain_init(struct domain *d) > +{ > + struct its_node *its; > + > + if ( is_hardware_domain(d) ) > + { > + /* > + * Only one virtual ITS is provided to domain. > + * Assign first physical ITS address to Dom0 virtual ITS. > + */ > + its = list_first_entry(&its_nodes, struct its_node, entry); > + d->arch.vits->gits_base = its->phys_base; > + d->arch.vits->gits_size = its->phys_size; > + } > + /* TODO: DomU */ > +} > + With the new vGIC infrastructure, anything related to domain initialization is done in the vGIC. > static int its_probe(struct dt_device_node *node) > { > paddr_t its_addr, its_size; > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > index 06f8e54..3bd1f2e 100644 > --- a/xen/arch/arm/setup.c > +++ b/xen/arch/arm/setup.c > @@ -776,7 +776,9 @@ void __init start_xen(unsigned long boot_phys_offset, > init_xen_time(); > > gic_init(); > - > +#ifdef CONFIG_ARM_64 > + vgic_its_init(); > +#endif > p2m_vmid_allocator_init(); > > softirq_init(); [...] > +void vgic_its_init(void) > +{ > + if ( gic_lpi_supported() ) > + its_lpi_init(gic_nr_id_bits()); > +} > + As said on patch #3 its_lpi_init can be called in its_init. In any anycase, it's not the goal of the vGIC to initialize the ITS driver. [...] > diff --git a/xen/include/asm-arm/gic_v3_defs.h b/xen/include/asm-arm/gic_v3_defs.h > index 368ebb3..24ef547 100644 > --- a/xen/include/asm-arm/gic_v3_defs.h > +++ b/xen/include/asm-arm/gic_v3_defs.h > @@ -243,6 +243,8 @@ > #define GITS_BASER_TYPE_RESERVED5 5 > #define GITS_BASER_TYPE_RESERVED6 6 > #define GITS_BASER_TYPE_RESERVED7 7 > +#define GITS_BASER_INIT_VAL ((1UL << GITS_BASER_TYPE_SHIFT) | \ > + (0x7UL << GITS_BASER_ENTRY_SIZE_SHIFT)) Please keep this define within the vgic ITS code. Regards, -- Julien Grall