aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/kvm/mmu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index b3a83ef2cf07..23dc4612026b 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -1150,6 +1150,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
1150 unsigned pte_size; 1150 unsigned pte_size;
1151 unsigned page_offset; 1151 unsigned page_offset;
1152 unsigned misaligned; 1152 unsigned misaligned;
1153 unsigned quadrant;
1153 int level; 1154 int level;
1154 int flooded = 0; 1155 int flooded = 0;
1155 int npte; 1156 int npte;
@@ -1202,7 +1203,10 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
1202 page_offset <<= 1; 1203 page_offset <<= 1;
1203 npte = 2; 1204 npte = 2;
1204 } 1205 }
1206 quadrant = page_offset >> PAGE_SHIFT;
1205 page_offset &= ~PAGE_MASK; 1207 page_offset &= ~PAGE_MASK;
1208 if (quadrant != page->role.quadrant)
1209 continue;
1206 } 1210 }
1207 spte = __va(page->page_hpa); 1211 spte = __va(page->page_hpa);
1208 spte += page_offset / sizeof(*spte); 1212 spte += page_offset / sizeof(*spte);