[COMMANDS] vfs: Extend fdt_load command to override node attributes

This patch extends "vfs fdt_load" command to take additional
optional paramenters to override attribute values of nodes
specified via "aliases" node of guest device tree.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_main: Fix compile warning when !CONFIG_RTC

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Add aliases for all arm32 and arm64 guests

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Further simplify pre-configured guest creation

This patch further simplifies per-configured guest creation by
using alias node update feature of "vfs fdt_load" command.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Call Arch specific functions for region add/delete

When region_add/region_del is called, call an architecture
specific functions. These function can do any architecture
related initialization or VM configuration for a given
region.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[CORE] Do arch_guest_init before guest aspace init.

The purpose of arch_guest_init is to prepare the
guest's architecture specific constructs. This might
include the state data structures. During the address
space init, new regions are added which modify or add
to the guest states. Since currently the arch_guest_init
is called after aspace init, the state structures aren't
created by this time. Hence need to move the arch_guest_init
before address space init.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[ARM] vgic: Increase max IRQ per-guest to 256

Quite a few guest including VExpress-A9 and VExpress-A15 have more
than 128 interrupts so far most of them were not used but latest
linux kernel uses interrupts beyond 128 hence this patch increases
max IRQ per-guest for VGIC to 256.

Signed-off-by: Anup Patel <anup@brainfault.org>
[EMULATORS] l2x0: Ignore writes to all lockdown registers

The l2x0 emulates PL310, PL020, and PL021. Among these, PL310
have 16 lock-down registers. This patch extends l2x0 to
ignore all 16 lock-down registers of PL310.

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Provide Linux-3.16 defconfig for all ARM guests

The Linux ARM kernel have matured a lot in-terms of DT-support.

This patch removes defconfigs of older kernels and adds linux-3.16
defconfig for all ARM guests using DT-support wherever possible.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] emulate_arm: Treate cache preload instructions as NOPs

The latest 3.16 kernel used PLDW instruction in spinlock implementation.

Unfortunately, on latest QEMU this instruction give undefined exception
for Cortex-A8 (i.e. UP ARMv7 host) which is very strange because the
ARMv7 architecture reference manual does not tell that PLDW instructions
are only available fo ARMv7MP.

Using this patch, we treate all preload instructions as NOPs in
ARM instruction emulation. This way if preload instruction trap
in Xvisor then we simply/safely ignore it.

Signed-off-by: Anup Patel <anup@brainfault.org>
[LIBS] Add function to provide muldiv operation.

Add function to compute 96-bit intermediate result of
 muldiv [(a*b)/c] operation.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[COMMANDS] Add sub-commands orphan_list and normal_list to vcpu command

This patch adds separate sub-commands under vcpu command to list Orphan
and Normal VCPUs.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_workqueue: Have separate syswq for each host CPU

Currently, the syswq is just a single thread with default priority
which can be scheduled on any host CPU. This means if syswq is
running on host CPUx and host CPUy schedules some work on syswq
then it will cause an IPI to wakeup syswq running on host CPUx.
There will lot of syswq wakeup IPIs if many subsystems start
using syswq as bottom-half.

This patch creates separate syswq each host CPU. Now if some
entity schedules work-on syswq then it will be acutally scheduled
on the syswq thread of the host CPU scheduling the work.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_workqueue: Minor improvements to vmm_workqueue_schedule_work()

Signed-off-by: Anup Patel <anup@brainfault.org>
[x86] Narrow the Uart region for guest.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Use arch_guest_region_add/delete

Use arch_guest_region_add/delete to enable/disable
IO intercept when an IO region is probed.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Use arch guest add region to save guest allocated memory.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] [REGRESSION] Fix x86 boot - current broken.

After commit-id 0d657917805ae29e43d0adbbaceabd81d99f0471
x86 was broken. Since now FDT is kept in big endian
format irrespective of the native endianness, its important
to specify the attribute sizes.

ACPI tables report addresses in u32, the code was setting
the phys_addr value with size of u32. Since native word
size is 8 bytes, during read of the attribute, endianess
conversion is done only on 4 bytes returning 0 as physical
address.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Suppress compilation warning in i440fx.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86][DOCS] Adding CMOS map as seen by BIOS.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>