On Tue, Jan 23, 2018 at 03:07:31PM +0000, Roger Pau Monne wrote: > +static void bar_write(const struct pci_dev *pdev, unsigned int reg, > + uint32_t val, void *data) > +{ > + struct vpci_bar *bar = data; > + uint8_t slot = PCI_SLOT(pdev->devfn), func = PCI_FUNC(pdev->devfn); > + bool hi = false; > + > + if ( pci_conf_read16(pdev->seg, pdev->bus, slot, func, PCI_COMMAND) & > + PCI_COMMAND_MEMORY ) > + { > + gprintk(XENLOG_WARNING, > + "%04x:%02x:%02x.%u: ignored BAR %lu write with memory > decoding enabled\n", > + pdev->seg, pdev->bus, slot, func, > + (pdev->vpci->header.bars - bar) / 4);
This should be bar - pdev->vpci->header.bars. Will fix it in next version. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel