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/virtio-pci.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'hw/virtio-pci.c') diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 85f14a2c2..62b46bd48 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -518,14 +518,6 @@ static int virtio_net_init_pci(PCIDevice *pci_dev) /* make the actual value visible */ proxy->nvectors = vdev->nvectors; - - if (!pci_dev->qdev.hotplugged) { - static int loaded = 0; - if (!loaded) { - pci_add_option_rom(pci_dev, "pxe-virtio.bin"); - loaded = 1; - } - } return 0; } @@ -569,6 +561,7 @@ static PCIDeviceInfo virtio_info[] = { .qdev.size = sizeof(VirtIOPCIProxy), .init = virtio_net_init_pci, .exit = virtio_net_exit_pci, + .romfile = "pxe-virtio.bin", .qdev.props = (Property[]) { DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3), DEFINE_NIC_PROPERTIES(VirtIOPCIProxy, nic), -- cgit v1.2.3