[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>
[ARM] optimize defterm implementation

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[ARM] move SCU symbols to local/static

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[ARM] move smp_operation data structure to local/static.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[ARM] vgic: Minor fixes for host-to-guest irq routing

This patch gets host-to-guest irq routing working on ARM fast model
by few minor fixes in __vgic_queue_irq().

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] generic: Add sample DTS for host-to-guest irq routing

This patch adds a sample DTS file for host-to-guest irq routing
on ARM fast model.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Depricate traditional round-robin schedalgo

The traditional round-robin schedalgo (i.e. vmm_schedalgo_rr) did not
honor the VCPU priorities hence is of less use in real-life.

In Xvisor, all schedalgo's must honor the VCPU priorities for proper
functioning of the hypervisor hence this patch depricates/removes the
traditional round-robin schedalgo.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Make host_physical_addr optional for alloced_rom & alloced_ram

For alloced_rom and alloced_ram regions we allocate host RAM when
creating the guest aspace hence "host_physical_addr" attribute is
not required for alloced_rom and alloced_ram regions. This patch
makes this thing more explicit in the vmm_guest_aspace implementation.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Use alloced_rom and alloced_ram instead of rom and ram

Currently, we use reserved rom and ram regions for all types of
ARM guests hence we have to explicitly specify host physical
address of these resered rom and ram regions. This in-turn
makes guest creation process bit more complex then it should be.

This patch replaces reserved rom and ram regions with alloced
rom and ram regions. As a result of this patch, the guest
creation process for all types of ARM guests is much more
simplified with less commands.

Signed-off-by: Anup Patel <anup@brainfault.org>
[LIBS] libfdt: Make libfdt_parse_devtree() more flexible

This patch makes libfdt_parse_devtree() API more flexible so that
it can be used to populate entire sub-trees from FDT under specified
device tree path.

Signed-off-by: Anup Patel <anup@brainfault.org>
[COMMANDS] vfs: Add fdt_load sub-command

This patch adds fdt_load sub-command to vfs command.

This new sub-command can be used to load FDT file as sub-tree
under given path of device tree.

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Add DTS files for various ARM guest types

With the new "vfs fdt_load" command we can create device tree
for guest instance form FDT file (i.e. DTB file) hence this
patch adds DTS files for all types of ARM guests and also
updates Xvisor disk image creation to include guest layout
DTB file.

Signed-off-by: Anup Patel <anup@brainfault.org>