• C
    ppc/pnv: Rework cache watch model of PnvXIVE · 0df68c7e
    Cédric Le Goater 提交于
    When the software modifies the XIVE internal structures, ESB, EAS,
    END, NVT, it also must update the caches of the different XIVE
    sub-engines. HW offers a set of common interface for such purpose.
    
    The CWATCH_SPEC register defines the block/index of the target and a
    set of flags to perform a full update and to watch for update
    conflicts.
    
    The cache watch CWATCH_DATAX registers are then loaded with the target
    data with a first read on CWATCH_DATA0. Writing back is done in the
    opposit order, CWATCH_DATA0 triggering the update.
    
    The SCRUB_TRIG registers are used to flush the cache in RAM, and to
    possibly invalidate it. Cache disablement is also an option but as we
    do not model the cache, these registers are no-ops
    
    Today, the modeling of these registers is incorrect but it did not
    impact the set up of a baremetal system. However, running KVM requires
    a rework.
    
    Fixes: 2dfa91a2 ("ppc/pnv: add a XIVE interrupt controller model for POWER9")
    Signed-off-by: NCédric Le Goater <clg@kaod.org>
    Message-Id: <20190630204601.30574-4-clg@kaod.org>
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    0df68c7e
pnv_xive.c 53.4 KB