Use using_{svm,vmx} instead of cpu_has_{svm,vmx} that not only checks if CPU
supports corresponding virtialization technology, but also if it is
supported by build configuration.
This fixes build when VMX=n or SVM=n, because then start_nested_{svm,vmx}
routine(s) not available.
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
---
xen/arch/x86/hvm/nestedhvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/hvm/nestedhvm.c b/xen/arch/x86/hvm/nestedhvm.c
index 451c4da6d4..008dddf801 100644
--- a/xen/arch/x86/hvm/nestedhvm.c
+++ b/xen/arch/x86/hvm/nestedhvm.c
@@ -155,9 +155,9 @@ static int __init cf_check nestedhvm_setup(void)
* done, so that if (for example) HAP is disabled, nested virt is
* disabled as well.
*/
- if ( cpu_has_vmx )
+ if ( using_vmx )
start_nested_vmx(&hvm_funcs);
- else if ( cpu_has_svm )
+ else if ( using_svm )
start_nested_svm(&hvm_funcs);
return 0;
--
2.25.1