On Tue, Apr 30, 2024 at 5:39 PM Philippe Mathieu-Daudé
<phi...@linaro.org> wrote:
> I'm still not convinced we need a migration back compat for this...

It's absolutely needed,

    memory_region_init_ram(isa_bios, NULL, "isa-bios", isa_bios_size,
                           &error_fatal);

will register a RAM region for migration, and when the destination
receives data from an older source, it will not find it it will fail.
On the other hand, if migrating backwards isa-bios will not be
populated and the guest may fail after reboot.

Paolo

> > diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
> > index 82d37cb376..ac88ad4eb9 100644
> > --- a/hw/i386/pc_sysfw.c
> > +++ b/hw/i386/pc_sysfw.c
> > @@ -135,6 +135,7 @@ static void pc_system_flash_map(PCMachineState *pcms,
> >                                   MemoryRegion *rom_memory)
> >   {
> >       X86MachineState *x86ms = X86_MACHINE(pcms);
> > +    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
> >       hwaddr total_size = 0;
> >       int i;
> >       BlockBackend *blk;
> > @@ -184,7 +185,12 @@ static void pc_system_flash_map(PCMachineState *pcms,
> >
> >           if (i == 0) {
> >               flash_mem = pflash_cfi01_get_memory(system_flash);
> > -            pc_isa_bios_init(&x86ms->isa_bios, rom_memory, flash_mem);
> > +            if (pcmc->isa_bios_alias) {
> > +                x86_isa_bios_init(&x86ms->isa_bios, rom_memory, flash_mem,
> > +                                  true);
> > +            } else {
> > +                pc_isa_bios_init(&x86ms->isa_bios, rom_memory, flash_mem);
> > +            }
> >
> >               /* Encrypt the pflash boot ROM */
> >               if (sev_enabled()) {
>


Reply via email to