On 2017年05月18日 16:43, Maxime Coquelin wrote:

+When the VHOST_USER_PROTOCOL_F_SLAVE_REQ is supported by the slave, and the
+master initiated the slave to master communication channel using the
+VHOST_USER_SET_SLAVE_REQ_FD request, the slave can send IOTLB miss and access +failure events by sending VHOST_USER_SLAVE_IOTLB_MSG requests to the master +with a struct vhost_iotlb_msg payload. For miss events, the iotlb payload has +to be filled with the miss message type (1), the I/O virtual address and the +permissions flags. For access failure event, the iotlb payload has to be +filled with the access failure message type (4), the I/O virtual address and
+the permissions flags.

I don't think slave should cache invalid entries. If it does not,
how can it detect access failure as opposed to a miss?

Of course, invalid cache entries should not be cached.
The VHOST_IOTLB_ACCESS_FAIL has been specified for the Kernel backend,
even if the latter does not implement it yet.

Yes, I leave this for future use e.g reporting copy_to_user() failure to userspace.

Thanks

Reply via email to