tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pci_dma64_available() and Xen



Hi,
I just noticed that pci_dma64_available() does the following:
int
pci_dma64_available(struct pci_attach_args *pa)
{
#ifdef _PCI_HAVE_DMA64
        if (BUS_DMA_TAG_VALID(pa->pa_dmat64) &&
                ((uint64_t)physmem << PAGE_SHIFT) > 0xffffffffULL)
                        return 1;
#endif
        return 0;
}

This is wrong for Xen, where a domain may have less than 4GB allocated,
but its memory is above the 4GB limit. More generally, this seems to
assume that the physical memory is contigous, which I feel is wrong for a
MI piece of code.
Would anyone object if I remove the physmem test from pci_dma64_available ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index