From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [sean-jc:x86/mmu_follow_pfn 7/28] arch/x86/kvm/mmu/paging_tmpl.h:555:50: error: 'struct page **' and 'struct page *' are not pointers to compatible types
Date: Sat, 22 Jun 2024 16:17:25 +0800 [thread overview]
Message-ID: <202406221621.juDuxt5k-lkp@intel.com> (raw)
tree: https://github.com/sean-jc/linux x86/mmu_follow_pfn
head: 57ff012a34bc3bfac1ebb0724078e8fe47fdb60a
commit: 85294ecb09b3f377a64f374c2841967c6be774eb [7/28] KVM: x86/mmu: Use
config: i386-buildonly-randconfig-002-20240622 (https://download.01.org/0day-ci/archive/20240622/202406221621.juDuxt5k-lkp@intel.com/config)
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/20240622/202406221621.juDuxt5k-lkp@intel.com/reproduce)
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/202406221621.juDuxt5k-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/kvm/mmu/mmu.c:4822:
>> arch/x86/kvm/mmu/paging_tmpl.h:555:50: error: 'struct page **' and 'struct page *' are not pointers to compatible types
555 | mmu_set_spte(vcpu, slot, spte, pte_access, gfn, page_to_pfn(page), NULL);
| ^~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:64:21: note: expanded from macro 'page_to_pfn'
64 | #define page_to_pfn __page_to_pfn
| ^
include/asm-generic/memory_model.h:19:53: note: expanded from macro '__page_to_pfn'
19 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ~~~~~~ ^ ~~~~~~~
In file included from arch/x86/kvm/mmu/mmu.c:4822:
>> arch/x86/kvm/mmu/paging_tmpl.h:556:25: error: incompatible pointer types passing 'struct page *[1]' to parameter of type 'struct page *' [-Werror,-Wincompatible-pointer-types]
556 | kvm_release_page_clean(page);
| ^~~~
include/linux/kvm_host.h:1209:42: note: passing argument to parameter 'page' here
1209 | void kvm_release_page_clean(struct page *page);
| ^
In file included from arch/x86/kvm/mmu/mmu.c:4826:
>> arch/x86/kvm/mmu/paging_tmpl.h:555:50: error: 'struct page **' and 'struct page *' are not pointers to compatible types
555 | mmu_set_spte(vcpu, slot, spte, pte_access, gfn, page_to_pfn(page), NULL);
| ^~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:64:21: note: expanded from macro 'page_to_pfn'
64 | #define page_to_pfn __page_to_pfn
| ^
include/asm-generic/memory_model.h:19:53: note: expanded from macro '__page_to_pfn'
19 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ~~~~~~ ^ ~~~~~~~
In file included from arch/x86/kvm/mmu/mmu.c:4826:
>> arch/x86/kvm/mmu/paging_tmpl.h:556:25: error: incompatible pointer types passing 'struct page *[1]' to parameter of type 'struct page *' [-Werror,-Wincompatible-pointer-types]
556 | kvm_release_page_clean(page);
| ^~~~
include/linux/kvm_host.h:1209:42: note: passing argument to parameter 'page' here
1209 | void kvm_release_page_clean(struct page *page);
| ^
In file included from arch/x86/kvm/mmu/mmu.c:4830:
>> arch/x86/kvm/mmu/paging_tmpl.h:555:50: error: 'struct page **' and 'struct page *' are not pointers to compatible types
555 | mmu_set_spte(vcpu, slot, spte, pte_access, gfn, page_to_pfn(page), NULL);
| ^~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:64:21: note: expanded from macro 'page_to_pfn'
64 | #define page_to_pfn __page_to_pfn
| ^
include/asm-generic/memory_model.h:19:53: note: expanded from macro '__page_to_pfn'
19 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ~~~~~~ ^ ~~~~~~~
In file included from arch/x86/kvm/mmu/mmu.c:4830:
>> arch/x86/kvm/mmu/paging_tmpl.h:556:25: error: incompatible pointer types passing 'struct page *[1]' to parameter of type 'struct page *' [-Werror,-Wincompatible-pointer-types]
556 | kvm_release_page_clean(page);
| ^~~~
include/linux/kvm_host.h:1209:42: note: passing argument to parameter 'page' here
1209 | void kvm_release_page_clean(struct page *page);
| ^
6 errors generated.
vim +555 arch/x86/kvm/mmu/paging_tmpl.h
531
532 static bool
533 FNAME(prefetch_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
534 u64 *spte, pt_element_t gpte)
535 {
536 struct kvm_memory_slot *slot;
537 struct page *page[1];
538 unsigned pte_access;
539 gfn_t gfn;
540
541 if (FNAME(prefetch_invalid_gpte)(vcpu, sp, spte, gpte))
542 return false;
543
544 gfn = gpte_to_gfn(gpte);
545 pte_access = sp->role.access & FNAME(gpte_access)(gpte);
546 FNAME(protect_clean_gpte)(vcpu->arch.mmu, &pte_access, gpte);
547
548 slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn, pte_access & ACC_WRITE_MASK);
549 if (!slot)
550 return false;
551
552 if (gfn_to_page_many_atomic(slot, gfn, page, 1) != 1)
553 return false;
554
> 555 mmu_set_spte(vcpu, slot, spte, pte_access, gfn, page_to_pfn(page), NULL);
> 556 kvm_release_page_clean(page);
557 return true;
558 }
559
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-06-22 8:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202406221621.juDuxt5k-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox