aboutsummaryrefslogtreecommitdiff
path: root/tests/prom-env-test.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2019-03-12 16:07:14 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-03-12 16:07:14 +1100
commitba3b40de424304c497ca4ff990dd24e37aff5f5b (patch)
tree1e6d8cc542e590bd00c90cb6d0a3114189dd8ea5 /tests/prom-env-test.c
parentce2918cbc31e190e7d644c684dcc2bbcb6b9a9df (diff)
downloadqemu-ba3b40de424304c497ca4ff990dd24e37aff5f5b.zip
qemu-ba3b40de424304c497ca4ff990dd24e37aff5f5b.tar.gz
qemu-ba3b40de424304c497ca4ff990dd24e37aff5f5b.tar.bz2
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.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
index 4821254..61bc1d1 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,