diff mbox

[REBASE/RESEND,1/4] qdev: Add a description field for qdev properties for documentation

Message ID f82c12ab9864ba4211752e7df78be9735b9602a2.1296800130.git.amit.shah@redhat.com
State New
Headers show

Commit Message

Amit Shah Feb. 4, 2011, 6:18 a.m. UTC
Add a 'description' along with each qdev property to document the input
each qdev property takes.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
---
 block_int.h             |   14 ++++----
 hw/a9mpcore.c           |    2 +-
 hw/acpi_piix4.c         |    2 +-
 hw/apic.c               |    4 +-
 hw/applesmc.c           |    4 +-
 hw/arm11mpcore.c        |    4 +-
 hw/arm_sysctl.c         |    4 +-
 hw/armv7m.c             |    2 +-
 hw/cs4231a.c            |    6 ++--
 hw/debugcon.c           |    6 ++--
 hw/eccmemctl.c          |    2 +-
 hw/escc.c               |   16 +++++-----
 hw/etraxfs_pic.c        |    3 +-
 hw/fdc.c                |   14 ++++----
 hw/fw_cfg.c             |    4 +-
 hw/grlib_apbuart.c      |    2 +-
 hw/grlib_gptimer.c      |    6 ++--
 hw/grlib_irqmp.c        |    4 +-
 hw/gus.c                |    8 ++--
 hw/hda-audio.c          |    2 +-
 hw/hpet.c               |    4 +-
 hw/i2c.c                |    2 +-
 hw/ide/cmd646.c         |    2 +-
 hw/ide/isa.c            |    6 ++--
 hw/ide/qdev.c           |    6 ++--
 hw/integratorcp.c       |    2 +-
 hw/intel-hda.c          |    6 ++--
 hw/ioh3420.c            |    8 ++--
 hw/ivshmem.c            |   15 +++++----
 hw/lance.c              |    2 +-
 hw/m48t59.c             |   12 ++++----
 hw/mc146818rtc.c        |    2 +-
 hw/ne2000-isa.c         |    4 +-
 hw/parallel.c           |    8 ++--
 hw/pci.c                |   10 +++---
 hw/pxa2xx_gpio.c        |    4 +-
 hw/qdev-addr.h          |    4 +-
 hw/qdev.c               |    3 +-
 hw/qdev.h               |   75 +++++++++++++++++++++++++----------------------
 hw/s390-virtio-bus.c    |    2 +-
 hw/sb16.c               |   10 +++---
 hw/scsi-bus.c           |    2 +-
 hw/scsi-disk.c          |    9 ++++--
 hw/serial.c             |    8 ++--
 hw/slavio_timer.c       |    2 +-
 hw/smbus_eeprom.c       |    2 +-
 hw/sparc32_dma.c        |    4 +-
 hw/spitz.c              |    5 ++-
 hw/sun4m.c              |    2 +-
 hw/sun4m_iommu.c        |    2 +-
 hw/sun4u.c              |    2 +-
 hw/syborg_fb.c          |    4 +-
 hw/syborg_interrupt.c   |    2 +-
 hw/syborg_keyboard.c    |    2 +-
 hw/syborg_pointer.c     |    4 +-
 hw/syborg_serial.c      |    2 +-
 hw/syborg_timer.c       |    2 +-
 hw/syborg_virtio.c      |    6 ++--
 hw/tcx.c                |   10 +++---
 hw/usb-bus.c            |    2 +-
 hw/usb-msd.c            |    2 +-
 hw/usb-ohci.c           |    4 +-
 hw/usb-serial.c         |    4 +-
 hw/virtio-blk.h         |    4 +-
 hw/virtio-console.c     |   16 +++++----
 hw/virtio-net.h         |   51 ++++++++++++++++++++-----------
 hw/virtio-pci.c         |   26 ++++++++--------
 hw/virtio.h             |    2 +-
 hw/vt82c686.c           |    2 +-
 hw/xilinx_ethlite.c     |    6 ++-
 hw/xilinx_intc.c        |    3 +-
 hw/xilinx_timer.c       |    4 +-
 hw/xio3130_downstream.c |    8 ++--
 hw/xio3130_upstream.c   |    4 +-
 net.h                   |    8 ++--
 usb-linux.c             |    8 ++--
 76 files changed, 276 insertions(+), 244 deletions(-)

Comments

Anthony Liguori Feb. 15, 2011, 4:43 p.m. UTC | #1
On 02/04/2011 12:18 AM, Amit Shah wrote:
> Add a 'description' along with each qdev property to document the input
> each qdev property takes.
>
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
> Acked-by: Markus Armbruster<armbru@redhat.com>
> ---
>   block_int.h             |   14 ++++----
>   hw/a9mpcore.c           |    2 +-
>   hw/acpi_piix4.c         |    2 +-
>   hw/apic.c               |    4 +-
>   hw/applesmc.c           |    4 +-
>   hw/arm11mpcore.c        |    4 +-
>   hw/arm_sysctl.c         |    4 +-
>   hw/armv7m.c             |    2 +-
>   hw/cs4231a.c            |    6 ++--
>   hw/debugcon.c           |    6 ++--
>   hw/eccmemctl.c          |    2 +-
>   hw/escc.c               |   16 +++++-----
>   hw/etraxfs_pic.c        |    3 +-
>   hw/fdc.c                |   14 ++++----
>   hw/fw_cfg.c             |    4 +-
>   hw/grlib_apbuart.c      |    2 +-
>   hw/grlib_gptimer.c      |    6 ++--
>   hw/grlib_irqmp.c        |    4 +-
>   hw/gus.c                |    8 ++--
>   hw/hda-audio.c          |    2 +-
>   hw/hpet.c               |    4 +-
>   hw/i2c.c                |    2 +-
>   hw/ide/cmd646.c         |    2 +-
>   hw/ide/isa.c            |    6 ++--
>   hw/ide/qdev.c           |    6 ++--
>   hw/integratorcp.c       |    2 +-
>   hw/intel-hda.c          |    6 ++--
>   hw/ioh3420.c            |    8 ++--
>   hw/ivshmem.c            |   15 +++++----
>   hw/lance.c              |    2 +-
>   hw/m48t59.c             |   12 ++++----
>   hw/mc146818rtc.c        |    2 +-
>   hw/ne2000-isa.c         |    4 +-
>   hw/parallel.c           |    8 ++--
>   hw/pci.c                |   10 +++---
>   hw/pxa2xx_gpio.c        |    4 +-
>   hw/qdev-addr.h          |    4 +-
>   hw/qdev.c               |    3 +-
>   hw/qdev.h               |   75 +++++++++++++++++++++++++----------------------
>   hw/s390-virtio-bus.c    |    2 +-
>   hw/sb16.c               |   10 +++---
>   hw/scsi-bus.c           |    2 +-
>   hw/scsi-disk.c          |    9 ++++--
>   hw/serial.c             |    8 ++--
>   hw/slavio_timer.c       |    2 +-
>   hw/smbus_eeprom.c       |    2 +-
>   hw/sparc32_dma.c        |    4 +-
>   hw/spitz.c              |    5 ++-
>   hw/sun4m.c              |    2 +-
>   hw/sun4m_iommu.c        |    2 +-
>   hw/sun4u.c              |    2 +-
>   hw/syborg_fb.c          |    4 +-
>   hw/syborg_interrupt.c   |    2 +-
>   hw/syborg_keyboard.c    |    2 +-
>   hw/syborg_pointer.c     |    4 +-
>   hw/syborg_serial.c      |    2 +-
>   hw/syborg_timer.c       |    2 +-
>   hw/syborg_virtio.c      |    6 ++--
>   hw/tcx.c                |   10 +++---
>   hw/usb-bus.c            |    2 +-
>   hw/usb-msd.c            |    2 +-
>   hw/usb-ohci.c           |    4 +-
>   hw/usb-serial.c         |    4 +-
>   hw/virtio-blk.h         |    4 +-
>   hw/virtio-console.c     |   16 +++++----
>   hw/virtio-net.h         |   51 ++++++++++++++++++++-----------
>   hw/virtio-pci.c         |   26 ++++++++--------
>   hw/virtio.h             |    2 +-
>   hw/vt82c686.c           |    2 +-
>   hw/xilinx_ethlite.c     |    6 ++-
>   hw/xilinx_intc.c        |    3 +-
>   hw/xilinx_timer.c       |    4 +-
>   hw/xio3130_downstream.c |    8 ++--
>   hw/xio3130_upstream.c   |    4 +-
>   net.h                   |    8 ++--
>   usb-linux.c             |    8 ++--
>   76 files changed, 276 insertions(+), 244 deletions(-)
>
> diff --git a/block_int.h b/block_int.h
> index 6ebdc3e..fdde005 100644
> --- a/block_int.h
> +++ b/block_int.h
> @@ -250,15 +250,15 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
>   }
>
>   #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
> -    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
> +    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
>       DEFINE_PROP_UINT16("logical_block_size", _state,                    \
> -                       _conf.logical_block_size, 512),                  \
> +                       _conf.logical_block_size, 512, ""),              \
>       DEFINE_PROP_UINT16("physical_block_size", _state,                   \
> -                       _conf.physical_block_size, 512),                 \
> -    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
> -    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
> -    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
> +                       _conf.physical_block_size, 512, ""),             \
> +    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
> +    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
> +        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
>       DEFINE_PROP_UINT32("discard_granularity", _state, \
> -                       _conf.discard_granularity, 0)
> +                       _conf.discard_granularity, 0, "")
>    

This is pretty horribly ugly.  If we were going this, we should at least 
introduce new defines that include a documentation field and not just 
add empty documentation fields.

Regards,

Anthony Liguori
Amit Shah Feb. 17, 2011, 1:06 p.m. UTC | #2
On (Tue) 15 Feb 2011 [10:43:42], Anthony Liguori wrote:

> >  #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
> >-    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
> >+    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
> >      DEFINE_PROP_UINT16("logical_block_size", _state,                    \
> >-                       _conf.logical_block_size, 512),                  \
> >+                       _conf.logical_block_size, 512, ""),              \
> >      DEFINE_PROP_UINT16("physical_block_size", _state,                   \
> >-                       _conf.physical_block_size, 512),                 \
> >-    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
> >-    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
> >-    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
> >+                       _conf.physical_block_size, 512, ""),             \
> >+    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
> >+    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
> >+        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
> >      DEFINE_PROP_UINT32("discard_granularity", _state, \
> >-                       _conf.discard_granularity, 0)
> >+                       _conf.discard_granularity, 0, "")
> 
> This is pretty horribly ugly.  If we were going this, we should at
> least introduce new defines that include a documentation field and
> not just add empty documentation fields.

We've discussed this in the past.  Once this patch series gets in,
I'll work to fill in the documentation here along with the
maintainers.

Also, an empty string is a reminder to people to add something here.

		Amit
Anthony Liguori Feb. 17, 2011, 1:12 p.m. UTC | #3
On 02/17/2011 07:06 AM, Amit Shah wrote:
> On (Tue) 15 Feb 2011 [10:43:42], Anthony Liguori wrote:
>
>    
>>>   #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
>>> -    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
>>> +    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
>>>       DEFINE_PROP_UINT16("logical_block_size", _state,                    \
>>> -                       _conf.logical_block_size, 512),                  \
>>> +                       _conf.logical_block_size, 512, ""),              \
>>>       DEFINE_PROP_UINT16("physical_block_size", _state,                   \
>>> -                       _conf.physical_block_size, 512),                 \
>>> -    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
>>> -    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
>>> -    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
>>> +                       _conf.physical_block_size, 512, ""),             \
>>> +    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
>>> +    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
>>> +        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
>>>       DEFINE_PROP_UINT32("discard_granularity", _state, \
>>> -                       _conf.discard_granularity, 0)
>>> +                       _conf.discard_granularity, 0, "")
>>>        
>> This is pretty horribly ugly.  If we were going this, we should at
>> least introduce new defines that include a documentation field and
>> not just add empty documentation fields.
>>      
> We've discussed this in the past.  Once this patch series gets in,
> I'll work to fill in the documentation here along with the
> maintainers.
>    

It means you're touching everything twice instead of touching everything 
once.  That's unnecessary churn and blame breakage.

It's still just as greppable if you use a new name.

Regards,

Anthony Liguori

> Also, an empty string is a reminder to people to add something here.
>
> 		Amit
>
>
Amit Shah Feb. 17, 2011, 1:37 p.m. UTC | #4
On (Thu) 17 Feb 2011 [07:12:42], Anthony Liguori wrote:
> On 02/17/2011 07:06 AM, Amit Shah wrote:
> >On (Tue) 15 Feb 2011 [10:43:42], Anthony Liguori wrote:
> >
> >>>  #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
> >>>-    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
> >>>+    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
> >>>      DEFINE_PROP_UINT16("logical_block_size", _state,                    \
> >>>-                       _conf.logical_block_size, 512),                  \
> >>>+                       _conf.logical_block_size, 512, ""),              \
> >>>      DEFINE_PROP_UINT16("physical_block_size", _state,                   \
> >>>-                       _conf.physical_block_size, 512),                 \
> >>>-    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
> >>>-    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
> >>>-    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
> >>>+                       _conf.physical_block_size, 512, ""),             \
> >>>+    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
> >>>+    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
> >>>+        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
> >>>      DEFINE_PROP_UINT32("discard_granularity", _state, \
> >>>-                       _conf.discard_granularity, 0)
> >>>+                       _conf.discard_granularity, 0, "")
> >>This is pretty horribly ugly.  If we were going this, we should at
> >>least introduce new defines that include a documentation field and
> >>not just add empty documentation fields.
> >We've discussed this in the past.  Once this patch series gets in,
> >I'll work to fill in the documentation here along with the
> >maintainers.
> 
> It means you're touching everything twice instead of touching
> everything once.  That's unnecessary churn and blame breakage.

Well no one can claim to be good enough to document each and every
parameter for each device that qemu has.  The infrastructure has to be
laid out, then the documentation can be filled in by the subsystem
maintainers.  I'm willing to co-ordinate that activity, as discussed
earlier.

		Amit
Markus Armbruster Feb. 18, 2011, 8:54 a.m. UTC | #5
Anthony Liguori <anthony@codemonkey.ws> writes:

> On 02/04/2011 12:18 AM, Amit Shah wrote:
>> Add a 'description' along with each qdev property to document the input
>> each qdev property takes.
>>
>> Signed-off-by: Amit Shah<amit.shah@redhat.com>
>> Acked-by: Markus Armbruster<armbru@redhat.com>
>> ---
[...]
>> diff --git a/block_int.h b/block_int.h
>> index 6ebdc3e..fdde005 100644
>> --- a/block_int.h
>> +++ b/block_int.h
>> @@ -250,15 +250,15 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
>>   }
>>
>>   #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
>> -    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
>> +    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
>>       DEFINE_PROP_UINT16("logical_block_size", _state,                    \
>> -                       _conf.logical_block_size, 512),                  \
>> +                       _conf.logical_block_size, 512, ""),              \
>>       DEFINE_PROP_UINT16("physical_block_size", _state,                   \
>> -                       _conf.physical_block_size, 512),                 \
>> -    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
>> -    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
>> -    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
>> +                       _conf.physical_block_size, 512, ""),             \
>> +    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
>> +    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
>> +        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
>>       DEFINE_PROP_UINT32("discard_granularity", _state, \
>> -                       _conf.discard_granularity, 0)
>> +                       _conf.discard_granularity, 0, "")
>>    
>
> This is pretty horribly ugly.  If we were going this, we should at
> least introduce new defines that include a documentation field and not
> just add empty documentation fields.

In my opinion, making missing documentation look horribly ugly is a very
desirable feature ;)
Markus Armbruster Feb. 18, 2011, 8:59 a.m. UTC | #6
Anthony Liguori <anthony@codemonkey.ws> writes:

> On 02/17/2011 07:06 AM, Amit Shah wrote:
>> On (Tue) 15 Feb 2011 [10:43:42], Anthony Liguori wrote:
>>
>>    
>>>>   #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
>>>> -    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
>>>> +    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
>>>>       DEFINE_PROP_UINT16("logical_block_size", _state,                    \
>>>> -                       _conf.logical_block_size, 512),                  \
>>>> +                       _conf.logical_block_size, 512, ""),              \
>>>>       DEFINE_PROP_UINT16("physical_block_size", _state,                   \
>>>> -                       _conf.physical_block_size, 512),                 \
>>>> -    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
>>>> -    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
>>>> -    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
>>>> +                       _conf.physical_block_size, 512, ""),             \
>>>> +    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
>>>> +    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
>>>> +        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
>>>>       DEFINE_PROP_UINT32("discard_granularity", _state, \
>>>> -                       _conf.discard_granularity, 0)
>>>> +                       _conf.discard_granularity, 0, "")
>>>>        
>>> This is pretty horribly ugly.  If we were going this, we should at
>>> least introduce new defines that include a documentation field and
>>> not just add empty documentation fields.
>>>      
>> We've discussed this in the past.  Once this patch series gets in,
>> I'll work to fill in the documentation here along with the
>> maintainers.
>>    
>
> It means you're touching everything twice instead of touching
> everything once.  That's unnecessary churn and blame breakage.
>
> It's still just as greppable if you use a new name.

What names would you suggest?  DEFINE_PROP_<FOO>_WITH_DOCS()?  For all
fifteen <FOO>s?  Not a good idea, because the longer name makes doing
the right thing even less attractive.  We better encourage doing the
right thing.
Anthony Liguori Feb. 18, 2011, 3:21 p.m. UTC | #7
On 02/18/2011 02:59 AM, Markus Armbruster wrote:
> Anthony Liguori<anthony@codemonkey.ws>  writes:
>
>    
>> On 02/17/2011 07:06 AM, Amit Shah wrote:
>>      
>>> On (Tue) 15 Feb 2011 [10:43:42], Anthony Liguori wrote:
>>>
>>>
>>>        
>>>>>    #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
>>>>> -    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
>>>>> +    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
>>>>>        DEFINE_PROP_UINT16("logical_block_size", _state,                    \
>>>>> -                       _conf.logical_block_size, 512),                  \
>>>>> +                       _conf.logical_block_size, 512, ""),              \
>>>>>        DEFINE_PROP_UINT16("physical_block_size", _state,                   \
>>>>> -                       _conf.physical_block_size, 512),                 \
>>>>> -    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
>>>>> -    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
>>>>> -    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
>>>>> +                       _conf.physical_block_size, 512, ""),             \
>>>>> +    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
>>>>> +    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
>>>>> +        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
>>>>>        DEFINE_PROP_UINT32("discard_granularity", _state, \
>>>>> -                       _conf.discard_granularity, 0)
>>>>> +                       _conf.discard_granularity, 0, "")
>>>>>
>>>>>            
>>>> This is pretty horribly ugly.  If we were going this, we should at
>>>> least introduce new defines that include a documentation field and
>>>> not just add empty documentation fields.
>>>>
>>>>          
>>> We've discussed this in the past.  Once this patch series gets in,
>>> I'll work to fill in the documentation here along with the
>>> maintainers.
>>>
>>>        
>> It means you're touching everything twice instead of touching
>> everything once.  That's unnecessary churn and blame breakage.
>>
>> It's still just as greppable if you use a new name.
>>      
> What names would you suggest?  DEFINE_PROP_<FOO>_WITH_DOCS()?  For all
> fifteen<FOO>s?  Not a good idea, because the longer name makes doing
> the right thing even less attractive.  We better encourage doing the
> right thing.
>    

Okay, make it a shorter name then DEFPROP_UINT32.

Regards,

Anthony Liguori
diff mbox

Patch

diff --git a/block_int.h b/block_int.h
index 6ebdc3e..fdde005 100644
--- a/block_int.h
+++ b/block_int.h
@@ -250,15 +250,15 @@  static inline unsigned int get_physical_block_exp(BlockConf *conf)
 }
 
 #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
-    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
+    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
     DEFINE_PROP_UINT16("logical_block_size", _state,                    \
-                       _conf.logical_block_size, 512),                  \
+                       _conf.logical_block_size, 512, ""),              \
     DEFINE_PROP_UINT16("physical_block_size", _state,                   \
-                       _conf.physical_block_size, 512),                 \
-    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
-    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
-    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
+                       _conf.physical_block_size, 512, ""),             \
+    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
+    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
+        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
     DEFINE_PROP_UINT32("discard_granularity", _state, \
-                       _conf.discard_granularity, 0)
+                       _conf.discard_granularity, 0, "")
 
 #endif /* BLOCK_INT_H */
diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c
index b5e5328..174f5d5 100644
--- a/hw/a9mpcore.c
+++ b/hw/a9mpcore.c
@@ -16,7 +16,7 @@  static SysBusDeviceInfo mpcore_priv_info = {
     .qdev.name  = "a9mpcore_priv",
     .qdev.size  = sizeof(mpcore_priv_state),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("num-cpu", mpcore_priv_state, num_cpu, 1),
+        DEFINE_PROP_UINT32("num-cpu", mpcore_priv_state, num_cpu, 1, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 5bbc2b5..c68c521 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -455,7 +455,7 @@  static PCIDeviceInfo piix4_pm_info = {
     .init               = piix4_pm_initfn,
     .config_write       = pm_write_config,
     .qdev.props         = (Property[]) {
-        DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
+        DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/apic.c b/hw/apic.c
index ff581f0..c43e98a 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -998,8 +998,8 @@  static SysBusDeviceInfo apic_info = {
     .qdev.reset = apic_reset,
     .qdev.no_user = 1,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT8("id", APICState, id, -1),
-        DEFINE_PROP_PTR("cpu_env", APICState, cpu_env),
+        DEFINE_PROP_UINT8("id", APICState, id, -1, ""),
+        DEFINE_PROP_PTR("cpu_env", APICState, cpu_env, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/applesmc.c b/hw/applesmc.c
index 29b9330..9803be6 100644
--- a/hw/applesmc.c
+++ b/hw/applesmc.c
@@ -227,8 +227,8 @@  static ISADeviceInfo applesmc_isa_info = {
     .init       = applesmc_isa_init,
     .qdev.props = (Property[]) {
         DEFINE_PROP_HEX32("iobase", struct AppleSMCStatus, iobase,
-                          APPLESMC_DEFAULT_IOBASE),
-        DEFINE_PROP_STRING("osk", struct AppleSMCStatus, osk),
+                          APPLESMC_DEFAULT_IOBASE, ""),
+        DEFINE_PROP_STRING("osk", struct AppleSMCStatus, osk, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c
index 3bbd885..a3a7a9d 100644
--- a/hw/arm11mpcore.c
+++ b/hw/arm11mpcore.c
@@ -88,7 +88,7 @@  static SysBusDeviceInfo mpcore_rirq_info = {
     .qdev.name  = "realview_mpcore",
     .qdev.size  = sizeof(mpcore_rirq_state),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("num-cpu", mpcore_rirq_state, num_cpu, 1),
+        DEFINE_PROP_UINT32("num-cpu", mpcore_rirq_state, num_cpu, 1, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
@@ -98,7 +98,7 @@  static SysBusDeviceInfo mpcore_priv_info = {
     .qdev.name  = "arm11mpcore_priv",
     .qdev.size  = sizeof(mpcore_priv_state),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("num-cpu", mpcore_priv_state, num_cpu, 1),
+        DEFINE_PROP_UINT32("num-cpu", mpcore_priv_state, num_cpu, 1, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c
index d8b062c..b8ba149 100644
--- a/hw/arm_sysctl.c
+++ b/hw/arm_sysctl.c
@@ -250,8 +250,8 @@  static SysBusDeviceInfo arm_sysctl_info = {
     .qdev.vmsd = &vmstate_arm_sysctl,
     .qdev.reset = arm_sysctl_reset,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0),
-        DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0),
+        DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0, ""),
+        DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/armv7m.c b/hw/armv7m.c
index 304cd34..680ee57 100644
--- a/hw/armv7m.c
+++ b/hw/armv7m.c
@@ -250,7 +250,7 @@  static SysBusDeviceInfo bitband_info = {
     .qdev.name  = "ARM,bitband-memory",
     .qdev.size  = sizeof(BitBandState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("base", BitBandState, base, 0),
+        DEFINE_PROP_UINT32("base", BitBandState, base, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/cs4231a.c b/hw/cs4231a.c
index 598f032..090aabc 100644
--- a/hw/cs4231a.c
+++ b/hw/cs4231a.c
@@ -672,9 +672,9 @@  static ISADeviceInfo cs4231a_info = {
     .qdev.vmsd     = &vmstate_cs4231a,
     .init          = cs4231a_initfn,
     .qdev.props    = (Property[]) {
-        DEFINE_PROP_HEX32  ("iobase",  CSState, port, 0x534),
-        DEFINE_PROP_UINT32 ("irq",     CSState, irq,  9),
-        DEFINE_PROP_UINT32 ("dma",     CSState, dma,  3),
+        DEFINE_PROP_HEX32  ("iobase",  CSState, port, 0x534, ""),
+        DEFINE_PROP_UINT32 ("irq",     CSState, irq,  9,     ""),
+        DEFINE_PROP_UINT32 ("dma",     CSState, dma,  3,     ""),
         DEFINE_PROP_END_OF_LIST (),
     },
 };
diff --git a/hw/debugcon.c b/hw/debugcon.c
index 5ee6821..a1e06ee 100644
--- a/hw/debugcon.c
+++ b/hw/debugcon.c
@@ -92,9 +92,9 @@  static ISADeviceInfo debugcon_isa_info = {
     .qdev.size  = sizeof(ISADebugconState),
     .init       = debugcon_isa_initfn,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_HEX32("iobase", ISADebugconState, iobase, 0xe9),
-        DEFINE_PROP_CHR("chardev",  ISADebugconState, state.chr),
-        DEFINE_PROP_HEX32("readback", ISADebugconState, state.readback, 0xe9),
+        DEFINE_PROP_HEX32("iobase", ISADebugconState, iobase, 0xe9, ""),
+        DEFINE_PROP_CHR("chardev",  ISADebugconState, state.chr, ""),
+        DEFINE_PROP_HEX32("readback", ISADebugconState, state.readback, 0xe9, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/eccmemctl.c b/hw/eccmemctl.c
index 2bda87b..5994262 100644
--- a/hw/eccmemctl.c
+++ b/hw/eccmemctl.c
@@ -318,7 +318,7 @@  static SysBusDeviceInfo ecc_info = {
     .qdev.vmsd  = &vmstate_ecc,
     .qdev.reset = ecc_reset,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_HEX32("version", ECCState, version, -1),
+        DEFINE_PROP_HEX32("version", ECCState, version, -1, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/escc.c b/hw/escc.c
index f6fd919..b61167e 100644
--- a/hw/escc.c
+++ b/hw/escc.c
@@ -941,14 +941,14 @@  static SysBusDeviceInfo escc_info = {
     .qdev.vmsd  = &vmstate_escc,
     .qdev.reset = escc_reset,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("frequency", SerialState, frequency,   0),
-        DEFINE_PROP_UINT32("it_shift",  SerialState, it_shift,    0),
-        DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
-        DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0),
-        DEFINE_PROP_UINT32("chnBtype",  SerialState, chn[0].type, 0),
-        DEFINE_PROP_UINT32("chnAtype",  SerialState, chn[1].type, 0),
-        DEFINE_PROP_CHR("chrB", SerialState, chn[0].chr),
-        DEFINE_PROP_CHR("chrA", SerialState, chn[1].chr),
+        DEFINE_PROP_UINT32("frequency", SerialState, frequency,   0, ""),
+        DEFINE_PROP_UINT32("it_shift",  SerialState, it_shift,    0, ""),
+        DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0, ""),
+        DEFINE_PROP_UINT32("disabled",  SerialState, disabled,    0, ""),
+        DEFINE_PROP_UINT32("chnBtype",  SerialState, chn[0].type, 0, ""),
+        DEFINE_PROP_UINT32("chnAtype",  SerialState, chn[1].type, 0, ""),
+        DEFINE_PROP_CHR("chrB", SerialState, chn[0].chr, ""),
+        DEFINE_PROP_CHR("chrA", SerialState, chn[1].chr, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/etraxfs_pic.c b/hw/etraxfs_pic.c
index 4feffda..f3f9abf 100644
--- a/hw/etraxfs_pic.c
+++ b/hw/etraxfs_pic.c
@@ -156,7 +156,8 @@  static SysBusDeviceInfo etraxfs_pic_info = {
     .qdev.name  = "etraxfs,pic",
     .qdev.size  = sizeof(struct etrax_pic),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_PTR("interrupt_vector", struct etrax_pic, interrupt_vector),
+        DEFINE_PROP_PTR("interrupt_vector", struct etrax_pic, interrupt_vector,
+                        ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/fdc.c b/hw/fdc.c
index 4bbcc47..c3c2f1a 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -2057,10 +2057,10 @@  static ISADeviceInfo isa_fdc_info = {
     .qdev.vmsd  = &vmstate_isa_fdc,
     .qdev.reset = fdctrl_external_reset_isa,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.drives[0].bs),
-        DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.drives[1].bs),
-        DEFINE_PROP_INT32("bootindexA", FDCtrlISABus, bootindexA, -1),
-        DEFINE_PROP_INT32("bootindexB", FDCtrlISABus, bootindexB, -1),
+        DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.drives[0].bs, ""),
+        DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.drives[1].bs, ""),
+        DEFINE_PROP_INT32("bootindexA", FDCtrlISABus, bootindexA, -1, ""),
+        DEFINE_PROP_INT32("bootindexB", FDCtrlISABus, bootindexB, -1, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
@@ -2082,8 +2082,8 @@  static SysBusDeviceInfo sysbus_fdc_info = {
     .qdev.vmsd  = &vmstate_sysbus_fdc,
     .qdev.reset = fdctrl_external_reset_sysbus,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_DRIVE("driveA", FDCtrlSysBus, state.drives[0].bs),
-        DEFINE_PROP_DRIVE("driveB", FDCtrlSysBus, state.drives[1].bs),
+        DEFINE_PROP_DRIVE("driveA", FDCtrlSysBus, state.drives[0].bs, ""),
+        DEFINE_PROP_DRIVE("driveB", FDCtrlSysBus, state.drives[1].bs, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
@@ -2095,7 +2095,7 @@  static SysBusDeviceInfo sun4m_fdc_info = {
     .qdev.vmsd  = &vmstate_sysbus_fdc,
     .qdev.reset = fdctrl_external_reset_sysbus,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_DRIVE("drive", FDCtrlSysBus, state.drives[0].bs),
+        DEFINE_PROP_DRIVE("drive", FDCtrlSysBus, state.drives[0].bs, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c
index 85c8c3c..c250dec 100644
--- a/hw/fw_cfg.c
+++ b/hw/fw_cfg.c
@@ -393,8 +393,8 @@  static SysBusDeviceInfo fw_cfg_info = {
     .qdev.reset = fw_cfg_reset,
     .qdev.no_user = 1,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_HEX32("ctl_iobase", FWCfgState, ctl_iobase, -1),
-        DEFINE_PROP_HEX32("data_iobase", FWCfgState, data_iobase, -1),
+        DEFINE_PROP_HEX32("ctl_iobase", FWCfgState, ctl_iobase, -1, ""),
+        DEFINE_PROP_HEX32("data_iobase", FWCfgState, data_iobase, -1, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/grlib_apbuart.c b/hw/grlib_apbuart.c
index 101b150..9d5b50c 100644
--- a/hw/grlib_apbuart.c
+++ b/hw/grlib_apbuart.c
@@ -174,7 +174,7 @@  static SysBusDeviceInfo grlib_gptimer_info = {
     .qdev.name  = "grlib,apbuart",
     .qdev.size  = sizeof(UART),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_CHR("chrdev", UART, chr),
+        DEFINE_PROP_CHR("chrdev", UART, chr, ""),
         DEFINE_PROP_END_OF_LIST()
     }
 };
diff --git a/hw/grlib_gptimer.c b/hw/grlib_gptimer.c
index 596a900..d970162 100644
--- a/hw/grlib_gptimer.c
+++ b/hw/grlib_gptimer.c
@@ -380,9 +380,9 @@  static SysBusDeviceInfo grlib_gptimer_info = {
     .qdev.reset = grlib_gptimer_reset,
     .qdev.size  = sizeof(GPTimerUnit),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("frequency", GPTimerUnit, freq_hz,   40000000),
-        DEFINE_PROP_UINT32("irq-line",  GPTimerUnit, irq_line,  8),
-        DEFINE_PROP_UINT32("nr-timers", GPTimerUnit, nr_timers, 2),
+        DEFINE_PROP_UINT32("frequency", GPTimerUnit, freq_hz,   40000000, ""),
+        DEFINE_PROP_UINT32("irq-line",  GPTimerUnit, irq_line,  8, ""),
+        DEFINE_PROP_UINT32("nr-timers", GPTimerUnit, nr_timers, 2, ""),
         DEFINE_PROP_END_OF_LIST()
     }
 };
diff --git a/hw/grlib_irqmp.c b/hw/grlib_irqmp.c
index f47c491..5251b25 100644
--- a/hw/grlib_irqmp.c
+++ b/hw/grlib_irqmp.c
@@ -362,8 +362,8 @@  static SysBusDeviceInfo grlib_irqmp_info = {
     .qdev.reset = grlib_irqmp_reset,
     .qdev.size  = sizeof(IRQMP),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_PTR("set_pil_in", IRQMP, set_pil_in),
-        DEFINE_PROP_PTR("set_pil_in_opaque", IRQMP, set_pil_in_opaque),
+        DEFINE_PROP_PTR("set_pil_in", IRQMP, set_pil_in, ""),
+        DEFINE_PROP_PTR("set_pil_in_opaque", IRQMP, set_pil_in_opaque, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/gus.c b/hw/gus.c
index ff9e7c7..2e21ecd 100644
--- a/hw/gus.c
+++ b/hw/gus.c
@@ -307,10 +307,10 @@  static ISADeviceInfo gus_info = {
     .qdev.vmsd     = &vmstate_gus,
     .init          = gus_initfn,
     .qdev.props    = (Property[]) {
-        DEFINE_PROP_UINT32 ("freq",    GUSState, freq,        44100),
-        DEFINE_PROP_HEX32  ("iobase",  GUSState, port,        0x240),
-        DEFINE_PROP_UINT32 ("irq",     GUSState, emu.gusirq,  7),
-        DEFINE_PROP_UINT32 ("dma",     GUSState, emu.gusdma,  3),
+        DEFINE_PROP_UINT32 ("freq",    GUSState, freq,        44100, ""),
+        DEFINE_PROP_HEX32  ("iobase",  GUSState, port,        0x240, ""),
+        DEFINE_PROP_UINT32 ("irq",     GUSState, emu.gusirq,  7,     ""),
+        DEFINE_PROP_UINT32 ("dma",     GUSState, emu.gusdma,  3,     ""),
         DEFINE_PROP_END_OF_LIST (),
     },
 };
diff --git a/hw/hda-audio.c b/hw/hda-audio.c
index c699d6f..89e0e34 100644
--- a/hw/hda-audio.c
+++ b/hw/hda-audio.c
@@ -880,7 +880,7 @@  static const VMStateDescription vmstate_hda_audio = {
 };
 
 static Property hda_audio_properties[] = {
-    DEFINE_PROP_UINT32("debug", HDAAudioState, debug, 0),
+    DEFINE_PROP_UINT32("debug", HDAAudioState, debug, 0, ""),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/hpet.c b/hw/hpet.c
index 8fb6811..fe2c5de 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -734,8 +734,8 @@  static SysBusDeviceInfo hpet_device_info = {
     .qdev.reset   = hpet_reset,
     .init         = hpet_init,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
-        DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false),
+        DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS, ""),
+        DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/i2c.c b/hw/i2c.c
index f80d12d..f648732 100644
--- a/hw/i2c.c
+++ b/hw/i2c.c
@@ -21,7 +21,7 @@  static struct BusInfo i2c_bus_info = {
     .name = "I2C",
     .size = sizeof(i2c_bus),
     .props = (Property[]) {
-        DEFINE_PROP_UINT8("address", struct i2c_slave, address, 0),
+        DEFINE_PROP_UINT8("address", struct i2c_slave, address, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 5d5464a..3ec3000 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -283,7 +283,7 @@  static PCIDeviceInfo cmd646_ide_info[] = {
         .qdev.size    = sizeof(PCIIDEState),
         .init         = pci_cmd646_ide_initfn,
         .qdev.props   = (Property[]) {
-            DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
+            DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0, ""),
             DEFINE_PROP_END_OF_LIST(),
         },
     },{
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index 8c59c5a..6740eb3 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -105,9 +105,9 @@  static ISADeviceInfo isa_ide_info = {
     .init       = isa_ide_initfn,
     .qdev.reset = isa_ide_reset,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_HEX32("iobase",  ISAIDEState, iobase,  0x1f0),
-        DEFINE_PROP_HEX32("iobase2", ISAIDEState, iobase2, 0x3f6),
-        DEFINE_PROP_UINT32("irq",    ISAIDEState, isairq,  14),
+        DEFINE_PROP_HEX32("iobase",  ISAIDEState, iobase,  0x1f0, ""),
+        DEFINE_PROP_HEX32("iobase2", ISAIDEState, iobase2, 0x3f6, ""),
+        DEFINE_PROP_UINT32("irq",    ISAIDEState, isairq,  14, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 2bb5c27..0ee272d 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -157,10 +157,10 @@  static IDEDeviceInfo ide_drive_info = {
     .qdev.size  = sizeof(IDEDrive),
     .init       = ide_drive_initfn,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("unit", IDEDrive, dev.unit, -1),
+        DEFINE_PROP_UINT32("unit", IDEDrive, dev.unit, -1, ""),
         DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf),
-        DEFINE_PROP_STRING("ver",  IDEDrive, dev.version),
-        DEFINE_PROP_STRING("serial",  IDEDrive, dev.serial),
+        DEFINE_PROP_STRING("ver",  IDEDrive, dev.version, ""),
+        DEFINE_PROP_STRING("serial",  IDEDrive, dev.serial, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/integratorcp.c b/hw/integratorcp.c
index b049940..95aa97a 100644
--- a/hw/integratorcp.c
+++ b/hw/integratorcp.c
@@ -531,7 +531,7 @@  static SysBusDeviceInfo core_info = {
     .qdev.name  = "integrator_core",
     .qdev.size  = sizeof(integratorcm_state),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("memsz", integratorcm_state, memsz, 0),
+        DEFINE_PROP_UINT32("memsz", integratorcm_state, memsz, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/intel-hda.c b/hw/intel-hda.c
index b2b6708..9c1034b 100644
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -32,7 +32,7 @@  static struct BusInfo hda_codec_bus_info = {
     .name      = "HDA",
     .size      = sizeof(HDACodecBus),
     .props     = (Property[]) {
-        DEFINE_PROP_UINT32("cad", HDACodecDevice, cad, -1),
+        DEFINE_PROP_UINT32("cad", HDACodecDevice, cad, -1, ""),
         DEFINE_PROP_END_OF_LIST()
     }
 };
@@ -1277,8 +1277,8 @@  static PCIDeviceInfo intel_hda_info = {
     .exit         = intel_hda_exit,
     .config_write = intel_hda_write_config,
     .qdev.props   = (Property[]) {
-        DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0),
-        DEFINE_PROP_UINT32("msi", IntelHDAState, msi, 1),
+        DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0, ""),
+        DEFINE_PROP_UINT32("msi", IntelHDAState, msi, 1, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/ioh3420.c b/hw/ioh3420.c
index 95adf09..a9a2e42 100644
--- a/hw/ioh3420.c
+++ b/hw/ioh3420.c
@@ -219,12 +219,12 @@  static PCIDeviceInfo ioh3420_info = {
     .exit = ioh3420_exitfn,
 
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT8("port", PCIESlot, port.port, 0),
-        DEFINE_PROP_UINT8("chassis", PCIESlot, chassis, 0),
-        DEFINE_PROP_UINT16("slot", PCIESlot, slot, 0),
+        DEFINE_PROP_UINT8("port", PCIESlot, port.port, 0, ""),
+        DEFINE_PROP_UINT8("chassis", PCIESlot, chassis, 0, ""),
+	DEFINE_PROP_UINT16("slot", PCIESlot, slot, 0, ""),
         DEFINE_PROP_UINT16("aer_log_max", PCIESlot,
                            port.br.dev.exp.aer_log.log_max,
-                           PCIE_AER_LOG_MAX_DEFAULT),
+                           PCIE_AER_LOG_MAX_DEFAULT, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index 7b19a81..c27b2cb 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -810,13 +810,14 @@  static PCIDeviceInfo ivshmem_info = {
     .init       = pci_ivshmem_init,
     .exit       = pci_ivshmem_uninit,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_CHR("chardev", IVShmemState, server_chr),
-        DEFINE_PROP_STRING("size", IVShmemState, sizearg),
-        DEFINE_PROP_UINT32("vectors", IVShmemState, vectors, 1),
-        DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD, false),
-        DEFINE_PROP_BIT("msi", IVShmemState, features, IVSHMEM_MSI, true),
-        DEFINE_PROP_STRING("shm", IVShmemState, shmobj),
-        DEFINE_PROP_STRING("role", IVShmemState, role),
+        DEFINE_PROP_CHR("chardev", IVShmemState, server_chr, ""),
+        DEFINE_PROP_STRING("size", IVShmemState, sizearg, ""),
+        DEFINE_PROP_UINT32("vectors", IVShmemState, vectors, 1, ""),
+        DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD,
+                        false, ""),
+        DEFINE_PROP_BIT("msi", IVShmemState, features, IVSHMEM_MSI, true, ""),
+        DEFINE_PROP_STRING("shm", IVShmemState, shmobj, ""),
+        DEFINE_PROP_STRING("role", IVShmemState, role, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/lance.c b/hw/lance.c
index ddb1cbb..03d7c31 100644
--- a/hw/lance.c
+++ b/hw/lance.c
@@ -147,7 +147,7 @@  static SysBusDeviceInfo lance_info = {
     .qdev.reset = lance_reset,
     .qdev.vmsd  = &vmstate_lance,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_PTR("dma", SysBusPCNetState, state.dma_opaque),
+        DEFINE_PROP_PTR("dma", SysBusPCNetState, state.dma_opaque, ""),
         DEFINE_NIC_PROPERTIES(SysBusPCNetState, state.conf),
         DEFINE_PROP_END_OF_LIST(),
     }
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 2020487..943a23a 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -733,9 +733,9 @@  static ISADeviceInfo m48t59_isa_info = {
     .qdev.reset = m48t59_reset_isa,
     .qdev.no_user = 1,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("size",    M48t59ISAState, state.size,    -1),
-        DEFINE_PROP_UINT32("type",    M48t59ISAState, state.type,    -1),
-        DEFINE_PROP_HEX32( "io_base", M48t59ISAState, state.io_base,  0),
+        DEFINE_PROP_UINT32("size",    M48t59ISAState, state.size,    -1, ""),
+        DEFINE_PROP_UINT32("type",    M48t59ISAState, state.type,    -1, ""),
+        DEFINE_PROP_HEX32( "io_base", M48t59ISAState, state.io_base,  0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
@@ -746,9 +746,9 @@  static SysBusDeviceInfo m48t59_info = {
     .qdev.size = sizeof(M48t59SysBusState),
     .qdev.reset = m48t59_reset_sysbus,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("size",    M48t59SysBusState, state.size,    -1),
-        DEFINE_PROP_UINT32("type",    M48t59SysBusState, state.type,    -1),
-        DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base,  0),
+        DEFINE_PROP_UINT32("size",    M48t59SysBusState, state.size,    -1, ""),
+        DEFINE_PROP_UINT32("type",    M48t59SysBusState, state.type,    -1, ""),
+        DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base,  0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index a1b0e31..4db7b9f 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -645,7 +645,7 @@  static ISADeviceInfo mc146818rtc_info = {
     .qdev.vmsd     = &vmstate_rtc,
     .init          = rtc_initfn,
     .qdev.props    = (Property[]) {
-        DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980),
+        DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c
index 3ff0d89..34d21c3 100644
--- a/hw/ne2000-isa.c
+++ b/hw/ne2000-isa.c
@@ -110,8 +110,8 @@  static ISADeviceInfo ne2000_isa_info = {
     .qdev.size  = sizeof(ISANE2000State),
     .init       = isa_ne2000_initfn,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_HEX32("iobase", ISANE2000State, iobase, 0x300),
-        DEFINE_PROP_UINT32("irq",   ISANE2000State, isairq, 9),
+        DEFINE_PROP_HEX32("iobase", ISANE2000State, iobase, 0x300, ""),
+        DEFINE_PROP_UINT32("irq",   ISANE2000State, isairq, 9, ""),
         DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c),
         DEFINE_PROP_END_OF_LIST(),
     },
diff --git a/hw/parallel.c b/hw/parallel.c
index ce311aa..e1220bd 100644
--- a/hw/parallel.c
+++ b/hw/parallel.c
@@ -593,10 +593,10 @@  static ISADeviceInfo parallel_isa_info = {
     .qdev.size  = sizeof(ISAParallelState),
     .init       = parallel_isa_initfn,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("index", ISAParallelState, index,   -1),
-        DEFINE_PROP_HEX32("iobase", ISAParallelState, iobase,  -1),
-        DEFINE_PROP_UINT32("irq",   ISAParallelState, isairq,  7),
-        DEFINE_PROP_CHR("chardev",  ISAParallelState, state.chr),
+        DEFINE_PROP_UINT32("index", ISAParallelState, index,   -1, ""),
+        DEFINE_PROP_HEX32("iobase", ISAParallelState, iobase,  -1, ""),
+        DEFINE_PROP_UINT32("irq",   ISAParallelState, isairq,  7, ""),
+        DEFINE_PROP_CHR("chardev",  ISAParallelState, state.chr, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/pci.c b/hw/pci.c
index d5bbba9..3d8f1c4 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -52,13 +52,13 @@  struct BusInfo pci_bus_info = {
     .get_fw_dev_path = pcibus_get_fw_dev_path,
     .reset      = pcibus_reset,
     .props      = (Property[]) {
-        DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
-        DEFINE_PROP_STRING("romfile", PCIDevice, romfile),
-        DEFINE_PROP_UINT32("rombar",  PCIDevice, rom_bar, 1),
+        DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1, ""),
+        DEFINE_PROP_STRING("romfile", PCIDevice, romfile, ""),
+        DEFINE_PROP_UINT32("rombar",  PCIDevice, rom_bar, 1, ""),
         DEFINE_PROP_BIT("multifunction", PCIDevice, cap_present,
-                        QEMU_PCI_CAP_MULTIFUNCTION_BITNR, false),
+                        QEMU_PCI_CAP_MULTIFUNCTION_BITNR, false, ""),
         DEFINE_PROP_BIT("command_serr_enable", PCIDevice, cap_present,
-                        QEMU_PCI_CAP_SERR_BITNR, true),
+                        QEMU_PCI_CAP_SERR_BITNR, true, ""),
         DEFINE_PROP_END_OF_LIST()
     }
 };
diff --git a/hw/pxa2xx_gpio.c b/hw/pxa2xx_gpio.c
index 789965d..9bfbfe3 100644
--- a/hw/pxa2xx_gpio.c
+++ b/hw/pxa2xx_gpio.c
@@ -327,8 +327,8 @@  static SysBusDeviceInfo pxa2xx_gpio_info = {
     .qdev.desc  = "PXA2xx GPIO controller",
     .qdev.size  = sizeof(PXA2xxGPIOInfo),
     .qdev.props = (Property []) {
-        DEFINE_PROP_INT32("lines", PXA2xxGPIOInfo, lines, 0),
-        DEFINE_PROP_INT32("ncpu", PXA2xxGPIOInfo, ncpu, 0),
+        DEFINE_PROP_INT32("lines", PXA2xxGPIOInfo, lines, 0, ""),
+        DEFINE_PROP_INT32("ncpu", PXA2xxGPIOInfo, ncpu, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/qdev-addr.h b/hw/qdev-addr.h
index a0ddf38..515a887 100644
--- a/hw/qdev-addr.h
+++ b/hw/qdev-addr.h
@@ -1,5 +1,5 @@ 
-#define DEFINE_PROP_TADDR(_n, _s, _f, _d)                               \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_taddr, target_phys_addr_t)
+#define DEFINE_PROP_TADDR(_n, _s, _f, _d, _c)				\
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_taddr, target_phys_addr_t, _c)
 
 extern PropertyInfo qdev_prop_taddr;
 void qdev_prop_set_taddr(DeviceState *dev, const char *name, target_phys_addr_t value);
diff --git a/hw/qdev.c b/hw/qdev.c
index c7fec44..7464568 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -187,7 +187,8 @@  int qdev_device_help(QemuOpts *opts)
         if (!prop->info->parse) {
             continue;           /* no way to set it, don't show */
         }
-        error_printf("%s.%s=%s\n", info->name, prop->name, prop->info->name);
+        error_printf("%s.%s=%s, %s\n", info->name, prop->name,
+                     prop->info->name, prop->desc ?: "");
     }
     return 1;
 }
diff --git a/hw/qdev.h b/hw/qdev.h
index 9808f85..c2801ce 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -80,6 +80,7 @@  struct BusState {
 struct Property {
     const char   *name;
     PropertyInfo *info;
+    const char   *desc;
     int          offset;
     int          bitnr;
     void         *defval;
@@ -234,59 +235,63 @@  extern PropertyInfo qdev_prop_netdev;
 extern PropertyInfo qdev_prop_vlan;
 extern PropertyInfo qdev_prop_pci_devfn;
 
-#define DEFINE_PROP(_name, _state, _field, _prop, _type) { \
+#define DEFINE_PROP(_name, _state, _field, _prop, _type, _desc) {       \
         .name      = (_name),                                    \
         .info      = &(_prop),                                   \
+        .desc      = (_desc),                                    \
         .offset    = offsetof(_state, _field)                    \
             + type_check(_type,typeof_field(_state, _field)),    \
         }
-#define DEFINE_PROP_DEFAULT(_name, _state, _field, _defval, _prop, _type) { \
+#define DEFINE_PROP_DEFAULT(_name, _state, _field, _defval, _prop, _type, \
+                            _desc) {                                    \
         .name      = (_name),                                           \
         .info      = &(_prop),                                          \
+        .desc      = (_desc),                                           \
         .offset    = offsetof(_state, _field)                           \
             + type_check(_type,typeof_field(_state, _field)),           \
         .defval    = (_type[]) { _defval },                             \
         }
-#define DEFINE_PROP_BIT(_name, _state, _field, _bit, _defval) {  \
+#define DEFINE_PROP_BIT(_name, _state, _field, _bit, _defval, _desc) {  \
         .name      = (_name),                                    \
         .info      = &(qdev_prop_bit),                           \
-        .bitnr    = (_bit),                                      \
+        .desc      = (_desc),                                    \
+        .bitnr     = (_bit),                                     \
         .offset    = offsetof(_state, _field)                    \
             + type_check(uint32_t,typeof_field(_state, _field)), \
         .defval    = (bool[]) { (_defval) },                     \
         }
 
-#define DEFINE_PROP_UINT8(_n, _s, _f, _d)                       \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint8, uint8_t)
-#define DEFINE_PROP_UINT16(_n, _s, _f, _d)                      \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint16, uint16_t)
-#define DEFINE_PROP_UINT32(_n, _s, _f, _d)                      \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint32, uint32_t)
-#define DEFINE_PROP_INT32(_n, _s, _f, _d)                      \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_int32, int32_t)
-#define DEFINE_PROP_UINT64(_n, _s, _f, _d)                      \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint64, uint64_t)
-#define DEFINE_PROP_HEX32(_n, _s, _f, _d)                       \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_hex32, uint32_t)
-#define DEFINE_PROP_HEX64(_n, _s, _f, _d)                       \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_hex64, uint64_t)
-#define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d)                   \
-    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_pci_devfn, uint32_t)
-
-#define DEFINE_PROP_PTR(_n, _s, _f)             \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_ptr, void*)
-#define DEFINE_PROP_CHR(_n, _s, _f)             \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharDriverState*)
-#define DEFINE_PROP_STRING(_n, _s, _f)             \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_string, char*)
-#define DEFINE_PROP_NETDEV(_n, _s, _f)             \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, VLANClientState*)
-#define DEFINE_PROP_VLAN(_n, _s, _f)             \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_vlan, VLANState*)
-#define DEFINE_PROP_DRIVE(_n, _s, _f) \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockDriverState *)
-#define DEFINE_PROP_MACADDR(_n, _s, _f)         \
-    DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr)
+#define DEFINE_PROP_UINT8(_n, _s, _f, _d, _c)                           \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint8, uint8_t, _c)
+#define DEFINE_PROP_UINT16(_n, _s, _f, _d, _c)                          \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint16, uint16_t, _c)
+#define DEFINE_PROP_UINT32(_n, _s, _f, _d, _c)                          \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint32, uint32_t, _c)
+#define DEFINE_PROP_INT32(_n, _s, _f, _d, _c)                           \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_int32, int32_t, _c)
+#define DEFINE_PROP_UINT64(_n, _s, _f, _d, _c)                          \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint64, uint64_t, _c)
+#define DEFINE_PROP_HEX32(_n, _s, _f, _d, _c)                           \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_hex32, uint32_t, _c)
+#define DEFINE_PROP_HEX64(_n, _s, _f, _d, _c)                           \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_hex64, uint64_t, _c)
+#define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d, _c)                       \
+    DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_pci_devfn, uint32_t, _c)
+
+#define DEFINE_PROP_PTR(_n, _s, _f, _c)                 \
+    DEFINE_PROP(_n, _s, _f, qdev_prop_ptr, void*, _c)
+#define DEFINE_PROP_CHR(_n, _s, _f, _c)                 \
+    DEFINE_PROP(_n, _s, _f, qdev_prop_chr, CharDriverState*, _c)
+#define DEFINE_PROP_STRING(_n, _s, _f, _c)              \
+    DEFINE_PROP(_n, _s, _f, qdev_prop_string, char*, _c)
+#define DEFINE_PROP_NETDEV(_n, _s, _f, _c)              \
+    DEFINE_PROP(_n, _s, _f, qdev_prop_netdev, VLANClientState*, _c)
+#define DEFINE_PROP_VLAN(_n, _s, _f, _c)                \
+    DEFINE_PROP(_n, _s, _f, qdev_prop_vlan, VLANState*, _c)
+#define DEFINE_PROP_DRIVE(_n, _s, _f, _c)               \
+    DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockDriverState *, _c)
+#define DEFINE_PROP_MACADDR(_n, _s, _f, _c)             \
+    DEFINE_PROP(_n, _s, _f, qdev_prop_macaddr, MACAddr, _c)
 
 #define DEFINE_PROP_END_OF_LIST()               \
     {}
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 784dc01..ba0f377 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -354,7 +354,7 @@  static VirtIOS390DeviceInfo s390_virtio_serial = {
     .qdev.size = sizeof(VirtIOS390Device),
     .qdev.props = (Property[]) {
         DEFINE_PROP_UINT32("max_ports", VirtIOS390Device, max_virtserial_ports,
-                           31),
+                           31, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/sb16.c b/hw/sb16.c
index c9d37ad..cd4a602 100644
--- a/hw/sb16.c
+++ b/hw/sb16.c
@@ -1404,11 +1404,11 @@  static ISADeviceInfo sb16_info = {
     .qdev.vmsd     = &vmstate_sb16,
     .init          = sb16_initfn,
     .qdev.props    = (Property[]) {
-        DEFINE_PROP_HEX32  ("version", SB16State, ver,  0x0405), /* 4.5 */
-        DEFINE_PROP_HEX32  ("iobase",  SB16State, port, 0x220),
-        DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5),
-        DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1),
-        DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5),
+        DEFINE_PROP_HEX32  ("version", SB16State, ver,  0x0405, ""), /* 4.5 */
+        DEFINE_PROP_HEX32  ("iobase",  SB16State, port, 0x220, ""),
+        DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5, ""),
+        DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1, ""),
+        DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5, ""),
         DEFINE_PROP_END_OF_LIST (),
     },
 };
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index ceeb4ec..3830a4e 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -12,7 +12,7 @@  static struct BusInfo scsi_bus_info = {
     .size  = sizeof(SCSIBus),
     .get_fw_dev_path = scsibus_get_fw_dev_path,
     .props = (Property[]) {
-        DEFINE_PROP_UINT32("scsi-id", SCSIDevice, id, -1),
+        DEFINE_PROP_UINT32("scsi-id", SCSIDevice, id, -1, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 488eedd..d33040e 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -1295,9 +1295,12 @@  static SCSIDeviceInfo scsi_disk_info = {
     .get_buf      = scsi_get_buf,
     .qdev.props   = (Property[]) {
         DEFINE_BLOCK_PROPERTIES(SCSIDiskState, qdev.conf),
-        DEFINE_PROP_STRING("ver",  SCSIDiskState, version),
-        DEFINE_PROP_STRING("serial",  SCSIDiskState, serial),
-        DEFINE_PROP_BIT("removable", SCSIDiskState, removable, 0, false),
+        DEFINE_PROP_STRING("ver",  SCSIDiskState, version, ""),
+        DEFINE_PROP_STRING("serial",  SCSIDiskState, serial, ""),
+        DEFINE_PROP_BIT("removable", SCSIDiskState, removable, 0, false, ""),
+        DEFINE_PROP_STRING("ver",  SCSIDiskState, version, ""),
+        DEFINE_PROP_STRING("serial",  SCSIDiskState, serial, ""),
+        DEFINE_PROP_BIT("removable", SCSIDiskState, removable, 0, false, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/serial.c b/hw/serial.c
index 2c4af61..f6d8c28 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -975,10 +975,10 @@  static ISADeviceInfo serial_isa_info = {
     .qdev.vmsd  = &vmstate_isa_serial,
     .init       = serial_isa_initfn,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("index", ISASerialState, index,   -1),
-        DEFINE_PROP_HEX32("iobase", ISASerialState, iobase,  -1),
-        DEFINE_PROP_UINT32("irq",   ISASerialState, isairq,  -1),
-        DEFINE_PROP_CHR("chardev",  ISASerialState, state.chr),
+        DEFINE_PROP_UINT32("index", ISASerialState, index,   -1, ""),
+        DEFINE_PROP_HEX32("iobase", ISASerialState, iobase,  -1, ""),
+        DEFINE_PROP_UINT32("irq",   ISASerialState, isairq,  -1, ""),
+        DEFINE_PROP_CHR("chardev",  ISASerialState, state.chr, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/slavio_timer.c b/hw/slavio_timer.c
index 5511313..e17ad29 100644
--- a/hw/slavio_timer.c
+++ b/hw/slavio_timer.c
@@ -411,7 +411,7 @@  static SysBusDeviceInfo slavio_timer_info = {
     .qdev.vmsd  = &vmstate_slavio_timer,
     .qdev.reset = slavio_timer_reset,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("num_cpus",  SLAVIO_TIMERState, num_cpus,  0),
+        DEFINE_PROP_UINT32("num_cpus",  SLAVIO_TIMERState, num_cpus,  0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/smbus_eeprom.c b/hw/smbus_eeprom.c
index 52463e0..9ee8f54 100644
--- a/hw/smbus_eeprom.c
+++ b/hw/smbus_eeprom.c
@@ -108,7 +108,7 @@  static SMBusDeviceInfo smbus_eeprom_info = {
     .i2c.qdev.name = "smbus-eeprom",
     .i2c.qdev.size = sizeof(SMBusEEPROMDevice),
     .i2c.qdev.props = (Property[]) {
-        DEFINE_PROP_PTR("data", SMBusEEPROMDevice, data),
+        DEFINE_PROP_PTR("data", SMBusEEPROMDevice, data, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
     .init = smbus_eeprom_init,
diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c
index e75694b..a471a6e 100644
--- a/hw/sparc32_dma.c
+++ b/hw/sparc32_dma.c
@@ -291,8 +291,8 @@  static SysBusDeviceInfo sparc32_dma_info = {
     .qdev.vmsd  = &vmstate_dma,
     .qdev.reset = dma_reset,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_PTR("iommu_opaque", DMAState, iommu),
-        DEFINE_PROP_UINT32("is_ledma", DMAState, is_ledma, 0),
+        DEFINE_PROP_PTR("iommu_opaque", DMAState, iommu, ""),
+        DEFINE_PROP_UINT32("is_ledma", DMAState, is_ledma, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/spitz.c b/hw/spitz.c
index 5b1e42d..fad1e71 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -1037,8 +1037,9 @@  static SysBusDeviceInfo sl_nand_info = {
     .qdev.size = sizeof(SLNANDState),
     .qdev.vmsd = &vmstate_sl_nand_info,
     .qdev.props = (Property []) {
-        DEFINE_PROP_UINT8("manf_id", SLNANDState, manf_id, NAND_MFR_SAMSUNG),
-        DEFINE_PROP_UINT8("chip_id", SLNANDState, chip_id, 0xf1),
+        DEFINE_PROP_UINT8("manf_id", SLNANDState, manf_id, NAND_MFR_SAMSUNG,
+                          ""),
+        DEFINE_PROP_UINT8("chip_id", SLNANDState, chip_id, 0xf1, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 30e8a21..cbf27d1 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -759,7 +759,7 @@  static SysBusDeviceInfo ram_info = {
     .qdev.name  = "memory",
     .qdev.size  = sizeof(RamDevice),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT64("size", RamDevice, size, 0),
+        DEFINE_PROP_UINT64("size", RamDevice, size, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/sun4m_iommu.c b/hw/sun4m_iommu.c
index bba69ee..e103499 100644
--- a/hw/sun4m_iommu.c
+++ b/hw/sun4m_iommu.c
@@ -365,7 +365,7 @@  static SysBusDeviceInfo iommu_info = {
     .qdev.vmsd  = &vmstate_iommu,
     .qdev.reset = iommu_reset,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_HEX32("version", IOMMUState, version, 0),
+        DEFINE_PROP_HEX32("version", IOMMUState, version, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 90b1ce2..ab420bd 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -692,7 +692,7 @@  static SysBusDeviceInfo ram_info = {
     .qdev.name  = "memory",
     .qdev.size  = sizeof(RamDevice),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT64("size", RamDevice, size, 0),
+        DEFINE_PROP_UINT64("size", RamDevice, size, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/syborg_fb.c b/hw/syborg_fb.c
index 7e37364..ef09440 100644
--- a/hw/syborg_fb.c
+++ b/hw/syborg_fb.c
@@ -537,8 +537,8 @@  static SysBusDeviceInfo syborg_fb_info = {
     .qdev.name  = "syborg,framebuffer",
     .qdev.size  = sizeof(SyborgFBState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("width",  SyborgFBState, cols, 0),
-        DEFINE_PROP_UINT32("height", SyborgFBState, rows, 0),
+        DEFINE_PROP_UINT32("width",  SyborgFBState, cols, 0, ""),
+        DEFINE_PROP_UINT32("height", SyborgFBState, rows, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/syborg_interrupt.c b/hw/syborg_interrupt.c
index 5217983..d1b8b05 100644
--- a/hw/syborg_interrupt.c
+++ b/hw/syborg_interrupt.c
@@ -225,7 +225,7 @@  static SysBusDeviceInfo syborg_int_info = {
     .qdev.name  = "syborg,interrupt",
     .qdev.size  = sizeof(SyborgIntState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("num-interrupts", SyborgIntState, num_irqs, 64),
+        DEFINE_PROP_UINT32("num-interrupts", SyborgIntState, num_irqs, 64, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/syborg_keyboard.c b/hw/syborg_keyboard.c
index d295e99..02b33ca 100644
--- a/hw/syborg_keyboard.c
+++ b/hw/syborg_keyboard.c
@@ -231,7 +231,7 @@  static SysBusDeviceInfo syborg_keyboard_info = {
     .qdev.name  = "syborg,keyboard",
     .qdev.size  = sizeof(SyborgKeyboardState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("fifo-size", SyborgKeyboardState, fifo_size, 16),
+        DEFINE_PROP_UINT32("fifo-size", SyborgKeyboardState, fifo_size, 16, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/syborg_pointer.c b/hw/syborg_pointer.c
index a886888..5c1fb0b 100644
--- a/hw/syborg_pointer.c
+++ b/hw/syborg_pointer.c
@@ -229,8 +229,8 @@  static SysBusDeviceInfo syborg_pointer_info = {
     .qdev.name  = "syborg,pointer",
     .qdev.size  = sizeof(SyborgPointerState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("fifo-size", SyborgPointerState, fifo_size, 16),
-        DEFINE_PROP_UINT32("absolute",  SyborgPointerState, absolute,   1),
+        DEFINE_PROP_UINT32("fifo-size", SyborgPointerState, fifo_size, 16, ""),
+        DEFINE_PROP_UINT32("absolute",  SyborgPointerState, absolute,   1, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/syborg_serial.c b/hw/syborg_serial.c
index 34ce076..87474e0 100644
--- a/hw/syborg_serial.c
+++ b/hw/syborg_serial.c
@@ -346,7 +346,7 @@  static SysBusDeviceInfo syborg_serial_info = {
     .qdev.name  = "syborg,serial",
     .qdev.size  = sizeof(SyborgSerialState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("fifo-size", SyborgSerialState, fifo_size, 16),
+        DEFINE_PROP_UINT32("fifo-size", SyborgSerialState, fifo_size, 16, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/syborg_timer.c b/hw/syborg_timer.c
index cedcd8e..add8a9a 100644
--- a/hw/syborg_timer.c
+++ b/hw/syborg_timer.c
@@ -232,7 +232,7 @@  static SysBusDeviceInfo syborg_timer_info = {
     .qdev.name  = "syborg,timer",
     .qdev.size  = sizeof(SyborgTimerState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("frequency",SyborgTimerState, freq, 0),
+        DEFINE_PROP_UINT32("frequency",SyborgTimerState, freq, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c
index ee08c49..e9d54a2 100644
--- a/hw/syborg_virtio.c
+++ b/hw/syborg_virtio.c
@@ -298,10 +298,10 @@  static SysBusDeviceInfo syborg_virtio_net_info = {
         DEFINE_NIC_PROPERTIES(SyborgVirtIOProxy, nic),
         DEFINE_VIRTIO_NET_FEATURES(SyborgVirtIOProxy, host_features),
         DEFINE_PROP_UINT32("x-txtimer", SyborgVirtIOProxy,
-                           net.txtimer, TX_TIMER_INTERVAL),
+                           net.txtimer, TX_TIMER_INTERVAL, ""),
         DEFINE_PROP_INT32("x-txburst", SyborgVirtIOProxy,
-                          net.txburst, TX_BURST),
-        DEFINE_PROP_STRING("tx", SyborgVirtIOProxy, net.tx),
+                          net.txburst, TX_BURST, ""),
+        DEFINE_PROP_STRING("tx", SyborgVirtIOProxy, net.tx, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/tcx.c b/hw/tcx.c
index 0e32830..7bed136 100644
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -634,11 +634,11 @@  static SysBusDeviceInfo tcx_info = {
     .qdev.reset = tcx_reset,
     .qdev.vmsd  = &vmstate_tcx,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_TADDR("addr",      TCXState, addr,      -1),
-        DEFINE_PROP_HEX32("vram_size", TCXState, vram_size, -1),
-        DEFINE_PROP_UINT16("width",    TCXState, width,     -1),
-        DEFINE_PROP_UINT16("height",   TCXState, height,    -1),
-        DEFINE_PROP_UINT16("depth",    TCXState, depth,     -1),
+        DEFINE_PROP_TADDR("addr",      TCXState, addr,      -1, ""),
+        DEFINE_PROP_HEX32("vram_size", TCXState, vram_size, -1, ""),
+        DEFINE_PROP_UINT16("width",    TCXState, width,     -1, ""),
+        DEFINE_PROP_UINT16("height",   TCXState, height,    -1, ""),
+        DEFINE_PROP_UINT16("depth",    TCXState, depth,     -1, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index abc7e61..b8f1d0d 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -16,7 +16,7 @@  static struct BusInfo usb_bus_info = {
     .get_dev_path = usb_get_dev_path,
     .get_fw_dev_path = usb_get_fw_dev_path,
     .props      = (Property[]) {
-        DEFINE_PROP_STRING("port", USBDevice, port_path),
+        DEFINE_PROP_STRING("port", USBDevice, port_path, ""),
         DEFINE_PROP_END_OF_LIST()
     },
 };
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 76f5b02..460b2d3 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -609,7 +609,7 @@  static struct USBDeviceInfo msd_info = {
     .usbdevice_init = usb_msd_init,
     .qdev.props     = (Property[]) {
         DEFINE_BLOCK_PROPERTIES(MSDState, conf),
-        DEFINE_PROP_BIT("removable", MSDState, removable, 0, false),
+        DEFINE_PROP_BIT("removable", MSDState, removable, 0, false, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index 09ea0b6..f650149 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -1778,8 +1778,8 @@  static SysBusDeviceInfo ohci_sysbus_info = {
     .qdev.desc    = "OHCI USB Controller",
     .qdev.size    = sizeof(OHCISysBusState),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("num-ports", OHCISysBusState, num_ports, 3),
-        DEFINE_PROP_TADDR("dma-offset", OHCISysBusState, dma_offset, 3),
+        DEFINE_PROP_UINT32("num-ports", OHCISysBusState, num_ports, 3, ""),
+        DEFINE_PROP_TADDR("dma-offset", OHCISysBusState, dma_offset, 3, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/usb-serial.c b/hw/usb-serial.c
index 6763d52..d4b4b1b 100644
--- a/hw/usb-serial.c
+++ b/hw/usb-serial.c
@@ -579,7 +579,7 @@  static struct USBDeviceInfo serial_info = {
     .usbdevice_name = "serial",
     .usbdevice_init = usb_serial_init,
     .qdev.props     = (Property[]) {
-        DEFINE_PROP_CHR("chardev", USBSerialState, cs),
+        DEFINE_PROP_CHR("chardev",     USBSerialState, cs, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
@@ -598,7 +598,7 @@  static struct USBDeviceInfo braille_info = {
     .usbdevice_name = "braille",
     .usbdevice_init = usb_braille_init,
     .qdev.props     = (Property[]) {
-        DEFINE_PROP_CHR("chardev", USBSerialState, cs),
+        DEFINE_PROP_CHR("chardev",     USBSerialState, cs, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h
index fff46da..d587c5b 100644
--- a/hw/virtio-blk.h
+++ b/hw/virtio-blk.h
@@ -97,8 +97,8 @@  struct virtio_scsi_inhdr
 
 #ifdef __linux__
 #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \
-        DEFINE_VIRTIO_COMMON_FEATURES(_state, _field), \
-        DEFINE_PROP_BIT("scsi", _state, _field, VIRTIO_BLK_F_SCSI, true)
+        DEFINE_VIRTIO_COMMON_FEATURES(_state, _field),                      \
+        DEFINE_PROP_BIT("scsi", _state, _field, VIRTIO_BLK_F_SCSI, true, "")
 #else
 #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \
         DEFINE_VIRTIO_COMMON_FEATURES(_state, _field)
diff --git a/hw/virtio-console.c b/hw/virtio-console.c
index 62624ec..a32e628 100644
--- a/hw/virtio-console.c
+++ b/hw/virtio-console.c
@@ -98,10 +98,11 @@  static VirtIOSerialPortInfo virtconsole_info = {
     .init          = virtconsole_initfn,
     .exit          = virtconsole_exitfn,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT8("is_console", VirtConsole, port.is_console, 1),
-        DEFINE_PROP_UINT32("nr", VirtConsole, port.id, VIRTIO_CONSOLE_BAD_ID),
-        DEFINE_PROP_CHR("chardev", VirtConsole, chr),
-        DEFINE_PROP_STRING("name", VirtConsole, port.name),
+        DEFINE_PROP_UINT8("is_console", VirtConsole, port.is_console, 1, ""),
+        DEFINE_PROP_UINT32("nr", VirtConsole, port.id, VIRTIO_CONSOLE_BAD_ID,
+                           ""),
+        DEFINE_PROP_CHR("chardev", VirtConsole, chr, ""),
+        DEFINE_PROP_STRING("name", VirtConsole, port.name, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
@@ -127,9 +128,10 @@  static VirtIOSerialPortInfo virtserialport_info = {
     .init          = virtserialport_initfn,
     .exit          = virtconsole_exitfn,
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("nr", VirtConsole, port.id, VIRTIO_CONSOLE_BAD_ID),
-        DEFINE_PROP_CHR("chardev", VirtConsole, chr),
-        DEFINE_PROP_STRING("name", VirtConsole, port.name),
+        DEFINE_PROP_UINT32("nr", VirtConsole, port.id, VIRTIO_CONSOLE_BAD_ID,
+                           ""),
+        DEFINE_PROP_CHR("chardev", VirtConsole, chr, ""),
+        DEFINE_PROP_STRING("name", VirtConsole, port.name, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };
diff --git a/hw/virtio-net.h b/hw/virtio-net.h
index 8af9a1c..8fde1a3 100644
--- a/hw/virtio-net.h
+++ b/hw/virtio-net.h
@@ -168,22 +168,37 @@  struct virtio_net_ctrl_mac {
  #define VIRTIO_NET_CTRL_VLAN_DEL             1
 
 #define DEFINE_VIRTIO_NET_FEATURES(_state, _field) \
-        DEFINE_VIRTIO_COMMON_FEATURES(_state, _field), \
-        DEFINE_PROP_BIT("csum", _state, _field, VIRTIO_NET_F_CSUM, true), \
-        DEFINE_PROP_BIT("guest_csum", _state, _field, VIRTIO_NET_F_GUEST_CSUM, true), \
-        DEFINE_PROP_BIT("gso", _state, _field, VIRTIO_NET_F_GSO, true), \
-        DEFINE_PROP_BIT("guest_tso4", _state, _field, VIRTIO_NET_F_GUEST_TSO4, true), \
-        DEFINE_PROP_BIT("guest_tso6", _state, _field, VIRTIO_NET_F_GUEST_TSO6, true), \
-        DEFINE_PROP_BIT("guest_ecn", _state, _field, VIRTIO_NET_F_GUEST_ECN, true), \
-        DEFINE_PROP_BIT("guest_ufo", _state, _field, VIRTIO_NET_F_GUEST_UFO, true), \
-        DEFINE_PROP_BIT("host_tso4", _state, _field, VIRTIO_NET_F_HOST_TSO4, true), \
-        DEFINE_PROP_BIT("host_tso6", _state, _field, VIRTIO_NET_F_HOST_TSO6, true), \
-        DEFINE_PROP_BIT("host_ecn", _state, _field, VIRTIO_NET_F_HOST_ECN, true), \
-        DEFINE_PROP_BIT("host_ufo", _state, _field, VIRTIO_NET_F_HOST_UFO, true), \
-        DEFINE_PROP_BIT("mrg_rxbuf", _state, _field, VIRTIO_NET_F_MRG_RXBUF, true), \
-        DEFINE_PROP_BIT("status", _state, _field, VIRTIO_NET_F_STATUS, true), \
-        DEFINE_PROP_BIT("ctrl_vq", _state, _field, VIRTIO_NET_F_CTRL_VQ, true), \
-        DEFINE_PROP_BIT("ctrl_rx", _state, _field, VIRTIO_NET_F_CTRL_RX, true), \
-        DEFINE_PROP_BIT("ctrl_vlan", _state, _field, VIRTIO_NET_F_CTRL_VLAN, true), \
-        DEFINE_PROP_BIT("ctrl_rx_extra", _state, _field, VIRTIO_NET_F_CTRL_RX_EXTRA, true)
+        DEFINE_VIRTIO_COMMON_FEATURES(_state, _field),                        \
+        DEFINE_PROP_BIT("csum", _state, _field, VIRTIO_NET_F_CSUM, true, ""), \
+        DEFINE_PROP_BIT("guest_csum", _state, _field, VIRTIO_NET_F_GUEST_CSUM, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("gso", _state, _field, VIRTIO_NET_F_GSO, true, ""), \
+        DEFINE_PROP_BIT("guest_tso4", _state, _field, VIRTIO_NET_F_GUEST_TSO4, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("guest_tso6", _state, _field, VIRTIO_NET_F_GUEST_TSO6, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("guest_ecn", _state, _field, VIRTIO_NET_F_GUEST_ECN, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("guest_ufo", _state, _field, VIRTIO_NET_F_GUEST_UFO, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("host_tso4", _state, _field, VIRTIO_NET_F_HOST_TSO4, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("host_tso6", _state, _field, VIRTIO_NET_F_HOST_TSO6, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("host_ecn", _state, _field, VIRTIO_NET_F_HOST_ECN, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("host_ufo", _state, _field, VIRTIO_NET_F_HOST_UFO, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("mrg_rxbuf", _state, _field, VIRTIO_NET_F_MRG_RXBUF, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("status", _state, _field, VIRTIO_NET_F_STATUS, true, \
+                        ""),                                            \
+        DEFINE_PROP_BIT("ctrl_vq", _state, _field, VIRTIO_NET_F_CTRL_VQ, true, \
+                        ""),                                            \
+        DEFINE_PROP_BIT("ctrl_rx", _state, _field, VIRTIO_NET_F_CTRL_RX, true, \
+                        ""),                                            \
+        DEFINE_PROP_BIT("ctrl_vlan", _state, _field, VIRTIO_NET_F_CTRL_VLAN, \
+                        true, ""),                                      \
+        DEFINE_PROP_BIT("ctrl_rx_extra", _state, _field,                \
+                        VIRTIO_NET_F_CTRL_RX_EXTRA, true, "")
 #endif
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 3911b09..d77cd5d 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -862,11 +862,11 @@  static PCIDeviceInfo virtio_info[] = {
         .init      = virtio_blk_init_pci,
         .exit      = virtio_blk_exit_pci,
         .qdev.props = (Property[]) {
-            DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
+            DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0, ""),
             DEFINE_BLOCK_PROPERTIES(VirtIOPCIProxy, block),
             DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
-                            VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
-            DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
+                            VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true, ""),
+            DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2, ""),
             DEFINE_VIRTIO_BLK_FEATURES(VirtIOPCIProxy, host_features),
             DEFINE_PROP_END_OF_LIST(),
         },
@@ -879,15 +879,15 @@  static PCIDeviceInfo virtio_info[] = {
         .romfile    = "pxe-virtio.bin",
         .qdev.props = (Property[]) {
             DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
-                            VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, false),
-            DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
+                            VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, false, ""),
+            DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3, ""),
             DEFINE_VIRTIO_NET_FEATURES(VirtIOPCIProxy, host_features),
             DEFINE_NIC_PROPERTIES(VirtIOPCIProxy, nic),
             DEFINE_PROP_UINT32("x-txtimer", VirtIOPCIProxy,
-                               net.txtimer, TX_TIMER_INTERVAL),
+                               net.txtimer, TX_TIMER_INTERVAL, ""),
             DEFINE_PROP_INT32("x-txburst", VirtIOPCIProxy,
-                              net.txburst, TX_BURST),
-            DEFINE_PROP_STRING("tx", VirtIOPCIProxy, net.tx),
+                              net.txburst, TX_BURST, ""),
+            DEFINE_PROP_STRING("tx", VirtIOPCIProxy, net.tx, ""),
             DEFINE_PROP_END_OF_LIST(),
         },
         .qdev.reset = virtio_pci_reset,
@@ -899,11 +899,11 @@  static PCIDeviceInfo virtio_info[] = {
         .exit      = virtio_serial_exit_pci,
         .qdev.props = (Property[]) {
             DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
-                               DEV_NVECTORS_UNSPECIFIED),
-            DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
+                               DEV_NVECTORS_UNSPECIFIED, ""),
+            DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0, ""),
             DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
             DEFINE_PROP_UINT32("max_ports", VirtIOPCIProxy, max_virtserial_ports,
-                               31),
+                               31, ""),
             DEFINE_PROP_END_OF_LIST(),
         },
         .qdev.reset = virtio_pci_reset,
@@ -925,8 +925,8 @@  static PCIDeviceInfo virtio_info[] = {
         .qdev.props = (Property[]) {
             DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
             DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
-            DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag),
-            DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id),
+            DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag, ""),
+            DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id, ""),
             DEFINE_PROP_END_OF_LIST(),
         },
     }, {
diff --git a/hw/virtio.h b/hw/virtio.h
index 31d16e1..8bee45a 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -208,7 +208,7 @@  void virtio_serial_exit(VirtIODevice *vdev);
 
 #define DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) \
 	DEFINE_PROP_BIT("indirect_desc", _state, _field, \
-			VIRTIO_RING_F_INDIRECT_DESC, true)
+			VIRTIO_RING_F_INDIRECT_DESC, true, "")
 
 target_phys_addr_t virtio_queue_get_desc_addr(VirtIODevice *vdev, int n);
 target_phys_addr_t virtio_queue_get_avail_addr(VirtIODevice *vdev, int n);
diff --git a/hw/vt82c686.c b/hw/vt82c686.c
index cacc217..502cdd2 100644
--- a/hw/vt82c686.c
+++ b/hw/vt82c686.c
@@ -517,7 +517,7 @@  static PCIDeviceInfo via_pm_info = {
     .init               = vt82c686b_pm_initfn,
     .config_write       = pm_write_config,
     .qdev.props         = (Property[]) {
-        DEFINE_PROP_UINT32("smb_io_base", VT686PMState, smb_io_base, 0),
+        DEFINE_PROP_UINT32("smb_io_base", VT686PMState, smb_io_base, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/xilinx_ethlite.c b/hw/xilinx_ethlite.c
index 54b57d7..061d44b 100644
--- a/hw/xilinx_ethlite.c
+++ b/hw/xilinx_ethlite.c
@@ -239,8 +239,10 @@  static SysBusDeviceInfo xilinx_ethlite_info = {
     .qdev.name  = "xilinx,ethlite",
     .qdev.size  = sizeof(struct xlx_ethlite),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("txpingpong", struct xlx_ethlite, c_tx_pingpong, 1),
-        DEFINE_PROP_UINT32("rxpingpong", struct xlx_ethlite, c_rx_pingpong, 1),
+        DEFINE_PROP_UINT32("txpingpong", struct xlx_ethlite, c_tx_pingpong, 1,
+                           ""),
+        DEFINE_PROP_UINT32("rxpingpong", struct xlx_ethlite, c_rx_pingpong, 1,
+                           ""),
         DEFINE_NIC_PROPERTIES(struct xlx_ethlite, conf),
         DEFINE_PROP_END_OF_LIST(),
     }
diff --git a/hw/xilinx_intc.c b/hw/xilinx_intc.c
index cb72d5a..4fceab8 100644
--- a/hw/xilinx_intc.c
+++ b/hw/xilinx_intc.c
@@ -163,7 +163,8 @@  static SysBusDeviceInfo xilinx_intc_info = {
     .qdev.name  = "xilinx,intc",
     .qdev.size  = sizeof(struct xlx_pic),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("kind-of-intr", struct xlx_pic, c_kind_of_intr, 0),
+        DEFINE_PROP_UINT32("kind-of-intr", struct xlx_pic, c_kind_of_intr, 0,
+                           ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
index 30827b0..d1bf1af 100644
--- a/hw/xilinx_timer.c
+++ b/hw/xilinx_timer.c
@@ -221,8 +221,8 @@  static SysBusDeviceInfo xilinx_timer_info = {
     .qdev.name  = "xilinx,timer",
     .qdev.size  = sizeof(struct timerblock),
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT32("frequency", struct timerblock, freq_hz,   0),
-        DEFINE_PROP_UINT32("nr-timers", struct timerblock, nr_timers, 0),
+        DEFINE_PROP_UINT32("frequency", struct timerblock, freq_hz,   0, ""),
+        DEFINE_PROP_UINT32("nr-timers", struct timerblock, nr_timers, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c
index 5aa6a6b..1c7dad2 100644
--- a/hw/xio3130_downstream.c
+++ b/hw/xio3130_downstream.c
@@ -184,12 +184,12 @@  static PCIDeviceInfo xio3130_downstream_info = {
     .exit = xio3130_downstream_exitfn,
 
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT8("port", PCIESlot, port.port, 0),
-        DEFINE_PROP_UINT8("chassis", PCIESlot, chassis, 0),
-        DEFINE_PROP_UINT16("slot", PCIESlot, slot, 0),
+        DEFINE_PROP_UINT8("port", PCIESlot, port.port, 0, ""),
+        DEFINE_PROP_UINT8("chassis", PCIESlot, chassis, 0, ""),
+        DEFINE_PROP_UINT16("slot", PCIESlot, slot, 0, ""),
         DEFINE_PROP_UINT16("aer_log_max", PCIESlot,
                            port.br.dev.exp.aer_log.log_max,
-                           PCIE_AER_LOG_MAX_DEFAULT),
+                           PCIE_AER_LOG_MAX_DEFAULT, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c
index a7640f5..66def8b 100644
--- a/hw/xio3130_upstream.c
+++ b/hw/xio3130_upstream.c
@@ -161,9 +161,9 @@  static PCIDeviceInfo xio3130_upstream_info = {
     .exit = xio3130_upstream_exitfn,
 
     .qdev.props = (Property[]) {
-        DEFINE_PROP_UINT8("port", PCIEPort, port, 0),
+        DEFINE_PROP_UINT8("port", PCIEPort, port, 0, ""),
         DEFINE_PROP_UINT16("aer_log_max", PCIEPort, br.dev.exp.aer_log.log_max,
-                           PCIE_AER_LOG_MAX_DEFAULT),
+                           PCIE_AER_LOG_MAX_DEFAULT, ""),
         DEFINE_PROP_END_OF_LIST(),
     }
 };
diff --git a/net.h b/net.h
index 6ceca50..aa4454b 100644
--- a/net.h
+++ b/net.h
@@ -21,10 +21,10 @@  typedef struct NICConf {
 } NICConf;
 
 #define DEFINE_NIC_PROPERTIES(_state, _conf)                            \
-    DEFINE_PROP_MACADDR("mac",   _state, _conf.macaddr),                \
-    DEFINE_PROP_VLAN("vlan",     _state, _conf.vlan),                   \
-    DEFINE_PROP_NETDEV("netdev", _state, _conf.peer),                   \
-    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1)
+    DEFINE_PROP_MACADDR("mac",   _state, _conf.macaddr, ""),            \
+    DEFINE_PROP_VLAN("vlan",     _state, _conf.vlan, ""),               \
+    DEFINE_PROP_NETDEV("netdev", _state, _conf.peer, ""),               \
+    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, "")
 
 /* VLANs support */
 
diff --git a/usb-linux.c b/usb-linux.c
index ccf7073..0f59a69 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -1068,10 +1068,10 @@  static struct USBDeviceInfo usb_host_dev_info = {
     .usbdevice_name = "host",
     .usbdevice_init = usb_host_device_open,
     .qdev.props     = (Property[]) {
-        DEFINE_PROP_UINT32("hostbus",  USBHostDevice, match.bus_num,    0),
-        DEFINE_PROP_UINT32("hostaddr", USBHostDevice, match.addr,       0),
-        DEFINE_PROP_HEX32("vendorid",  USBHostDevice, match.vendor_id,  0),
-        DEFINE_PROP_HEX32("productid", USBHostDevice, match.product_id, 0),
+        DEFINE_PROP_UINT32("hostbus",  USBHostDevice, match.bus_num,    0, ""),
+        DEFINE_PROP_UINT32("hostaddr", USBHostDevice, match.addr,       0, ""),
+        DEFINE_PROP_HEX32("vendorid",  USBHostDevice, match.vendor_id,  0, ""),
+        DEFINE_PROP_HEX32("productid", USBHostDevice, match.product_id, 0, ""),
         DEFINE_PROP_END_OF_LIST(),
     },
 };