[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 24.07.18 at 11:28, <rcojocaru@xxxxxxxxxxxxxxx> wrote: > 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? Maybe, but that wasn't the point of my remark. I want to get rid of the cpu_has_svm here, not have it amended. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |