aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86.c
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-12-13 21:01:48 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:58:10 -0500
commitf05e70ac03a6614af12194a014b338ec5594cb5c (patch)
tree1dcaea0f519167ad75c99a2c4e7c46e08050a8fe /drivers/kvm/x86.c
parentd69fb81f0554fb980e4b1d3db4e44351c2c4a4a2 (diff)
KVM: Portability: Move mmu-related fields to kvm_arch
This patches moves mmu-related fields to kvm_arch. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Acked-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86.c')
-rw-r--r--drivers/kvm/x86.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index 7e1bd526bd5c..c0e95fb9f46c 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -1175,7 +1175,7 @@ static int kvm_vm_ioctl_set_nr_mmu_pages(struct kvm *kvm,
1175 mutex_lock(&kvm->lock); 1175 mutex_lock(&kvm->lock);
1176 1176
1177 kvm_mmu_change_mmu_pages(kvm, kvm_nr_mmu_pages); 1177 kvm_mmu_change_mmu_pages(kvm, kvm_nr_mmu_pages);
1178 kvm->n_requested_mmu_pages = kvm_nr_mmu_pages; 1178 kvm->arch.n_requested_mmu_pages = kvm_nr_mmu_pages;
1179 1179
1180 mutex_unlock(&kvm->lock); 1180 mutex_unlock(&kvm->lock);
1181 return 0; 1181 return 0;
@@ -1183,7 +1183,7 @@ static int kvm_vm_ioctl_set_nr_mmu_pages(struct kvm *kvm,
1183 1183
1184static int kvm_vm_ioctl_get_nr_mmu_pages(struct kvm *kvm) 1184static int kvm_vm_ioctl_get_nr_mmu_pages(struct kvm *kvm)
1185{ 1185{
1186 return kvm->n_alloc_mmu_pages; 1186 return kvm->arch.n_alloc_mmu_pages;
1187} 1187}
1188 1188
1189gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn) 1189gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn)
@@ -3051,7 +3051,7 @@ struct kvm *kvm_arch_create_vm(void)
3051 if (!kvm) 3051 if (!kvm)
3052 return ERR_PTR(-ENOMEM); 3052 return ERR_PTR(-ENOMEM);
3053 3053
3054 INIT_LIST_HEAD(&kvm->active_mmu_pages); 3054 INIT_LIST_HEAD(&kvm->arch.active_mmu_pages);
3055 3055
3056 return kvm; 3056 return kvm;
3057} 3057}
@@ -3130,7 +3130,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
3130 } 3130 }
3131 } 3131 }
3132 3132
3133 if (!kvm->n_requested_mmu_pages) { 3133 if (!kvm->arch.n_requested_mmu_pages) {
3134 unsigned int nr_mmu_pages = kvm_mmu_calculate_mmu_pages(kvm); 3134 unsigned int nr_mmu_pages = kvm_mmu_calculate_mmu_pages(kvm);
3135 kvm_mmu_change_mmu_pages(kvm, nr_mmu_pages); 3135 kvm_mmu_change_mmu_pages(kvm, nr_mmu_pages);
3136 } 3136 }