qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/5] qdev/compat: virtio-blk-pci 0.10 compatibil


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 3/5] qdev/compat: virtio-blk-pci 0.10 compatibility.
Date: Thu, 09 Jul 2009 10:50:28 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Michael S. Tsirkin wrote:
Hi Gerd,
a couple of questions:

On Thu, Jul 09, 2009 at 03:02:31PM +0200, Gerd Hoffmann wrote:
Signed-off-by: Gerd Hoffmann <address@hidden>
---
 hw/pc.c         |    5 +++++
 hw/virtio-pci.c |   22 ++++++++++++++--------
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 6ba6b25..0574283 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1463,6 +1463,11 @@ static QEMUMachine pc_machine_v0_10 = {
     .init = pc_init_pci,
     .max_cpus = 255,
     .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?

#define strify_i(a) # a
#define strify(a) strify_i(a)

.value = strify(PCI_CLASS_STORAGE_OTHER),

Will expand to:

.value = "0x0180",

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]