Skip to content

Commit 00c2201

Browse files
pgondabonzini
authored andcommitted
KVM: SEV: Add cond_resched() to loop in sev_clflush_pages()
Add resched to avoid warning from sev_clflush_pages() with large number of pages. Signed-off-by: Peter Gonda <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: [email protected] Cc: [email protected] Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 3123109 commit 00c2201

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kvm/svm/sev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ static void sev_clflush_pages(struct page *pages[], unsigned long npages)
465465
page_virtual = kmap_atomic(pages[i]);
466466
clflush_cache_range(page_virtual, PAGE_SIZE);
467467
kunmap_atomic(page_virtual);
468+
cond_resched();
468469
}
469470
}
470471

0 commit comments

Comments
 (0)