[arm-platforms:kvm-arm64/pmu-undef-NV 6/7] include/kvm/arm_pmu.h:96:20: error: redefinition of 'kvm_arm_support_pmu_v3'

kernel test robot lkp at intel.com
Mon Jan 25 16:25:39 EST 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/pmu-undef-NV
head:   a4550c29589967d011dda2ceee9e8fcb99372edd
commit: dba2c741ded829defbcfab22d6cba6267f8cc133 [6/7] KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key
config: arm64-randconfig-r006-20210125 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=dba2c741ded829defbcfab22d6cba6267f8cc133
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms kvm-arm64/pmu-undef-NV
        git checkout dba2c741ded829defbcfab22d6cba6267f8cc133
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/arm64/include/asm/kvm_host.h:38,
                    from include/linux/kvm_host.h:36,
                    from arch/arm64/kernel/asm-offsets.c:14:
>> include/kvm/arm_pmu.h:96:20: error: redefinition of 'kvm_arm_support_pmu_v3'
      96 | static inline bool kvm_arm_support_pmu_v3(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/kvm/arm_pmu.h:18:29: note: previous definition of 'kvm_arm_support_pmu_v3' was here
      18 | static __always_inline bool kvm_arm_support_pmu_v3(void)
         |                             ^~~~~~~~~~~~~~~~~~~~~~
--
   In file included from arch/arm64/include/asm/kvm_host.h:38,
                    from include/linux/kvm_host.h:36,
                    from arch/arm64/kernel/asm-offsets.c:14:
>> include/kvm/arm_pmu.h:96:20: error: redefinition of 'kvm_arm_support_pmu_v3'
      96 | static inline bool kvm_arm_support_pmu_v3(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/kvm/arm_pmu.h:18:29: note: previous definition of 'kvm_arm_support_pmu_v3' was here
      18 | static __always_inline bool kvm_arm_support_pmu_v3(void)
         |                             ^~~~~~~~~~~~~~~~~~~~~~
   make[2]: *** [scripts/Makefile.build:117: arch/arm64/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1206: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/kvm_arm_support_pmu_v3 +96 include/kvm/arm_pmu.h

ab9468340d2bcc2a Shannon Zhao     2015-06-18   67  
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11   68  #define kvm_arm_pmu_irq_initialized(v)	(false)
051ff581ce70e822 Shannon Zhao     2015-12-08   69  static inline u64 kvm_pmu_get_counter_value(struct kvm_vcpu *vcpu,
051ff581ce70e822 Shannon Zhao     2015-12-08   70  					    u64 select_idx)
051ff581ce70e822 Shannon Zhao     2015-12-08   71  {
051ff581ce70e822 Shannon Zhao     2015-12-08   72  	return 0;
051ff581ce70e822 Shannon Zhao     2015-12-08   73  }
051ff581ce70e822 Shannon Zhao     2015-12-08   74  static inline void kvm_pmu_set_counter_value(struct kvm_vcpu *vcpu,
051ff581ce70e822 Shannon Zhao     2015-12-08   75  					     u64 select_idx, u64 val) {}
96b0eebcc6a14e3b Shannon Zhao     2015-09-08   76  static inline u64 kvm_pmu_valid_counter_mask(struct kvm_vcpu *vcpu)
96b0eebcc6a14e3b Shannon Zhao     2015-09-08   77  {
96b0eebcc6a14e3b Shannon Zhao     2015-09-08   78  	return 0;
96b0eebcc6a14e3b Shannon Zhao     2015-09-08   79  }
bca031e2c8aa22a9 Zenghui Yu       2019-07-18   80  static inline void kvm_pmu_vcpu_init(struct kvm_vcpu *vcpu) {}
2aa36e9840d71710 Shannon Zhao     2015-09-11   81  static inline void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu) {}
5f0a714a2b63c25f Shannon Zhao     2015-09-11   82  static inline void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu) {}
418e5ca88cc18b7e Andrew Murray    2019-06-17   83  static inline void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val) {}
418e5ca88cc18b7e Andrew Murray    2019-06-17   84  static inline void kvm_pmu_enable_counter_mask(struct kvm_vcpu *vcpu, u64 val) {}
b02386eb7dac7555 Shannon Zhao     2016-02-26   85  static inline void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu) {}
b02386eb7dac7555 Shannon Zhao     2016-02-26   86  static inline void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu) {}
3dbbdf78636e6609 Christoffer Dall 2017-02-01   87  static inline bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu)
3dbbdf78636e6609 Christoffer Dall 2017-02-01   88  {
3dbbdf78636e6609 Christoffer Dall 2017-02-01   89  	return false;
3dbbdf78636e6609 Christoffer Dall 2017-02-01   90  }
3dbbdf78636e6609 Christoffer Dall 2017-02-01   91  static inline void kvm_pmu_update_run(struct kvm_vcpu *vcpu) {}
7a0adc7064b88609 Shannon Zhao     2015-09-08   92  static inline void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) {}
76993739cd6f5b42 Shannon Zhao     2015-10-28   93  static inline void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) {}
7f7663587165fe1a Shannon Zhao     2015-07-03   94  static inline void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu,
7f7663587165fe1a Shannon Zhao     2015-07-03   95  						  u64 data, u64 select_idx) {}
808e738142e7086e Shannon Zhao     2016-01-11  @96  static inline bool kvm_arm_support_pmu_v3(void) { return false; }
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11   97  static inline int kvm_arm_pmu_v3_set_attr(struct kvm_vcpu *vcpu,
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11   98  					  struct kvm_device_attr *attr)
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11   99  {
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  100  	return -ENXIO;
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  101  }
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  102  static inline int kvm_arm_pmu_v3_get_attr(struct kvm_vcpu *vcpu,
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  103  					  struct kvm_device_attr *attr)
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  104  {
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  105  	return -ENXIO;
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  106  }
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  107  static inline int kvm_arm_pmu_v3_has_attr(struct kvm_vcpu *vcpu,
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  108  					  struct kvm_device_attr *attr)
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  109  {
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  110  	return -ENXIO;
bb0c70bcca6ba3c8 Shannon Zhao     2016-01-11  111  }
a2befacf50940017 Christoffer Dall 2017-05-02  112  static inline int kvm_arm_pmu_v3_enable(struct kvm_vcpu *vcpu)
a2befacf50940017 Christoffer Dall 2017-05-02  113  {
a2befacf50940017 Christoffer Dall 2017-05-02  114  	return 0;
a2befacf50940017 Christoffer Dall 2017-05-02  115  }
88865beca90621ae Marc Zyngier     2020-03-12  116  static inline u64 kvm_pmu_get_pmceid(struct kvm_vcpu *vcpu, bool pmceid1)
88865beca90621ae Marc Zyngier     2020-03-12  117  {
88865beca90621ae Marc Zyngier     2020-03-12  118  	return 0;
88865beca90621ae Marc Zyngier     2020-03-12  119  }
04fe472615d0216e Shannon Zhao     2015-09-11  120  #endif
04fe472615d0216e Shannon Zhao     2015-09-11  121  

:::::: The code at line 96 was first introduced by commit
:::::: 808e738142e7086ef793ebf9797099c392894e65 arm64: KVM: Add a new feature bit for PMUv3

:::::: TO: Shannon Zhao <shannon.zhao at linaro.org>
:::::: CC: Marc Zyngier <marc.zyngier at arm.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 32128 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210126/c75caf0a/attachment-0001.gz>


More information about the linux-arm-kernel mailing list