Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-07-12 Thread Michael S. Tsirkin
On Mon, Jul 12, 2021 at 11:07:44AM +0800, Jason Wang wrote: > > 在 2021/7/12 上午12:08, Michael S. Tsirkin 写道: > > On Fri, Jun 04, 2021 at 01:38:01PM +0800, Jason Wang wrote: > > > 在 2021/5/14 下午7:13, Michael S. Tsirkin 写道: > > > > On Thu, May 06, 2021 at 01:38:29PM +0100, Christoph Hellwig wrote: >

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-07-11 Thread Jason Wang
在 2021/7/12 上午12:08, Michael S. Tsirkin 写道: On Fri, Jun 04, 2021 at 01:38:01PM +0800, Jason Wang wrote: 在 2021/5/14 下午7:13, Michael S. Tsirkin 写道: On Thu, May 06, 2021 at 01:38:29PM +0100, Christoph Hellwig wrote: On Thu, May 06, 2021 at 04:12:17AM -0400, Michael S. Tsirkin wrote: Let's try

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-07-11 Thread Michael S. Tsirkin
On Fri, Jun 04, 2021 at 01:38:01PM +0800, Jason Wang wrote: > > 在 2021/5/14 下午7:13, Michael S. Tsirkin 写道: > > On Thu, May 06, 2021 at 01:38:29PM +0100, Christoph Hellwig wrote: > > > On Thu, May 06, 2021 at 04:12:17AM -0400, Michael S. Tsirkin wrote: > > > > Let's try for just a bit, won't make t

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-06-03 Thread Jason Wang
在 2021/5/14 下午7:13, Michael S. Tsirkin 写道: On Thu, May 06, 2021 at 01:38:29PM +0100, Christoph Hellwig wrote: On Thu, May 06, 2021 at 04:12:17AM -0400, Michael S. Tsirkin wrote: Let's try for just a bit, won't make this window anyway: I have an old idea. Add a way to find out that unmap is a

Re: Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-14 Thread Michael S. Tsirkin
On Fri, May 14, 2021 at 07:27:22PM +0800, Yongji Xie wrote: > On Fri, May 14, 2021 at 7:17 PM Stefan Hajnoczi wrote: > > > > On Fri, May 14, 2021 at 03:29:20PM +0800, Jason Wang wrote: > > > On Fri, May 14, 2021 at 12:27 AM Stefan Hajnoczi > > > wrote: > > > > > > > > On Fri, Apr 23, 2021 at 04:

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-14 Thread Stefan Hajnoczi
On Fri, May 14, 2021 at 03:29:20PM +0800, Jason Wang wrote: > On Fri, May 14, 2021 at 12:27 AM Stefan Hajnoczi wrote: > > > > On Fri, Apr 23, 2021 at 04:09:35PM +0800, Jason Wang wrote: > > > Sometimes, the driver doesn't trust the device. This is usually > > > happens for the encrtpyed VM or VDUS

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-14 Thread Michael S. Tsirkin
On Thu, May 06, 2021 at 01:38:29PM +0100, Christoph Hellwig wrote: > On Thu, May 06, 2021 at 04:12:17AM -0400, Michael S. Tsirkin wrote: > > Let's try for just a bit, won't make this window anyway: > > > > I have an old idea. Add a way to find out that unmap is a nop > > (or more exactly does not

Re: Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-14 Thread Jason Wang
On Fri, May 14, 2021 at 2:07 PM Yongji Xie wrote: > > On Fri, May 14, 2021 at 12:27 AM Stefan Hajnoczi wrote: > > > > On Fri, Apr 23, 2021 at 04:09:35PM +0800, Jason Wang wrote: > > > Sometimes, the driver doesn't trust the device. This is usually > > > happens for the encrtpyed VM or VDUSE[1]. >

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-14 Thread Jason Wang
On Fri, May 14, 2021 at 12:27 AM Stefan Hajnoczi wrote: > > On Fri, Apr 23, 2021 at 04:09:35PM +0800, Jason Wang wrote: > > Sometimes, the driver doesn't trust the device. This is usually > > happens for the encrtpyed VM or VDUSE[1]. > > Thanks for doing this. > > Can you describe the overall memo

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-13 Thread Stefan Hajnoczi
On Fri, Apr 23, 2021 at 04:09:35PM +0800, Jason Wang wrote: > Sometimes, the driver doesn't trust the device. This is usually > happens for the encrtpyed VM or VDUSE[1]. Thanks for doing this. Can you describe the overall memory safety model that virtio drivers must follow? For example: - Driver

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-06 Thread Christoph Hellwig
On Thu, May 06, 2021 at 04:12:17AM -0400, Michael S. Tsirkin wrote: > Let's try for just a bit, won't make this window anyway: > > I have an old idea. Add a way to find out that unmap is a nop > (or more exactly does not use the address/length). > Then in that case even with DMA API we do not need

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-06 Thread Michael S. Tsirkin
On Thu, May 06, 2021 at 11:20:30AM +0800, Jason Wang wrote: > > 在 2021/4/23 下午4:09, Jason Wang 写道: > > Hi: > > > > Sometimes, the driver doesn't trust the device. This is usually > > happens for the encrtpyed VM or VDUSE[1]. In both cases, technology > > like swiotlb is used to prevent the poking

Re: [RFC PATCH V2 0/7] Do not read from descripto ring

2021-05-05 Thread Jason Wang
在 2021/4/23 下午4:09, Jason Wang 写道: Hi: Sometimes, the driver doesn't trust the device. This is usually happens for the encrtpyed VM or VDUSE[1]. In both cases, technology like swiotlb is used to prevent the poking/mangling of memory from the device. But this is not sufficient since current virt