[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] QEMU tries to register to VFIO memory that is not RAM
From: |
Thanos Makatos |
Subject: |
Re: [Qemu-devel] QEMU tries to register to VFIO memory that is not RAM |
Date: |
Fri, 14 Jun 2019 15:56:06 +0000 |
> > > diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> > > index 4374cc6176..d9d3b1277a 100644
> > > --- a/hw/vfio/common.c
> > > +++ b/hw/vfio/common.c
> > > @@ -430,6 +430,9 @@ static void
> > vfio_listener_region_add(MemoryListener *listener,
> > > VFIOHostDMAWindow *hostwin;
> > > bool hostwin_found;
> > >
> > > + if (!section->mr->ram_device)
> > > + return;
> > > +
> >
> > Nope, this would prevent IOMMU mapping of assigned device MMIO
> > regions
> > which would prevent peer-to-peer DMA between assigned devices.
> Thanks,
>
> Understood.
>
> Is there a strong reason why QEMU allocates memory for these address
> spaces without MAP_SHARED? In our use case it would solve our problem if
> we could make QEMU use MAP_SHARED. I understand that this isn't strictly
> correct, so would it be acceptable to enable this behavior with a command-
> line option or an #ifdef?
Ping!