KVM: x86: always use kvm_make_request instead of set_bit
authorRadim Krčmář <rkrcmar@redhat.com>
Wed, 26 Apr 2017 20:32:20 +0000 (22:32 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 27 Apr 2017 12:12:53 +0000 (14:12 +0200)
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c

index 2de54c20fa9e373c07c250681ffe10c930276322..0936c3e2e51c13a743fa73972b9df44aaa97884e 100644 (file)
@@ -2203,8 +2203,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
                        bool tmp = (msr == MSR_KVM_SYSTEM_TIME);
 
                        if (ka->boot_vcpu_runs_old_kvmclock != tmp)
-                               set_bit(KVM_REQ_MASTERCLOCK_UPDATE,
-                                       &vcpu->requests);
+                               kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu);
 
                        ka->boot_vcpu_runs_old_kvmclock = tmp;
                }
@@ -2802,11 +2801,6 @@ static bool need_emulate_wbinvd(struct kvm_vcpu *vcpu)
        return kvm_arch_has_noncoherent_dma(vcpu->kvm);
 }
 
-static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu)
-{
-       set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests);
-}
-
 void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 {
        /* Address WBINVD may be executed by guest */
@@ -2850,7 +2844,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
                if (!vcpu->kvm->arch.use_master_clock || vcpu->cpu == -1)
                        kvm_make_request(KVM_REQ_GLOBAL_CLOCK_UPDATE, vcpu);
                if (vcpu->cpu != cpu)
-                       kvm_migrate_timers(vcpu);
+                       kvm_make_request(KVM_REQ_MIGRATE_TIMER, vcpu);
                vcpu->cpu = cpu;
        }