Skip to contentSkip to conversation

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

PATCH In review Laurent Vivier 6 participants 8 messages Nov 20, 2019 – Nov 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tests/migration-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/migration-test.c +2 -1
index ac780dffdaad..2b25ba6d77f6 100644
@@ -1349,7 +1349,8 @@ int main(int argc, char **argv)
      * some reason)
      */
     if (g_str_equal(qtest_get_arch(), "ppc64") &&
-        access("/sys/module/kvm_hv", F_OK)) {
+        (access("/sys/module/kvm_hv", F_OK) ||
+         access("/dev/kvm", R_OK | W_OK))) {
         g_test_message("Skipping test: kvm_hv not available");
         return g_test_run();
     }
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Laurent Vivier

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.

---
 tests/migration-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/migration-test.c +0 -0
index ac780dffdaad..2b25ba6d77f6 100644

tests/migration-test.c int main(int argc, char **argv) · line 1356

Quoted 9 lines
tests/migration-test.c +2 -1
@@ -1349,7 +1349,8 @@ int main(int argc, char **argv)
      * some reason)
      */
     if (g_str_equal(qtest_get_arch(), "ppc64") &&
-        access("/sys/module/kvm_hv", F_OK)) {
+        (access("/sys/module/kvm_hv", F_OK) ||
+         access("/dev/kvm", R_OK | W_OK))) {
         g_test_message("Skipping test: kvm_hv not available");
         return g_test_run();
     }
Reviewed-by on v1 1/1
#2 lore raw
In reply to Laurent Vivier
Quoted 14 lines · On Wed, 20 Nov 2019 18:09:55 +0100 Laurent Vivier <[email protected]> wrote:

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

Quoted 8 lines

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.

---

Quoted 17 lines
 tests/migration-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/migration-test.c +2 -1
index ac780dffdaad..2b25ba6d77f6 100644
@@ -1349,7 +1349,8 @@ int main(int argc, char **argv)
      * some reason)
      */
     if (g_str_equal(qtest_get_arch(), "ppc64") &&
-        access("/sys/module/kvm_hv", F_OK)) {
+        (access("/sys/module/kvm_hv", F_OK) ||
+         access("/dev/kvm", R_OK | W_OK))) {
         g_test_message("Skipping test: kvm_hv not available");
         return g_test_run();
     }
Reviewed-by on v1 1/1
#3 lore raw
In reply to Laurent Vivier
Quoted 14 lines · Laurent Vivier

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

Quoted 7 lines

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.

Oh, why it is so difficult!!!

Thanks, Juan.

#4 lore raw
Quoted 20 lines · Juan Quintela
Quoted 19 lines · Laurent Vivier

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.

Quoted 9 lines
Quoted 2 lines

Oh, why it is so difficult!!!

Thanks, Juan.

David,

could you add this one too to your ppc-for-4.2 queue?

Thanks,
Laurent

#5 lore raw
Quoted 26 lines · Laurent Vivier
Quoted 25 lines · Juan Quintela
Quoted 14 lines · Laurent Vivier

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

Quoted 7 lines

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.

Quoted 8 lines
Quoted 4 lines

Oh, why it is so difficult!!!

Thanks, Juan.

David,

could you add this one too to your ppc-for-4.2 queue?

I was about to ask if you preffered it to go through the migration tree.

David?

Later, Juan.

#6 lore raw
Quoted 32 lines · Juan Quintela
Quoted 31 lines · Laurent Vivier
Quoted 29 lines · Juan Quintela
Quoted 14 lines · Laurent Vivier

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

Quoted 7 lines

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.

Oh, why it is so difficult!!!

Thanks, Juan.

Quoted 7 lines
Quoted 3 lines

David,

could you add this one too to your ppc-for-4.2 queue?

I was about to ask if you preffered it to go through the migration tree.

David?

Migration tree is good for me.

Quoted 3 lines

Later, Juan.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#7 lore raw
In reply to Juan Quintela

Le 21/11/2019 à 09:30, Juan Quintela a écrit :

Quoted 34 lines
Quoted 33 lines · Laurent Vivier
Quoted 20 lines · Juan Quintela
Quoted 19 lines · Laurent Vivier

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.

Quoted 9 lines
Quoted 2 lines

Oh, why it is so difficult!!!

Thanks, Juan.

David,

Quoted 7 lines
Quoted 1 line

could you add this one too to your ppc-for-4.2 queue?

I was about to ask if you preffered it to go through the migration tree.

David?

Later, Juan.

Juan, as it's a fix it should go in rc3.

Thanks,
Laurent