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

Re: [Xen-devel] [PATCH V6 08/10] xen: Add arch_domain_preinit to initialise vGIC before evtchn_init



On Mon, 2015-06-01 at 20:56 +0800, Chen Baozi wrote:
> From: Chen Baozi <baozich@xxxxxxxxx>
> 
> evtchn_init will call domain_max_vcpus to allocate poll_mask. On
> arm/arm64 platform, this number is determined by the vGIC the guest
> is going to use, which won't be initialised until arch_domain_create
> is called in current implementation. However, moving arch_domain_create
> means that we will allocate memory before checking the XSM policy,
> which seems not to be acceptable because if the domain is not allowed
> to boot by XSM policy the expensive execution of arch_domain_create
> is wasteful. Thus, we create the arch_domain_preinit to make vgic_ops
> initialisation be done earlier.

I don't have a fundamental objection to this refactoring, but I'm
curious under what circumstances something would belong in preinit
rather than create, i.e. what is the expected semantics of this new hook
vs the old one.

If you could arrange that only preinit needed the config pointer that
might provide a suitably narrow definition. AFAIK that would just mean
moving the setting of arch.vgic.nr_spis.

I also don't have a fundamental objection to receiving a 16 byte poll
mask on gic v2 systems, x86 copes with a similar sized one even on small
systems. 

Ian.


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


 


Rackspace

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