From: kernel test robot <lkp@intel.com>
To: Marc Zyngier <maz@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v4 14/18] KVM: arm64: nv: Add SW walker for AT S1 emulation
Date: Thu, 22 Aug 2024 02:07:15 +0800 [thread overview]
Message-ID: <202408220101.bqH2w4z5-lkp@intel.com> (raw)
In-Reply-To: <20240820103756.3545976-15-maz@kernel.org>
Hi Marc,
kernel test robot noticed the following build warnings:
[auto build test WARNING on kvmarm/next]
[also build test WARNING on arm64/for-next/core soc/for-next linus/master v6.11-rc4 next-20240821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Marc-Zyngier/arm64-Add-missing-APTable-and-TCR_ELx-HPD-masks/20240820-184117
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
patch link: https://lore.kernel.org/r/20240820103756.3545976-15-maz%40kernel.org
patch subject: [PATCH v4 14/18] KVM: arm64: nv: Add SW walker for AT S1 emulation
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240822/202408220101.bqH2w4z5-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408220101.bqH2w4z5-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/202408220101.bqH2w4z5-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/arm64/kvm/at.c: In function 'handle_at_slow':
>> arch/arm64/kvm/at.c:736:45: warning: variable 'px' set but not used [-Wunused-but-set-variable]
736 | bool perm_fail, ur, uw, ux, pr, pw, px;
| ^~
arch/arm64/kvm/at.c: In function '__kvm_at_s1e2':
arch/arm64/kvm/at.c:973:36: warning: variable 'mmu' set but not used [-Wunused-but-set-variable]
973 | struct kvm_s2_mmu *mmu;
| ^~~
vim +/px +736 arch/arm64/kvm/at.c
733
734 static u64 handle_at_slow(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
735 {
> 736 bool perm_fail, ur, uw, ux, pr, pw, px;
737 struct s1_walk_result wr = {};
738 struct s1_walk_info wi = {};
739 int ret, idx;
740
741 ret = setup_s1_walk(vcpu, op, &wi, &wr, vaddr);
742 if (ret)
743 goto compute_par;
744
745 if (wr.level == S1_MMU_DISABLED)
746 goto compute_par;
747
748 idx = srcu_read_lock(&vcpu->kvm->srcu);
749
750 ret = walk_s1(vcpu, &wi, &wr, vaddr);
751
752 srcu_read_unlock(&vcpu->kvm->srcu, idx);
753
754 if (ret)
755 goto compute_par;
756
757 /* FIXME: revisit when adding indirect permission support */
758 /* AArch64.S1DirectBasePermissions() */
759 if (wi.regime != TR_EL2) {
760 switch (FIELD_GET(PTE_USER | PTE_RDONLY, wr.desc)) {
761 case 0b00:
762 pr = pw = true;
763 ur = uw = false;
764 break;
765 case 0b01:
766 pr = pw = ur = uw = true;
767 break;
768 case 0b10:
769 pr = true;
770 pw = ur = uw = false;
771 break;
772 case 0b11:
773 pr = ur = true;
774 pw = uw = false;
775 break;
776 }
777
778 switch (wr.APTable) {
779 case 0b00:
780 break;
781 case 0b01:
782 ur = uw = false;
783 break;
784 case 0b10:
785 pw = uw = false;
786 break;
787 case 0b11:
788 pw = ur = uw = false;
789 break;
790 }
791
792 /* We don't use px for anything yet, but hey... */
793 px = !((wr.desc & PTE_PXN) || wr.PXNTable || uw);
794 ux = !((wr.desc & PTE_UXN) || wr.UXNTable);
795
796 if (op == OP_AT_S1E1RP || op == OP_AT_S1E1WP) {
797 bool pan;
798
799 pan = *vcpu_cpsr(vcpu) & PSR_PAN_BIT;
800 pan &= ur || uw;
801 pw &= !pan;
802 pr &= !pan;
803 }
804 } else {
805 ur = uw = ux = false;
806
807 if (!(wr.desc & PTE_RDONLY)) {
808 pr = pw = true;
809 } else {
810 pr = true;
811 pw = false;
812 }
813
814 if (wr.APTable & BIT(1))
815 pw = false;
816
817 /* XN maps to UXN */
818 px = !((wr.desc & PTE_UXN) || wr.UXNTable);
819 }
820
821 perm_fail = false;
822
823 switch (op) {
824 case OP_AT_S1E1RP:
825 case OP_AT_S1E1R:
826 case OP_AT_S1E2R:
827 perm_fail = !pr;
828 break;
829 case OP_AT_S1E1WP:
830 case OP_AT_S1E1W:
831 case OP_AT_S1E2W:
832 perm_fail = !pw;
833 break;
834 case OP_AT_S1E0R:
835 perm_fail = !ur;
836 break;
837 case OP_AT_S1E0W:
838 perm_fail = !uw;
839 break;
840 default:
841 BUG();
842 }
843
844 if (perm_fail)
845 fail_s1_walk(&wr, ESR_ELx_FSC_PERM_L(wr.level), false, false);
846
847 compute_par:
848 return compute_par_s1(vcpu, &wr, wi.regime);
849 }
850
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-21 18:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 10:37 [PATCH v4 00/18] KVM: arm64: nv: Add support for address translation instructions Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 01/18] arm64: Add missing APTable and TCR_ELx.HPD masks Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 02/18] arm64: Add PAR_EL1 field description Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 03/18] arm64: Add system register encoding for PSTATE.PAN Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 04/18] arm64: Add ESR_ELx_FSC_ADDRSZ_L() helper Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 05/18] KVM: arm64: Make kvm_at() take an OP_AT_* Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 06/18] KVM: arm64: nv: Enforce S2 alignment when contiguous bit is set Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 07/18] KVM: arm64: nv: Turn upper_attr for S2 walk into the full descriptor Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 08/18] KVM: arm64: nv: Honor absence of FEAT_PAN2 Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 09/18] KVM: arm64: nv: Add basic emulation of AT S1E{0,1}{R,W} Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 10/18] KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 11/18] KVM: arm64: nv: Add basic emulation of AT S1E2{R,W} Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 12/18] KVM: arm64: nv: Add emulation of AT S12E{0,1}{R,W} Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 13/18] KVM: arm64: nv: Make ps_to_output_size() generally available Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 14/18] KVM: arm64: nv: Add SW walker for AT S1 emulation Marc Zyngier
2024-08-21 18:07 ` kernel test robot [this message]
2024-08-20 10:37 ` [PATCH v4 15/18] KVM: arm64: nv: Sanitise SCTLR_EL1.EPAN according to VM configuration Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 16/18] KVM: arm64: nv: Make AT+PAN instructions aware of FEAT_PAN3 Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 17/18] KVM: arm64: nv: Plumb handling of AT S1* traps from EL2 Marc Zyngier
2024-08-20 10:37 ` [PATCH v4 18/18] KVM: arm64: nv: Add support for FEAT_ATS1A Marc Zyngier
2024-08-21 4:25 ` [PATCH v4 00/18] KVM: arm64: nv: Add support for address translation instructions Ganapatrao Kulkarni
2024-08-21 7:02 ` Oliver Upton
2024-08-21 9:28 ` Ganapatrao Kulkarni
2024-08-30 20:01 ` Marc Zyngier
2024-08-30 20:09 ` Marc Zyngier
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=202408220101.bqH2w4z5-lkp@intel.com \
--to=lkp@intel.com \
--cc=maz@kernel.org \
--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.