From 8c52c8f320b27684ec3b1a649925b75af376b1f7 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 18 Dec 2009 12:01:08 +0100 Subject: pci romfiles: add property, add default to PCIDeviceInfo This patch adds a romfile property to the pci bus. It allows to specify a romfile to load into the rom bar of the pci device. The default value comes from a new field in PCIDeviceInfo. The property allows to change the file and also to disable the rom loading using an empty string. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- hw/e1000.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'hw/e1000.c') diff --git a/hw/e1000.c b/hw/e1000.c index f7956010f1..33c4bc61fd 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1121,14 +1121,6 @@ static int pci_e1000_init(PCIDevice *pci_dev) d->dev.qdev.info->name, d->dev.qdev.id, d); qemu_format_nic_info_str(&d->nic->nc, macaddr); - - if (!pci_dev->qdev.hotplugged) { - static int loaded = 0; - if (!loaded) { - pci_add_option_rom(&d->dev, "pxe-e1000.bin"); - loaded = 1; - } - } return 0; } @@ -1146,6 +1138,7 @@ static PCIDeviceInfo e1000_info = { .qdev.vmsd = &vmstate_e1000, .init = pci_e1000_init, .exit = pci_e1000_uninit, + .romfile = "pxe-e1000.bin", .qdev.props = (Property[]) { DEFINE_NIC_PROPERTIES(E1000State, conf), DEFINE_PROP_END_OF_LIST(), -- cgit v1.2.1