Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector

2016-08-02 Thread Jason Wang
On 2016年08月02日 14:37, Cornelia Huck wrote: On Tue, 2 Aug 2016 10:39:22 +0800 Jason Wang wrote: On 2016年08月02日 02:00, Cornelia Huck wrote: On Mon, 1 Aug 2016 16:07:58 +0800 Jason Wang wrote: +if (k->query_guest_notifiers && +k->query_guest_notifiers(qbus->parent) && +v

Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector

2016-08-01 Thread Cornelia Huck
On Tue, 2 Aug 2016 10:39:22 +0800 Jason Wang wrote: > On 2016年08月02日 02:00, Cornelia Huck wrote: > > On Mon, 1 Aug 2016 16:07:58 +0800 > > Jason Wang wrote: > >> +if (k->query_guest_notifiers && > >> +k->query_guest_notifiers(qbus->parent) && > >> +virtio_queue_vector(vdev,

Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector

2016-08-01 Thread Jason Wang
On 2016年08月02日 02:00, Cornelia Huck wrote: On Mon, 1 Aug 2016 16:07:58 +0800 Jason Wang wrote: We used to set vring call fd unconditionally even if guest driver does not use MSIX for this vritqueue at all. This will cause lots of unnecessary userspace access and other checks for drivers doe

Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector

2016-08-01 Thread Jason Wang
On 2016年08月01日 22:08, Michael S. Tsirkin wrote: On Mon, Aug 01, 2016 at 04:07:58PM +0800, Jason Wang wrote: We used to set vring call fd unconditionally even if guest driver does not use MSIX for this vritqueue at all. This will cause lots of unnecessary userspace access and other checks for d

Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector

2016-08-01 Thread Cornelia Huck
On Mon, 1 Aug 2016 16:07:58 +0800 Jason Wang wrote: > We used to set vring call fd unconditionally even if guest driver does > not use MSIX for this vritqueue at all. This will cause lots of > unnecessary userspace access and other checks for drivers does not use > interrupt at all (e.g virtio-n

Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector

2016-08-01 Thread Michael S. Tsirkin
On Mon, Aug 01, 2016 at 04:07:58PM +0800, Jason Wang wrote: > We used to set vring call fd unconditionally even if guest driver does > not use MSIX for this vritqueue at all. This will cause lots of > unnecessary userspace access and other checks for drivers does not use > interrupt at all (e.g vir

[Qemu-devel] [PATCH] vhost: don't set vring call if no vector

2016-08-01 Thread Jason Wang
We used to set vring call fd unconditionally even if guest driver does not use MSIX for this vritqueue at all. This will cause lots of unnecessary userspace access and other checks for drivers does not use interrupt at all (e.g virtio-net pmd). So check and clean vring call fd if guest does not use