• L
    intc/arm_gic: Add virtualization extensions helper macros and functions · 4a37e0e4
    Luc Michel 提交于
    Add some helper macros and functions related to the virtualization
    extensions to gic_internal.h.
    
    The GICH_LR_* macros help extracting specific fields of a list register
    value. The only tricky one is the priority field as only the MSB are
    stored. The value must be shifted accordingly to obtain the correct
    priority value.
    
    gic_is_vcpu() and gic_get_vcpu_real_id() help with (v)CPU id manipulation
    to abstract the fact that vCPU id are in the range
    [ GIC_NCPU; (GIC_NCPU + num_cpu) [.
    
    gic_lr_* and gic_virq_is_valid() help with the list registers.
    gic_get_lr_entry() returns the LR entry for a given (vCPU, irq) pair. It
    is meant to be used in contexts where we know for sure that the entry
    exists, so we assert that entry is actually found, and the caller can
    avoid the NULL check on the returned pointer.
    Signed-off-by: NLuc Michel <luc.michel@greensocs.com>
    Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
    Message-id: 20180727095421.386-8-luc.michel@greensocs.com
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    4a37e0e4
gic_internal.h 8.7 KB