qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] arm_gic_kvm: Disable live migration if not s


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] arm_gic_kvm: Disable live migration if not supported
Date: Mon, 19 Oct 2015 18:17:39 +0100

On 16 October 2015 at 14:55, Pavel Fedin <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]