svn commit: r281630 - head/sys/amd64/vmm

Neel Natu neel at FreeBSD.org
Thu Apr 16 22:44:52 UTC 2015


Author: neel
Date: Thu Apr 16 22:44:51 2015
New Revision: 281630
URL: https://svnweb.freebsd.org/changeset/base/281630

Log:
  Relax the check on which vectors can be delivered through the APIC. According
  to the Intel SDM vectors 16 through 255 are allowed to be delivered via the
  local APIC.
  
  Reported by:	Leon Dang (ldang at nahannisys.com)
  MFC after:	2 weeks

Modified:
  head/sys/amd64/vmm/vmm_lapic.c

Modified: head/sys/amd64/vmm/vmm_lapic.c
==============================================================================
--- head/sys/amd64/vmm/vmm_lapic.c	Thu Apr 16 22:35:19 2015	(r281629)
+++ head/sys/amd64/vmm/vmm_lapic.c	Thu Apr 16 22:44:51 2015	(r281630)
@@ -57,7 +57,11 @@ lapic_set_intr(struct vm *vm, int cpu, i
 	if (cpu < 0 || cpu >= VM_MAXCPU)
 		return (EINVAL);
 
-	if (vector < 32 || vector > 255)
+	/*
+	 * According to section "Maskable Hardware Interrupts" in Intel SDM
+	 * vectors 16 through 255 can be delivered through the local APIC.
+	 */
+	if (vector < 16 || vector > 255)
 		return (EINVAL);
 
 	vlapic = vm_lapic(vm, cpu);


More information about the svn-src-all mailing list