[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v2 01/18] aspeed/smc: Fix write incorrect data into flash in
From: |
Jamin Lin |
Subject: |
RE: [PATCH v2 01/18] aspeed/smc: Fix write incorrect data into flash in user mode |
Date: |
Wed, 23 Oct 2024 01:41:43 +0000 |
Hi Cedric,
> Subject: Re: [PATCH v2 01/18] aspeed/smc: Fix write incorrect data into flash
> in
> user mode
>
> >>
> >> static const VMStateDescription vmstate_aspeed_smc = {
> >> .name = "aspeed.smc",
> >> - .version_id = 2,
> >> + .version_id = 3,
> >> .minimum_version_id = 2,
> >> .fields = (const VMStateField[]) {
> >> VMSTATE_UINT32_ARRAY(regs, AspeedSMCState,
> ASPEED_SMC_R_MAX),
> >> VMSTATE_UINT8(snoop_index, AspeedSMCState),
> >> VMSTATE_UINT8(snoop_dummies, AspeedSMCState),
> >> + VMSTATE_BOOL(unselect, AspeedSMCState),
> >> VMSTATE_END_OF_LIST()
> >> }
> >> };
> >
> > I think this will break migration compatibility. In order to enable at
> > least forward migration, it should be:
> >
> > VMSTATE_BOOL_V(unselect, AspeedSMCState, 3),
>
> This is correct. I will fix the patch.
>
If I need to re-send v3 patch, I will fix it.
Thanks for help.
Jamin
> Some background,
>
> The aspeed machines are fully emulated and the Aspeed SoC models are not
> part of any virt* machines (yet). So migration support is a bit of a theory.
> We
> have done our best to maintain some support, compatibility not being a
> priority. IOW, it's not perfectly tuned as on virt machines.
>
> Also, on ARM, migration of the CPU secure mode (I think this is the reason,
> Peter please correct me !) is not supported and if migration is initiated
> after
> Linux has started, the machine will hang.
>
> However, if one day, an aspeed model becomes part of a virt machine, we
> should be more careful. I would start by resetting all vmstate versions to 1!
>
> Thanks,
>
> C.
>
>
>
> >
> > For allowing backwards migration, too, we should consider making it a
> > subsection instead that allows migration in the default case of an
> > idle device.
> >
> > Kevin
> >
[PATCH v2 03/18] hw/block:m25p80: Support write status register 2 command (0x31) for w25q01jvq, Jamin Lin, 2024/10/22
[PATCH v2 05/18] hw/arm/aspeed: Correct spi_model w25q256 for ast1030-a1 EVB., Jamin Lin, 2024/10/22
[PATCH v2 06/18] hw/arm/aspeed: Correct fmc_model w25q80bl for ast1030-a1 EVB, Jamin Lin, 2024/10/22
[PATCH v2 08/18] test/qtest/aspeed_smc-test: Fix coding style, Jamin Lin, 2024/10/22
[PATCH v2 07/18] aspeed: Fix hardcode attach flash model of spi controllers, Jamin Lin, 2024/10/22
[PATCH v2 09/18] test/qtest/aspeed_smc-test: Move testcases to test_palmetto_bmc function, Jamin Lin, 2024/10/22