VMM: Sync halting GPCs and interrupt injection
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 20 Jun 2016 20:48:57 +0000 (16:48 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 24 Jun 2016 18:24:06 +0000 (14:24 -0400)
commit5bb3ad6e5867368331f09c82ec063912e881330e
tree8c3b95d8b8e3ddef0c849ae56f75505f5451e630
parentd37288a0c653166f7bbf0af72caeefd74d654a5b
VMM: Sync halting GPCs and interrupt injection

Previously, halts and mwaits were just immediately returning.  This led to
the guest spinning while waiting on console I/O.  You could see this if you
ran 'ps' while the VM was running.

Now when we send interrupts, we synchronize with the halting guest thread,
such that the guest can halt until it receives an IRQ.  Everyone who wants
to send an IRQ (vector!) to a guest pcore must use vmm_interrupt_guest().

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/vmm/vmrunkernel.c
user/vmm/include/vmm/sched.h
user/vmm/include/vmm/vmm.h
user/vmm/sched.c
user/vmm/vmexit.c
user/vmm/vmm.c [new file with mode: 0644]