static int msix_set_notifier_for_vector(PCIDevice *dev, unsigned int vector) { MSIMessage msg; if (msix_is_masked(dev, vector)) { return 0; } msg = msix_get_message(dev, vector); return dev->msix_vector_use_notifier(dev, vector, msg); }
/* Send an MSI-X message */ void msix_notify(PCIDevice *dev, unsigned vector) { MSIMessage msg; //fprintf(stdout, "qemu:msix: msix_notify \n"); if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector]) return; if (msix_is_masked(dev, vector)) { msix_set_pending(dev, vector); return; } msg = msix_get_message(dev, vector); stl_le_phys(msg.address, msg.data); }
/* Send an MSI-X message */ void msix_notify(PCIDevice *dev, unsigned vector) { MSIMessage msg; if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector]) return; if (msix_is_masked(dev, vector)) { msix_set_pending(dev, vector); return; } msg = msix_get_message(dev, vector); msi_send_message(dev, msg); }
/* Send an MSI-X message */ void msix_notify(PCIDevice *dev, unsigned vector) { MSIMessage msg; if (vector >= dev->msix_entries_nr || !dev->msix_entry_used[vector]) return; if (msix_is_masked(dev, vector)) { msix_set_pending(dev, vector); return; } msg = msix_get_message(dev, vector); address_space_stl_le(&dev->bus_master_as, msg.address, msg.data, MEMTXATTRS_UNSPECIFIED, NULL); }
static void msix_fire_vector_notifier(PCIDevice *dev, unsigned int vector, bool is_masked) { MSIMessage msg; int ret; if (!dev->msix_vector_use_notifier) { return; } if (is_masked) { dev->msix_vector_release_notifier(dev, vector); } else { msg = msix_get_message(dev, vector); ret = dev->msix_vector_use_notifier(dev, vector, msg); assert(ret >= 0); } }
static int ivshmem_add_kvm_msi_virq(IVShmemState *s, int vector) { PCIDevice *pdev = PCI_DEVICE(s); MSIMessage msg = msix_get_message(pdev, vector); int ret; IVSHMEM_DPRINTF("ivshmem_add_kvm_msi_virq vector:%d\n", vector); if (s->msi_vectors[vector].pdev != NULL) { return 0; } ret = kvm_irqchip_add_msi_route(kvm_state, msg, pdev); if (ret < 0) { error_report("ivshmem: kvm_irqchip_add_msi_route failed"); return -1; } s->msi_vectors[vector].virq = ret; s->msi_vectors[vector].pdev = pdev; return 0; }