summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWanpeng Li <wanpengli@tencent.com>2018-07-23 14:39:51 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-06 17:59:21 +0200
commitd63bae079b6426afc998c5ea76d9cde8d8c98303 (patch)
treeddf825743ad904a96f358883dd90495cb0d7111e /arch
parent4180bf1b655a791a0a6ef93a2ffffc762722c782 (diff)
downloadlinux-d63bae079b6426afc998c5ea76d9cde8d8c98303.tar.gz
linux-d63bae079b6426afc998c5ea76d9cde8d8c98303.tar.bz2
linux-d63bae079b6426afc998c5ea76d9cde8d8c98303.zip
KVM: X86: Add kvm hypervisor init time platform setup callback
Add kvm hypervisor init time platform setup callback which will be used to replace native apic hooks by pararvirtual hooks. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/kvm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 575c9a51e6ba..39d79720380f 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -624,12 +624,22 @@ static uint32_t __init kvm_detect(void)
return kvm_cpuid_base();
}
+static void __init kvm_apic_init(void)
+{
+}
+
+static void __init kvm_init_platform(void)
+{
+ x86_platform.apic_post_init = kvm_apic_init;
+}
+
const __initconst struct hypervisor_x86 x86_hyper_kvm = {
.name = "KVM",
.detect = kvm_detect,
.type = X86_HYPER_KVM,
.init.guest_late_init = kvm_guest_init,
.init.x2apic_available = kvm_para_available,
+ .init.init_platform = kvm_init_platform,
};
static __init int activate_jump_labels(void)