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

Re: [Xen-devel] [PATCH v4] x86/mm: Add mem access rights to NPT



On 07/24/2018 11:55 AM, Jan Beulich wrote:
>> +    if ( cpu_has_svm && !p2m->mem_access_settings )
>> +    {
>> +        p2m->mem_access_settings = xmalloc(struct radix_tree_root);
>> +
>> +        if( !p2m->mem_access_settings )
> Style.
> 
>> +        {
>> +            xfree(d->arch.monitor.msr_bitmap);
>> +            return -ENOMEM;
>> +        }
>> +        radix_tree_init(p2m->mem_access_settings);
>> +    }
> What's the SVM connection here? Please don't forget that p2m-pt.c
> also serves the shadow case. Perhaps struct p2m_domain should
> contain a boolean indicator whether this auxiliary data structure is
> needed?

Would it not work to simply check for "if ( cpu_has_svm &&
p2m_is_hostp2m(p2m) && !p2m->mem_access_settings )" here?

In the shadow case, will not p2m->p2m_class be p2m_nested?


Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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