[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] hw/arm/smmuv3: Add GBPA register
From: |
Mostafa Saleh |
Subject: |
Re: [PATCH v4] hw/arm/smmuv3: Add GBPA register |
Date: |
Sun, 12 Feb 2023 13:23:46 +0000 |
On Sat, Feb 11, 2023 at 01:48:57PM -1000, Richard Henderson wrote:
> Just "return s->gbpa != SMMU_GBPA_RESET_VAL;".
I will update it.
> > @@ -1512,6 +1553,10 @@ static const VMStateDescription vmstate_smmuv3 = {
> > VMSTATE_END_OF_LIST(),
> > },
> > + .subsections = (const VMStateDescription * []) {
> > + &vmstate_gbpa,
> > + NULL
> > + }
>
> Actually, I suspect that you need a pre_load hook that resets gbpa, which
> will then be overwritten if and only if the saved value != reset value.
>
Please correct me if I am wrong. From what I see, the initial for value
GBPA will be set from smmu_reset_hold which is called from context of
qemu_system_reset from qemu_init context.
And migration will start after that in migration_incoming_process from
qemu_main_loop context.
I validated that also by printing the value of GBPA from vmstate_smmuv3
pre_load at migration without GPBA, and it is the same as
SMMU_GBPA_RESET_VAL.
Thanks,
Mostafa