On 16 October 2015 at 14:55, Pavel Fedin <p.fe...@samsung.com> wrote: > Hello! > >> > + if (kvm_arm_gic_can_save_restore(s)) { >> > + kvm_arm_gic_put(s); >> > + } >> >> Why change the reset method in a patch that's dealing with adding >> a warning about migration? > > Since pre_save and post_load will never be called if migration > is disabled, i removed unnecessary checks from there. But, since > reset method calls post_load, i had to add the check there.
Ah yes, I see now. (Reset is broken on old kernels without the save/restore ABI, but not much we can do about that.) > Actually, i would factor away kvm_arm_gic_reset() completely, > because all it does is calling parent's reset, then calling > post_load. This can perfectly be done in parent class. For > software-emulated GICv3 post_load callback is simply not used, > so that would be safe. Calling post_load in the parent class is the wrong thing in the wrong place, because the need to write the data back into the kernel is an implementation detail of the KVM GIC subclass, and so is the fact that the post_load hook happens to do the write-data-back job. Another subclass might potentially do different things in its post-load hook; it's just coincidence that the emulated GIC happens not to need to do any post-load operations at the moment. I've applied this patch to target-arm.next. thanks -- PMM