[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] pci: Automatically patch PCI device id in P

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 1/2] pci: Automatically patch PCI device id in PCI ROM
Date: Mon, 18 Oct 2010 12:04:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100827 Red Hat/3.1.3-1.el6 Thunderbird/3.1.3


+    /* Don't patch a rom with wrong vendor id (might be changed if needed). */
+    if (vendor_id != rom_vendor_id) {
+        return;
+    }

Yes, please drop that one.  If this is accepted I'd like to use this for
vga roms too, so we have to carry only two of them instead of four.

+    if (device_id != rom_device_id) {
+        /* Patch device id and checksum (at offset 6 for etherboot roms). */

Does this offset work for all roms?

  /* Add an option rom for the device */
  static int pci_add_option_rom(PCIDevice *pdev)
@@ -1849,6 +1900,8 @@ static int pci_add_option_rom(PCIDevice *pdev)
      load_image(path, ptr);

+    pci_patch_device_id(pdev, ptr, size);

I'd prefer this being opt-in per driver instead of being applied globally (and maybe also pass in a flag whenever a vendor mismatch is fine or not).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]