]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/xen: Disable APIC PM for Xen PV guests
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tue, 4 Mar 2014 02:40:21 +0000 (21:40 -0500)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 29 Jun 2015 15:37:32 +0000 (08:37 -0700)
Xen PV guests support only few APIC registers and writes to
unsupported registers result in WARN_ONs. Most APIC accesses in these
guests  have been eliminated; however, lapic_suspend/resume are still
called (on 32-bit kernels).

We can disable APIC power management in xen_smp_prepare_boot_cpu()
(which is called after APIC has been initialized).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/include/asm/apic.h
arch/x86/kernel/apic/apic.c
arch/x86/xen/smp.c

index 976b86a325e55cedfd28c029455ddecb2c06b6be..010c52d600de1264d7d01801945a0dbb0605639d 100644 (file)
@@ -628,6 +628,8 @@ extern int default_cpu_present_to_apicid(int mps_cpu);
 extern int default_check_phys_apicid_present(int phys_apicid);
 #endif
 
+extern void apic_pm_deactivate(void);
+
 #endif /* CONFIG_X86_LOCAL_APIC */
 extern void irq_enter(void);
 extern void irq_exit(void);
index dcb52850a28fcbe00a4a25ddf47d6f4ccedf3c9c..fda59d9c8634ba7d3c822076db6e6a46b5df585a 100644 (file)
@@ -2379,6 +2379,11 @@ static void apic_pm_activate(void)
        apic_pm_state.active = 1;
 }
 
+void apic_pm_deactivate(void)
+{
+       apic_pm_state.active = 0;
+}
+
 static int __init init_lapic_sysfs(void)
 {
        /* XXX: remove suspend/resume procs if !apic_pm_state.active? */
@@ -2394,6 +2399,7 @@ core_initcall(init_lapic_sysfs);
 #else  /* CONFIG_PM */
 
 static void apic_pm_activate(void) { }
+void apic_pm_deactivate(void) { }
 
 #endif /* CONFIG_PM */
 
index 86484384492e97d8d41d030bdb78fd0119a8b2cf..6ca5692fd94c6e8c40067e13031535d4468a358f 100644 (file)
@@ -299,6 +299,10 @@ static void __init xen_smp_prepare_boot_cpu(void)
 
                xen_filter_cpu_maps();
                xen_setup_vcpu_info_placement();
+
+#ifdef CONFIG_X86_LOCAL_APIC
+               apic_pm_deactivate();
+#endif
        }
        /*
         * The alternative logic (which patches the unlock/lock) runs before