Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-15 Thread Michael S. Tsirkin
On Fri, Mar 13, 2015 at 02:28:20PM +0800, Fam Zheng wrote: > On Fri, 03/13 14:07, Fam Zheng wrote: > > On Thu, 03/12 12:15, Michael S. Tsirkin wrote: > > > On Thu, Mar 12, 2015 at 11:04:33AM +, Peter Maydell wrote: > > > > On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > > > > > This isn

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-13 Thread Michael S. Tsirkin
On Fri, Mar 13, 2015 at 02:07:19PM +0800, Fam Zheng wrote: > On Thu, 03/12 12:15, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2015 at 11:04:33AM +, Peter Maydell wrote: > > > On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > > > > This isn't a device reset though. > > > > The function t

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Fam Zheng
On Fri, 03/13 14:07, Fam Zheng wrote: > On Thu, 03/12 12:15, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2015 at 11:04:33AM +, Peter Maydell wrote: > > > On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > > > > This isn't a device reset though. > > > > The function that Fam is touching i

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Fam Zheng
On Thu, 03/12 12:15, Michael S. Tsirkin wrote: > On Thu, Mar 12, 2015 at 11:04:33AM +, Peter Maydell wrote: > > On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > > > This isn't a device reset though. > > > The function that Fam is touching is called > > > when a special "virtio reset" reg

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 11:04:33AM +, Peter Maydell wrote: > On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > > This isn't a device reset though. > > The function that Fam is touching is called > > when a special "virtio reset" register to > > poked by the driver. > > It only resets part

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Peter Maydell
On 12 March 2015 at 10:57, Michael S. Tsirkin wrote: > This isn't a device reset though. > The function that Fam is touching is called > when a special "virtio reset" register to > poked by the driver. > It only resets part of the device, not all of it, > and it seems reasonable to ask that it cle

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 10:21:47AM +, Peter Maydell wrote: > On 12 March 2015 at 10:16, Michael S. Tsirkin wrote: > > So thinking about this more, by the time kdump tries to reset device, > > linux has probably already disabled the IRQ at the APIC level. > > Isn't that the case? If so, the pat

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Peter Maydell
On 12 March 2015 at 10:16, Michael S. Tsirkin wrote: > So thinking about this more, by the time kdump tries to reset device, > linux has probably already disabled the IRQ at the APIC level. > Isn't that the case? If so, the patch won't help, will it? Trying to deassert (or worse, assert) interrup

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 06:00:28PM +0800, Fam Zheng wrote: > On Thu, 03/12 10:41, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2015 at 02:40:55PM +0800, Fam Zheng wrote: > > > Currently we could leave PCI IRQ asserted even after reset, it is safer > > > to clear it. > > > > > > In the case that a

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 06:00:28PM +0800, Fam Zheng wrote: > On Thu, 03/12 10:41, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2015 at 02:40:55PM +0800, Fam Zheng wrote: > > > Currently we could leave PCI IRQ asserted even after reset, it is safer > > > to clear it. > > > > > > In the case that a

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Fam Zheng
On Thu, 03/12 10:41, Michael S. Tsirkin wrote: > On Thu, Mar 12, 2015 at 02:40:55PM +0800, Fam Zheng wrote: > > Currently we could leave PCI IRQ asserted even after reset, it is safer > > to clear it. > > > > In the case that a buggy driver has disabled MSI-X unintentially, we may > > have already

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 02:40:55PM +0800, Fam Zheng wrote: > Currently we could leave PCI IRQ asserted even after reset, it is safer > to clear it. > > In the case that a buggy driver has disabled MSI-X unintentially, we may > have already injected IRQ in previous virtio_pci_notify, which will not

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Fam Zheng
On Thu, 03/12 08:22, Michael S. Tsirkin wrote: > On Thu, Mar 12, 2015 at 02:40:55PM +0800, Fam Zheng wrote: > > Currently we could leave PCI IRQ asserted even after reset, it is safer > > to clear it. > > > > In the case that a buggy driver has disabled MSI-X unintentially, we may > > have already

Re: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-12 Thread Michael S. Tsirkin
On Thu, Mar 12, 2015 at 02:40:55PM +0800, Fam Zheng wrote: > Currently we could leave PCI IRQ asserted even after reset, it is safer > to clear it. > > In the case that a buggy driver has disabled MSI-X unintentially, we may > have already injected IRQ in previous virtio_pci_notify, which will not

[Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset

2015-03-11 Thread Fam Zheng
Currently we could leave PCI IRQ asserted even after reset, it is safer to clear it. In the case that a buggy driver has disabled MSI-X unintentially, we may have already injected IRQ in previous virtio_pci_notify, which will not be cleared by guest because it doesn't expect it (i.e. no irq handle