Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-17 Thread Michael S. Tsirkin
On Thu, Nov 17, 2016 at 04:04:26AM -0500, Paolo Bonzini wrote: > > > > > > /* > > > > > > * virtio spec 1.0 says ISR bit 0 should be ignored with MSI, but > > > > > > * windows drivers included in virtio-win 1.8.0 (circa 2015) > > > > > > * for Windows 8.1 only are incorrectly polling this bit d

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-17 Thread Stefan Hajnoczi
On Wed, Nov 16, 2016 at 10:15:25PM +0200, Michael S. Tsirkin wrote: > On Wed, Nov 16, 2016 at 07:05:51PM +0100, Paolo Bonzini wrote: > > @@ -1356,6 +1349,17 @@ bool virtio_should_notify(VirtIODevice *vdev, > > VirtQueue *vq) > > return !v || vring_need_event(vring_get_used_event(vq), new, old

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-17 Thread Paolo Bonzini
> > > > > /* > > > > > * virtio spec 1.0 says ISR bit 0 should be ignored with MSI, but > > > > > * windows drivers included in virtio-win 1.8.0 (circa 2015) > > > > > * for Windows 8.1 only are incorrectly polling this bit during > > > > > shutdown > > > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 04:05:31PM -0500, Paolo Bonzini wrote: > > > - Original Message - > > From: "Michael S. Tsirkin" > > To: "Paolo Bonzini" > > Cc: qemu-devel@nongnu.org, "alex williamson" , > > borntrae...@de.ibm.com, fel...@nutanix.com > > Sent: Wednesday, November 16, 2016 9:39

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Paolo Bonzini
- Original Message - > From: "Michael S. Tsirkin" > To: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org, "alex williamson" , > borntrae...@de.ibm.com, fel...@nutanix.com > Sent: Wednesday, November 16, 2016 9:39:24 PM > Subject: Re: [PATCH 3/3] virtio: set ISR on dataplane notifications >

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Paolo Bonzini
> > +void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > +if (!virtio_should_notify(vdev, vq)) { > > +return; > > +} > > + > > +trace_virtio_notify_irqfd(vdev, vq); > > +virtio_set_isr(vq->vdev, 0x1); > > So here, I think we need a comment with parts of >

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 07:05:51PM +0100, Paolo Bonzini wrote: > Dataplane has been omitting forever the step of setting ISR when > an interrupt is raised. This caused little breakage, because the > specification actually says that ISR may not be updated in MSI mode. > > Some versions of the Wind

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 03:38:11PM -0500, Paolo Bonzini wrote: > > > +void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue *vq) > > > +{ > > > +if (!virtio_should_notify(vdev, vq)) { > > > +return; > > > +} > > > + > > > +trace_virtio_notify_irqfd(vdev, vq); > > > +virtio_

[Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Paolo Bonzini
Dataplane has been omitting forever the step of setting ISR when an interrupt is raised. This caused little breakage, because the specification actually says that ISR may not be updated in MSI mode. Some versions of the Windows drivers however didn't clear MSI mode correctly, and proceeded using

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Alex Williamson
On Tue, 15 Nov 2016 21:17:56 +0200 "Michael S. Tsirkin" wrote: > On Tue, Nov 15, 2016 at 11:21:55AM -0700, Alex Williamson wrote: > > On Tue, 15 Nov 2016 19:58:52 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Nov 15, 2016 at 10:48:15AM -0700, Alex Williamson wrote: > > > > On Tue,

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 11:21:55AM -0700, Alex Williamson wrote: > On Tue, 15 Nov 2016 19:58:52 +0200 > "Michael S. Tsirkin" wrote: > > > On Tue, Nov 15, 2016 at 10:48:15AM -0700, Alex Williamson wrote: > > > On Tue, 15 Nov 2016 19:38:30 +0200 > > > "Michael S. Tsirkin" wrote: > > > > > > > O

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Alex Williamson
On Tue, 15 Nov 2016 19:58:52 +0200 "Michael S. Tsirkin" wrote: > On Tue, Nov 15, 2016 at 10:48:15AM -0700, Alex Williamson wrote: > > On Tue, 15 Nov 2016 19:38:30 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Nov 15, 2016 at 05:22:49PM +0100, Paolo Bonzini wrote: > > > > > > > >

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 10:48:15AM -0700, Alex Williamson wrote: > On Tue, 15 Nov 2016 19:38:30 +0200 > "Michael S. Tsirkin" wrote: > > > On Tue, Nov 15, 2016 at 05:22:49PM +0100, Paolo Bonzini wrote: > > > > > > > > > On 15/11/2016 16:44, Michael S. Tsirkin wrote: > > > > True. We could drop

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Alex Williamson
On Tue, 15 Nov 2016 19:38:30 +0200 "Michael S. Tsirkin" wrote: > On Tue, Nov 15, 2016 at 05:22:49PM +0100, Paolo Bonzini wrote: > > > > > > On 15/11/2016 16:44, Michael S. Tsirkin wrote: > > > True. We could drop it from non-data plane, it's just that we never had > > > a reason to. vhost in

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 05:22:49PM +0100, Paolo Bonzini wrote: > > > On 15/11/2016 16:44, Michael S. Tsirkin wrote: > > True. We could drop it from non-data plane, it's just that we never had > > a reason to. vhost in kernel does not set ISR in MSI mode, either. > > Yeah, I suspected that. But

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Paolo Bonzini
On 15/11/2016 16:44, Michael S. Tsirkin wrote: > True. We could drop it from non-data plane, it's just that we never had > a reason to. vhost in kernel does not set ISR in MSI mode, either. Yeah, I suspected that. But dropping it from non-dataplane would break Windows hibernation and crashdump,

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 04:28:37PM +0100, Paolo Bonzini wrote: > > > On 15/11/2016 16:26, Michael S. Tsirkin wrote: > > On Tue, Nov 15, 2016 at 02:46:29PM +0100, Paolo Bonzini wrote: > >> Dataplane has been omitting forever the step of setting ISR when an > >> interrupt is raised. This causes su

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Paolo Bonzini
On 15/11/2016 16:26, Michael S. Tsirkin wrote: > On Tue, Nov 15, 2016 at 02:46:29PM +0100, Paolo Bonzini wrote: >> Dataplane has been omitting forever the step of setting ISR when an >> interrupt is raised. This causes surprisingly little breakage, >> because most polling-mode drivers look at th

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 02:46:29PM +0100, Paolo Bonzini wrote: > Dataplane has been omitting forever the step of setting ISR when an > interrupt is raised. This causes surprisingly little breakage, > because most polling-mode drivers look at the used ring's index field > rather than the ISR regist

[Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-15 Thread Paolo Bonzini
Dataplane has been omitting forever the step of setting ISR when an interrupt is raised. This causes surprisingly little breakage, because most polling-mode drivers look at the used ring's index field rather than the ISR register. Some versions of the Windows drivers are an exception---and they u