Add macro for virtio-console PCI device ID (Mark McLoughlin)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 26 Jan 2009 15:22:46 +0000 (15:22 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 26 Jan 2009 15:22:46 +0000 (15:22 +0000)
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

hw/pci.h
hw/virtio-console.c

index 867e6fe..a94fd44 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -16,6 +16,7 @@ extern target_phys_addr_t pci_mem_base;
 #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);
index deae76d..ce20c91 100644 (file)
@@ -126,7 +126,8 @@ void *virtio_console_init(PCIBus *bus, CharDriverState *chr)
     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));