svn commit: r291851 - head/sys/x86/x86
Konstantin Belousov
kib at FreeBSD.org
Sat Dec 5 08:52:38 UTC 2015
Author: kib
Date: Sat Dec 5 08:52:37 2015
New Revision: 291851
URL: https://svnweb.freebsd.org/changeset/base/291851
Log:
It seems that at least some KVM versions advertise support for EIO
suppression but the version of the IOAPIC reported is 0x11 and neither
IOAPIC EOIR nor the Linux trick of temporal reprogramming of the pin
to edge-trigger mode to issue EOI work.
Disable eoi suppression if KVM is detected. The mode can still be
forced with the tunable.
Reported and tested by: Roman Mamontov <mr.xanto at gmail.com>
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/x86/x86/local_apic.c
Modified: head/sys/x86/x86/local_apic.c
==============================================================================
--- head/sys/x86/x86/local_apic.c Sat Dec 5 08:46:41 2015 (r291850)
+++ head/sys/x86/x86/local_apic.c Sat Dec 5 08:52:37 2015 (r291851)
@@ -467,10 +467,20 @@ native_lapic_init(vm_paddr_t addr)
* we by default enable suppression even when system only has
* one IO-APIC, since EOI is broadcasted to all APIC agents,
* including CPUs, otherwise.
+ *
+ * It seems that at least some KVM versions report
+ * EOI_SUPPRESSION bit, but auto-EOI does not work.
*/
ver = lapic_read32(LAPIC_VERSION);
if ((ver & APIC_VER_EOI_SUPPRESSION) != 0) {
lapic_eoi_suppression = 1;
+ if (vm_guest == VM_GUEST_VM &&
+ !strcmp(hv_vendor, "KVMKVMKVM")) {
+ if (bootverbose)
+ printf(
+ "KVM -- disabling lapic eoi suppression\n");
+ lapic_eoi_suppression = 0;
+ }
TUNABLE_INT_FETCH("hw.lapic_eoi_suppression",
&lapic_eoi_suppression);
}
More information about the svn-src-head
mailing list