Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: PPC: Drop unused @kvm_ro param from kvmppc_book3s_instantiate_page()

Drop @kvm_ro from kvmppc_book3s_instantiate_page() as it is now only
written, and never read.

No functional change intended.

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-63-seanjc@google.com>

authored by

Sean Christopherson and committed by
Paolo Bonzini
dac09f61 431d2f7d

+4 -8
+1 -1
arch/powerpc/include/asm/kvm_book3s.h
··· 203 203 extern int kvmppc_book3s_instantiate_page(struct kvm_vcpu *vcpu, 204 204 unsigned long gpa, 205 205 struct kvm_memory_slot *memslot, 206 - bool writing, bool kvm_ro, 206 + bool writing, 207 207 pte_t *inserted_pte, unsigned int *levelp); 208 208 extern int kvmppc_init_vm_radix(struct kvm *kvm); 209 209 extern void kvmppc_free_radix(struct kvm *kvm);
+2 -4
arch/powerpc/kvm/book3s_64_mmu_radix.c
··· 821 821 int kvmppc_book3s_instantiate_page(struct kvm_vcpu *vcpu, 822 822 unsigned long gpa, 823 823 struct kvm_memory_slot *memslot, 824 - bool writing, bool kvm_ro, 824 + bool writing, 825 825 pte_t *inserted_pte, unsigned int *levelp) 826 826 { 827 827 struct kvm *kvm = vcpu->kvm; ··· 931 931 struct kvm_memory_slot *memslot; 932 932 long ret; 933 933 bool writing = !!(dsisr & DSISR_ISSTORE); 934 - bool kvm_ro = false; 935 934 936 935 /* Check for unusual errors */ 937 936 if (dsisr & DSISR_UNSUPP_MMU) { ··· 983 984 ea, DSISR_ISSTORE | DSISR_PROTFAULT); 984 985 return RESUME_GUEST; 985 986 } 986 - kvm_ro = true; 987 987 } 988 988 989 989 /* Failed to set the reference/change bits */ ··· 1000 1002 1001 1003 /* Try to insert a pte */ 1002 1004 ret = kvmppc_book3s_instantiate_page(vcpu, gpa, memslot, writing, 1003 - kvm_ro, NULL, NULL); 1005 + NULL, NULL); 1004 1006 1005 1007 if (ret == 0 || ret == -EAGAIN) 1006 1008 ret = RESUME_GUEST;
+1 -3
arch/powerpc/kvm/book3s_hv_nested.c
··· 1527 1527 unsigned long n_gpa, gpa, gfn, perm = 0UL; 1528 1528 unsigned int shift, l1_shift, level; 1529 1529 bool writing = !!(dsisr & DSISR_ISSTORE); 1530 - bool kvm_ro = false; 1531 1530 long int ret; 1532 1531 1533 1532 if (!gp->l1_gr_to_hr) { ··· 1606 1607 ea, DSISR_ISSTORE | DSISR_PROTFAULT); 1607 1608 return RESUME_GUEST; 1608 1609 } 1609 - kvm_ro = true; 1610 1610 } 1611 1611 1612 1612 /* 2. Find the host pte for this L1 guest real address */ ··· 1627 1629 if (!pte_present(pte) || (writing && !(pte_val(pte) & _PAGE_WRITE))) { 1628 1630 /* No suitable pte found -> try to insert a mapping */ 1629 1631 ret = kvmppc_book3s_instantiate_page(vcpu, gpa, memslot, 1630 - writing, kvm_ro, &pte, &level); 1632 + writing, &pte, &level); 1631 1633 if (ret == -EAGAIN) 1632 1634 return RESUME_GUEST; 1633 1635 else if (ret)