[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH v3 07/16] x86/hvm: guard AMD-V and Intel VT-x hvm_function_table initializers
From: Xenia Ragiadakou <burzalodowa@xxxxxxxxx> 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@xxxxxxxxx> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> --- 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |