Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-16 Thread Tiwei Bie
On Mon, Apr 16, 2018 at 03:47:06PM +0800, Stefan Hajnoczi wrote: > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > > Naming suggestion: "PREFILL_IOTLB" instead of "NEED_ALL_IOTLB". > > I wasn't able to guess what "NEED_AL

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-16 Thread Jason Wang
On 2018年04月16日 15:47, Stefan Hajnoczi wrote: On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB Naming suggestion: "PREFILL_IOTLB" instead of "NEED_ALL_IOTLB". I wasn't able to guess what "NEED_ALL_IOTLB" does. "PREFILL_IOTL

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-16 Thread Stefan Hajnoczi
On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB Naming suggestion: "PREFILL_IOTLB" instead of "NEED_ALL_IOTLB". I wasn't able to guess what "NEED_ALL_IOTLB" does. "PREFILL_IOTLB" communicates that memory translation will be

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-12 Thread Jason Wang
On 2018年04月12日 16:10, Tiwei Bie wrote: On Thu, Apr 12, 2018 at 03:38:50PM +0800, Jason Wang wrote: On 2018年04月12日 09:44, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 08:37:17PM +0300, Michael S. Tsirkin wrote: On Wed, Apr 11, 2018 at 04:38:53PM +0800, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 04

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-12 Thread Tiwei Bie
On Thu, Apr 12, 2018 at 03:38:50PM +0800, Jason Wang wrote: > On 2018年04月12日 09:44, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 08:37:17PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Apr 11, 2018 at 04:38:53PM +0800, Tiwei Bie wrote: > > > > On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-12 Thread Jason Wang
On 2018年04月12日 09:44, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 08:37:17PM +0300, Michael S. Tsirkin wrote: On Wed, Apr 11, 2018 at 04:38:53PM +0800, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: On 2018年04月11日 15:20, Tiwei Bie wrote: This patch introduces VHOS

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-12 Thread Jason Wang
On 2018年04月12日 11:41, Michael S. Tsirkin wrote: On Thu, Apr 12, 2018 at 11:37:35AM +0800, Jason Wang wrote: On 2018年04月12日 09:57, Michael S. Tsirkin wrote: On Thu, Apr 12, 2018 at 09:39:43AM +0800, Tiwei Bie wrote: On Thu, Apr 12, 2018 at 04:29:29AM +0300, Michael S. Tsirkin wrote: On Thu,

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 11:43:41AM +0800, Jason Wang wrote: > > > On 2018年04月12日 11:35, Michael S. Tsirkin wrote: > > > There are more advantages to using request with PASID: > > > > > > You can use hardware support for nesting, having guest supply 1st level > > > translation and host second lev

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月12日 11:37, Michael S. Tsirkin wrote: Yeah, we are still using the existing IOTLB update messages to send the IOTLB messages to backend. The only difference is that, QEMU won't wait for the queries before sending the IOTLB update messages. Yes, my question is not very clear. I mean w

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月12日 11:35, Michael S. Tsirkin wrote: There are more advantages to using request with PASID: You can use hardware support for nesting, having guest supply 1st level translation and host second level translation. I actually had an idea to do something like this for AMD and ARM which

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 11:37:35AM +0800, Jason Wang wrote: > > > On 2018年04月12日 09:57, Michael S. Tsirkin wrote: > > On Thu, Apr 12, 2018 at 09:39:43AM +0800, Tiwei Bie wrote: > > > On Thu, Apr 12, 2018 at 04:29:29AM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Apr 12, 2018 at 09:10:59AM +08

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月12日 09:57, Michael S. Tsirkin wrote: On Thu, Apr 12, 2018 at 09:39:43AM +0800, Tiwei Bie wrote: On Thu, Apr 12, 2018 at 04:29:29AM +0300, Michael S. Tsirkin wrote: On Thu, Apr 12, 2018 at 09:10:59AM +0800, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 04:22:21PM +0300, Michael S. Tsirk

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 11:23:31AM +0800, Jason Wang wrote: > > > On 2018年04月12日 01:00, Michael S. Tsirkin wrote: > > On Wed, Apr 11, 2018 at 09:41:05PM +0800, Jason Wang wrote: > > > On 2018年04月11日 16:38, Tiwei Bie wrote: > > > > On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: > > >

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 06:20:55AM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 12, 2018 at 10:35:05AM +0800, Tiwei Bie wrote: > > On Thu, Apr 12, 2018 at 04:57:13AM +0300, Michael S. Tsirkin wrote: > > > On Thu, Apr 12, 2018 at 09:39:43AM +0800, Tiwei Bie wrote: > > > > On Thu, Apr 12, 2018 at 0

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月12日 01:00, Michael S. Tsirkin wrote: On Wed, Apr 11, 2018 at 09:41:05PM +0800, Jason Wang wrote: On 2018年04月11日 16:38, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: On 2018年04月11日 15:20, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_N

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 10:35:05AM +0800, Tiwei Bie wrote: > On Thu, Apr 12, 2018 at 04:57:13AM +0300, Michael S. Tsirkin wrote: > > On Thu, Apr 12, 2018 at 09:39:43AM +0800, Tiwei Bie wrote: > > > On Thu, Apr 12, 2018 at 04:29:29AM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Apr 12, 2018 at 0

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Thu, Apr 12, 2018 at 04:57:13AM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 12, 2018 at 09:39:43AM +0800, Tiwei Bie wrote: > > On Thu, Apr 12, 2018 at 04:29:29AM +0300, Michael S. Tsirkin wrote: > > > On Thu, Apr 12, 2018 at 09:10:59AM +0800, Tiwei Bie wrote: > > > > On Wed, Apr 11, 2018 at 0

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 09:39:43AM +0800, Tiwei Bie wrote: > On Thu, Apr 12, 2018 at 04:29:29AM +0300, Michael S. Tsirkin wrote: > > On Thu, Apr 12, 2018 at 09:10:59AM +0800, Tiwei Bie wrote: > > > On Wed, Apr 11, 2018 at 04:22:21PM +0300, Michael S. Tsirkin wrote: > > > > On Wed, Apr 11, 2018 at 0

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 08:37:17PM +0300, Michael S. Tsirkin wrote: > On Wed, Apr 11, 2018 at 04:38:53PM +0800, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: > > > On 2018年04月11日 15:20, Tiwei Bie wrote: > > > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Thu, Apr 12, 2018 at 04:29:29AM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 12, 2018 at 09:10:59AM +0800, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 04:22:21PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > > > This patch introduces VHO

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 09:10:59AM +0800, Tiwei Bie wrote: > On Wed, Apr 11, 2018 at 04:22:21PM +0300, Michael S. Tsirkin wrote: > > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > > > feature for vhost-user. By default,

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 04:22:21PM +0300, Michael S. Tsirkin wrote: > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > > feature for vhost-user. By default, vhost-user backend needs > > to query the IOTLBs from QEMU after me

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 04:38:53PM +0800, Tiwei Bie wrote: > On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: > > On 2018年04月11日 15:20, Tiwei Bie wrote: > > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > > > feature for vhost-user. By default, vhost-user backend needs > >

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 09:41:05PM +0800, Jason Wang wrote: > > > On 2018年04月11日 16:38, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: > > > On 2018年04月11日 15:20, Tiwei Bie wrote: > > > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > > > > feature

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月11日 21:22, Michael S. Tsirkin wrote: On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU after meeting unknown IOVAs. With thi

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月11日 16:38, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: On 2018年04月11日 15:20, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU after

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > feature for vhost-user. By default, vhost-user backend needs > to query the IOTLBs from QEMU after meeting unknown IOVAs. > With this protocol feature negotiated, QEMU will prov

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 05:16:47PM +0800, Peter Xu wrote: > On Wed, Apr 11, 2018 at 04:55:25PM +0800, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 04:37:16PM +0800, Peter Xu wrote: > > > On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > > > > On Wed, Apr 11, 2018 at 04:00:36PM +0800, Pet

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 04:55:25PM +0800, Tiwei Bie wrote: > On Wed, Apr 11, 2018 at 04:37:16PM +0800, Peter Xu wrote: > > On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > > > On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > > > > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiw

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 04:37:16PM +0800, Peter Xu wrote: > On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > > > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > > > > > [...] > > > > > > > This is just a RFC

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: > On 2018年04月11日 15:20, Tiwei Bie wrote: > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > > feature for vhost-user. By default, vhost-user backend needs > > to query the IOTLBs from QEMU after meeting unknown IOVAs. > > Wit

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > Hi Peter, > > On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > > > [...] > > > > > This is just a RFC for now. It seems that, it doesn't work > > > as expected

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
Hi Peter, On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > [...] > > > This is just a RFC for now. It seems that, it doesn't work > > as expected when guest is using kernel driver (To handle > > this case, it seems that so

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月11日 15:20, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU after meeting unknown IOVAs. With this protocol feature negotiated, QEMU will provide all the IOTLBs to vh

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: [...] > This is just a RFC for now. It seems that, it doesn't work > as expected when guest is using kernel driver (To handle > this case, it seems that some RAM regions' events also need > to be listened). Any comments would be appreciat

[Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU after meeting unknown IOVAs. With this protocol feature negotiated, QEMU will provide all the IOTLBs to vhost-user backend without waiting for the qu