qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] hw/nand hw/onenand and read-only


From: Markus Armbruster
Subject: Re: [Qemu-devel] hw/nand hw/onenand and read-only
Date: Wed, 19 Oct 2011 11:45:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 19 October 2011 09:03, Markus Armbruster <address@hidden> wrote:
>> <address@hidden> writes:
>>> both device models already support running without a drive as well by
>>> using a memory buffer instead so it would also be possible to make them
>>> use a read-only drive in a way that initial NAND/OneNAND contents would be
>>> read from the drive but any changes would not be written back to the drive
>>> and would be lost when QEMU is killed.
>>
>> Sounds like it could be useful, but it's not what I'd expect for
>> "readonly".
>>
>> You could create a boolean device property to make memory contents
>> transient rather than persistent.  Then reject read-only drives only in
>> persistent mode, i.e. when the property is false.  Feels cleaner to me.
>
> That doesn't sound very onenand/nand specific to me, though.

Better ideas welcome :)

First thing to decide is whether it's a property of the device or one of
its backend.

Similar devices have similar properties.  Sometimes we factor out common
ones.  See for instance DEFINE_BLOCK_PROPERTIES().



reply via email to

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