Skip to content
  • Peter Maydell's avatar
    244194fe
    hw/intc/arm_gicv3_its: Pass ITE values back from get_ite() via a struct · 244194fe
    Peter Maydell authored
    
    
    In get_ite() we currently return the caller some of the fields of an
    Interrupt Table Entry via a set of pointer arguments, and validate
    some of them internally (interrupt type and valid bit) to return a
    simple true/false 'valid' indication. Define a new ITEntry struct
    which has all the fields that the in-memory ITE has, and bring the
    get_ite() function in to line with get_dte() and get_cte().
    
    This paves the way for handling virtual interrupts, which will want
    a different subset of the fields in the ITE. Handling them under
    the old "lots of pointer arguments" scheme would have meant a
    confusingly large set of arguments for this function.
    
    The new struct ITEntry is obviously confusably similar to the
    existing IteEntry struct, whose fields are the raw 12 bytes
    of the in-memory ITE. In the next commit we will make update_ite()
    use ITEntry instead of IteEntry, which will allow us to delete
    the IteEntry struct and remove the confusion.
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-id: 20220201193207.2771604-9-peter.maydell@linaro.org
    244194fe
    hw/intc/arm_gicv3_its: Pass ITE values back from get_ite() via a struct
    Peter Maydell authored
    
    
    In get_ite() we currently return the caller some of the fields of an
    Interrupt Table Entry via a set of pointer arguments, and validate
    some of them internally (interrupt type and valid bit) to return a
    simple true/false 'valid' indication. Define a new ITEntry struct
    which has all the fields that the in-memory ITE has, and bring the
    get_ite() function in to line with get_dte() and get_cte().
    
    This paves the way for handling virtual interrupts, which will want
    a different subset of the fields in the ITE. Handling them under
    the old "lots of pointer arguments" scheme would have meant a
    confusingly large set of arguments for this function.
    
    The new struct ITEntry is obviously confusably similar to the
    existing IteEntry struct, whose fields are the raw 12 bytes
    of the in-memory ITE. In the next commit we will make update_ite()
    use ITEntry instead of IteEntry, which will allow us to delete
    the IteEntry struct and remove the confusion.
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-id: 20220201193207.2771604-9-peter.maydell@linaro.org
Loading