diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2009-12-23 11:35:16 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:43 -0500 |
commit | 46a26bf55714c1e2f17e34683292a389acb8e601 (patch) | |
tree | 3df70225ce6a076d7e4be604a5d72465383043ee /arch/x86/kvm/x86.c | |
parent | 2044892d4a005a78796c92fd1aef4633be896698 (diff) |
KVM: modify memslots layout in struct kvm
Have a pointer to an allocated region inside struct kvm.
[alex: fix ppc book 3s]
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 8798504ace11..3b81cb9da8b8 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2427,7 +2427,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
2427 | spin_lock(&kvm->mmu_lock); | 2427 | spin_lock(&kvm->mmu_lock); |
2428 | kvm_mmu_slot_remove_write_access(kvm, log->slot); | 2428 | kvm_mmu_slot_remove_write_access(kvm, log->slot); |
2429 | spin_unlock(&kvm->mmu_lock); | 2429 | spin_unlock(&kvm->mmu_lock); |
2430 | memslot = &kvm->memslots[log->slot]; | 2430 | memslot = &kvm->memslots->memslots[log->slot]; |
2431 | n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; | 2431 | n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; |
2432 | memset(memslot->dirty_bitmap, 0, n); | 2432 | memset(memslot->dirty_bitmap, 0, n); |
2433 | } | 2433 | } |
@@ -5223,7 +5223,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm, | |||
5223 | int user_alloc) | 5223 | int user_alloc) |
5224 | { | 5224 | { |
5225 | int npages = mem->memory_size >> PAGE_SHIFT; | 5225 | int npages = mem->memory_size >> PAGE_SHIFT; |
5226 | struct kvm_memory_slot *memslot = &kvm->memslots[mem->slot]; | 5226 | struct kvm_memory_slot *memslot = &kvm->memslots->memslots[mem->slot]; |
5227 | 5227 | ||
5228 | /*To keep backward compatibility with older userspace, | 5228 | /*To keep backward compatibility with older userspace, |
5229 | *x86 needs to hanlde !user_alloc case. | 5229 | *x86 needs to hanlde !user_alloc case. |