All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Juha.Riihimaki@nokia.com
Cc: peter.maydell@linaro.org, riku.voipio@iki.fi, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] hw/nand hw/onenand and read-only
Date: Wed, 19 Oct 2011 10:03:23 +0200	[thread overview]
Message-ID: <m339ep4ddg.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <CAC44696.32F4D%juha.riihimaki@nokia.com> (Juha Riihimaki's message of "Wed, 19 Oct 2011 06:36:18 +0000")

<Juha.Riihimaki@nokia.com> writes:

> On 18.10.11 16:38 , "ext Markus Armbruster" <armbru@redhat.com> wrote:
>
>>    $ qemu-system-arm -drive if=none,file=tmp.qcow2,readonly,id=foo
>>-device nand,drive=foo -kernel /dev/null
>>    qemu: hardware error: nand_device_init: Unsupported NAND block size.
>>    [...]
>>
>>Note that I didn't bother supplying a drive with sensible size.  If I
>>did, I guess I'd get nand coupled to a read-only drive.  Easy enough for
>>you to try :)
>
> Indeed, thanks ;) While I'm at it, I'll also fix the NAND init function to
> return -1 instead of aborting. I'll send patches for hw/nand and
> hw/onenand shortly. I'll simply make them reject read-only drives however

Thanks!

> 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.

  reply	other threads:[~2011-10-19  8:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18  8:23 [Qemu-devel] hw/nand hw/onenand and read-only Markus Armbruster
2011-10-18  8:44 ` Juha.Riihimaki
2011-10-18 13:38   ` Markus Armbruster
2011-10-18 14:01     ` Peter Maydell
2011-10-18 15:13       ` Markus Armbruster
2011-10-19  6:36     ` Juha.Riihimaki
2011-10-19  8:03       ` Markus Armbruster [this message]
2011-10-19  8:46         ` Peter Maydell
2011-10-19  9:29           ` Kevin Wolf
2011-10-19  9:45           ` Markus Armbruster

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=m339ep4ddg.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=Juha.Riihimaki@nokia.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.