Skip to contentSkip to conversation

[6439] Add macro for virtio-console PCI device ID (Mark McLoughlin)

Qemu-devel Anthony Liguori 1 participant 1 message Jan 26, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6439

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6439
Author:   aliguori
Date:     2009-01-26 15:22:46 +0000 (Mon, 26 Jan 2009)

Log Message:
-----------
Add macro for virtio-console PCI device ID (Mark McLoughlin)

Also use the existing macro for the PCI vendor ID

Modified Paths:
--------------
trunk/hw/pci.h
trunk/hw/virtio-console.c

Modified: trunk/hw/pci.h
===================================================================

hw/pci.h +1 -0
@@ -16,6 +16,7 @@
 #define PCI_DEVICE_ID_VIRTIO_NET         0x1000
 #define PCI_DEVICE_ID_VIRTIO_BLOCK       0x1001
 #define PCI_DEVICE_ID_VIRTIO_BALLOON     0x1002
+#define PCI_DEVICE_ID_VIRTIO_CONSOLE     0x1003
 
 typedef void PCIConfigWriteFunc(PCIDevice *pci_dev,
                                 uint32_t address, uint32_t data, int len);

Modified: trunk/hw/virtio-console.c
===================================================================

hw/virtio-console.c +2 -1
@@ -126,7 +126,8 @@
     VirtIOConsole *s;
 
     s = (VirtIOConsole *)virtio_init_pci(bus, "virtio-console",
-                                         6900, 0x1003,
+                                         PCI_VENDOR_ID_REDHAT_QUMRANET,
+                                         PCI_DEVICE_ID_VIRTIO_CONSOLE,
                                          0, VIRTIO_ID_CONSOLE,
                                          0x03, 0x80, 0x00,
                                          0, sizeof(VirtIOConsole));