Message ID | 52c64ffd589f289fda271422fee1e957f94aac6e.1717410850.git.Sergiy_Kibrik@epam.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86: make cpu virtualization support configurable | expand |
On 03.06.2024 13:22, Sergiy Kibrik wrote: > From: Xenia Ragiadakou <burzalodowa@gmail.com> > > Replace cpu_has_vmx check with using_vmx, so that presence of functions > ept_p2m_init() and ept_p2m_uninit() in the build gets checked. > Since currently Intel EPT implementation depends on CONFIG_VMX config option, > when VMX is off these functions are unavailable. > > Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> > Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> The actual code change is okay, so Acked-by: Jan Beulich <jbeulich@suse.com> I don't, however, understand what "gets checked" in the description is meant to mean. Elsewhere the wording was more towards the actual goal, I think. Jan > --- a/xen/arch/x86/mm/p2m-basic.c > +++ b/xen/arch/x86/mm/p2m-basic.c > @@ -40,7 +40,7 @@ static int p2m_initialise(struct domain *d, struct p2m_domain *p2m) > p2m_pod_init(p2m); > p2m_nestedp2m_init(p2m); > > - if ( hap_enabled(d) && cpu_has_vmx ) > + if ( hap_enabled(d) && using_vmx ) > ret = ept_p2m_init(p2m); > else > p2m_pt_init(p2m); > @@ -72,7 +72,7 @@ struct p2m_domain *p2m_init_one(struct domain *d) > void p2m_free_one(struct p2m_domain *p2m) > { > p2m_free_logdirty(p2m); > - if ( hap_enabled(p2m->domain) && cpu_has_vmx ) > + if ( hap_enabled(p2m->domain) && using_vmx ) > ept_p2m_uninit(p2m); > free_cpumask_var(p2m->dirty_cpumask); > xfree(p2m);
diff --git a/xen/arch/x86/mm/p2m-basic.c b/xen/arch/x86/mm/p2m-basic.c index 08007a687c..442284fb40 100644 --- a/xen/arch/x86/mm/p2m-basic.c +++ b/xen/arch/x86/mm/p2m-basic.c @@ -40,7 +40,7 @@ static int p2m_initialise(struct domain *d, struct p2m_domain *p2m) p2m_pod_init(p2m); p2m_nestedp2m_init(p2m); - if ( hap_enabled(d) && cpu_has_vmx ) + if ( hap_enabled(d) && using_vmx ) ret = ept_p2m_init(p2m); else p2m_pt_init(p2m); @@ -72,7 +72,7 @@ struct p2m_domain *p2m_init_one(struct domain *d) void p2m_free_one(struct p2m_domain *p2m) { p2m_free_logdirty(p2m); - if ( hap_enabled(p2m->domain) && cpu_has_vmx ) + if ( hap_enabled(p2m->domain) && using_vmx ) ept_p2m_uninit(p2m); free_cpumask_var(p2m->dirty_cpumask); xfree(p2m);