[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 04/11] igd: switch TYPE_IGD_PASSTHROUGH_I440F
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PATCH v3 04/11] igd: switch TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE to realize |
Date: |
Mon, 25 Jan 2016 11:53:16 +0000 |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Mon, 25 Jan 2016, Gerd Hoffmann wrote:
> Hi,
>
> > > static void igd_passthrough_i440fx_class_init(ObjectClass *klass, void
> > > *data)
> > > @@ -78,7 +77,7 @@ static void
> > > igd_passthrough_i440fx_class_init(ObjectClass *klass, void *data)
> > > DeviceClass *dc = DEVICE_CLASS(klass);
> > > PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
> > >
> > > - k->init = igd_pt_i440fx_initfn;
> > > + k->realize = igd_pt_i440fx_realize;
> >
> > I am trying to understand how this have ever worked before:
> >
> > * PCIDeviceClass::init is called by pci_default_realize()
> > (default value for PCIDeviceClass::realize)
> > * i440fx_class_init() overrides PCIDeviceClass::realize
> > to i440fx_realize()
> >
> > So, when exactly was igd_pt_i440fx_realize() being called, before
> > this series?
>
> It simply didn't?
>
> I suspect this got ported over from the qemu-xen tree, but wasn't really
> tested and also not adapted to commit "9af21db pci: Trivial device model
> conversions to realize". So this patch actually is yet another
> bugfix ...
You are probably right. For your reference, the original code is here:
http://xenbits.xen.org/gitweb/?p=qemu-xen-traditional.git;a=blob_plain;f=hw/pt-graphics.c;hb=HEAD
[Qemu-devel] [PATCH v3 08/11] igd: add q35 support, Gerd Hoffmann, 2016/01/05
[Qemu-devel] [PATCH v3 03/11] pc: move igd support code to igd.c, Gerd Hoffmann, 2016/01/05
[Qemu-devel] [PATCH v3 07/11] igd: revamp host config read, Gerd Hoffmann, 2016/01/05