Hi Eric, > >> After fixing the mem_pages stuff I get the following error on a cavium > >> machine. > >> > >> augere@virtlab-arm04:~/UPSTREAM/ML/tools/testing/selftests/kvm# > >> ./aarch64/id_reg_test > >> ==== Test Assertion Failure ==== > >> aarch64/id_reg_test.c:814: fval >= min > >> pid=11692 tid=11692 errno=4 - Interrupted system call > >> 1 0x00000000004028d3: test_feature at id_reg_test.c:813 > >> 2 (inlined by) test_feature_all at id_reg_test.c:863 > >> 3 (inlined by) run_test at id_reg_test.c:1073 > >> 4 0x000000000040156f: main at id_reg_test.c:1124 > >> 5 0x000003ffa9420de3: ?? ??:0 > >> 6 0x00000000004015eb: _start at :? > >> PERFMON field of ID_DFR0 is too small (0) > >> > >> Fails on > >> test_feature: PERFMON (reg ID_DFR0) > >> > >> I will do my utmost to further debug > > > > Thank you for running it in your environment and reporting this ! > > This is very interesting... > > > > It implies that the host's ID_DFR0_EL1.PerfMon is zero or 0xf > > (meaning FEAT_PMUv3 is not implemented) even though the host's > > ID_AA64DFR0_EL1.PMUVer indicates that FEAT_PMUv3 is implemented. > > > > Would it be possible for you to check values of those two > > registers on the host (not on the guest) to see if both of them > > indicate the presence of FEAT_PMUv3 consistently ? > > Here are both values printed in armpmu_register() > [ 33.320901] armpmu_register perfmon=0x0 pmuver=0x4 > > perfmon = > cpuid_feature_extract_unsigned_field(read_cpuid(ID_DFR0_EL1), > ID_DFR0_PERFMON_SHIFT); > pmuver = > cpuid_feature_extract_unsigned_field(read_cpuid(ID_AA64DFR0_EL1), > ID_AA64DFR0_PMUVER_SHIFT); > printk("%s perfmon=0x%x pmuver=0x%x\n", __func__, perfmon, pmuver); > > My machine is a Gigabyte R181-T90 (ThunderX2) Thank you for your providing the information !! Since the test incorrectly expects that ID_DFR0_EL1.PerfMon indicates PMUv3 on any CPUs that support PMUv3 even when they don't support 32bit EL0, I will fix the test. (ThunderX2 doesn't seem to support 32bit EL0) Thanks, Reiji _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm