Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Sep 2016 06:08:21 +0000 (UTC)
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r306481 - head/sys/x86/x86
Message-ID:  <201609300608.u8U68LHd090123@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sephe
Date: Fri Sep 30 06:08:21 2016
New Revision: 306481
URL: https://svnweb.freebsd.org/changeset/base/306481

Log:
  x86/ioapic: Fix destination cpu for Hyper-V
  
  On Hyper-V:
  - Stick to the first cpu for all I/O APIC pins.
  - And don't allow destination cpu changes.
  
  Reviewed by:	jhb
  MFC after:	1 week
  Sponsored by:	Microsoft
  Differential Revision:	https://reviews.freebsd.org/D7949

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

Modified: head/sys/x86/x86/io_apic.c
==============================================================================
--- head/sys/x86/x86/io_apic.c	Fri Sep 30 05:51:11 2016	(r306480)
+++ head/sys/x86/x86/io_apic.c	Fri Sep 30 06:08:21 2016	(r306481)
@@ -412,6 +412,18 @@ ioapic_assign_cpu(struct intsrc *isrc, u
 	u_int old_id;
 
 	/*
+	 * On Hyper-V:
+	 * - Stick to the first cpu for all I/O APIC pins.
+	 * - And don't allow destination cpu changes.
+	 */
+	if (vm_guest == VM_GUEST_HV) {
+		if (intpin->io_vector)
+			return (EINVAL);
+		else
+			apic_id = 0;
+	}
+
+	/*
 	 * keep 1st core as the destination for NMI
 	 */
 	if (intpin->io_irq == IRQ_NMI)



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