summaryrefslogtreecommitdiffstats
path: root/target/arm/cpu.h
diff options
context:
space:
mode:
authorPeter Maydell2020-02-14 18:51:07 +0100
committerPeter Maydell2020-02-21 17:07:01 +0100
commit1548a7b2ad621a31b4216ed703b6d658a2ecf0d0 (patch)
tree70693a8be50a34e45787ac315d49d7a4112c4b18 /target/arm/cpu.h
parenttarget/arm: Move DBGDIDR into ARMISARegisters (diff)
downloadqemu-1548a7b2ad621a31b4216ed703b6d658a2ecf0d0.tar.gz
qemu-1548a7b2ad621a31b4216ed703b6d658a2ecf0d0.tar.xz
qemu-1548a7b2ad621a31b4216ed703b6d658a2ecf0d0.zip
target/arm: Read debug-related ID registers from KVM
Now we have isar_feature test functions that look at fields in the ID_AA64DFR0_EL1 and ID_DFR0 ID registers, add the code that reads these register values from KVM so that the checks behave correctly when we're using KVM. No isar_feature function tests ID_AA64DFR1_EL1 or DBGDIDR yet, but we add it to maintain the invariant that every field in the ARMISARegisters struct is populated for a KVM CPU and can be relied on. This requirement isn't actually written down yet, so add a note to the relevant comment. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200214175116.9164-13-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/cpu.h')
-rw-r--r--target/arm/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 3c996db3e4..e043932fcb 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -853,6 +853,11 @@ struct ARMCPU {
* prefix means a constant register.
* Some of these registers are split out into a substructure that
* is shared with the translators to control the ISA.
+ *
+ * Note that if you add an ID register to the ARMISARegisters struct
+ * you need to also update the 32-bit and 64-bit versions of the
+ * kvm_arm_get_host_cpu_features() function to correctly populate the
+ * field by reading the value from the KVM vCPU.
*/
struct ARMISARegisters {
uint32_t id_isar0;