KVM/MIPS: GIC emulation for SMP guests

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
---
Changes in v2:

*) Limit GCMP address space to 4K so that it does overlap with the boot ROM @
   0x1fc00000. This wasn't causing an issue in earlier releases of QEMU.
KVM/MIPS: add save/restore state APIs for saving/restoring KVM guests

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: do not start the periodic timer in KVM modes

Compare/Count timer interrupts are handled in-kernel.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: in KVM mode inject IRQ2 (I/O) interupts via ioctls()

COP0 emulation is in-kernel.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: define APIs to convert Guest KSEG0 <-> Guest Physical addresses

In trap and emulate mode both the guest kernel and guest userspace execute in UM:

  Guest User address space:   0x00000000 -> 0x40000000
  Guest Kernel Unmapped:      0x40000000 -> 0x60000000
  Guest Kernel Mapped:        0x60000000 -> 0x80000000

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
[RFC] KVM/MIPS: QEMU <-> Kernel interface for KVM/MIPS

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: enable KVM/MIPS for MIPS targets

Add MIPS GIC code to the build.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: set sigmask length to 16 for MIPS targets

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: set page size to 16K in KVM mode

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: MIPS specfic APIs for KVM

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
KVM/MIPS: General KVM support and support for SMP Guests

- In KVM mode the bootrom is loaded and executed from the last 1MB of DRAM.
- Use the CPS bootrom from MIPS in KVM mode. This allows bootstrapping of multiple cores.
- Add suport for MIPS GIC emulation for SMP Guests.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>