This sets a default PCI subsystem ID for all emulated PCI devices. PCI
specs require this, so do it. The defaults are global variables so
they can easily be changed (before device creation) as Xen probably
wants to use the XenSource vendor ID instead of the qemu default.
The defaults are pre-filled by pci_register_device(). Individual
drivers can overwrite it of course when setting up the config space
for the emulated device.
TODO: get an official vendor ID assigned, or borrow one (maybe
Qumranet which already sponsors the virtio IDs ???).
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/pci.c | 11 +++++++++++
hw/pci.h | 2 ++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index bc55989..ffc90d7 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -50,6 +50,8 @@ static void pci_update_mappings(PCIDevice *d);
static void pci_set_irq(void *opaque, int irq_num, int level);
target_phys_addr_t pci_mem_base;
+uint16_t pci_default_sub_vendor_id = 0xfffa; /* FIXME: get one assigned */
+uint16_t pci_default_sub_device_id = 0x0001;