On Wed, Feb 05, 2020 at 01:50:28PM +0800, Jason Wang wrote:
On 2020/2/5 äå1:31, Michael S. Tsirkin wrote:Oh ok. So with a real device, I suspect we do not want to wait for each
On Wed, Feb 05, 2020 at 11:12:21AM +0800, Jason Wang wrote:It's the existed uapi:
On 2020/2/5 äå10:05, Tiwei Bie wrote:to make sure, could you post the suggested argument format for
On Tue, Feb 04, 2020 at 02:46:16PM +0800, Jason Wang wrote:I think so. Michael, do you think this makes sense?
On 2020/2/4 äå2:01, Michael S. Tsirkin wrote:Do you mean we let userspace to only use VHOST_IOTLB_UPDATE/INVALIDATE
On Tue, Feb 04, 2020 at 11:30:11AM +0800, Jason Wang wrote:Sure, so that basically VHOST_IOTLB_UPDATE/INVALIDATE I think?
5) generate diffs of memory table and using IOMMU API to setup the dmaFrankly I think that's a bunch of work. Why not a MAP/UNMAP interface?
mapping in this method
to do the DMA mapping in vhost-vdpa case? When vIOMMU isn't available,
userspace will set msg->iova to GPA, otherwise userspace will set
msg->iova to GIOVA, and vhost-vdpa module will get HPA from msg->uaddr?
Thanks,
Tiwei
Thanks
these ioctls?
/* no alignment requirement */
struct vhost_iotlb_msg {
ÂÂÂ __u64 iova;
ÂÂÂ __u64 size;
ÂÂÂ __u64 uaddr;
#define VHOST_ACCESS_ROÂÂÂÂÂ 0x1
#define VHOST_ACCESS_WOÂÂÂÂÂ 0x2
#define VHOST_ACCESS_RWÂÂÂÂÂ 0x3
ÂÂÂ __u8 perm;
#define VHOST_IOTLB_MISSÂÂÂÂÂÂÂÂÂÂ 1
#define VHOST_IOTLB_UPDATEÂÂÂÂÂÂÂÂ 2
#define VHOST_IOTLB_INVALIDATEÂÂÂÂ 3
#define VHOST_IOTLB_ACCESS_FAILÂÂÂ 4
ÂÂÂ __u8 type;
};
#define VHOST_IOTLB_MSG 0x1
#define VHOST_IOTLB_MSG_V2 0x2
struct vhost_msg {
ÂÂÂ int type;
ÂÂÂ union {
ÂÂÂ ÂÂÂ struct vhost_iotlb_msg iotlb;
ÂÂÂ ÂÂÂ __u8 padding[64];
ÂÂÂ };
};
struct vhost_msg_v2 {
ÂÂÂ __u32 type;
ÂÂÂ __u32 reserved;
ÂÂÂ union {
ÂÂÂ ÂÂÂ struct vhost_iotlb_msg iotlb;
ÂÂÂ ÂÂÂ __u8 padding[64];
ÂÂÂ };
};
change to be processed by device completely, so we might want an asynchronous variant
and then some kind of flush that tells device "you better apply these now".