Peter Maydell <peter.maydell(a)linaro.org> writes:
On Wed, 30 Jan 2019 at 16:44, Laszlo Ersek <lersek(a)redhat.com>
wrote:
>
> On 01/30/19 16:24, Peter Maydell wrote:
>
> > Well, nobody who does anything with x86 has cared enough to
> > make the pflash implementation actually correct.
>
> I feel sort of included under this umbrella, so:
>
> I haven't been aware of any particular pflash implementation errors. I
> "didn't care" because it "worked fine" as much as I could
tell.
Lesson for the future: when we correct something, but don't dare to
touch (some) existing uses (being not "reasonably sure it doesn't
actually break guests that used to work"), we should at least have
enough sense to make "incorrect" opt-in rather than opt-out! People
adding new uses will be blissfully unaware of the need to opt-out, and
the problem will multiply, just like it did here.
It depends entirely on what the guest code that's accessing
the flash devices does. If you stick to what Linux and
presumably UEFI have always done then you don't notice
anything wrong. Some things that are in spec for hardware
don't work right, though.
Commits 4b6fedcac0f51157e through a0289b8af3b05fe4 are
where we fixed these bugs.
Updating other platforms should mostly be a matter of
(a) figuring out what the actual hardware config is
and setting the device properties accordingly
(b) testing that guest software still works
(c) checking that migration compat remains working
Unavoidable pain for uses that predate the bug fixes. Self-inflicted
pain for all later uses.
Can you fix the code so incorrect behavior becomes opt-in rather than
opt-out? Pretty-please?