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

Re: [Xen-devel] [PATCH v2 04/12] x86/altp2m: basic data structures and support routines.



>>> On 24.06.15 at 12:06, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 22/06/15 19:56, Ed White wrote:
>> @@ -498,6 +498,24 @@ int hap_enable(struct domain *d, u32 mode)
>>             goto out;
>>      }
>>  
>> +    /* Init alternate p2m data */
>> +    if ( (d->arch.altp2m_eptp = alloc_xenheap_page()) == NULL )
> 
> Please use alloc_domheap_page() and map_domain_page_global() so the
> allocation is accounted against the domain.

The suggestion is okay, but it would be NULL that gets passed as
domain pointer here, i.e. there wouldn't be any accounting anyway
(we'd gain a wider pool to allocate from, but now that we have
vmalloc(), that should be considered as an option here too). Or
shouldn't this memory come from the P2M pool anyway?

What I also dislike here is an EPT specific allocation in hap.c.

Jan


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