From: kernel test robot <lkp@intel.com>
To: Jing Zhang <jingzhangos@google.com>, KVM <kvm@vger.kernel.org>,
KVMARM <kvmarm@lists.linux.dev>,
ARMLinux <linux-arm-kernel@lists.infradead.org>,
Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@google.com>
Cc: oe-kbuild-all@lists.linux.dev, Will Deacon <will@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
James Morse <james.morse@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Fuad Tabba <tabba@google.com>, Reiji Watanabe <reijiw@google.com>,
Raghavendra Rao Ananta <rananta@google.com>,
Jing Zhang <jingzhangos@google.com>
Subject: Re: [PATCH v6 4/6] KVM: arm64: Use per guest ID register for ID_AA64DFR0_EL1.PMUVer
Date: Wed, 5 Apr 2023 00:59:46 +0800 [thread overview]
Message-ID: <202304050006.49TmDWF6-lkp@intel.com> (raw)
In-Reply-To: <20230404035344.4043856-5-jingzhangos@google.com>
Hi Jing,
kernel test robot noticed the following build errors:
[auto build test ERROR on 7e364e56293bb98cae1b55fd835f5991c4e96e7d]
url: https://github.com/intel-lab-lkp/linux/commits/Jing-Zhang/KVM-arm64-Move-CPU-ID-feature-registers-emulation-into-a-separate-file/20230404-115612
base: 7e364e56293bb98cae1b55fd835f5991c4e96e7d
patch link: https://lore.kernel.org/r/20230404035344.4043856-5-jingzhangos%40google.com
patch subject: [PATCH v6 4/6] KVM: arm64: Use per guest ID register for ID_AA64DFR0_EL1.PMUVer
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230405/202304050006.49TmDWF6-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/66ece3020c02ab1206bb9478e8cb0172e125bbfc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jing-Zhang/KVM-arm64-Move-CPU-ID-feature-registers-emulation-into-a-separate-file/20230404-115612
git checkout 66ece3020c02ab1206bb9478e8cb0172e125bbfc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304050006.49TmDWF6-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/rhashtable-types.h:14,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/sched.h:15,
from include/linux/hardirq.h:9,
from include/linux/kvm_host.h:7,
from arch/arm64/kvm/id_regs.c:13:
arch/arm64/kvm/id_regs.c: In function 'set_id_aa64dfr0_el1':
>> arch/arm64/kvm/id_regs.c:261:44: error: 'struct kvm_arch' has no member named 'config_lock'
261 | mutex_lock(&vcpu->kvm->arch.config_lock);
| ^
include/linux/mutex.h:187:44: note: in definition of macro 'mutex_lock'
187 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^~~~
arch/arm64/kvm/id_regs.c:269:46: error: 'struct kvm_arch' has no member named 'config_lock'
269 | mutex_unlock(&vcpu->kvm->arch.config_lock);
| ^
arch/arm64/kvm/id_regs.c: In function 'set_id_dfr0_el1':
arch/arm64/kvm/id_regs.c:311:44: error: 'struct kvm_arch' has no member named 'config_lock'
311 | mutex_lock(&vcpu->kvm->arch.config_lock);
| ^
include/linux/mutex.h:187:44: note: in definition of macro 'mutex_lock'
187 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^~~~
arch/arm64/kvm/id_regs.c:318:46: error: 'struct kvm_arch' has no member named 'config_lock'
318 | mutex_unlock(&vcpu->kvm->arch.config_lock);
| ^
vim +261 arch/arm64/kvm/id_regs.c
228
229 static int set_id_aa64dfr0_el1(struct kvm_vcpu *vcpu,
230 const struct sys_reg_desc *rd,
231 u64 val)
232 {
233 u8 pmuver, host_pmuver;
234 bool valid_pmu;
235
236 host_pmuver = kvm_arm_pmu_get_pmuver_limit();
237
238 /*
239 * Allow AA64DFR0_EL1.PMUver to be set from userspace as long
240 * as it doesn't promise more than what the HW gives us. We
241 * allow an IMPDEF PMU though, only if no PMU is supported
242 * (KVM backward compatibility handling).
243 */
244 pmuver = FIELD_GET(ARM64_FEATURE_MASK(ID_AA64DFR0_EL1_PMUVer), val);
245 if ((pmuver != ID_AA64DFR0_EL1_PMUVer_IMP_DEF && pmuver > host_pmuver))
246 return -EINVAL;
247
248 valid_pmu = (pmuver != 0 && pmuver != ID_AA64DFR0_EL1_PMUVer_IMP_DEF);
249
250 /* Make sure view register and PMU support do match */
251 if (kvm_vcpu_has_pmu(vcpu) != valid_pmu)
252 return -EINVAL;
253
254 /* We can only differ with PMUver, and anything else is an error */
255 val ^= read_id_reg(vcpu, rd);
256 val &= ~ARM64_FEATURE_MASK(ID_AA64DFR0_EL1_PMUVer);
257 if (val)
258 return -EINVAL;
259
260 if (valid_pmu) {
> 261 mutex_lock(&vcpu->kvm->arch.config_lock);
262 IDREG(vcpu->kvm, SYS_ID_AA64DFR0_EL1) &= ~ID_AA64DFR0_EL1_PMUVer_MASK;
263 IDREG(vcpu->kvm, SYS_ID_AA64DFR0_EL1) |= FIELD_PREP(ID_AA64DFR0_EL1_PMUVer_MASK,
264 pmuver);
265
266 IDREG(vcpu->kvm, SYS_ID_DFR0_EL1) &= ~ID_DFR0_EL1_PerfMon_MASK;
267 IDREG(vcpu->kvm, SYS_ID_DFR0_EL1) |= FIELD_PREP(ID_DFR0_EL1_PerfMon_MASK,
268 pmuver_to_perfmon(pmuver));
269 mutex_unlock(&vcpu->kvm->arch.config_lock);
270 } else {
271 assign_bit(KVM_ARCH_FLAG_VCPU_HAS_IMP_DEF_PMU, &vcpu->kvm->arch.flags,
272 pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF);
273 }
274
275 return 0;
276 }
277
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-04-04 17:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 3:53 [PATCH v6 0/6] Support writable CPU ID registers from userspace Jing Zhang
2023-04-04 3:53 ` [PATCH v6 1/6] KVM: arm64: Move CPU ID feature registers emulation into a separate file Jing Zhang
2023-04-04 3:53 ` [PATCH v6 2/6] KVM: arm64: Save ID registers' sanitized value per guest Jing Zhang
2023-04-04 3:53 ` [PATCH v6 3/6] KVM: arm64: Use per guest ID register for ID_AA64PFR0_EL1.[CSV2|CSV3] Jing Zhang
2023-04-04 3:53 ` [PATCH v6 4/6] KVM: arm64: Use per guest ID register for ID_AA64DFR0_EL1.PMUVer Jing Zhang
2023-04-04 16:59 ` kernel test robot [this message]
2023-04-11 6:47 ` kernel test robot
2023-04-19 3:40 ` Reiji Watanabe
2023-04-24 19:07 ` Jing Zhang
2023-04-25 1:45 ` Reiji Watanabe
2023-04-04 3:53 ` [PATCH v6 5/6] KVM: arm64: Reuse fields of sys_reg_desc for idreg Jing Zhang
2023-04-19 4:09 ` Reiji Watanabe
2023-04-24 19:12 ` Jing Zhang
2023-04-04 3:53 ` [PATCH v6 6/6] KVM: arm64: Refactor writings for PMUVer/CSV2/CSV3 Jing Zhang
2023-04-19 4:59 ` Reiji Watanabe
2023-04-24 19:19 ` Jing Zhang
2023-04-25 2:19 ` Reiji Watanabe
2023-04-25 16:40 ` Jing Zhang
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=202304050006.49TmDWF6-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexandru.elisei@arm.com \
--cc=james.morse@arm.com \
--cc=jingzhangos@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=rananta@google.com \
--cc=reijiw@google.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).