Date: Mon, 16 Jun 2014 22:59:18 +0000 (UTC) From: Tycho Nightingale <tychon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267558 - head/sys/amd64/vmm/intel Message-ID: <201406162259.s5GMxIoq079308@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tychon Date: Mon Jun 16 22:59:18 2014 New Revision: 267558 URL: http://svnweb.freebsd.org/changeset/base/267558 Log: Bring an overly enthusiastic KASSERT inline with the Intel SDM. Reviewed by: neel Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Mon Jun 16 21:37:16 2014 (r267557) +++ head/sys/amd64/vmm/intel/vmx.c Mon Jun 16 22:59:18 2014 (r267558) @@ -1258,12 +1258,28 @@ vmx_inject_interrupts(struct vmx *vmx, i /* Ask the local apic for a vector to inject */ if (!vlapic_pending_intr(vlapic, &vector)) return; + + /* + * From the Intel SDM, Volume 3, Section "Maskable + * Hardware Interrupts": + * - maskable interrupt vectors [16,255] can be delivered + * through the local APIC. + */ + KASSERT(vector >= 16 && vector <= 255, + ("invalid vector %d from local APIC", vector)); } else { /* Ask the legacy pic for a vector to inject */ vatpic_pending_intr(vmx->vm, &vector); - } - KASSERT(vector >= 32 && vector <= 255, ("invalid vector %d", vector)); + /* + * From the Intel SDM, Volume 3, Section "Maskable + * Hardware Interrupts": + * - maskable interrupt vectors [0,255] can be delivered + * through the INTR pin. + */ + KASSERT(vector >= 0 && vector <= 255, + ("invalid vector %d from INTR", vector)); + } /* Check RFLAGS.IF and the interruptibility state of the guest */ rflags = vmcs_read(VMCS_GUEST_RFLAGS);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406162259.s5GMxIoq079308>