[CORE] Support cacheable & non-cacheable access in vmm_host_memory_xxx() API

Currently, vmm_host_memory_xxx() and vmm_guest_memory_xxx() APIs only
supported cacheable access but in-real life we might also require
non-cacheable access from this APIs. For example, file contents loaded
by "vfs host_load" and "vfs guest_load" commands should be updated
in RAM directly and should not reside in caches.

This patch extends vmm_host_memory_xxx() and vmm_guest_memory_xxx() APIs
to support both cacheable and non-cacheable access.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into A20
[CORE] vmm_devemu: Associate endianess with both data and device emulator

Currently, we associate endianess with only device emulator which not
the complete story.

In future for ARM32VE and ARM64, we might have Guest VCPU running with
endianess different from Xvisor endianess. In this situation, the data
to/from Guest VCPU has an endiness associated with it.

This patch makes endianess handling in vmm_devemu more generic so that
it is easier for us to implement cross-endian virtualization for any
architecture.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into A20
[DRIVERS] net: Fix compile warnings in smc91x driver

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into A20
[CORE] vmm_devtree: Return const pointer from vmm_devtree_attrval() API

The vmm_devtree_attrval() API returns pointer to attribute value of
a device tree node. This pointer has to be const to avoid accidental
updates to attribute value thereby reducing potential buggy use of
vmm_devtree_attrval() API.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_devtree: Introduce APIs for safe access to attribute values

Currently, we only had vmm_devtree_attrval() API for accessing node
attribute values as "const void *". This function returns const pointer
hence avoids prevents updates to attribute value at compile time but
this does not prevent illegal/out-of-bound reads to attribute values.

This patch introduces a wide range of APIs for safe access to node
attribute values there-by providing us a way to further improve
attribute value access from various parts of Xvisor.

Signed-off-by: Anup Patel <anup@brainfault.org>
[LIBS] Use appropriate node attribute access API where applicable

We replace use of vmm_devtree_attrval() API with appropriate
node attribute access API wherever applicable.

Signed-off-by: Anup Patel <anup@brainfault.org>
[EMULATORS] Use appropriate node attribute access API where applicable

We replace use of vmm_devtree_attrval() API with appropriate
node attribute access API wherever applicable.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Use appropriate node attribute access API where applicable

We replace use of vmm_devtree_attrval() API with appropriate
node attribute access API wherever applicable.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARCH] Use appropriate node attribute access API where applicable

We replace use of vmm_devtree_attrval() API with appropriate
node attribute access API wherever applicable.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into A20
[COMMANDS] Use appropriate node attribute access API where applicable

We replace use of vmm_devtree_attrval() API with appropriate
node attribute access API wherever applicable.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DAEMONS] Use appropriate node attribute access API where applicable

We replace use of vmm_devtree_attrval() API with appropriate
node attribute access API wherever applicable.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Use appropriate node attribute access API where applicable

We replace use of vmm_devtree_attrval() API with appropriate
node attribute access API wherever applicable.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] net: Simplify and optimize software bridge

Currently, we use linked-list based mac table and spin lock
for protecting mac table which is sub-optimal.

This patch makes mac table array based and we use rwlock for
protecting mac table so that we mostly take read lock on mac
table in bridge_rx_handler() there-by considerably reducing
lock contention in bridge_rx_handler().

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into A20
[DRIVERS] ide: Code cleanups and coverity scan bug fixes

This patch mostly does code cleanups to make IDE driver coding style
look like other parts of Xvisor.

We also fix following issues reported by coverity scan:
CID 1170861 Logically dead code
CID 1170854 Uninitialized scalar variable
CID 1170853 Uninitialized scalar variable
CID 1170852 Uninitialized scalar variable
CID 1170851 Uninitialized scalar variable
CID 1170850 Uninitialized scalar variable
CID 1170849 Uninitialized scalar variable

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] input: Check dev parameter in input_reset_device() before use

This patch fixes issues "CID 1170855 Dereference before null check"
reported by coverity scan.

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