From: Xenia Ragiadakou <burzalod...@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 <burzalod...@gmail.com> Signed-off-by: Sergiy Kibrik <sergiy_kib...@epam.com> --- changes in v3: - use using_{svm,vmx} macro instead of IS_ENABLED(CONFIG_{SVM,VMX}) - updated description --- xen/arch/x86/hvm/hvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ) -- 2.25.1