summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorLan Tianyu2018-12-06 14:21:10 +0100
committerPaolo Bonzini2018-12-21 11:28:41 +0100
commit748c0e312fce983bd7854b369b192e24dce90878 (patch)
treefa6c52e90d0ee3db59f013bd1305970595bcc86a /arch/x86/kvm/mmu.c
parentKVM: Replace old tlb flush function with new one to flush a specified range. (diff)
downloadkernel-qcow2-linux-748c0e312fce983bd7854b369b192e24dce90878.tar.gz
kernel-qcow2-linux-748c0e312fce983bd7854b369b192e24dce90878.tar.xz
kernel-qcow2-linux-748c0e312fce983bd7854b369b192e24dce90878.zip
KVM: Make kvm_set_spte_hva() return int
The patch is to make kvm_set_spte_hva() return int and caller can check return value to determine flush tlb or not. Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com> Acked-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 711a41a85dfb..dd71864ded39 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1913,9 +1913,10 @@ int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end)
return kvm_handle_hva_range(kvm, start, end, 0, kvm_unmap_rmapp);
}
-void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte)
+int kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte)
{
kvm_handle_hva(kvm, hva, (unsigned long)&pte, kvm_set_pte_rmapp);
+ return 0;
}
static int kvm_age_rmapp(struct kvm *kvm, struct kvm_rmap_head *rmap_head,