[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/7] igd: switch TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEV
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 3/7] igd: switch TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE to realize |
Date: |
Tue, 8 Dec 2015 15:07:24 +0100 |
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/pci-host/igd.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c
index ef0273b..d1eeafb 100644
--- a/hw/pci-host/igd.c
+++ b/hw/pci-host/igd.c
@@ -53,7 +53,7 @@ out:
return ret;
}
-static int igd_pt_i440fx_initfn(struct PCIDevice *pci_dev)
+static void igd_pt_i440fx_realize(PCIDevice *pci_dev, Error **errp)
{
uint32_t val = 0;
int rc, i, num;
@@ -65,12 +65,11 @@ static int igd_pt_i440fx_initfn(struct PCIDevice *pci_dev)
len = igd_host_bridge_infos[i].len;
rc = host_pci_config_read(pos, len, val);
if (rc) {
- return -ENODEV;
+ error_setg(errp, "failed to read host config");
+ return;
}
pci_default_write_config(pci_dev, pos, val, len);
}
-
- return 0;
}
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;
dc->desc = "IGD Passthrough Host bridge";
}
--
1.8.3.1
- [Qemu-devel] [PATCH 0/7] igd passthrough chipset tweaks, Gerd Hoffmann, 2015/12/08
- [Qemu-devel] [PATCH 2/7] pc: move igd support code to igd.c, Gerd Hoffmann, 2015/12/08
- [Qemu-devel] [PATCH 4/7] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize, Gerd Hoffmann, 2015/12/08
- [Qemu-devel] [PATCH 3/7] igd: switch TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE to realize,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 1/7] pc: wire up TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE for !xen, Gerd Hoffmann, 2015/12/08
- [Qemu-devel] [PATCH 7/7] igd: add q35 support, Gerd Hoffmann, 2015/12/08
- [Qemu-devel] [PATCH 6/7] igd: revamp host config read, Gerd Hoffmann, 2015/12/08
- [Qemu-devel] [PATCH 5/7] igd: use defines for standard pci config space offsets, Gerd Hoffmann, 2015/12/08
- Re: [Qemu-devel] [PATCH 0/7] igd passthrough chipset tweaks, Stefano Stabellini, 2015/12/11