From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOvFw-0002Hk-9o for qemu-devel@nongnu.org; Thu, 09 Jul 2009 11:09:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOvFr-000292-9x for qemu-devel@nongnu.org; Thu, 09 Jul 2009 11:09:51 -0400 Received: from [199.232.76.173] (port=33660 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOvFr-00028j-59 for qemu-devel@nongnu.org; Thu, 09 Jul 2009 11:09:47 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45136) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOvFq-0000eU-NQ for qemu-devel@nongnu.org; Thu, 09 Jul 2009 11:09:46 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n69F9jMp024766 for ; Thu, 9 Jul 2009 11:09:45 -0400 Message-ID: <4A560835.3050108@redhat.com> Date: Thu, 09 Jul 2009 17:09:41 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/5] qdev/compat: virtio-blk-pci 0.10 compatibility. References: <1247144553-8951-1-git-send-email-kraxel@redhat.com> <1247144553-8951-4-git-send-email-kraxel@redhat.com> <20090709145215.GC26895@redhat.com> In-Reply-To: <20090709145215.GC26895@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 07/09/09 16:52, Michael S. Tsirkin wrote: >> .compat_props = (CompatProperty[]) { >> + { >> + .driver = "virtio-blk-pci", >> + .property = "class", >> + .value = "0x0180", /* PCI_CLASS_STORAGE_OTHER */ > > it seems annoying that we can't use the symbolic name. Ideas how to fix this? We could add a special property type instead of using hex32. Then we can have a string <-> int mapping and use something like .value = "storage-other", Not sure it is worth the trouble though. >> - >> - uint16_t vendor; >> - uint16_t device; >> - uint16_t subvendor; >> - uint16_t class_code; >> - uint8_t pif; > > Are the other fields unused? If yes can be a separate patch ... Yes, they are all unused to date. This patch puts class_code into use. >> + if (proxy->class_code != PCI_CLASS_STORAGE_SCSI&& >> + proxy->class_code != PCI_CLASS_STORAGE_OTHER) >> + proxy->class_code = PCI_CLASS_STORAGE_SCSI; >> + > > what does this do? Make sure proxy->class_code has one of the two allowed values. >> vdev = virtio_blk_init(&pci_dev->qdev); >> virtio_init_pci(proxy, vdev, >> PCI_VENDOR_ID_REDHAT_QUMRANET, >> PCI_DEVICE_ID_VIRTIO_BLOCK, >> - PCI_CLASS_STORAGE_OTHER, >> - 0x00); >> + proxy->class_code, 0x00); >> } >> >> static void virtio_console_init_pci(PCIDevice *pci_dev) > > does this mean that virtio block was broken by some previous > patch? It's not a good way to split changes: bisecting won't work. Huh? virtio block wasn't broken. What makes you think it was? cheers, Gerd