Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / arch / x86 / kvm / lapic.c
index 2a5ca97c263bb48092ea80f88c7d30120ea63b6e..9a3e342e3cda7ecfc42c86d981d791601d9615f5 100644 (file)
@@ -1900,8 +1900,9 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu)
        if (!test_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention))
                return;
 
-       kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data,
-                               sizeof(u32));
+       if (kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data,
+                                 sizeof(u32)))
+               return;
 
        apic_set_tpr(vcpu->arch.apic, data & 0xff);
 }