From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize Date: Tue, 5 Jan 2016 12:41:32 +0100 Message-ID: <1451994098-6972-6-git-send-email-kraxel@redhat.com> References: <1451994098-6972-1-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1451994098-6972-1-git-send-email-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vfio-users-bounces-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Errors-To: vfio-users-bounces-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org To: qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org Cc: igvt-g-y27Ovi1pjclAfugRpC6u6w@public.gmane.org, xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org, Eduardo Habkost , Stefano Stabellini , Cao jin , vfio-users-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: xen-devel@lists.xenproject.org Signed-off-by: Gerd Hoffmann --- hw/pci-host/igd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c index d1eeafb..6f52ab1 100644 --- a/hw/pci-host/igd.c +++ b/hw/pci-host/igd.c @@ -53,12 +53,20 @@ out: return ret; } +static void (*i440fx_realize)(PCIDevice *pci_dev, Error **errp); static void igd_pt_i440fx_realize(PCIDevice *pci_dev, Error **errp) { + Error *err = NULL; uint32_t val = 0; int rc, i, num; int pos, len; + i440fx_realize(pci_dev, &err); + if (err != NULL) { + error_propagate(errp, err); + return; + } + num = ARRAY_SIZE(igd_host_bridge_infos); for (i = 0; i < num; i++) { pos = igd_host_bridge_infos[i].offset; @@ -77,6 +85,7 @@ static void igd_passthrough_i440fx_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); + i440fx_realize = k->realize; k->realize = igd_pt_i440fx_realize; dc->desc = "IGD Passthrough Host bridge"; } -- 1.8.3.1