qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/5] qdev/compat: virtio-blk-pci 0.10	compatibility.
Date: Thu, 09 Jul 2009 17:09:41 +0200	[thread overview]
Message-ID: <4A560835.3050108@redhat.com> (raw)
In-Reply-To: <20090709145215.GC26895@redhat.com>

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

  reply	other threads:[~2009-07-09 15:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 13:02 [Qemu-devel] [PATCH 0/5] qdev: compat properties Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 1/5] qdev/compat: compat property infrastructure Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 2/5] qdev/compat: add pc-0.10 machine type Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 3/5] qdev/compat: virtio-blk-pci 0.10 compatibility Gerd Hoffmann
2009-07-09 14:52   ` Michael S. Tsirkin
2009-07-09 15:09     ` Gerd Hoffmann [this message]
2009-07-09 18:20       ` Michael S. Tsirkin
2009-07-09 19:42         ` Filip Navara
2009-07-09 19:45           ` Michael S. Tsirkin
2009-07-09 15:50     ` Anthony Liguori
2009-07-09 13:02 ` [Qemu-devel] [PATCH 4/5] qdev/compat: virtio-balloon-pci " Gerd Hoffmann
2009-07-09 13:02 ` [Qemu-devel] [PATCH 5/5] qdev/compat: virtio-net-pci " Gerd Hoffmann
2009-07-09 14:40   ` Michael S. Tsirkin
2009-07-09 15:17     ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A560835.3050108@redhat.com \
    --to=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).