diff options
author | Zhang Xiantao <xiantao.zhang@intel.com> | 2007-12-14 10:01:48 +0800 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 17:58:10 +0200 |
commit | f05e70ac03a6614af12194a014b338ec5594cb5c (patch) | |
tree | 1dcaea0f519167ad75c99a2c4e7c46e08050a8fe /drivers/kvm/x86.c | |
parent | d69fb81f0554fb980e4b1d3db4e44351c2c4a4a2 (diff) | |
download | lwn-f05e70ac03a6614af12194a014b338ec5594cb5c.tar.gz lwn-f05e70ac03a6614af12194a014b338ec5594cb5c.zip |
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.c | 8 |
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, mutex_lock(&kvm->lock); kvm_mmu_change_mmu_pages(kvm, kvm_nr_mmu_pages); - kvm->n_requested_mmu_pages = kvm_nr_mmu_pages; + kvm->arch.n_requested_mmu_pages = kvm_nr_mmu_pages; mutex_unlock(&kvm->lock); return 0; @@ -1183,7 +1183,7 @@ static int kvm_vm_ioctl_set_nr_mmu_pages(struct kvm *kvm, static int kvm_vm_ioctl_get_nr_mmu_pages(struct kvm *kvm) { - return kvm->n_alloc_mmu_pages; + return kvm->arch.n_alloc_mmu_pages; } gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn) @@ -3051,7 +3051,7 @@ struct kvm *kvm_arch_create_vm(void) if (!kvm) return ERR_PTR(-ENOMEM); - INIT_LIST_HEAD(&kvm->active_mmu_pages); + INIT_LIST_HEAD(&kvm->arch.active_mmu_pages); return kvm; } @@ -3130,7 +3130,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm, } } - if (!kvm->n_requested_mmu_pages) { + if (!kvm->arch.n_requested_mmu_pages) { unsigned int nr_mmu_pages = kvm_mmu_calculate_mmu_pages(kvm); kvm_mmu_change_mmu_pages(kvm, nr_mmu_pages); } |