]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - virt/kvm/arm/arm.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[zynq/linux.git] / virt / kvm / arm / arm.c
index 8de55041e7ba3a8bab08e28d90bd9e911c0a3678..99c37384ba7bd3766db4fb863d6baea908210c75 100644 (file)
@@ -611,6 +611,13 @@ static void vcpu_req_sleep(struct kvm_vcpu *vcpu)
                /* Awaken to handle a signal, request we sleep again later. */
                kvm_make_request(KVM_REQ_SLEEP, vcpu);
        }
+
+       /*
+        * Make sure we will observe a potential reset request if we've
+        * observed a change to the power state. Pairs with the smp_wmb() in
+        * kvm_psci_vcpu_on().
+        */
+       smp_rmb();
 }
 
 static int kvm_vcpu_initialized(struct kvm_vcpu *vcpu)
@@ -624,6 +631,9 @@ static void check_vcpu_requests(struct kvm_vcpu *vcpu)
                if (kvm_check_request(KVM_REQ_SLEEP, vcpu))
                        vcpu_req_sleep(vcpu);
 
+               if (kvm_check_request(KVM_REQ_VCPU_RESET, vcpu))
+                       kvm_reset_vcpu(vcpu);
+
                /*
                 * Clear IRQ_PENDING requests that were made to guarantee
                 * that a VCPU sees new virtual interrupts.