Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215805
b: refs/heads/master
c: 8e0e8af
h: refs/heads/master
i:
  215803: ca020bf
v: v3
  • Loading branch information
Xiao Guangrong authored and Avi Kivity committed Oct 24, 2010
1 parent 4129151 commit 7d36540
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 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: 365fb3fdf6769d3553999d8eb6cc2a8c56c747c1
refs/heads/master: 8e0e8afa82018a3c751ea474eb47dfc65f00f4c3
38 changes: 0 additions & 38 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3606,43 +3606,6 @@ static void audit_mappings(struct kvm_vcpu *vcpu)
2);
}

static int count_rmaps(struct kvm_vcpu *vcpu)
{
struct kvm *kvm = vcpu->kvm;
struct kvm_memslots *slots;
int nmaps = 0;
int i, j, k, idx;

idx = srcu_read_lock(&kvm->srcu);
slots = kvm_memslots(kvm);
for (i = 0; i < KVM_MEMORY_SLOTS; ++i) {
struct kvm_memory_slot *m = &slots->memslots[i];
struct kvm_rmap_desc *d;

for (j = 0; j < m->npages; ++j) {
unsigned long *rmapp = &m->rmap[j];

if (!*rmapp)
continue;
if (!(*rmapp & 1)) {
++nmaps;
continue;
}
d = (struct kvm_rmap_desc *)(*rmapp & ~1ul);
while (d) {
for (k = 0; k < RMAP_EXT; ++k)
if (d->sptes[k])
++nmaps;
else
break;
d = d->more;
}
}
}
srcu_read_unlock(&kvm->srcu, idx);
return nmaps;
}

void inspect_spte_has_rmap(struct kvm *kvm, u64 *sptep)
{
unsigned long *rmapp;
Expand Down Expand Up @@ -3704,7 +3667,6 @@ static void check_mappings_rmap(struct kvm_vcpu *vcpu)
static void audit_rmap(struct kvm_vcpu *vcpu)
{
check_mappings_rmap(vcpu);
count_rmaps(vcpu);
}

static void audit_write_protection(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit 7d36540

Please sign in to comment.