use PCI MACRO in virtio-pci
PATCH 1/1 use PCI MACRO in virtio-pci
--- hw/virtio-pci.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
hw/virtio-pci.c +3 -3
@@ -627,9 +627,9 @@ 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,
Signature · 1 line
1.7.1
Quoted 4 lines · hkran
Signed-off-by hkran <[email protected]>---
hw/virtio-pci.c | 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)
This patch is line-wrapped and git-am refuses to apply it.
Are you using git-send-email(1)? It normally sends patches correctly so I recommend it if you are not yet using it.
Otherwise this looks good and we can take it into the trivial-patches tree. Please resend without line wrap.
Stefan
Quoted 7 lines · Stefan Hajnoczi
Quoted 4 lines · hkran
Signed-off-by hkran<[email protected]>--- hw/virtio-pci.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)This patch is line-wrapped and git-am refuses to apply it.
Quoted 8 lines
Are you using git-send-email(1)? It normally sends patches correctly so I recommend it if you are not yet using it.
Otherwise this looks good and we can take it into the trivial-patches tree. Please resend without line wrap.
Stefan
ok,thanks for reviewing. I will resend it with git-publish:)
Quoted 1 line · hkran
Signed-off-by hkran <[email protected]>
A Signed-off-by line needs to use your full name.
Regards,
Anthony Liguori
Quoted 22 lines
---
hw/virtio-pci.c| 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)hw/virtio-pci.c +3
-3@@ -627,9 +627,9 @@ 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,
Quoted 30 lines · Anthony Liguori
Quoted 1 line · hkran
Signed-off-by hkran <[email protected]>A Signed-off-by line needs to use your full name.
Regards,
Anthony Liguori
Quoted 21 lines
---
hw/virtio-pci.c| 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)hw/virtio-pci.c +3
-3@@ -627,9 +627,9 @@ 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 ;
Quoted 3 lines
Quoted 2 lines
memory_region_init(&proxy->msix_bar, "virtio-msix", 4096); if (vdev->nvectors&& !msix_init(&proxy->pci_dev,vdev->nvectors,