Revision 932d4a42 hw/msix.c

b/hw/msix.c
37 37
    return msg;
38 38
}
39 39

  
40
/*
41
 * Special API for POWER to configure the vectors through
42
 * a side channel. Should never be used by devices.
43
 */
44
void msix_set_message(PCIDevice *dev, int vector, struct MSIMessage msg)
45
{
46
    uint8_t *table_entry = dev->msix_table + vector * PCI_MSIX_ENTRY_SIZE;
47

  
48
    pci_set_quad(table_entry + PCI_MSIX_ENTRY_LOWER_ADDR, msg.address);
49
    pci_set_long(table_entry + PCI_MSIX_ENTRY_DATA, msg.data);
50
    table_entry[PCI_MSIX_ENTRY_VECTOR_CTRL] &= ~PCI_MSIX_ENTRY_CTRL_MASKBIT;
51
}
52

  
40 53
static uint8_t msix_pending_mask(int vector)
41 54
{
42 55
    return 1 << (vector % 8);

Also available in: Unified diff