On Fri, 27 Nov 2020 at 17:18, Eduardo Habkost <ehabk...@redhat.com> wrote: > Thanks! Is the data returned by kvm_arm_get_host_cpu_features() > supposed to eventually affect the value of id_aa64mmfr0? I don't > see how that could happen.
kvm_arm_get_host_cpu_features() does: err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64mmfr0, ARM64_SYS_REG(3, 0, 0, 7, 0)); which is filling in data in the ARMHostCPUFeatures* that it is passed as an argument. The caller is kvm_arm_set_cpu_features_from_host(), which does kvm_arm_get_host_cpu_features(&arm_host_cpu_features) (assuming it hasn't already done it once and cached the results; arm_host_cpu_features is a global) and then cpu->isar = arm_host_cpu_features.isar; thus copying the ID values into the "struct ARMISARegisters isar" that is part of the ARMCPU struct. (It also copies across the 'features' word which gets set up with ARM_FEATURE_* flags for the benefit of the parts of the target code which key off those rather than ID register fields.) thanks -- PMM