aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--virt/kvm/kvm_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 1df4c0422f68..897bff3b7df9 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1091,9 +1091,8 @@ int __kvm_set_memory_region(struct kvm *kvm,
1091{ 1091{
1092 int r; 1092 int r;
1093 gfn_t base_gfn; 1093 gfn_t base_gfn;
1094 unsigned long npages, ugfn; 1094 unsigned long npages;
1095 int lpages; 1095 unsigned long i;
1096 unsigned long i, j;
1097 struct kvm_memory_slot *memslot; 1096 struct kvm_memory_slot *memslot;
1098 struct kvm_memory_slot old, new; 1097 struct kvm_memory_slot old, new;
1099 1098
@@ -1171,6 +1170,9 @@ int __kvm_set_memory_region(struct kvm *kvm,
1171 goto skip_lpage; 1170 goto skip_lpage;
1172 1171
1173 for (i = 0; i < KVM_NR_PAGE_SIZES - 1; ++i) { 1172 for (i = 0; i < KVM_NR_PAGE_SIZES - 1; ++i) {
1173 unsigned long ugfn;
1174 unsigned long j;
1175 int lpages;
1174 int level = i + 2; 1176 int level = i + 2;
1175 1177
1176 /* Avoid unused variable warning if no large pages */ 1178 /* Avoid unused variable warning if no large pages */