On Tue, Mar 17, 2015 at 09:19:42AM +0000, Jan Beulich wrote:
> > +            psra->cos_mask = (~(~0ull << (get_count_order(info->cos_max)
> > +                             + 32))) & (~0ull << 32);
> 
> ((1ull << get_count_order()) - 1) << 32
> 
> seems better readable to me.

Indeed :)

> 
> >  void psr_ctxt_switch_to(struct domain *d)
> >  {
> > +    uint64_t reg;
> > +    struct psr_assoc *psra = &this_cpu(psr_assoc);
> > +
> > +    psr_assoc_reg_read(psra, &reg);
> 
> This ultimately leading to psr_assoc_init() makes it really undesirable
> here imo: Initialization work shouldn't be done during a context
> switch, even is this a one time thing on each CPU.

This is what we did in CMT patch. But now I think psr_assoc_init()
can be called from cat_cpu_init() other than here.

Chao

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

Reply via email to