Same nested TLB/access bit issue like x86. Use the is_pseries_lpar() check to detect when running nested kvm on pseries LPAR to only warn on idle-page check.
Reported-by: Anushree Mathur <[email protected]> Tested-by: Anushree Mathur <[email protected]> Signed-off-by: Ritesh Harjani (IBM) <[email protected]> --- tools/testing/selftests/kvm/Makefile.kvm | 1 + .../testing/selftests/kvm/access_tracking_perf_test.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm index a7ecd7a242a9..57d1bf994fe8 100644 --- a/tools/testing/selftests/kvm/Makefile.kvm +++ b/tools/testing/selftests/kvm/Makefile.kvm @@ -263,6 +263,7 @@ TEST_GEN_PROGS_powerpc += kvm_page_table_test TEST_GEN_PROGS_powerpc += set_memory_region_test TEST_GEN_PROGS_powerpc += memslot_modification_stress_test TEST_GEN_PROGS_powerpc += memslot_perf_test +TEST_GEN_PROGS_powerpc += access_tracking_perf_test SPLIT_TESTS += arch_timer SPLIT_TESTS += get-reg-list diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c b/tools/testing/selftests/kvm/access_tracking_perf_test.c index 4415c94b2866..94bfb82f7b79 100644 --- a/tools/testing/selftests/kvm/access_tracking_perf_test.c +++ b/tools/testing/selftests/kvm/access_tracking_perf_test.c @@ -470,6 +470,17 @@ static int access_tracking_unreliable(void) puts("Skipping idle page count sanity check, because the test is run nested"); return 1; } +#endif +#ifdef __powerpc64__ + /* + * Nested KVM (pSeries LPAR) can hide accessed/idle, since KVM doesn't + * explicitely flush the TLB for access bit update. L0 keeps + * translations cached so the guest won't see the idle bit cleared. + */ + if (is_pseries_lpar()) { + puts("Skipping idle page count sanity check, because the test is run nested"); + return 1; + } #endif /* * When NUMA balancing is enabled, guest memory will be unmapped to get -- 2.39.5
