Re: [PATCH] KVM: x86: VMX: fix building without CONFIG_HYPERV

From: Radim KrÄmÃÅ
Date: Sat May 26 2018 - 10:18:21 EST


2018-05-25 17:36+0200, Arnd Bergmann:
> The global ms_hyperv variable is part of the hyperv support, so
> we get a link error from accessing it in kernels that have this
> turned off:
>
> arch/x86/kvm/vmx.o: In function `alloc_loaded_vmcs':
> vmx.c:(.text+0x1654a): undefined reference to `ms_hyperv'
> vmx.c:(.text+0x1657a): undefined reference to `ms_hyperv'
>
> This changes the condition to first check the compile-time
> configuration symbol to avoid the link error.
>
> Fixes: ceef7d10dfb6 ("KVM: x86: VMX: hyper-v: Enlightened MSR-Bitmap support")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Queued, thanks.