diff options
author | Hui Kai Ran <hkran@linux.vnet.ibm.com> | 2011-12-08 13:49:13 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-12-09 11:25:22 +0000 |
commit | ad3d11e6e78f8640c1af6f67420200d8287c3267 (patch) | |
tree | b4adeedec86470bbfa0db9521f401423ee3476e1 /hw/virtio-pci.c | |
parent | ee12e1f38a8bb2cbf58584688f0a90a7872f5dcf (diff) |
virtio-pci: use pci macros
Signed-off-by: Hui Kai Ran <hkran@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r-- | hw/virtio-pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index c665f5c94b..77b75bcd9a 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -627,9 +627,10 @@ void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev) if (proxy->class_code) { pci_config_set_class(config, proxy->class_code); } - pci_set_word(config + 0x2c, pci_get_word(config + PCI_VENDOR_ID)); - pci_set_word(config + 0x2e, vdev->device_id); - config[0x3d] = 1; + pci_set_word(config + PCI_SUBSYSTEM_VENDOR_ID, + pci_get_word(config + PCI_VENDOR_ID)); + pci_set_word(config + PCI_SUBSYSTEM_ID, vdev->device_id); + config[PCI_INTERRUPT_PIN] = 1; memory_region_init(&proxy->msix_bar, "virtio-msix", 4096); if (vdev->nvectors && !msix_init(&proxy->pci_dev, vdev->nvectors, |