Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Sep 2019 13:47:35 +0000 (14:47 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Sep 2019 13:47:35 +0000 (14:47 +0100)
Pull x86 fixes from Ingo Molnar:
 "A KVM guest fix, and a kdump kernel relocation errors fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/timer: Force PIT initialization when !X86_FEATURE_ARAT
  x86/purgatory: Change compiler flags from -mcmodel=kernel to -mcmodel=large to fix kexec relocation errors

1  2 
arch/x86/kernel/apic/apic.c

index aa5495d0f47832fbc02d102a8fb66180a550b6e9,f91b3ff9dc03b98adb1096d0d6f69c3631f5a7e6..08fb79f377936c7725af66bf7bdeaf8f94c70c02
@@@ -834,6 -834,10 +834,10 @@@ bool __init apic_needs_pit(void
        if (!boot_cpu_has(X86_FEATURE_APIC))
                return true;
  
+       /* Virt guests may lack ARAT, but still have DEADLINE */
+       if (!boot_cpu_has(X86_FEATURE_ARAT))
+               return true;
        /* Deadline timer is based on TSC so no further PIT action required */
        if (boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
                return false;
@@@ -1179,6 -1183,10 +1183,6 @@@ void clear_local_APIC(void
        apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
        v = apic_read(APIC_LVT1);
        apic_write(APIC_LVT1, v | APIC_LVT_MASKED);
 -      if (!x2apic_enabled()) {
 -              v = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
 -              apic_write(APIC_LDR, v);
 -      }
        if (maxlvt >= 4) {
                v = apic_read(APIC_LVTPC);
                apic_write(APIC_LVTPC, v | APIC_LVT_MASKED);