[CORE] vmm_host_irq: Add a special flag for host-to-guest routed irqs

This patch adds a special per-host-irq flag to represent host-to-guest
routed irqs. The arch specific HW assisted PIC emulators (e.g. VGIC)
can use this per-host-irq flag to mark host irqs that are routed to
guest. The host PIC driver (e.g. GIC) can also check this flag to
handle host-to-guest routed irqs differently.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] vgic: First-cut implementation of host-to-guest irq routing

This patch introduces host-to-guest irq routing for VGIC. This
implementation does not break existing functionality of VGIC.

We still need to do more testing for host-to-guest irq routing
implemented by this patch hence it is still work-in-progress.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_percpu: Make sure __percpu_offset[] table is zero initialized

We use __percpu_offset[] table which hold relative offset of percpu section
for each host CPU. The this_cpu() and per_cpu() macros depend on this
__percpu_offset[] table for getting percpu variables.

It is quite possible the __percpu_offset[] table is accessed even before
vmm_percpu_init() hence this patch ensures that it is zero initialized
at boot-time by moving it to .bss section.

Tested-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into imx6
[ARM] vgic: Treat host-to-guest routed irqs as edge-triggered

When we route host irq to guest irq:
1. We first take regular host interrupt in VGIC (i.e. vgic_routed_irq())
2. Next we determine the mapped guest irq in vgic_routed_irq()
3. Once we know the guest irq, we first lower the guest irq level
(to ensure previously raised guest irq is cleared) and then raise
the guest irq level (to ensure fresh interrupt is triggered)

Now if we treat host-to-guest irq as level-triggered then above
describe process will not work because __vgic_sync_vcpu_hwstate()
will again mark it pending before next host interrupt. To avoid
this situation we treat host-to-guest irq as edge-triggered so
that __vgic_sync_vcpu_hwstate() will not mark it pending.

Th above also apply to generic timer interrupts hence we also
treat all PPIs as edge-triggered.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_scheduler: Add new API vmm_scheduler_idle_vcpu()

This patch adds a new API vmm_scheduler_idle_vcpu() to determine
the idle VCPU for a give host CPU.

This new API will be very useful for load-balancing alogs who
require to sample the time spend by host CPU in idle state.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into imx6