Re: [PATCH v2 1/2] vhost: Don't call access_ok() when using IOTLB

2020-10-02 Thread Jason Wang
On 2020/9/30 上午12:30, Greg Kurz wrote: When the IOTLB device is enabled, the vring addresses we get from userspace are GIOVAs. It is thus wrong to pass them down to access_ok() which only takes HVAs. Access validation is done at prefetch time with IOTLB. Teach vq_access_ok() about that by movi

[PATCH v2 1/2] vhost: Don't call access_ok() when using IOTLB

2020-09-29 Thread Greg Kurz
When the IOTLB device is enabled, the vring addresses we get from userspace are GIOVAs. It is thus wrong to pass them down to access_ok() which only takes HVAs. Access validation is done at prefetch time with IOTLB. Teach vq_access_ok() about that by moving the (vq->iotlb) check from vhost_vq_acce