Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-08-20 Thread Alex Williamson
On Sat, 2012-08-18 at 00:28 +1000, Alexey Kardashevskiy wrote: > On Fri, Jun 22, 2012 at 6:16 PM, Alexey Kardashevskiy wrote: > > > On 07/06/12 09:17, Alex Williamson wrote: > > > On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: > > >> Some adapters (like NEC PCI USB controller) do

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-08-17 Thread Alexey Kardashevskiy
On Fri, Jun 22, 2012 at 6:16 PM, Alexey Kardashevskiy wrote: > On 07/06/12 09:17, Alex Williamson wrote: > > On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: > >> Some adapters (like NEC PCI USB controller) do not flush their config > >> on a sioftware reset and remember DMA config,

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-06-22 Thread Alexey Kardashevskiy
On 07/06/12 09:17, Alex Williamson wrote: > On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: >> Some adapters (like NEC PCI USB controller) do not flush their config >> on a sioftware reset and remember DMA config, etc. >> >> If we use such an adapter with QEMU, then crash QEMU (stop

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-06-06 Thread Benjamin Herrenschmidt
On Wed, 2012-06-06 at 21:56 -0600, Alex Williamson wrote: > In so far as vfio should only have to call pci_reset_function and > device > quirks take care of everything else, I agree with you, but that > doesn't > answer any of my questions. Sure, we may want pre- and post-reset > fixup > quirks an

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-06-06 Thread Alex Williamson
On Thu, 2012-06-07 at 12:52 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-06-06 at 17:17 -0600, Alex Williamson wrote: > > > diff --git a/drivers/vfio/pci/vfio_pci.c > > b/drivers/vfio/pci/vfio_pci.c > > > index 1e5315c..6e7c12d 100644 > > > --- a/drivers/vfio/pci/vfio_pci.c > > > +++ b/drive

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-06-06 Thread Benjamin Herrenschmidt
On Wed, 2012-06-06 at 17:17 -0600, Alex Williamson wrote: > > diff --git a/drivers/vfio/pci/vfio_pci.c > b/drivers/vfio/pci/vfio_pci.c > > index 1e5315c..6e7c12d 100644 > > --- a/drivers/vfio/pci/vfio_pci.c > > +++ b/drivers/vfio/pci/vfio_pci.c > > @@ -88,6 +88,8 @@ static void vfio_pci_disable(str

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-06-06 Thread Alex Williamson
On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: > Some adapters (like NEC PCI USB controller) do not flush their config > on a sioftware reset and remember DMA config, etc. > > If we use such an adapter with QEMU, then crash QEMU (stop it with > ctrl-A ctrl-X), and try to use it in

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-05-28 Thread Michael S. Tsirkin
On Mon, May 28, 2012 at 02:48:10PM +0200, Jan Kiszka wrote: > On 2012-05-28 14:44, Michael S. Tsirkin wrote: > > On Fri, May 25, 2012 at 05:35:03PM +1000, Alexey Kardashevskiy wrote: > >> Some adapters (like NEC PCI USB controller) do not flush their config > >> on a sioftware reset and remember DM

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-05-28 Thread Jan Kiszka
On 2012-05-28 14:44, Michael S. Tsirkin wrote: > On Fri, May 25, 2012 at 05:35:03PM +1000, Alexey Kardashevskiy wrote: >> Some adapters (like NEC PCI USB controller) do not flush their config >> on a sioftware reset and remember DMA config, etc. >> >> If we use such an adapter with QEMU, then crash

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-05-28 Thread Michael S. Tsirkin
On Fri, May 25, 2012 at 05:35:03PM +1000, Alexey Kardashevskiy wrote: > Some adapters (like NEC PCI USB controller) do not flush their config > on a sioftware reset and remember DMA config, etc. > > If we use such an adapter with QEMU, then crash QEMU (stop it with > ctrl-A ctrl-X), and try to use

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-05-25 Thread Benjamin Herrenschmidt
On Fri, 2012-05-25 at 06:24 -0600, Alex Williamson wrote: > > > To eliminate such effect, some quirk should be called. The > proposed > > > pci_fixup_final does its job well for mentioned NEC PCI USB but > not > > > sure if it is 100% correct. > > > > I think we should create a new quirk category.

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-05-25 Thread Alex Williamson
On Fri, 2012-05-25 at 18:28 +1000, Benjamin Herrenschmidt wrote: > On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: > > Some adapters (like NEC PCI USB controller) do not flush their config > > on a sioftware reset and remember DMA config, etc. > > > > If we use such an adapter with

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-05-25 Thread Benjamin Herrenschmidt
On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: > Some adapters (like NEC PCI USB controller) do not flush their config > on a sioftware reset and remember DMA config, etc. > > If we use such an adapter with QEMU, then crash QEMU (stop it with > ctrl-A ctrl-X), and try to use it in

[Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-05-25 Thread Alexey Kardashevskiy
Some adapters (like NEC PCI USB controller) do not flush their config on a sioftware reset and remember DMA config, etc. If we use such an adapter with QEMU, then crash QEMU (stop it with ctrl-A ctrl-X), and try to use it in QEMU again, it may start working immediately with previous config when pc