hyperv/vmbus: Complete vmbus initialization; interrupt cputimer is enabled
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 13 Jun 2016 01:58:01 +0000 (09:58 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 16 Jun 2016 02:12:49 +0000 (10:12 +0800)
commite3c41896e9aa173644cc1e67e218562bae1ea69f
tree2befb185b2531d3ef5a0d7f4909be544a6199f85
parent42098fc3d098a14b8a0137565e72f24aef743c67
hyperv/vmbus: Complete vmbus initialization; interrupt cputimer is enabled

Most of the bits are obtained from FreeBSD.  However, The interrupt bits
are reworked:
- Since the vmbus message/event interrupt works in the same fashion as
  MSI-X, we just allocate MSI-X for them, instead of allocating IDT
  vector, rolling vmbus own interrupt vector and turning the interrupt
  handling inside-out.  The standard and generic bus APIs are used to
  allocate and setup per-cpu vmbus interrupt.
- Interrupt cputimer reuses the current per-cpu interrupt timer code.
- AutoEOI is not used, since we reuse the per-cpu interrupt timer IDT
  vector and MSI IDT vector.  After a brief discussion w/ Dexuan Cui,
  I concluded that AutoEOI probably does not provide noticible performance
  improvement but will introduce extra code complexity.  We leave it off
  for now.

Obtained-from: FreeBSD (mostly)
13 files changed:
sys/dev/virtual/hyperv/include/hyperv_busdma.h [copied from sys/dev/virtual/hyperv/vmbus/hyperv_var.h with 71% similarity]
sys/dev/virtual/hyperv/vmbus/Makefile
sys/dev/virtual/hyperv/vmbus/hyperv.c
sys/dev/virtual/hyperv/vmbus/hyperv_busdma.c [copied from sys/dev/virtual/hyperv/vmbus/hyperv_var.h with 57% similarity]
sys/dev/virtual/hyperv/vmbus/hyperv_machdep.h [copied from sys/dev/virtual/hyperv/vmbus/hyperv_var.h with 82% similarity]
sys/dev/virtual/hyperv/vmbus/hyperv_var.h
sys/dev/virtual/hyperv/vmbus/vmbus.c
sys/dev/virtual/hyperv/vmbus/vmbus_reg.h [new file with mode: 0644]
sys/dev/virtual/hyperv/vmbus/vmbus_var.h [new file with mode: 0644]
sys/dev/virtual/hyperv/vmbus/x86_64/hyperv_machdep.c [copied from sys/dev/virtual/hyperv/vmbus/hyperv_var.h with 71% similarity]
sys/platform/pc64/include/msi_machdep.h
sys/platform/pc64/x86_64/msi.c
sys/sys/systimer.h