qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Jordan Justen <jljusten@gmail.com>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] pflash: Restore & fix lazy ROMD switching
Date: Mon, 11 Apr 2011 07:27:38 +0200	[thread overview]
Message-ID: <4DA2914A.4070203@web.de> (raw)
In-Reply-To: <BANLkTim4dHGBRZaj6eNrRsuiACVvCLObrw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

On 2011-04-10 21:33, Jordan Justen wrote:
> On Sun, Apr 10, 2011 at 03:53, Jan Kiszka <jan.kiszka@web.de> wrote:
>> Commit 5145b3d1cc revealed a bug in the lazy ROMD switch-back logic, but
>> resolved it by breaking that feature. This approach addresses the issue
>> by switching back to ROMD after a certain amount of read accesses
>> without further unlock sequences.
> 
> Without this change, the code will stay in flash mode until a single
> read occurs.  The code sequence you are wanting to support using will
> issue a read before trying to unlock again?
> 
> Actually, I suppose it will want to verify the written data before
> moving on, so this does make sense.

Precisely. The drivers (e.g. Linux) compare two successive reads for bit
flips. In their absence, the result was written. The guest I'm
optimizing for does 5 reads per write.

> 
> Is the overhead of switching the modes significant enough to justify
> the lazy switch-back?  (If so, maybe I'll look at this for cfi01 too.)

As we call into cpu_register_physical_memory, the overhead is
tremendous, an order of magnitude IIRC, which will sum up to huge delays
when reflashing a complete multi-MB firmware image e.g.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2011-04-11  5:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-03 20:16 [Qemu-devel] [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mode Jordan Justen
2011-04-09 16:35 ` Aurelien Jarno
2011-04-10  8:38 ` [Qemu-devel] " Jan Kiszka
2011-04-10 10:53   ` [Qemu-devel] [PATCH] pflash: Restore & fix lazy ROMD switching Jan Kiszka
2011-04-10 19:33     ` Jordan Justen
2011-04-11  5:27       ` Jan Kiszka [this message]
2011-04-26  7:42     ` Jan Kiszka
2011-04-27 14:31       ` Aurelien Jarno
2011-04-10 18:29   ` [Qemu-devel] Re: [PATCH] hw/pflash_cfi02: Fix lazy reset of ROMD mode Jordan Justen

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=4DA2914A.4070203@web.de \
    --to=jan.kiszka@web.de \
    --cc=aurelien@aurel32.net \
    --cc=jljusten@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).