qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH v8] introduce vfio-user protocol specification


From: Thanos Makatos
Subject: RE: [PATCH v8] introduce vfio-user protocol specification
Date: Mon, 14 Jun 2021 09:47:12 +0000

> > > +VFIO_USER_DMA_UNMAP
> > > +-------------------
> > > +
> > > +This command message is sent by the client to the server to inform
> > > +it that a DMA region, previously made available via a
> > > +VFIO_USER_DMA_MAP command message, is no longer available for
> DMA.
> > > +It typically occurs when memory is subtracted from the client or if
> > > +the client uses a vIOMMU. If the client does not expect the server
> > > +to perform DMA then it does not need to send to the server
> > > +VFIO_USER_DMA_UNMAP commands. If the server does not need to
> > > +perform DMA then it can ignore such commands but it must still
> > > +reply to them. The table is an
> >
> > I'm confused why expectation of DMA plays a factor here.  For example,
> > if QEMU unplugs a DIMM and the server has an mmap of the file
> > descriptor related to that DIMM, does it get to retain the mmap if it
> > doesn't currently have any DMA queued targeting that address range?
> > Can QEMU skip sending an unmap if the PCI bus master bit is disabled
> > on the device preventing further DMA?  How can the associated file
> > descriptor get released?  This doesn't feel strongly specified.
> 
> I thought we'd removed those sentences actually, as they're just confusing.
> In reality, everything is going to both send and handle map/unmap
> messages.
> 
> > Are there any assumptions about address and size of the unmap command
> > relative to the original map command or is the client freely allowed
> > to bisect, overlap, or overextend previous mappings?
> 
> Good question. Filed https://github.com/nutanix/libvfio-user/issues/504 to
> track this.
> 
> I actually don't know what clients would like to be able to do in this 
> respect.

It's probably not worth supporting such behavior at this point, especially since
there's no valid use case yet. Let's drop it. Should we ever want to introduce
such behavior in the future, can should be able to do so by a capability. Also,
the protocol format won't have to change since additional DMA regions can
simply be appended to the message payload.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]