Commit 14d50bef67881716bf750a1ddee9d2bb429e75f1
1 parent
a7c4996b
Add macro for virtio-console PCI device ID (Mark McLoughlin)
Also use the existing macro for the PCI vendor ID Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6439 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
3 additions
and
1 deletions
hw/pci.h
| @@ -16,6 +16,7 @@ extern target_phys_addr_t pci_mem_base; | @@ -16,6 +16,7 @@ extern target_phys_addr_t pci_mem_base; | ||
| 16 | #define PCI_DEVICE_ID_VIRTIO_NET 0x1000 | 16 | #define PCI_DEVICE_ID_VIRTIO_NET 0x1000 |
| 17 | #define PCI_DEVICE_ID_VIRTIO_BLOCK 0x1001 | 17 | #define PCI_DEVICE_ID_VIRTIO_BLOCK 0x1001 |
| 18 | #define PCI_DEVICE_ID_VIRTIO_BALLOON 0x1002 | 18 | #define PCI_DEVICE_ID_VIRTIO_BALLOON 0x1002 |
| 19 | +#define PCI_DEVICE_ID_VIRTIO_CONSOLE 0x1003 | ||
| 19 | 20 | ||
| 20 | typedef void PCIConfigWriteFunc(PCIDevice *pci_dev, | 21 | typedef void PCIConfigWriteFunc(PCIDevice *pci_dev, |
| 21 | uint32_t address, uint32_t data, int len); | 22 | uint32_t address, uint32_t data, int len); |
hw/virtio-console.c
| @@ -126,7 +126,8 @@ void *virtio_console_init(PCIBus *bus, CharDriverState *chr) | @@ -126,7 +126,8 @@ void *virtio_console_init(PCIBus *bus, CharDriverState *chr) | ||
| 126 | VirtIOConsole *s; | 126 | VirtIOConsole *s; |
| 127 | 127 | ||
| 128 | s = (VirtIOConsole *)virtio_init_pci(bus, "virtio-console", | 128 | s = (VirtIOConsole *)virtio_init_pci(bus, "virtio-console", |
| 129 | - 6900, 0x1003, | 129 | + PCI_VENDOR_ID_REDHAT_QUMRANET, |
| 130 | + PCI_DEVICE_ID_VIRTIO_CONSOLE, | ||
| 130 | 0, VIRTIO_ID_CONSOLE, | 131 | 0, VIRTIO_ID_CONSOLE, |
| 131 | 0x03, 0x80, 0x00, | 132 | 0x03, 0x80, 0x00, |
| 132 | 0, sizeof(VirtIOConsole)); | 133 | 0, sizeof(VirtIOConsole)); |