mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
KVM: Drop unused "hva" pointer from __gfn_to_pfn_memslot()
Drop @hva from __gfn_to_pfn_memslot() now that all callers pass NULL. No functional change intended. 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-19-seanjc@google.com>
This commit is contained in:
parent
084ecf95a0
commit
cccefb0a0d
@ -1571,7 +1571,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
|
||||
mmap_read_unlock(current->mm);
|
||||
|
||||
pfn = __gfn_to_pfn_memslot(memslot, gfn, false, NULL,
|
||||
write_fault, &writable, NULL);
|
||||
write_fault, &writable);
|
||||
if (pfn == KVM_PFN_ERR_HWPOISON) {
|
||||
kvm_send_hwpoison_signal(hva, vma_shift);
|
||||
return 0;
|
||||
|
@ -614,7 +614,7 @@ int kvmppc_book3s_hv_page_fault(struct kvm_vcpu *vcpu,
|
||||
} else {
|
||||
/* Call KVM generic code to do the slow-path check */
|
||||
pfn = __gfn_to_pfn_memslot(memslot, gfn, false, NULL,
|
||||
writing, &write_ok, NULL);
|
||||
writing, &write_ok);
|
||||
if (is_error_noslot_pfn(pfn))
|
||||
return -EFAULT;
|
||||
page = NULL;
|
||||
|
@ -853,7 +853,7 @@ int kvmppc_book3s_instantiate_page(struct kvm_vcpu *vcpu,
|
||||
|
||||
/* Call KVM generic code to do the slow-path check */
|
||||
pfn = __gfn_to_pfn_memslot(memslot, gfn, false, NULL,
|
||||
writing, upgrade_p, NULL);
|
||||
writing, upgrade_p);
|
||||
if (is_error_noslot_pfn(pfn))
|
||||
return -EFAULT;
|
||||
page = NULL;
|
||||
|
@ -4384,8 +4384,7 @@ static int __kvm_faultin_pfn(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault
|
||||
return kvm_faultin_pfn_private(vcpu, fault);
|
||||
|
||||
fault->pfn = __gfn_to_pfn_memslot(fault->slot, fault->gfn, false, true,
|
||||
fault->write, &fault->map_writable,
|
||||
NULL);
|
||||
fault->write, &fault->map_writable);
|
||||
|
||||
/*
|
||||
* If resolving the page failed because I/O is needed to fault-in the
|
||||
@ -4413,8 +4412,7 @@ static int __kvm_faultin_pfn(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault
|
||||
* get a page and a fatal signal, i.e. SIGKILL, is pending.
|
||||
*/
|
||||
fault->pfn = __gfn_to_pfn_memslot(fault->slot, fault->gfn, true, true,
|
||||
fault->write, &fault->map_writable,
|
||||
NULL);
|
||||
fault->write, &fault->map_writable);
|
||||
return RET_PF_CONTINUE;
|
||||
}
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ kvm_pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault,
|
||||
kvm_pfn_t gfn_to_pfn_memslot(const struct kvm_memory_slot *slot, gfn_t gfn);
|
||||
kvm_pfn_t __gfn_to_pfn_memslot(const struct kvm_memory_slot *slot, gfn_t gfn,
|
||||
bool interruptible, bool no_wait,
|
||||
bool write_fault, bool *writable, hva_t *hva);
|
||||
bool write_fault, bool *writable);
|
||||
|
||||
void kvm_release_pfn_clean(kvm_pfn_t pfn);
|
||||
void kvm_release_pfn_dirty(kvm_pfn_t pfn);
|
||||
|
@ -2967,13 +2967,10 @@ retry:
|
||||
|
||||
kvm_pfn_t __gfn_to_pfn_memslot(const struct kvm_memory_slot *slot, gfn_t gfn,
|
||||
bool interruptible, bool no_wait,
|
||||
bool write_fault, bool *writable, hva_t *hva)
|
||||
bool write_fault, bool *writable)
|
||||
{
|
||||
unsigned long addr = __gfn_to_hva_many(slot, gfn, NULL, write_fault);
|
||||
|
||||
if (hva)
|
||||
*hva = addr;
|
||||
|
||||
if (kvm_is_error_hva(addr)) {
|
||||
if (writable)
|
||||
*writable = false;
|
||||
@ -2996,13 +2993,13 @@ kvm_pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault,
|
||||
bool *writable)
|
||||
{
|
||||
return __gfn_to_pfn_memslot(gfn_to_memslot(kvm, gfn), gfn, false, false,
|
||||
write_fault, writable, NULL);
|
||||
write_fault, writable);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gfn_to_pfn_prot);
|
||||
|
||||
kvm_pfn_t gfn_to_pfn_memslot(const struct kvm_memory_slot *slot, gfn_t gfn)
|
||||
{
|
||||
return __gfn_to_pfn_memslot(slot, gfn, false, false, true, NULL, NULL);
|
||||
return __gfn_to_pfn_memslot(slot, gfn, false, false, true, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gfn_to_pfn_memslot);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user