On Fri, Feb 22, 2019 at 01:15:27AM -0500, Michael S. Tsirkin wrote:
> On Thu, Feb 21, 2019 at 10:59:02AM +0100, Gerd Hoffmann wrote:
> > Hi,
> >
> > > > Note: I think using a pci memory bar (aka host memory mapped into the
> > > > guest) as backing storage for dma-bufs isn't going to work.
> > >
> > > (Not knowing dma-bufs) but could you explain why?
> >
> > Many places in the linux kernel assume dma-bufs are built out of normal
> > ram pages (i.e. something backed by struct page). Which is not the case
> > for pci memory bars which are typically ioremapped() (completely or in
> > chunks) to access them.
>
> Can't we register PCI memory as ZONE_DEVICE?
Oh, didn't know this exists. Yes, that might work.
cheers,
Gerd