Re: [Qemu-devel] [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-04 Thread Alex Williamson
On Fri, 2013-10-04 at 22:13 +1000, Alexey Kardashevskiy wrote: > On 10/04/2013 01:39 AM, Alex Williamson wrote: > > During vfio-pci initfn, the device is not always in a state where the > > option ROM can be read. In the case of graphics cards, there's often > > no per function reset, which means

Re: [Qemu-devel] [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-04 Thread Alexey Kardashevskiy
On 10/04/2013 01:39 AM, Alex Williamson wrote: > During vfio-pci initfn, the device is not always in a state where the > option ROM can be read. In the case of graphics cards, there's often > no per function reset, which means we have host driver state affecting > whether the option ROM is usable.

Re: [Qemu-devel] [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-03 Thread Alex Williamson
On Thu, 2013-10-03 at 20:46 +0200, Paolo Bonzini wrote: > Il 03/10/2013 17:39, Alex Williamson ha scritto: > > +static const MemoryRegionOps vfio_rom_ops = { > > +.read = vfio_rom_read, > > +.endianness = DEVICE_LITTLE_ENDIAN, > > +}; > > + > > I think you need to define a write callback t

Re: [Qemu-devel] [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-03 Thread Paolo Bonzini
Il 03/10/2013 17:39, Alex Williamson ha scritto: > +static const MemoryRegionOps vfio_rom_ops = { > +.read = vfio_rom_read, > +.endianness = DEVICE_LITTLE_ENDIAN, > +}; > + I think you need to define a write callback too (unless you're sure for some other reason that the area will never be

[Qemu-devel] [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-03 Thread Alex Williamson
During vfio-pci initfn, the device is not always in a state where the option ROM can be read. In the case of graphics cards, there's often no per function reset, which means we have host driver state affecting whether the option ROM is usable. Ideally we want to move reading the option ROM past a