David Woodhouse <dw...@infradead.org> writes:

> On Sun, 2013-01-27 at 18:53 -0600, Anthony Liguori wrote:
>> Are you just trying to persist a single blob of a fixed maximum size?
>
> That would suffice.
>
>> Why not just have a second flash device then?
>
> Mostly because flash devices don't actually *work* with KVM.

They absolutely do.  What doesn't work is executing ROM from flash if
the ROM cannot be treated as read-only memory.

That's because all we get is a PF in the kernel when trying to execute
from unmapped ROM.  There's no way to turn that into MMIO to userspace
without switching to running fully in emulation mode.  The x86 emulator
is pretty close to complete but work would be needed to fully complete
it to make this work.

We normally handle this by mapping the ROM memory read-only so it can be
executed without PF'ing but since the BIOS area is subject to PAM, we
can't use this trick for that particular ROM.

SeaBIOS has hack to just not use PAM to do BIOS shadowing when running
under KVM/QEMU but presumably OVMF lacks this.

But in this case, you're using the flash device purely for read/write,
not for execution, so there's no limitation at all.

Regards,

Anthony Liguori

>
> Should I be looking at fixing *that*, instead?
>
> -- 
> dwmw2

Reply via email to