From: Xenia Ragiadakou <burzalodowa@gmail.com>
Since start_svm() is AMD-V specific while start_vmx() is Intel VT-x specific,
one can be excluded from build completely with CONFIG_SVM and CONFIG_VMX,
respectively.
No functional change intended.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
---
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 0ce45b177c..3edbe03caf 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -156,9 +156,9 @@ static int __init cf_check hvm_enable(void)
{
const struct hvm_function_table *fns = NULL;
- if ( cpu_has_vmx )
+ if ( IS_ENABLED(CONFIG_VMX) && cpu_has_vmx )
fns = start_vmx();
- else if ( cpu_has_svm )
+ else if ( IS_ENABLED(CONFIG_SVM) && cpu_has_svm )
fns = start_svm();
if ( fns == NULL )
--
2.25.1
Since start_svm() is AMD-V specific while start_vmx() is Intel VT-x specific,
one can be excluded from build completely with CONFIG_SVM and CONFIG_VMX,
respectively.
No functional change intended.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
---
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 0ce45b177c..3edbe03caf 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -156,9 +156,9 @@ static int __init cf_check hvm_enable(void)
{
const struct hvm_function_table *fns = NULL;
- if ( cpu_has_vmx )
+ if ( IS_ENABLED(CONFIG_VMX) && cpu_has_vmx )
fns = start_vmx();
- else if ( cpu_has_svm )
+ else if ( IS_ENABLED(CONFIG_SVM) && cpu_has_svm )
fns = start_svm();
if ( fns == NULL )
--
2.25.1