diff options
Diffstat (limited to 'arch/ia64/kvm/kvm-ia64.c')
-rw-r--r-- | arch/ia64/kvm/kvm-ia64.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 43f4c92816ef..405052002493 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -774,13 +774,13 @@ struct kvm *kvm_arch_alloc_vm(void) | |||
774 | return kvm; | 774 | return kvm; |
775 | } | 775 | } |
776 | 776 | ||
777 | struct kvm_io_range { | 777 | struct kvm_ia64_io_range { |
778 | unsigned long start; | 778 | unsigned long start; |
779 | unsigned long size; | 779 | unsigned long size; |
780 | unsigned long type; | 780 | unsigned long type; |
781 | }; | 781 | }; |
782 | 782 | ||
783 | static const struct kvm_io_range io_ranges[] = { | 783 | static const struct kvm_ia64_io_range io_ranges[] = { |
784 | {VGA_IO_START, VGA_IO_SIZE, GPFN_FRAME_BUFFER}, | 784 | {VGA_IO_START, VGA_IO_SIZE, GPFN_FRAME_BUFFER}, |
785 | {MMIO_START, MMIO_SIZE, GPFN_LOW_MMIO}, | 785 | {MMIO_START, MMIO_SIZE, GPFN_LOW_MMIO}, |
786 | {LEGACY_IO_START, LEGACY_IO_SIZE, GPFN_LEGACY_IO}, | 786 | {LEGACY_IO_START, LEGACY_IO_SIZE, GPFN_LEGACY_IO}, |
@@ -1366,14 +1366,12 @@ static void kvm_release_vm_pages(struct kvm *kvm) | |||
1366 | { | 1366 | { |
1367 | struct kvm_memslots *slots; | 1367 | struct kvm_memslots *slots; |
1368 | struct kvm_memory_slot *memslot; | 1368 | struct kvm_memory_slot *memslot; |
1369 | int i, j; | 1369 | int j; |
1370 | unsigned long base_gfn; | 1370 | unsigned long base_gfn; |
1371 | 1371 | ||
1372 | slots = kvm_memslots(kvm); | 1372 | slots = kvm_memslots(kvm); |
1373 | for (i = 0; i < slots->nmemslots; i++) { | 1373 | kvm_for_each_memslot(memslot, slots) { |
1374 | memslot = &slots->memslots[i]; | ||
1375 | base_gfn = memslot->base_gfn; | 1374 | base_gfn = memslot->base_gfn; |
1376 | |||
1377 | for (j = 0; j < memslot->npages; j++) { | 1375 | for (j = 0; j < memslot->npages; j++) { |
1378 | if (memslot->rmap[j]) | 1376 | if (memslot->rmap[j]) |
1379 | put_page((struct page *)memslot->rmap[j]); | 1377 | put_page((struct page *)memslot->rmap[j]); |
@@ -1820,7 +1818,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, | |||
1820 | if (log->slot >= KVM_MEMORY_SLOTS) | 1818 | if (log->slot >= KVM_MEMORY_SLOTS) |
1821 | goto out; | 1819 | goto out; |
1822 | 1820 | ||
1823 | memslot = &kvm->memslots->memslots[log->slot]; | 1821 | memslot = id_to_memslot(kvm->memslots, log->slot); |
1824 | r = -ENOENT; | 1822 | r = -ENOENT; |
1825 | if (!memslot->dirty_bitmap) | 1823 | if (!memslot->dirty_bitmap) |
1826 | goto out; | 1824 | goto out; |