From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tio4V-00081d-Iy for qemu-devel@nongnu.org; Wed, 12 Dec 2012 10:18:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tio4N-000310-O8 for qemu-devel@nongnu.org; Wed, 12 Dec 2012 10:18:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tio4N-00030t-FE for qemu-devel@nongnu.org; Wed, 12 Dec 2012 10:17:59 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBCFHwRG025887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Dec 2012 10:17:58 -0500 Date: Wed, 12 Dec 2012 17:21:06 +0200 From: "Michael S. Tsirkin" Message-ID: <20121212152106.GA16750@redhat.com> References: <1353320494-15033-1-git-send-email-pbonzini@redhat.com> <1353320494-15033-5-git-send-email-pbonzini@redhat.com> <20121212142207.GA15555@redhat.com> <50C894CB.9030406@redhat.com> <20121212144854.GG15555@redhat.com> <50C899E4.5020403@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50C899E4.5020403@redhat.com> Subject: Re: [Qemu-devel] [PATCH 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: Paolo Bonzini Cc: qemu-devel@nongnu.org, kraxel@redhat.com On Wed, Dec 12, 2012 at 03:51:16PM +0100, Paolo Bonzini wrote: > Il 12/12/2012 15:48, Michael S. Tsirkin ha scritto: > >>>>> > >> > diff --git a/hw/pci.h b/hw/pci.h > >>>>> > >> > index 0719521..3704d5f 100644 > >>>>> > >> > --- a/hw/pci.h > >>>>> > >> > +++ b/hw/pci.h > >>>>> > >> > @@ -78,6 +78,7 @@ > >>>>> > >> > #define PCI_DEVICE_ID_VIRTIO_SCSI 0x1004 > >>>>> > >> > #define PCI_DEVICE_ID_VIRTIO_RNG 0x1005 > >>>>> > >> > #define PCI_DEVICE_ID_VIRTIO_9P 0x1009 > >>>>> > >> > +#define PCI_DEVICE_ID_QUMRANET_IVSHMEM 0x1110 > >>>>> > >> > > >>>>> > >> > #define FMT_PCIBUS PRIx64 > >>> > > Why _QUMRANET I wonder? > >>> > > > >> > > >> > Because it's under 0x1af4 (PCI_VENDOR_ID_REDHAT_QUMRANET), not 0x1b36 > >> > (PCI_VENDOR_ID_REDHAT). > > > > Yes but so are all virtio devices are they not? > > All device IDs start with PCI_DEVICE_ID_. virtio devices are > the exception for some historical reason I don't know. > PCI_DEVICE_ID_VIRTIO_IVSHMEM is wrong, and PCI_DEVICE_ID_IVSHMEM is > unspecific. PCI_DEVICE_ID_QEMU_IVSHMEM is wrong because the QEMU vendor > id is 0x1234. > > So either it stays Qumranet, or the 0x1234 vendor id is renamed to > PCI_VENDOR_ID_BOCHS and 0x1af4 becomes PCI_VENDOR_ID_REDHAT_QEMU. > Either is fine for me, but I wanted to minimize the churn. > > Paolo Thinking about it some more, I'd rather move this stuff out of pci.h For virtio, there's actually linux/virtio_ids.h which defines VIRTIO_ID_NET etc. We should add that, and have virtio just use it. Doesn't ivshmem have a linux driver? When it lands upstream we'll be able to add it to pci_ids.h meanwhile keeping a number in device .c seems fine as well. I will do the virtio change I think - meanwhile could you limit this patch to just the .txt change please? -- MST