diff options
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/vmm/vmm_lapic.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |