Message ID | 25d4ade03f22ae4eb260af3eae5f48528f2e3ca8.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:20, Sergiy Kibrik wrote: > From: Xenia Ragiadakou <burzalodowa@gmail.com> > > Since start_svm() is AMD-V specific while start_vmx() is Intel VT-x specific, > any of them can potentially be excluded from build completely with CONFIG_SVM > or CONFIG_VMX options respectively, hence we have to explicitly check if > they're available and use specific macros using_{svm,vmx} for that. > > Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> > Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> Acked-by: Jan Beulich <jbeulich@suse.com> yet again I think this could sensibly be folded with the earlier two patches. Jan
07.06.24 11:01, Jan Beulich: > On 03.06.2024 13:20, Sergiy Kibrik wrote: >> From: Xenia Ragiadakou <burzalodowa@gmail.com> >> >> Since start_svm() is AMD-V specific while start_vmx() is Intel VT-x specific, >> any of them can potentially be excluded from build completely with CONFIG_SVM >> or CONFIG_VMX options respectively, hence we have to explicitly check if >> they're available and use specific macros using_{svm,vmx} for that. >> >> Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> >> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> > > Acked-by: Jan Beulich <jbeulich@suse.com> > yet again I think this could sensibly be folded with the earlier > two patches. > sure, I'll squash together patches 5,6,7 -Sergiy
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 8334ab1711..7b8679bcd8 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -155,9 +155,9 @@ static int __init cf_check hvm_enable(void) { const struct hvm_function_table *fns = NULL; - if ( cpu_has_vmx ) + if ( using_vmx ) fns = start_vmx(); - else if ( cpu_has_svm ) + else if ( using_svm ) fns = start_svm(); if ( fns == NULL )