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 <pgonda@google.com> Cc: Sean Christopherson <seanjc@google.com> Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Message-Id: <20220330164306.2376085-1-pgonda@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 3123109 commit 00c2201

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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)