Date: Sat, 5 Dec 2015 08:52:37 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291851 - head/sys/x86/x86 Message-ID: <201512050852.tB58qbW9091471@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512050852.tB58qbW9091471>