• Alexey Kardashevskiy's avatar
    pseries: Add PCI MSI/MSI-X support · 0ee2c058
    Alexey Kardashevskiy authored
    
    
    This patch implements MSI and MSI-X support for the pseries PCI host
    bridge.  To do this it adds:
    
     * A "config_space_address to msi_table" map, since the MSI RTAS calls
    take a PCI config space address as an identifier.
    
     * A MSIX memory region to catch msi_notify()/msix_notiry() from
    virtio-pci and pass them to the guest via qemu_irq_pulse().
    
     * RTAS call "ibm,change-msi" which sets up MSI vectors for a
    device. Note that this call may configure and return lesser number of
    vectors than requested.
    
     * RTAS call "ibm,query-interrupt-source-number" which translates MSI
    vector to interrupt controller (XICS) IRQ number.
    
    Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    [agraf: fix error case ndev < 0]
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    0ee2c058