• C
    spapr/xive: rework the mapping the KVM memory regions · 981b1c62
    Cédric Le Goater 提交于
    Today, the interrupt device is fully initialized at reset when the CAS
    negotiation process has completed. Depending on the KVM capabilities,
    the SpaprXive memory regions (ESB, TIMA) are initialized with a host
    MMIO backend or a QEMU emulated backend. This results in a complex
    initialization sequence partially done at realize and later at reset,
    and some memory region leaks.
    
    To simplify this sequence and to remove of the late initialization of
    the emulated device which is required to be done only once, we
    introduce new memory regions specific for KVM. These regions are
    mapped as overlaps on top of the emulated device to make use of the
    host MMIOs. Also provide proper cleanups of these regions when the
    XIVE KVM device is destroyed to fix the leaks.
    Signed-off-by: NCédric Le Goater <clg@kaod.org>
    Message-Id: <20190614165920.12670-2-clg@kaod.org>
    Reviewed-by: NGreg Kurz <groug@kaod.org>
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    981b1c62
xive.h 16.0 KB