Extend the support for local interrupts on the local APIC:
authorjhb <jhb@FreeBSD.org>
Mon, 23 Dec 2013 19:29:07 +0000 (19:29 +0000)
committerjhb <jhb@FreeBSD.org>
Mon, 23 Dec 2013 19:29:07 +0000 (19:29 +0000)
commit8ab82a5fe13e26cddefae4b3e57d3c2d8baf2b20
tree1bf0f6e72b82932012864d660cbc802885ec7efd
parent4cd7151fa0d6497a4048c615ac13730233856a4f
Extend the support for local interrupts on the local APIC:
- Add a generic routine to trigger an LVT interrupt that supports both
  fixed and NMI delivery modes.
- Add an ioctl and bhyvectl command to trigger local interrupts inside a
  guest.  In particular, a global NMI similar to that raised by SERR# or
  PERR# can be simulated by asserting LINT1 on all vCPUs.
- Extend the LVT table in the vCPU local APIC to support CMCI.
- Flesh out the local APIC error reporting a bit to cache errors and
  report them via ESR when ESR is written to.  Add support for asserting
  the error LVT when an error occurs.  Raise illegal vector errors when
  attempting to signal an invalid vector for an interrupt or when sending
  an IPI.
- Ignore writes to reserved bits in LVT entries.
- Export table entries the MADT and MP Table advertising the stock x86
  config of LINT0 set to ExtInt and LINT1 wired to NMI.

Reviewed by: neel (earlier version)
lib/libvmmapi/vmmapi.c
lib/libvmmapi/vmmapi.h
sys/amd64/include/vmm_dev.h
sys/amd64/vmm/io/vlapic.c
sys/amd64/vmm/io/vlapic.h
sys/amd64/vmm/vmm_dev.c
sys/amd64/vmm/vmm_lapic.c
sys/amd64/vmm/vmm_lapic.h
usr.sbin/bhyve/acpi.c
usr.sbin/bhyve/mptbl.c
usr.sbin/bhyvectl/bhyvectl.c