From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android14-6.1-2025-09 0/1] arch/arm64/kvm/hyp/nvhe/mem_protect.c:635:5: warning: no previous prototype for '__pkvm_host_set_stage2_memattr'
Date: Thu, 18 Dec 2025 00:31:09 +0800 [thread overview]
Message-ID: <202512180010.zii3BuxO-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android14-6.1-2025-09
head: b812b232b0959e0476d1809d64a4dda2fa4dc8e1
commit: d56ad709773a90012b44e87c0c233faebdcf5823 [0/1] ANDROID: arm64: Implement hypervisor workaround for SoCs with DMA beyond the PoC
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20251218/202512180010.zii3BuxO-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251218/202512180010.zii3BuxO-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/202512180010.zii3BuxO-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/arm64/kvm/hyp/nvhe/mem_protect.c:635:5: warning: no previous prototype for '__pkvm_host_set_stage2_memattr' [-Wmissing-prototypes]
635 | int __pkvm_host_set_stage2_memattr(phys_addr_t phys, bool force_nc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/__pkvm_host_set_stage2_memattr +635 arch/arm64/kvm/hyp/nvhe/mem_protect.c
634
> 635 int __pkvm_host_set_stage2_memattr(phys_addr_t phys, bool force_nc)
636 {
637 kvm_pte_t pte;
638 int ret = 0;
639
640 if (!static_branch_unlikely(&pkvm_force_nc))
641 return -ENOENT;
642
643 phys = ALIGN_DOWN(phys, PAGE_SIZE);
644 hyp_spin_lock(&host_mmu.lock);
645
646 ret = kvm_pgtable_get_leaf(&host_mmu.pgt, phys, &pte, NULL);
647 if (ret)
648 goto unlock;
649
650 if (!addr_is_memory(phys)) {
651 ret = -EIO;
652 goto unlock;
653 }
654
655 if (!kvm_pte_valid(pte) && pte) {
656 switch (pte) {
657 case DEFERRED_MEMATTR_NOTE:
658 break;
659 default:
660 ret = -EPERM;
661 }
662 } else if (host_get_page_state(pte, phys) != PKVM_PAGE_OWNED) {
663 ret = -EPERM;
664 }
665
666 if (ret)
667 goto unlock;
668
669 if (force_nc) {
670 ret = host_stage2_idmap_locked(phys, PAGE_SIZE,
671 PKVM_HOST_MEM_PROT |
672 KVM_PGTABLE_PROT_NC,
673 false);
674 if (ret)
675 goto unlock;
676
677 kvm_flush_dcache_to_poc(hyp_fixmap_map_nc(phys), PAGE_SIZE);
678 hyp_fixmap_unmap();
679 } else {
680 ret = kvm_pgtable_stage2_annotate(&host_mmu.pgt, phys,
681 PAGE_SIZE, &host_s2_pool,
682 DEFERRED_MEMATTR_NOTE);
683 }
684 unlock:
685 hyp_spin_unlock(&host_mmu.lock);
686 return ret;
687 }
688
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-12-17 16:31 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=202512180010.zii3BuxO-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.