The errata framework doesn't work with kvmtool, so just live dangerously and force all tests to run. Cc: Alexandru Elisei <alexandru.elisei@xxxxxxx> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx> --- configure | 3 +++ lib/errata.h | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 30112a812d0b..e6b4ca1015bb 100755 --- a/configure +++ b/configure @@ -17,6 +17,7 @@ pretty_print_stacks=yes environ_default=yes u32_long= vmm="qemu" +errata_force=0 usage() { cat <<-EOF @@ -118,6 +119,7 @@ elif [ "$arch" = "arm" ] || [ "$arch" = "arm64" ]; then arm_uart_early_addr=0x09000000 elif [ "$vmm" = "kvmtool" ]; then arm_uart_early_addr=0x3f8 + errata_force=1 else echo '--vmm must be one of "qemu" or "kvmtool"!' usage @@ -226,6 +228,7 @@ if [ "$arch" = "arm" ] || [ "$arch" = "arm64" ]; then cat <<EOF >> lib/config.h #define CONFIG_UART_EARLY_BASE ${arm_uart_early_addr} +#define CONFIG_ERRATA_FORCE ${errata_force} EOF fi diff --git a/lib/errata.h b/lib/errata.h index f3ebca2d8a6c..5af0eb3bf8e2 100644 --- a/lib/errata.h +++ b/lib/errata.h @@ -6,6 +6,11 @@ */ #ifndef _ERRATA_H_ #define _ERRATA_H_ +#include "config.h" + +#ifndef CONFIG_ERRATA_FORCE +#define CONFIG_ERRATA_FORCE 0 +#endif #define _ERRATA(erratum) errata("ERRATA_" # erratum) #define ERRATA(erratum) _ERRATA(erratum) @@ -15,8 +20,12 @@ static inline bool errata_force(void) { - char *s = getenv("ERRATA_FORCE"); + char *s; + + if (CONFIG_ERRATA_FORCE == 1) + return true; + s = getenv("ERRATA_FORCE"); return s && (*s == '1' || *s == 'y' || *s == 'Y'); } -- 2.18.1