All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Kevin Wolf" <kwolf@redhat.com>
Subject: Re: Re: [PATCH v2 0/3] hw/pflash: implement update buffer for block writes
Date: Mon, 22 Jan 2024 11:40:19 +0100	[thread overview]
Message-ID: <l2hfr22wl4ztjvwnm4e7f7dvour3fbe4yoydvofy2ktsjbfwfk@hnknxiljcjdm> (raw)
In-Reply-To: <789d8190-6d14-46ff-89a8-c7f2457ecc15@tls.msk.ru>

On Sat, Jan 20, 2024 at 01:18:14PM +0300, Michael Tokarev wrote:
> 08.01.2024 19:08, Gerd Hoffmann:
> > When running qemu with edk2 efi firmware on aarch64 the efi
> > variable store in pflash can get corrupted.  qemu not doing
> > proper block writes -- flush all or nothing to storage -- is
> > a hot candidate for being the root cause.
> > 
> > This little series tries to fix that with an update buffer
> > where block writes are staged, so we can commit or discard
> > the changes when the block write is completed or canceled.
> 
> It looks like we can pick this up for stable too.  It's not
> usual to pick up new features for stable, but this one fixes
> actual bug and if not applied, can easily lead to data corruption.
> 
> I'd pick it up for 8.2.x and 8.1.x at least.

Well, it turned out there was a edk2 bug causing flash corruption.
While debugging edk2 I was using a qemu build with fixed pflash.

So on one hand I don't know for sure whenever the incorrect block
flash emulation /alone/ can cause pflash corruption too.

On the other hand the edk2 debugging session also was a stress
test for the pflash fix, so I'm pretty confident it works
correctly.

I think it makes sense to include it.

take care,
  Gerd



      reply	other threads:[~2024-01-22 10:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 16:08 [PATCH v2 0/3] hw/pflash: implement update buffer for block writes Gerd Hoffmann
2024-01-08 16:08 ` [PATCH v2 1/3] hw/pflash: refactor pflash_data_write() Gerd Hoffmann
2024-01-08 16:08 ` [PATCH v2 2/3] hw/pflash: use ldn_{be,le}_p and stn_{be,le}_p Gerd Hoffmann
2024-01-08 16:08 ` [PATCH v2 3/3] hw/pflash: implement update buffer for block writes Gerd Hoffmann
2024-01-17  8:41 ` [PATCH v2 0/3] " Philippe Mathieu-Daudé
2024-01-20 10:18 ` Michael Tokarev
2024-01-22 10:40   ` Gerd Hoffmann [this message]

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=l2hfr22wl4ztjvwnm4e7f7dvour3fbe4yoydvofy2ktsjbfwfk@hnknxiljcjdm \
    --to=kraxel@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=philmd@linaro.org \
    --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.