KVM: x86: directly use kvm_make_request again
authorLiang Chen <liangchen.linux@gmail.com>
Thu, 18 Sep 2014 16:38:37 +0000 (12:38 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Sep 2014 12:07:51 +0000 (14:07 +0200)
A one-line wrapper around kvm_make_request is not particularly
useful. Replace kvm_mmu_flush_tlb() with kvm_make_request().

Signed-off-by: Liang Chen <liangchen.linux@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c

index 028df8dc538e837a720ae36979666a125840becf..eeeb573fcf6fb0f421e663171f0a2239c76af650 100644 (file)
@@ -914,7 +914,6 @@ void kvm_inject_nmi(struct kvm_vcpu *vcpu);
 
 int fx_init(struct kvm_vcpu *vcpu);
 
-void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu);
 void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
                       const u8 *new, int bytes);
 int kvm_mmu_unprotect_page(struct kvm *kvm, gfn_t gfn);
index 90f0aceea4cceba12bd22d6e20a4bf6280018105..045d592af1ddb27bae2694fbd1b02a1e09ae95cc 100644 (file)
@@ -1743,7 +1743,7 @@ static int __kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
                return 1;
        }
 
-       kvm_mmu_flush_tlb(vcpu);
+       kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
        return 0;
 }
 
@@ -1796,7 +1796,7 @@ static void kvm_sync_pages(struct kvm_vcpu *vcpu,  gfn_t gfn)
 
        kvm_mmu_commit_zap_page(vcpu->kvm, &invalid_list);
        if (flush)
-               kvm_mmu_flush_tlb(vcpu);
+               kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
 }
 
 struct mmu_page_path {
@@ -2530,7 +2530,7 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
              true, host_writable)) {
                if (write_fault)
                        *emulate = 1;
-               kvm_mmu_flush_tlb(vcpu);
+               kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
        }
 
        if (unlikely(is_mmio_spte(*sptep) && emulate))
@@ -3444,12 +3444,6 @@ static void nonpaging_init_context(struct kvm_vcpu *vcpu,
        context->nx = false;
 }
 
-void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu)
-{
-       kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
-}
-EXPORT_SYMBOL_GPL(kvm_mmu_flush_tlb);
-
 void kvm_mmu_new_cr3(struct kvm_vcpu *vcpu)
 {
        mmu_free_roots(vcpu);
@@ -3964,7 +3958,7 @@ static void mmu_pte_write_flush_tlb(struct kvm_vcpu *vcpu, bool zap_page,
        if (remote_flush)
                kvm_flush_remote_tlbs(vcpu->kvm);
        else if (local_flush)
-               kvm_mmu_flush_tlb(vcpu);
+               kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
 }
 
 static u64 mmu_pte_write_fetch_gpte(struct kvm_vcpu *vcpu, gpa_t *gpa,
@@ -4225,7 +4219,7 @@ EXPORT_SYMBOL_GPL(kvm_mmu_page_fault);
 void kvm_mmu_invlpg(struct kvm_vcpu *vcpu, gva_t gva)
 {
        vcpu->arch.mmu.invlpg(vcpu, gva);
-       kvm_mmu_flush_tlb(vcpu);
+       kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
        ++vcpu->stat.invlpg;
 }
 EXPORT_SYMBOL_GPL(kvm_mmu_invlpg);
index 2ab504791190910c5bc09317de1cf54b98f344a6..ec389a6dc82a99539f253399c88aa75d6effc738 100644 (file)
@@ -6711,7 +6711,7 @@ static int handle_invept(struct kvm_vcpu *vcpu)
        switch (type) {
        case VMX_EPT_EXTENT_GLOBAL:
                kvm_mmu_sync_roots(vcpu);
-               kvm_mmu_flush_tlb(vcpu);
+               kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
                nested_vmx_succeed(vcpu);
                break;
        default:
index 65b97d5567fefbcfa3d18d4addf86eb1875d8f76..47678d4e229a4a9073bad0034aebf1902675e3b1 100644 (file)
@@ -729,7 +729,7 @@ int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
 {
        if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) {
                kvm_mmu_sync_roots(vcpu);
-               kvm_mmu_flush_tlb(vcpu);
+               kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
                return 0;
        }