Skip to content
  • Peter Maydell's avatar
    31164ebf
    hw/intc/arm_gicv3: Specify valid and impl in MemoryRegionOps · 31164ebf
    Peter Maydell authored
    
    
    The GICv3 has some registers that support byte accesses, and some
    that support 8-byte accesses.  Our TCG implementation implements all
    of this, switching on the 'size' argument and handling the registers
    that must support reads of that size while logging an error for
    attempted accesses to registers that do not support that size access.
    However we forgot to tell the core memory subsystem about this by
    specifying the .impl and .valid fields in the MemoryRegionOps struct,
    so the core was happily simulating 8 byte accesses by combining two 4
    byte accesses.  This doesn't have much guest-visible effect, since
    there aren't many 8 byte registers and they all support being written
    in two 4 byte parts.
    
    Set the .impl and .valid fields to say that all sizes from 1 to 8
    bytes are both valid and implemented by the device.
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-id: 20220303202341.2232284-4-peter.maydell@linaro.org
    31164ebf
    hw/intc/arm_gicv3: Specify valid and impl in MemoryRegionOps
    Peter Maydell authored
    
    
    The GICv3 has some registers that support byte accesses, and some
    that support 8-byte accesses.  Our TCG implementation implements all
    of this, switching on the 'size' argument and handling the registers
    that must support reads of that size while logging an error for
    attempted accesses to registers that do not support that size access.
    However we forgot to tell the core memory subsystem about this by
    specifying the .impl and .valid fields in the MemoryRegionOps struct,
    so the core was happily simulating 8 byte accesses by combining two 4
    byte accesses.  This doesn't have much guest-visible effect, since
    there aren't many 8 byte registers and they all support being written
    in two 4 byte parts.
    
    Set the .impl and .valid fields to say that all sizes from 1 to 8
    bytes are both valid and implemented by the device.
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-id: 20220303202341.2232284-4-peter.maydell@linaro.org
Loading