]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 258859,259081,259085,259205,259213,259275,259482,259537,259702,259779:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 23 Feb 2014 00:46:05 +0000 (00:46 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 23 Feb 2014 00:46:05 +0000 (00:46 +0000)
commit4b77fd689dd22788daac518b3ced870b9c590b5b
tree74c089432fac1660f52a522e3e53195374381e38
parent17e56be1f7eea31d3e7956f0272a6740647cf659
MFC 258859,259081,259085,259205,259213,259275,259482,259537,259702,259779:
Several changes to the local APIC support in bhyve:
- Rename 'vm_interrupt_hostcpu()' to 'vcpu_notify_event()'.
- If a vcpu disables its local apic and then executes a 'HLT' then spin
  down the vcpu and destroy its thread context. Also modify the 'HLT'
  processing to ignore pending interrupts in the IRR if interrupts have
  been disabled by the guest.  The interrupt cannot be injected into the
  guest in any case so resuming it is futile.
- Use callout(9) to drive the vlapic timer instead of clocking it on each
  VM exit.
- When the guest is bringing up the APs in the x2APIC mode a write to the
  ICR register will now trigger a return to userspace with an exitcode of
  VM_EXITCODE_SPINUP_AP.
- Change the vlapic timer lock to be a spinlock because the vlapic can be
  accessed from within a critical section (vm run loop) when guest is using
  x2apic mode.
- Fix the vlapic version register.
- Add a command to bhyvectl to inject an NMI on a specific vcpu.
- Add an API to deliver message signalled interrupts to vcpus. This allows
  callers to treat the MSI 'addr' and 'data' fields as opaque and also lets
  bhyve implement multiple destination modes: physical, flat and clustered.
- Rename the ambiguously named 'vm_setup_msi()' and 'vm_setup_msix()' to
  'vm_setup_pptdev_msi()' and 'vm_setup_pptdev_msix()' respectively.
- Consolidate the virtual apic initialization in a single function:
  vlapic_reset()
- 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.
- Export table entries in the MADT and MP Table advertising the stock x86
  config of LINT0 set to ExtInt and LINT1 wired to NMI.

git-svn-id: svn://svn.freebsd.org/base/stable/10@262350 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
24 files changed:
lib/libvmmapi/vmmapi.c
lib/libvmmapi/vmmapi.h
sys/amd64/include/vmm.h
sys/amd64/include/vmm_dev.h
sys/amd64/vmm/intel/vmx.c
sys/amd64/vmm/io/ppt.c
sys/amd64/vmm/io/ppt.h
sys/amd64/vmm/io/vhpet.c
sys/amd64/vmm/io/vioapic.c
sys/amd64/vmm/io/vlapic.c
sys/amd64/vmm/io/vlapic.h
sys/amd64/vmm/vmm.c
sys/amd64/vmm/vmm_dev.c
sys/amd64/vmm/vmm_lapic.c
sys/amd64/vmm/vmm_lapic.h
sys/amd64/vmm/vmm_msr.c
sys/amd64/vmm/vmm_msr.h
usr.sbin/bhyve/acpi.c
usr.sbin/bhyve/bhyverun.c
usr.sbin/bhyve/mptbl.c
usr.sbin/bhyve/pci_emul.c
usr.sbin/bhyve/pci_emul.h
usr.sbin/bhyve/pci_passthru.c
usr.sbin/bhyvectl/bhyvectl.c