x86: vmm: Use a separate vector for posted IRQs
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 23 Aug 2017 14:27:18 +0000 (10:27 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 25 Aug 2017 18:41:49 +0000 (14:41 -0400)
commit84b60db830c9431767325f19f31746e4faea0520
tree6cb6abbe6f6cc605f071c5f1cbfb905ab1692106
parent193d2642c9d53363ef24082e6f3a006666e51f72
x86: vmm: Use a separate vector for posted IRQs

We were using I_POKE_CORE, but we actually need two separate IRQs.
Sometimes we actually want to kick the core into the kernel, but if we use
the posted IRQ vector and the core was running a guest, we wouldn't kick
the core.

I looked into this because of mpstat.  It'll send IPIs to force a cpu state
change / reevaluation.  But if the guest was spinning or halted, the POKE
would have no effect.

This also is just a little clearer in the code where we are trying to do a
posted IRQ and where we are just trying to kick the core.

Note that mpstat is a little racy.  We could make it better, but I'd like
to keep the ability to not interfere with the CG cores.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/riscv/trap.h
kern/arch/x86/process64.c
kern/arch/x86/trap.c
kern/arch/x86/trap.h
kern/arch/x86/trapentry64.S
kern/arch/x86/vmm/intel/vmx.c
kern/arch/x86/vmm/vmm.c
kern/src/schedule.c