[CORE] Add vmm_host_vapool_isvalid() helper API.

This patch adds vmm_host_vapool_isvalid() API which can help
us check for valid virtual addresses at various places in Xvisor code.

This API is mostly for debugging and sanity checks.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Early sanity check for not allowing invalid virtual address

This patch adds sanity check in Guest VCPU fault handlers for
early detection of Guest VCPU trying to access hypervisor virtual
address space.

This check was already being done by cpu_vcpu_cp15_perm_fault() but
this patch helps us detect this Guest VCPU misbehaviour even before
it reaches cpu_vcpu_cp15_perm_fault() via permission fault.

Signed-off-by: Anup Patel <anup@brainfault.org>
[TOP] Explicitly prevent creation of .note.gnu.build-id section

Some versions of gcc/ld might have creation of .not.gnu.build-id turned-on
by default. So we explicitly tell ld not to do so.

Signed-off-by: Sukanto Ghosh <sukantoghosh@gmail.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Fix readq and writeq

Signed-off-by: Sukanto Ghosh <sukantoghosh@gmail.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
[LIBS] Explicitly initialize __atomic_hash to all zeroes

We depend on the behavior that __atomic_hash is initialized to zeroes.
This patch explicitly does that.

Signed-off-by: Sukanto Ghosh <sukantoghosh@gmail.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Fix busybox documentation

Signed-off-by: Sukanto Ghosh <sukantoghosh@gmail.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
[DOCS] fast_model_boot.S: Pass the input-binary as IMAGE macro

So far we had fixed binary 'fast_model_boot.img' being included in the
Fast-Model boot code. This patch removes the limitation by having the binary
passed as macro IMAGE  (-DIMAGE=<input-binary-path> while compiling)

Signed-off-by: Sukanto Ghosh <sukantoghosh@gmail.com>
[DOCS] fast_model_boot.S: Optionally pass a fixed-up device-tree blob

As Xvisor arm32ve port now supports boot-loader provided device-tree
blob, we add an option to pass the same in fast_model_boot.S (as
-DTB=<path-to-dtb>). Please note that no dtb fixup is done.

Signed-off-by: Sukanto Ghosh <sukantoghosh@gmail.com>
[LIBS] add strnlen and strlcat functions

strlcat is a safer strncat version and its implementation
requires strnlen.

strlcat will be used to fix a number of problem in Xvisor
source tree.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_fb.h: fix small bug in header.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_fbmon: remove useless code.

Problem notified by Coverity Scan

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_buddy: use strlcpy instead of strncpy.

This guaranty a trailing 0 a the end of string.

We also change the initial test to something more meaningfull.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_blockdev: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_fbmem.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_input.c: use strlcpy instead of strncpy.

We also replace vmm_malloc/memset with vmm_zalloc

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_net_bridge.c: don't use pointer before they are tested.

We were using a pointer before it was tested for NULL.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_netport.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_netswitch.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_rtcdev.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_cmdmgr.c: ret variable might be used uninitialized.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>