]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Report GICv3 sysregs present in ID registers if needed
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Nov 2017 15:01:38 +0000 (15:01 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 20 Nov 2017 13:39:12 +0000 (13:39 +0000)
commit96a8b92ed8f02d5e86ad380d3299d9f41f99b072
treec65676f2a828247ca79f2476f6c742aed1ff4564
parentb11ce33fe0266f8ede18cfcf961536f6a209b02b
target/arm: Report GICv3 sysregs present in ID registers if needed

The CPU ID registers ID_AA64PFR0_EL1, ID_PFR1_EL1 and ID_PFR1
have a field for reporting presence of GICv3 system registers.
We need to report this field correctly in order for Xen to
work as a guest inside QEMU emulation. We mustn't incorrectly
claim the sysregs exist when they don't, though, or Linux will
crash.

Unfortunately the way we've designed the GICv3 emulation in QEMU
puts the system registers as part of the GICv3 device, which
may be created after the CPU proper has been realized. This
means that we don't know at the point when we define the ID
registers what the correct value is. Handle this by switching
them to calling a function at runtime to read the value, where
we can fill in the GIC field appropriately.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Message-id: 1510066898-3725-1-git-send-email-peter.maydell@linaro.org
target/arm/helper.c