diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2019-03-12 16:07:14 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-03-12 16:07:14 +1100 |
commit | ba3b40de424304c497ca4ff990dd24e37aff5f5b (patch) | |
tree | 1e6d8cc542e590bd00c90cb6d0a3114189dd8ea5 /tests/prom-env-test.c | |
parent | ce2918cbc31e190e7d644c684dcc2bbcb6b9a9df (diff) |
Suppress test warnings about missing Spectre/Meltdown mitigations with TCG
The new pseries-4.0 machine type defaults to enabling Spectre/Meltdown
mitigations. Unfortunately those mitigations aren't implemented for TCG
because we're not yet sure if they're necessary or how to implement them.
We don't fail fatally, but we do warn in this case, because it is quite
plausible that Spectre/Meltdown can be exploited through TCG (at least for
the guest to get access to the qemu address space).
This create noise in our testcases though. So, modify the affected tests
to explicitly disable the mitigations to suppress these warnings.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/prom-env-test.c')
-rw-r--r-- | tests/prom-env-test.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c index 4821254b7e..61bc1d1e7b 100644 --- a/tests/prom-env-test.c +++ b/tests/prom-env-test.c @@ -44,11 +44,18 @@ static void check_guest_memory(QTestState *qts) static void test_machine(const void *machine) { - const char *extra_args; + const char *extra_args = ""; QTestState *qts; - /* The pseries firmware boots much faster without the default devices */ - extra_args = strcmp(machine, "pseries") == 0 ? "-nodefaults" : ""; + /* + * The pseries firmware boots much faster without the default + * devices, it also needs Spectre/Meltdown workarounds disabled to + * avoid warnings with TCG + */ + if (strcmp(machine, "pseries") == 0) { + extra_args = "-nodefaults" + " -machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken"; + } qts = qtest_initf("-M %s,accel=tcg %s -prom-env 'use-nvramrc?=true' " "-prom-env 'nvramrc=%x %x l!' ", (const char *)machine, |