[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 07/25] arm/altp2m: Add altp2m init/teardown routines.
On 05/08/16 07:53, Sergej Proskurin wrote: Hi Julien, Hello Sergej, On 08/03/2016 08:12 PM, Julien Grall wrote:On 01/08/16 18:10, Sergej Proskurin wrote:+int altp2m_init(struct domain *d) +{ + unsigned int i; + + spin_lock_init(&d->arch.altp2m_lock); + + for ( i = 0; i < MAX_ALTP2M; i++ ) + { + d->arch.altp2m_p2m[i] = NULL; + d->arch.altp2m_vttbr[i] = INVALID_VTTBR;I don't think altp2m_vttbr is useful. There is no real performance impact to free the whole altp2m if the altp2m is destroyed (see altp2m_destroy_by_id) and re-allocated afterwards. The code will actually much simpler. With this solution you will be able to detect if an altp2m is available by testin altp2m_p2m[i] is NULL.This is true. I did not want to free the entire domain got every time the hostp2m got changed, while altp2m was active (see altp2m_propagate_change). But it would not introduce much more overhead when it does. Thank you. I think you misunderstood my point. When you flush the altp2m you only need to reset lowest_mapped_gfn and max_mapped_gfn aside freeing intermediate page table. The altp2m should be fully freed when it get destroyed, nobody will use it anyway. This will also simplify a lot the logic. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |