All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Edmondson <dme@dme.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [RFC PATCH 0/3] hw/pflash_cfi01: Reduce memory consumption when flash image is smaller than region
Date: Tue, 16 Feb 2021 15:22:04 +0000	[thread overview]
Message-ID: <cunh7mcjaw3.fsf@dme.org> (raw)
In-Reply-To: <df4db595-c2db-4fa8-0a4b-1403117dcc76@redhat.com>

On Tuesday, 2021-02-16 at 16:03:05 +01, Philippe Mathieu-Daudé wrote:

> I am not a block expert, but I wonder if something like this could
> be used:
>
> - create a raw (parent) block image of 64MiB
>
> - add a raw (child) block with your 768kB of VARS file
>
> - add a null-co (child) block of 63Mib + 256kiB
>
> - pass the parent block to the pflash device

I'm not clear how this would behave if there is a write to the device at
(say) 1MiB.

More philosophically, how should it behave?

My expectation was that if the machine says that there is 64MiB of
writable flash, we have to allow writes throughout the full 64MiB and
(significantly) persist them to the backing block device.

Just because the backing block device started out 768KiB big doesn't
mean that we should not write to the remaining extent if that's what the
VM attempts.

Would the above approach achieve that? (It doesn't sound like it.)

dme.
-- 
No visible means of support and you have not seen nothing yet.


  reply	other threads:[~2021-02-16 15:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 14:27 [RFC PATCH 0/3] hw/pflash_cfi01: Reduce memory consumption when flash image is smaller than region David Edmondson
2021-02-16 14:27 ` [RFC PATCH 1/3] hw/pflash_cfi*: Replace DPRINTF with trace events David Edmondson
2021-02-16 14:27 ` [RFC PATCH 2/3] hw/pflash_cfi01: Correct the type of PFlashCFI01.ro David Edmondson
2021-02-16 14:27 ` [RFC PATCH 3/3] hw/pflash_cfi01: Allow read-only devices to have a smaller backing device David Edmondson
2021-02-16 15:03 ` [RFC PATCH 0/3] hw/pflash_cfi01: Reduce memory consumption when flash image is smaller than region Philippe Mathieu-Daudé
2021-02-16 15:22   ` David Edmondson [this message]
2021-02-16 15:44     ` Philippe Mathieu-Daudé
2021-02-16 15:53       ` David Edmondson
2021-02-18 10:34         ` David Edmondson

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=cunh7mcjaw3.fsf@dme.org \
    --to=dme@dme.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 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.