From 4fe75f186071555dfd14233ef4f7690285598706 Mon Sep 17 00:00:00 2001 From: neel Date: Thu, 16 Apr 2015 22:44:51 +0000 Subject: 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@nahannisys.com) MFC after: 2 weeks --- sys/amd64/vmm/vmm_lapic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/amd64') diff --git a/sys/amd64/vmm/vmm_lapic.c b/sys/amd64/vmm/vmm_lapic.c index 15a995e..6bccd32 100644 --- a/sys/amd64/vmm/vmm_lapic.c +++ b/sys/amd64/vmm/vmm_lapic.c @@ -57,7 +57,11 @@ lapic_set_intr(struct vm *vm, int cpu, int vector, bool level) 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); -- cgit v1.1