]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/kvm/arm.c
arm/arm64: KVM: Fix ordering of timer/GIC on guest entry
[karo-tx-linux.git] / arch / arm / kvm / arm.c
index 9ce5cf02ed178a55894aefd70c7b8da92407afa7..1141d21b7e3c3bbc6bb2729a87f9f3b10c8f6b3d 100644 (file)
@@ -523,8 +523,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
                if (vcpu->arch.pause)
                        vcpu_pause(vcpu);
 
-               kvm_vgic_flush_hwstate(vcpu);
                kvm_timer_flush_hwstate(vcpu);
+               kvm_vgic_flush_hwstate(vcpu);
 
                preempt_disable();
                local_irq_disable();
@@ -540,8 +540,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
                if (ret <= 0 || need_new_vmid_gen(vcpu->kvm)) {
                        local_irq_enable();
                        preempt_enable();
-                       kvm_timer_sync_hwstate(vcpu);
                        kvm_vgic_sync_hwstate(vcpu);
+                       kvm_timer_sync_hwstate(vcpu);
                        continue;
                }
 
@@ -587,9 +587,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
                trace_kvm_exit(kvm_vcpu_trap_get_class(vcpu), *vcpu_pc(vcpu));
                preempt_enable();
 
-
-               kvm_timer_sync_hwstate(vcpu);
                kvm_vgic_sync_hwstate(vcpu);
+               kvm_timer_sync_hwstate(vcpu);
 
                ret = handle_exit(vcpu, run, ret);
        }