On 10/18/2010 02:03 PM, Michael S. Tsirkin wrote:
On Mon, Oct 18, 2010 at 01:42:06PM -0500, Anthony Liguori wrote:
+/* Patch the PCI vendor and device ids in a PCI rom image if necessary.
+   This is needed for an option rom which is used for more than one device. */
+static void pci_patch_ids(PCIDevice *pdev, uint8_t *ptr, int size)
let's return an error code on malformed roms so management can detect errors?
A bad/missing PnP header does not mean it's an invalid ROM.
I don't see this as a generic capability - rather a specific
hack that helps reduce some duplication for eepro100 and friends.
As such, if we can't patch the id we know it's an invalid file.

This code is unconditional in the pci option rom loading path.

If it's restricted to a qdev property that's defaulted to enabled for the eepro cards, that would be a reasonable argument to make.

Regards,

Anthony Liguori



Reply via email to