Revision 531a0b82

b/hw/msi.c
258 258
    uint32_t pending;
259 259
    int i;
260 260

  
261
#ifdef MSI_DEBUG
262
    if (ranges_overlap(addr, len, dev->msi_cap, msi_cap_sizeof(flags))) {
263
        MSI_DEV_PRINTF(dev, "addr 0x%"PRIx32" val 0x%"PRIx32" len %d\n",
264
                       addr, val, len);
265
        MSI_DEV_PRINTF(dev, "ctrl: 0x%"PRIx16" address: 0x%"PRIx32,
266
                       flags,
267
                       pci_get_long(dev->config + msi_address_lo_off(dev)));
268
        if (msi64bit) {
269
            fprintf(stderr, " addrss-hi: 0x%"PRIx32,
270
                    pci_get_long(dev->config + msi_address_hi_off(dev)));
271
        }
272
        fprintf(stderr, " data: 0x%"PRIx16,
273
                pci_get_word(dev->config + msi_data_off(dev, msi64bit)));
274
        if (flags & PCI_MSI_FLAGS_MASKBIT) {
275
            fprintf(stderr, " mask 0x%"PRIx32" pending 0x%"PRIx32,
276
                    pci_get_long(dev->config + msi_mask_off(dev, msi64bit)),
277
                    pci_get_long(dev->config + msi_pending_off(dev, msi64bit)));
278
        }
279
        fprintf(stderr, "\n");
261
    if (!ranges_overlap(addr, len, dev->msi_cap, msi_cap_sizeof(flags))) {
262
        return;
280 263
    }
281
#endif
282 264

  
283
    /* Are we modified? */
284
    if (!(ranges_overlap(addr, len, msi_flags_off(dev), 2) ||
285
          (msi_per_vector_mask &&
286
           ranges_overlap(addr, len, msi_mask_off(dev, msi64bit), 4)))) {
287
        return;
265
#ifdef MSI_DEBUG
266
    MSI_DEV_PRINTF(dev, "addr 0x%"PRIx32" val 0x%"PRIx32" len %d\n",
267
                   addr, val, len);
268
    MSI_DEV_PRINTF(dev, "ctrl: 0x%"PRIx16" address: 0x%"PRIx32,
269
                   flags,
270
                   pci_get_long(dev->config + msi_address_lo_off(dev)));
271
    if (msi64bit) {
272
        fprintf(stderr, " addrss-hi: 0x%"PRIx32,
273
                pci_get_long(dev->config + msi_address_hi_off(dev)));
288 274
    }
275
    fprintf(stderr, " data: 0x%"PRIx16,
276
            pci_get_word(dev->config + msi_data_off(dev, msi64bit)));
277
    if (flags & PCI_MSI_FLAGS_MASKBIT) {
278
        fprintf(stderr, " mask 0x%"PRIx32" pending 0x%"PRIx32,
279
                pci_get_long(dev->config + msi_mask_off(dev, msi64bit)),
280
                pci_get_long(dev->config + msi_pending_off(dev, msi64bit)));
281
    }
282
    fprintf(stderr, "\n");
283
#endif
289 284

  
290 285
    if (!(flags & PCI_MSI_FLAGS_ENABLE)) {
291 286
        return;

Also available in: Unified diff