kvm: svm: Fix implicit declaration for __default_cpu_present_to_apicid()
authorSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Wed, 15 Jun 2016 22:23:45 +0000 (17:23 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2016 22:28:24 +0000 (00:28 +0200)
commit7d669f50847481c52faf0656aea7b4be63113210
tree58e897f904a4b2b6a0a1119bbe6b3d6962de3544
parent0699fdb380a847dcd4b74bbca6078bdb20033366
kvm: svm: Fix implicit declaration for __default_cpu_present_to_apicid()

The commit 8221c1370056 ("svm: Manage vcpu load/unload when enable AVIC")
introduces a build error due to implicit function declaration
when #ifdef CONFIG_X86_32 and #ifndef CONFIG_X86_LOCAL_APIC
(as reported by Kbuild test robot i386-randconfig-x0-06121009).

So, this patch introduces kvm_cpu_get_apicid() wrapper
around __default_cpu_present_to_apicid() with additional
handling if CONFIG_X86_LOCAL_APIC is not defined.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: commit 8221c1370056 ("svm: Manage vcpu load/unload when enable AVIC")
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c