initialize header type register in pci generic code.

Cc: Blue Swirl <blauwir...@gmail.com>
Cc: "Michael S. Tsirkin" <m...@redhat.com>
Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp>
---
 hw/pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index eb2043e..7b055b4 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -603,6 +603,7 @@ static PCIDevice *do_pci_register_device(PCIDevice 
*pci_dev, PCIBus *bus,
     pci_dev->irq_state = 0;
     pci_config_alloc(pci_dev);
 
+    pci_dev->config[PCI_HEADER_TYPE] = header_type;
     header_type &= ~PCI_HEADER_TYPE_MULTI_FUNCTION;
     if (header_type == PCI_HEADER_TYPE_NORMAL) {
         pci_set_default_subsystem_id(pci_dev);
-- 
1.6.6.1


Reply via email to