Commit-ID: eed1cf49ac664398c03ff0bd848b1537f5938972 Gitweb: https://git.kernel.org/tip/eed1cf49ac664398c03ff0bd848b1537f5938972 Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx> AuthorDate: Wed, 31 Jan 2018 09:41:40 +0100 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Wed, 31 Jan 2018 09:41:40 +0100 x86/kvm: Use the proper function to check hypervisor type The reenlightment support for hyperv slapped a direct reference to x86_hyper_type into the kvm code which results in the following build failure when CONFIG_HYPERVISOR_GUEST=n: arch/x86/kvm/x86.c:6259:6: error: ‘x86_hyper_type’ undeclared (first use in this function) arch/x86/kvm/x86.c:6259:6: note: each undeclared identifier is reported only once for each function it appears in Use the proper helper function to cure that. Qualiteee.... Fixes: 0092e4346f49 ("x86/kvm: Support Hyper-V reenlightenment") Reported-by: Ingo Molnar <mingo@xxxxxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Cc: kvm@xxxxxxxxxxxxxxx Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx> Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx> Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@xxxxxxxxxxxxx> Cc: Roman Kagan <rkagan@xxxxxxxxxxxxx> Cc: Andy Lutomirski <luto@xxxxxxxxxx> Cc: devel@xxxxxxxxxxxxxxxxxxxxxx Cc: "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx> Cc: Cathy Avery <cavery@xxxxxxxxxx> Cc: Mohammed Gamal <mmorsy@xxxxxxxxxx> --- arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 879a999..4c48c40 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6256,7 +6256,7 @@ int kvm_arch_init(void *opaque) #ifdef CONFIG_X86_64 pvclock_gtod_register_notifier(&pvclock_gtod_notifier); - if (x86_hyper_type == X86_HYPER_MS_HYPERV) + if (hypervisor_is_type(X86_HYPER_MS_HYPERV)) set_hv_tscchange_cb(kvm_hyperv_tsc_notifier); #endif @@ -6271,7 +6271,7 @@ out: void kvm_arch_exit(void) { #ifdef CONFIG_X86_64 - if (x86_hyper_type == X86_HYPER_MS_HYPERV) + if (hypervisor_is_type(X86_HYPER_MS_HYPERV)) clear_hv_tscchange_cb(); #endif kvm_lapic_exit(); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html