Message ID | 63ba1d4e043315693957093688670d36ffa65d28.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:18, Sergiy Kibrik wrote: > 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> Acked-by: Jan Beulich <jbeulich@suse.com> preferably, as said there, with the introduction of those macros moved here, and title/description adjusted accordingly. Jan
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;
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(-)