Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2020 21:34:52 +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: r359093 - head/sys/x86/x86
Message-ID:  <202003182134.02ILYqVF029932@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Mar 18 21:34:52 2020
New Revision: 359093
URL: https://svnweb.freebsd.org/changeset/base/359093

Log:
  Do not spuriously re-enable disabled io_apic pin on EOI for some configurations.
  
  If EOI suppression is supported but reported ioapic version is so old
  that it does not has EOI register (weird virtualization setup), fix
  Intel trick of eoi-ing by flipping pin type (edge/level) to account
  for the disabled pin.
  
  Reported by:	Juniper
  Reviewed by:	jhb
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks
  Differential revision:	https://reviews.freebsd.org/D23965

Modified:
  head/sys/x86/x86/io_apic.c

Modified: head/sys/x86/x86/io_apic.c
==============================================================================
--- head/sys/x86/x86/io_apic.c	Wed Mar 18 21:31:35 2020	(r359092)
+++ head/sys/x86/x86/io_apic.c	Wed Mar 18 21:34:52 2020	(r359093)
@@ -193,8 +193,11 @@ _ioapic_eoi_source(struct intsrc *isrc, int locked)
 		low1 |= IOART_TRGREDG | IOART_INTMSET;
 		ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
 		    low1);
+		low1 = src->io_lowreg;
+		if (src->io_masked != 0)
+			low1 |= IOART_INTMSET;
 		ioapic_write(io->io_addr, IOAPIC_REDTBL_LO(src->io_intpin),
-		    src->io_lowreg);
+		    low1);
 		if (!locked)
 			mtx_unlock_spin(&icu_lock);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003182134.02ILYqVF029932>