[Top][All Lists]

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

Immutable qdev properties (was: [Qemu-devel] [PATCH 3/3] qdev: convert w

From: Markus Armbruster
Subject: Immutable qdev properties (was: [Qemu-devel] [PATCH 3/3] qdev: convert watchdogs)
Date: Mon, 24 Aug 2009 11:05:45 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Gerd Hoffmann <address@hidden> writes:

>> +static void wdt_ib700_init(ISADevice *dev)
>>   {
>> +    timer = qemu_new_timer(vm_clock, ib700_timer_expired, NULL);
>>       register_savevm("ib700_wdt", -1, 0, ib700_save, ib700_load, NULL);
>> -
>>       register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, NULL);
>>       register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, NULL);
>>   }
> One minor nit:  Setting dev->iobase[] to { 0x441, 0x443 } here would
> be nice as 'info qtree' will show the ports actually used by the
> device then.

Can do.

iobase[] will start as whatever the user specifies in -device,
defaulting to { -1, -1 }, then revert to { 0x441, 0x443 } when the
device is initialized.  Not sure whether this is a problem.

Taking a step back, the general problem is "immutable" qdev properties,
i.e. properties that aren't configurable.  I think it would be good to
agree on a common method there, and document it.

Your suggestion for this particular case is to have device
initialization overwrite whatever was configured.  Good enough for the
general case?

> Otherwise the patch series looks good.

Thanks for the review!

reply via email to

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