From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj4xT-0003zs-Pp for qemu-devel@nongnu.org; Thu, 13 Dec 2012 04:20:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tj4xS-0003yP-Ny for qemu-devel@nongnu.org; Thu, 13 Dec 2012 04:19:59 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:63511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj4xS-0003yK-Gf for qemu-devel@nongnu.org; Thu, 13 Dec 2012 04:19:58 -0500 Received: by mail-ie0-f173.google.com with SMTP id e13so3610266iej.4 for ; Thu, 13 Dec 2012 01:19:58 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 13 Dec 2012 10:19:37 +0100 Message-Id: <1355390378-16692-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1355390378-16692-1-git-send-email-pbonzini@redhat.com> References: <1355390378-16692-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 4/5] ivshmem: use symbolic constant for PCI ID, add to pci-ids.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Due to disagreement on a name that is generic enough for hw/pci.h, the symbolic constants are placed in the .c files. Signed-off-by: Paolo Bonzini --- docs/specs/pci-ids.txt | 2 ++ hw/ivshmem.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt index 2d5329a..e76b196 100644 --- a/docs/specs/pci-ids.txt +++ b/docs/specs/pci-ids.txt @@ -30,4 +30,6 @@ maintained as part of the virtio specification. 1af4:1100 Used as PCI Subsystem ID for existing hardware devices emulated by qemu. +1af4:1110 ivshmem device (shared memory, docs/specs/ivshmem_device_spec.txt) + All other device IDs are reserved. diff --git a/hw/ivshmem.c b/hw/ivshmem.c index f6dbb21..9520daa 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -28,6 +28,9 @@ #include #include +#define PCI_VENDOR_ID_IVSHMEM PCI_VENDOR_ID_REDHAT_QUMRANET +#define PCI_DEVICE_ID_IVSHMEM 0x1110 + #define IVSHMEM_IOEVENTFD 0 #define IVSHMEM_MSI 1 @@ -799,8 +802,8 @@ static void ivshmem_class_init(ObjectClass *klass, void *data) k->init = pci_ivshmem_init; k->exit = pci_ivshmem_uninit; - k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET; - k->device_id = 0x1110; + k->vendor_id = PCI_VENDOR_ID_IVSHMEM; + k->device_id = PCI_DEVICE_ID_IVSHMEM; k->class_id = PCI_CLASS_MEMORY_RAM; dc->reset = ivshmem_reset; dc->props = ivshmem_properties; -- 1.8.0.1