[vfio-users] [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize
Eduardo Habkost
ehabkost at redhat.com
Sat Jan 23 14:52:54 UTC 2016
On Wed, Jan 20, 2016 at 10:10:11AM +0100, Gerd Hoffmann wrote:
> Hi,
>
> > > > > + i440fx_realize = k->realize;
> > > > > k->realize = igd_pt_i440fx_realize;
> > >
> > > ... because we are overriding it right here.
> >
> > Many device classes have a parent_realize field so they can keep
> > a pointer to the original realize function. It's better than a
> > static variable.
>
> How does the attached patch (incremental fix, not tested yet) look like?
Looks good.
Reviewed-by: Eduardo Habkost <ehabkost at redhat.com>
But, I have a similar question to the one I had about patch
04/11: how did this ever work before?
Does that mean i440fx_realize() was never called when
creating/initializing a TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE
before?
--
Eduardo
More information about the vfio-users
mailing list