From 3ad82a7e874c5d6c4045090cc01d7794dd9eb21c Mon Sep 17 00:00:00 2001 From: Zhang Xiantao Date: Tue, 20 Nov 2007 13:11:38 +0800 Subject: KVM: Recalculate mmu pages needed for every memory region change Instead of incrementally changing the mmu cache size for every memory slot operation, recalculate it from scratch. This is simpler and safer. Signed-off-by: Zhang Xiantao Signed-off-by: Avi Kivity --- drivers/kvm/x86.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/kvm/x86.h') diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h index 90b791bf6287..71f2477d03fd 100644 --- a/drivers/kvm/x86.h +++ b/drivers/kvm/x86.h @@ -236,6 +236,7 @@ void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); void kvm_mmu_zap_all(struct kvm *kvm); +unsigned int kvm_mmu_calculate_mmu_pages(struct kvm *kvm); void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages); enum emulation_result { -- cgit v1.2.2