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

Re: [Xen-devel] [PATCH V2 3/4] arm: allocate per-PCPU domheap pagetable pages



On Tue, 23 Apr 2013, Ian Campbell wrote:
> On Tue, 2013-04-23 at 11:55 +0100, Stefano Stabellini wrote:
> 
> > > +    flush_xen_dcache_va_range(root, PAGE_SIZE);
> > > +    flush_xen_dcache_va_range(domheap, DOMHEAP_SECOND_PAGES*PAGE_SIZE);
> > 
> > Don't we need to flush first too (on ARMv8)?
> 
> Yes, I think so.
> 
> > 
> > 
> > > +    per_cpu(xen_pgtable, cpu) = root;
> > > +    per_cpu(xen_dommap, cpu) = domheap;
> > 
> > I think we should flush the two per_cpu variables here
> 
> These are just normal per-cpu variables, they aren't passed to the MMU
> hardware or anything like that, so I don't think we do need to flush.
> 
> If we need to flush per_cpu writes in the general case then we have a
> big problem, but I don't think this is the case.

I noticed that you used xen_pgtable at the beginning of
mmu_init_secondary_cpu, that is executed by the second cpu. However the
second cpu has already paging enabled and doesn't actually pass the
variable to the hardware, so I think you are right, we don't need to
flush them.

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