Hi Sean,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 591c3cfd9334124e0c6df438eb2ffb040e6de29e commit: aeaeb4dcb428b870d4207cc0fae7c125b7522406 [27353/30000] KVM: x86: Subsume nested GPA read helper into load_pdptrs() config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240828/202408281850.dOf6mZes-lkp@i...) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240828/202408281850.dOf6mZes-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202408281850.dOf6mZes-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kvm/x86.c:805:5: warning: no previous prototype for function 'kvm_read_guest_page_mmu' [-Wmissing-prototypes]
805 | int kvm_read_guest_page_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, | ^ arch/x86/kvm/x86.c:805:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 805 | int kvm_read_guest_page_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, | ^ | static arch/x86/kvm/x86.c:900:6: warning: no previous prototype for function 'kvm_post_set_cr0' [-Wmissing-prototypes] 900 | void kvm_post_set_cr0(struct kvm_vcpu *vcpu, unsigned long old_cr0, unsigned long cr0) | ^ arch/x86/kvm/x86.c:900:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 900 | void kvm_post_set_cr0(struct kvm_vcpu *vcpu, unsigned long old_cr0, unsigned long cr0) | ^ | static arch/x86/kvm/x86.c:1081:6: warning: no previous prototype for function 'kvm_post_set_cr4' [-Wmissing-prototypes] 1081 | void kvm_post_set_cr4(struct kvm_vcpu *vcpu, unsigned long old_cr4, unsigned long cr4) | ^ arch/x86/kvm/x86.c:1081:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1081 | void kvm_post_set_cr4(struct kvm_vcpu *vcpu, unsigned long old_cr4, unsigned long cr4) | ^ | static 3 warnings generated.
vim +/kvm_read_guest_page_mmu +805 arch/x86/kvm/x86.c
16f8a6f9798ab9a Nadav Amit 2014-10-03 799 ec92fe44e7ff94d Joerg Roedel 2010-09-10 800 /* ec92fe44e7ff94d Joerg Roedel 2010-09-10 801 * This function will be used to read from the physical memory of the currently 54bf36aac520315 Paolo Bonzini 2015-04-08 802 * running guest. The difference to kvm_vcpu_read_guest_page is that this function ec92fe44e7ff94d Joerg Roedel 2010-09-10 803 * can read from guest physical or from the guest's guest physical memory. ec92fe44e7ff94d Joerg Roedel 2010-09-10 804 */ ec92fe44e7ff94d Joerg Roedel 2010-09-10 @805 int kvm_read_guest_page_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, ec92fe44e7ff94d Joerg Roedel 2010-09-10 806 gfn_t ngfn, void *data, int offset, int len, ec92fe44e7ff94d Joerg Roedel 2010-09-10 807 u32 access) ec92fe44e7ff94d Joerg Roedel 2010-09-10 808 { 54987b7afa902e8 Paolo Bonzini 2014-09-02 809 struct x86_exception exception; ec92fe44e7ff94d Joerg Roedel 2010-09-10 810 gfn_t real_gfn; ec92fe44e7ff94d Joerg Roedel 2010-09-10 811 gpa_t ngpa; ec92fe44e7ff94d Joerg Roedel 2010-09-10 812 ec92fe44e7ff94d Joerg Roedel 2010-09-10 813 ngpa = gfn_to_gpa(ngfn); 54987b7afa902e8 Paolo Bonzini 2014-09-02 814 real_gfn = mmu->translate_gpa(vcpu, ngpa, access, &exception); ec92fe44e7ff94d Joerg Roedel 2010-09-10 815 if (real_gfn == UNMAPPED_GVA) ec92fe44e7ff94d Joerg Roedel 2010-09-10 816 return -EFAULT; ec92fe44e7ff94d Joerg Roedel 2010-09-10 817 ec92fe44e7ff94d Joerg Roedel 2010-09-10 818 real_gfn = gpa_to_gfn(real_gfn); ec92fe44e7ff94d Joerg Roedel 2010-09-10 819 54bf36aac520315 Paolo Bonzini 2015-04-08 820 return kvm_vcpu_read_guest_page(vcpu, real_gfn, data, offset, len); ec92fe44e7ff94d Joerg Roedel 2010-09-10 821 } ec92fe44e7ff94d Joerg Roedel 2010-09-10 822 EXPORT_SYMBOL_GPL(kvm_read_guest_page_mmu); ec92fe44e7ff94d Joerg Roedel 2010-09-10 823
:::::: The code at line 805 was first introduced by commit :::::: ec92fe44e7ff94d04d8305e49efcffd8773e1cf6 KVM: X86: Add kvm_read_guest_page_mmu function
:::::: TO: Joerg Roedel joerg.roedel@amd.com :::::: CC: Avi Kivity avi@redhat.com