From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android16-6.12-desktop 280/280] arch/x86/kvm/mmu/mmu.c:4757:31: error: no member named 'pkvm' in 'struct kvm_arch'
Date: Thu, 13 Mar 2025 01:13:30 +0800 [thread overview]
Message-ID: <202503130142.I5liChOR-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android16-6.12-desktop
head: 416b1b8e121ff0114c661e47e388426ad5cce864
commit: 6e27d23add2a1f16ed2a78641daed6d88a91a32c [280/280] ANDROID: pkvm: x86: Fix compiling issues found by 0day for arch s390/powerpc
config: i386-buildonly-randconfig-002-20250312 (https://download.01.org/0day-ci/archive/20250313/202503130142.I5liChOR-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250313/202503130142.I5liChOR-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/202503130142.I5liChOR-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/kvm/mmu/mmu.c:4739:25: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_pinned_page'
4739 | ppage = kmalloc(sizeof(*ppage), GFP_KERNEL_ACCOUNT);
| ^~~~~~~~
include/linux/slab.h:887:52: note: expanded from macro 'kmalloc'
887 | #define kmalloc(...) alloc_hooks(kmalloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/alloc_tag.h:241:31: note: expanded from macro 'alloc_hooks'
241 | alloc_hooks_tag(&_alloc_tag, _do_alloc); \
| ^~~~~~~~~
include/linux/alloc_tag.h:227:9: note: expanded from macro 'alloc_hooks_tag'
227 | typeof(_do_alloc) _res; \
| ^~~~~~~~~
arch/x86/kvm/mmu/mmu.c:4734:9: note: forward declaration of 'struct kvm_pinned_page'
4734 | struct kvm_pinned_page *ppage = NULL;
| ^
arch/x86/kvm/mmu/mmu.c:4739:25: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_pinned_page'
4739 | ppage = kmalloc(sizeof(*ppage), GFP_KERNEL_ACCOUNT);
| ^~~~~~~~
include/linux/slab.h:887:52: note: expanded from macro 'kmalloc'
887 | #define kmalloc(...) alloc_hooks(kmalloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/alloc_tag.h:241:31: note: expanded from macro 'alloc_hooks'
241 | alloc_hooks_tag(&_alloc_tag, _do_alloc); \
| ^~~~~~~~~
include/linux/alloc_tag.h:231:10: note: expanded from macro 'alloc_hooks_tag'
231 | _res = _do_alloc; \
| ^~~~~~~~~
arch/x86/kvm/mmu/mmu.c:4734:9: note: forward declaration of 'struct kvm_pinned_page'
4734 | struct kvm_pinned_page *ppage = NULL;
| ^
arch/x86/kvm/mmu/mmu.c:4739:25: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_pinned_page'
4739 | ppage = kmalloc(sizeof(*ppage), GFP_KERNEL_ACCOUNT);
| ^~~~~~~~
include/linux/slab.h:887:52: note: expanded from macro 'kmalloc'
887 | #define kmalloc(...) alloc_hooks(kmalloc_noprof(__VA_ARGS__))
| ^~~~~~~~~~~
include/linux/alloc_tag.h:241:31: note: expanded from macro 'alloc_hooks'
241 | alloc_hooks_tag(&_alloc_tag, _do_alloc); \
| ^~~~~~~~~
include/linux/alloc_tag.h:234:10: note: expanded from macro 'alloc_hooks_tag'
234 | _res = _do_alloc; \
| ^~~~~~~~~
arch/x86/kvm/mmu/mmu.c:4734:9: note: forward declaration of 'struct kvm_pinned_page'
4734 | struct kvm_pinned_page *ppage = NULL;
| ^
arch/x86/kvm/mmu/mmu.c:4755:9: error: incomplete definition of type 'struct kvm_pinned_page'
4755 | ppage->page = page;
| ~~~~~^
arch/x86/kvm/mmu/mmu.c:4734:9: note: forward declaration of 'struct kvm_pinned_page'
4734 | struct kvm_pinned_page *ppage = NULL;
| ^
>> arch/x86/kvm/mmu/mmu.c:4757:31: error: no member named 'pkvm' in 'struct kvm_arch'
4757 | spin_lock(&vcpu->kvm->arch.pkvm.pinned_page_lock);
| ~~~~~~~~~~~~~~~ ^
arch/x86/kvm/mmu/mmu.c:4758:19: error: incomplete definition of type 'struct kvm_pinned_page'
4758 | list_add(&ppage->list, &vcpu->kvm->arch.pkvm.pinned_pages);
| ~~~~~^
arch/x86/kvm/mmu/mmu.c:4734:9: note: forward declaration of 'struct kvm_pinned_page'
4734 | struct kvm_pinned_page *ppage = NULL;
| ^
arch/x86/kvm/mmu/mmu.c:4758:44: error: no member named 'pkvm' in 'struct kvm_arch'
4758 | list_add(&ppage->list, &vcpu->kvm->arch.pkvm.pinned_pages);
| ~~~~~~~~~~~~~~~ ^
arch/x86/kvm/mmu/mmu.c:4759:33: error: no member named 'pkvm' in 'struct kvm_arch'
4759 | spin_unlock(&vcpu->kvm->arch.pkvm.pinned_page_lock);
| ~~~~~~~~~~~~~~~ ^
8 errors generated.
vim +4757 arch/x86/kvm/mmu/mmu.c
4752
4753 if (ppage) {
4754 if (r == RET_PF_FIXED && (page = kvm_pfn_to_refcounted_page(fault->pfn))) {
4755 ppage->page = page;
4756 get_page(page);
> 4757 spin_lock(&vcpu->kvm->arch.pkvm.pinned_page_lock);
4758 list_add(&ppage->list, &vcpu->kvm->arch.pkvm.pinned_pages);
4759 spin_unlock(&vcpu->kvm->arch.pkvm.pinned_page_lock);
4760 } else {
4761 kfree(ppage);
4762 }
4763 }
4764
4765 return r;
4766 }
4767
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-12 17:14 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=202503130142.I5liChOR-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.