kvm: x86: Add support for segment setup in virtual 8086 mode

VMX has some special requirements on the segment registers when
setting up the virtual 8086 mode. This changeset adds code to transfer
registers the same way as qemu does it when in virtual 8086 mode.
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: Fix segment limit transfer

It seems like gem5 stores segment limits as the actual limit in
memory, i.e., base + segment size. A real x86 on the other hand stores
the limit as the size of the segment. Since kvm expects a "real" limit
value, we need to convert it before transfering it to kvm. This
changeset adds the necessary conversions.

a "real" limit before t
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().