Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372989
b: refs/heads/master
c: 5d21881
h: refs/heads/master
i:
  372987: fd47b5a
v: v3
  • Loading branch information
Marcelo Tosatti authored and Gleb Natapov committed Mar 13, 2013
1 parent 8959ef1 commit a5b7191
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57f252f22908535e04d520f3833a6e3116eb159d
refs/heads/master: 5d218814328da91a27e982748443e7e375e11396
7 changes: 5 additions & 2 deletions trunk/arch/x86/kvm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ int kvm_init_shadow_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context);

static inline unsigned int kvm_mmu_available_pages(struct kvm *kvm)
{
return kvm->arch.n_max_mmu_pages -
kvm->arch.n_used_mmu_pages;
if (kvm->arch.n_max_mmu_pages > kvm->arch.n_used_mmu_pages)
return kvm->arch.n_max_mmu_pages -
kvm->arch.n_used_mmu_pages;

return 0;
}

static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit a5b7191

Please sign in to comment.