hw/intc/arm_gicv3: Remove incorrect usage of fieldoffset
commite971fa042253ed36e602a2c1bc01144da3e8832f
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 27 Dec 2016 14:59:25 +0000 (27 14:59 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 27 Dec 2016 14:59:25 +0000 (27 14:59 +0000)
tree696a8bf04ea289e76cda923a854964521dab7fa8
parentc9b61d9aa1ad234b0961f8add023cdc999cda3da
hw/intc/arm_gicv3: Remove incorrect usage of fieldoffset

In the ARMCPRegInfo definitions for the GICv3 CPU interface
registers, we were trying to use .fieldoffset to specify
the locations of data fields within the GICv3CPUState struct.
This is completely broken, because .fieldoffset is for offsets
into the CPUARMState struct. We didn't notice because we
were only using this for reads to BPR0, AP0R<n>, IGRPEN0
and CTLR_EL3, and Linux doesn't use these registers.

Replace the .fieldoffset uses with explicit read functions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
hw/intc/arm_gicv3_cpuif.c