aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/hyperv/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/hyperv/mmu.c')
-rw-r--r--arch/x86/hyperv/mmu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/hyperv/mmu.c b/arch/x86/hyperv/mmu.c
index e65d7fe6489f..5208ba49c89a 100644
--- a/arch/x86/hyperv/mmu.c
+++ b/arch/x86/hyperv/mmu.c
@@ -37,12 +37,14 @@ static inline int fill_gva_list(u64 gva_list[], int offset,
37 * Lower 12 bits encode the number of additional 37 * Lower 12 bits encode the number of additional
38 * pages to flush (in addition to the 'cur' page). 38 * pages to flush (in addition to the 'cur' page).
39 */ 39 */
40 if (diff >= HV_TLB_FLUSH_UNIT) 40 if (diff >= HV_TLB_FLUSH_UNIT) {
41 gva_list[gva_n] |= ~PAGE_MASK; 41 gva_list[gva_n] |= ~PAGE_MASK;
42 else if (diff) 42 cur += HV_TLB_FLUSH_UNIT;
43 } else if (diff) {
43 gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT; 44 gva_list[gva_n] |= (diff - 1) >> PAGE_SHIFT;
45 cur = end;
46 }
44 47
45 cur += HV_TLB_FLUSH_UNIT;
46 gva_n++; 48 gva_n++;
47 49
48 } while (cur < end); 50 } while (cur < end);