kvm: x86: Adjust PC to remove the CS segment base address

gem5 seems to store the PC as RIP+CS_BASE. This is not what KVM
expects, so we need to subtract CS_BASE prior to transfering the PC
into KVM. This changeset adds the necessary PC manipulation and
refactors thread context updates slightly to avoid reading registers
multiple times from KVM.
kvm: x86: Add support for x86 INIT and STARTUP handling

This changeset adds support for INIT and STARTUP IPI handling. We
currently handle both of these interrupts in gem5 and transfer the
state to KVM. Since we do not have a BIOS loaded, we pretend that the
INIT interrupt actually suspends the CPU after reset.
x86: Add support for IPIs sent between event queues

This changeset adds support for IPI delivery across parallel event
queues. The current implementation uses opportunistic events to
deliver the IPI "as soon as possible".
kvm: Add support for context control from other threads

We normally assume that wakeup(), activateContext(), suspendContext()
et al. are called from the same event queue as the one running the
CPU. This is no longer true when simulating multicore CPUs using KVM.
This changeset adds the neccessary support using opportunistic events
to handle communication between event queues.
kvm: Lock the event queue runing the VM when doing IO

In order to support multiple CPUs running in the same VM, we need to
lock the event queue simulating devices when performing an IO. This
ensures that only one CPU ever accesses devices at a time. We
implement this by making the VM support the basic locking protocol by
forwarding it to its event queue. This implies that VMs and devices
must live in the same event queue.
kvm: Initialize signal handlers from startupThread()

Signal handlers in KVM are controlled per thread and should be
initialized in the right thread. This changeset moves the
initialization call from startup() to startupThread().
kvm: x86: Always assume segments to be usable

When transfering segment registers into kvm, we need to find the value
of the unusable bit. We used to assume that this can be inferred from
the selector since segments are generally unusable if their selector
is 0. This doesn't work in practice due to some weird corner cases.
Instead, just assume that segments are always usable. This is what
qemu does so it should work.