qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

pseries: disable migration-test if /dev/kvm cannot be used

On ppc64, migration-test only works with kvm_hv, and we already
have a check to verify the module is loaded.

kvm_hv module can be loaded in memory and /sys/module/kvm_hv exists,
but on some systems (like build systems) /dev/kvm can be missing
(by administrators choice).

And as kvm_hv exists test-migration is started but QEMU falls back to
TCG because it cannot be used:

Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator

And as the test is done with TCG, it fails.

As for s390x, we must check for the existence and the access rights
of /dev/kvm.

Reported-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20191120170955.242900-1-lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

authored by

Laurent Vivier and committed by
Thomas Huth
1ee5e144 eca3a945

+2 -1
+2 -1
tests/migration-test.c
··· 1349 1349 * some reason) 1350 1350 */ 1351 1351 if (g_str_equal(qtest_get_arch(), "ppc64") && 1352 - access("/sys/module/kvm_hv", F_OK)) { 1352 + (access("/sys/module/kvm_hv", F_OK) || 1353 + access("/dev/kvm", R_OK | W_OK))) { 1353 1354 g_test_message("Skipping test: kvm_hv not available"); 1354 1355 return g_test_run(); 1355 1356 }