On Thu, Sep 27, 2018 at 01:13:54AM +0000, [email protected] wrote:
> From: Manish Jaggi <[email protected]>
> 
> Invariant registers will be skipped from being restored from
> guests' context on migrated host.
> 
> Signed-off-by: Manish Jaggi <[email protected]>
> 
> diff --git a/target/arm/kvm.c b/target/arm/kvm.c
> index 65f867d..2d89600 100644
> --- a/target/arm/kvm.c
> +++ b/target/arm/kvm.c
> @@ -451,6 +451,9 @@ bool write_list_to_kvmstate(ARMCPU *cpu, int level)
>          default:
>              abort();
>          }
> +        if (skip_invariant && kvm_arm_is_invariant(&r)) {
> +            continue;
> +        }
>          ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, &r);
>          if (ret) {
>              /* We might fail for "unknown register" and also for
> -- 
> 1.8.3.1
> 
>

I think we should compare the invariants we're going to skip restoring
with their saved state and output messages when they don't match to the
migration log. That way when things go wrong we have a clue as to why.

Thanks,
drew

Reply via email to