mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
KVM: Drop APIs that manipulate "struct page" via pfns
Remove all kvm_{release,set}_pfn_*() APIs now that all users are gone. No functional change intended. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Sean Christopherson <seanjc@google.com> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20241010182427.1434605-85-seanjc@google.com>
This commit is contained in:
parent
2362506f7c
commit
93b7da404f
@ -1274,11 +1274,6 @@ static inline kvm_pfn_t kvm_faultin_pfn(struct kvm_vcpu *vcpu, gfn_t gfn,
|
||||
write ? FOLL_WRITE : 0, writable, refcounted_page);
|
||||
}
|
||||
|
||||
void kvm_release_pfn_clean(kvm_pfn_t pfn);
|
||||
void kvm_release_pfn_dirty(kvm_pfn_t pfn);
|
||||
void kvm_set_pfn_dirty(kvm_pfn_t pfn);
|
||||
void kvm_set_pfn_accessed(kvm_pfn_t pfn);
|
||||
|
||||
int kvm_read_guest_page(struct kvm *kvm, gfn_t gfn, void *data, int offset,
|
||||
int len);
|
||||
int kvm_read_guest(struct kvm *kvm, gpa_t gpa, void *data, unsigned long len);
|
||||
|
@ -3164,61 +3164,6 @@ void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_vcpu_unmap);
|
||||
|
||||
void kvm_release_pfn_clean(kvm_pfn_t pfn)
|
||||
{
|
||||
struct page *page;
|
||||
|
||||
if (is_error_noslot_pfn(pfn))
|
||||
return;
|
||||
|
||||
page = kvm_pfn_to_refcounted_page(pfn);
|
||||
if (!page)
|
||||
return;
|
||||
|
||||
kvm_release_page_clean(page);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_release_pfn_clean);
|
||||
|
||||
void kvm_release_pfn_dirty(kvm_pfn_t pfn)
|
||||
{
|
||||
struct page *page;
|
||||
|
||||
if (is_error_noslot_pfn(pfn))
|
||||
return;
|
||||
|
||||
page = kvm_pfn_to_refcounted_page(pfn);
|
||||
if (!page)
|
||||
return;
|
||||
|
||||
kvm_release_page_dirty(page);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_release_pfn_dirty);
|
||||
|
||||
/*
|
||||
* Note, checking for an error/noslot pfn is the caller's responsibility when
|
||||
* directly marking a page dirty/accessed. Unlike the "release" helpers, the
|
||||
* "set" helpers are not to be used when the pfn might point at garbage.
|
||||
*/
|
||||
void kvm_set_pfn_dirty(kvm_pfn_t pfn)
|
||||
{
|
||||
if (WARN_ON(is_error_noslot_pfn(pfn)))
|
||||
return;
|
||||
|
||||
if (pfn_valid(pfn))
|
||||
kvm_set_page_dirty(pfn_to_page(pfn));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_set_pfn_dirty);
|
||||
|
||||
void kvm_set_pfn_accessed(kvm_pfn_t pfn)
|
||||
{
|
||||
if (WARN_ON(is_error_noslot_pfn(pfn)))
|
||||
return;
|
||||
|
||||
if (pfn_valid(pfn))
|
||||
kvm_set_page_accessed(pfn_to_page(pfn));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_set_pfn_accessed);
|
||||
|
||||
static int next_segment(unsigned long len, int offset)
|
||||
{
|
||||
if (len > PAGE_SIZE - offset)
|
||||
|
Loading…
Reference in New Issue
Block a user