summaryrefslogtreecommitdiff
path: root/kvm_mmu.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-06-08 12:49:42 -0700
committerRobert Mustacchi <rm@joyent.com>2011-06-08 12:49:42 -0700
commitfc81a7032577914bac149316323d225e6c268a18 (patch)
treeb653340be716504ab3551a85a00377c20c6b1c74 /kvm_mmu.c
parentce88b2d2a6af27fd7873e2ff5c41c0ac387cddbe (diff)
downloadillumos-kvm-fc81a7032577914bac149316323d225e6c268a18.tar.gz
HVM-328 replace container_of with offsetof calculations
Diffstat (limited to 'kvm_mmu.c')
-rw-r--r--kvm_mmu.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/kvm_mmu.c b/kvm_mmu.c
index c908c08..5fa5a15 100644
--- a/kvm_mmu.c
+++ b/kvm_mmu.c
@@ -1452,13 +1452,9 @@ kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages)
!list_is_empty(&kvm->arch.active_mmu_pages)) {
struct kvm_mmu_page *page;
-#ifdef XXX_KVM_DOESNTCOMPILE
- page = container_of(kvm->arch.active_mmu_pages.prev,
- struct kvm_mmu_page, link);
-#else
page = (struct kvm_mmu_page *)
list_head(&kvm->arch.active_mmu_pages);
-#endif
+
/* page removed by kvm_mmu_zap_page */
used_pages -= kvm_mmu_zap_page(kvm, page);
used_pages--;
@@ -2713,13 +2709,7 @@ __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)
!list_is_empty(&vcpu->kvm->arch.active_mmu_pages)) {
struct kvm_mmu_page *sp;
-#ifdef XXX
- sp = container_of(vcpu->kvm->arch.active_mmu_pages.prev,
- struct kvm_mmu_page, link);
-#else
- XXX_KVM_PROBE;
sp = list_head(&vcpu->kvm->arch.active_mmu_pages);
-#endif
kvm_mmu_zap_page(vcpu->kvm, sp);
KVM_KSTAT_INC(vcpu->kvm, kvmks_mmu_recycled);
}