All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Fuad Tabba <tabba@google.com>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org,
	Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@google.com>
Subject: [arm-platforms:kvm-arm64/per-vcpu-host-pmu-data 3/4] arch/arm64/kvm/arm.c:764:23: error: 'struct kvm_pmu' has no member named 'events'
Date: Mon, 16 May 2022 18:42:33 +0800	[thread overview]
Message-ID: <202205161814.KQHpOzsJ-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/per-vcpu-host-pmu-data
head:   722625c6f4c5b6a9953d6af04c7bb1a6e12830b3
commit: 84d751a019a9792f5b4884e1d598b603c360ec22 [3/4] KVM: arm64: Pass pmu events to hyp via vcpu
config: arm64-randconfig-r022-20220516 (https://download.01.org/0day-ci/archive/20220516/202205161814.KQHpOzsJ-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.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=84d751a019a9792f5b4884e1d598b603c360ec22
        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/per-vcpu-host-pmu-data
        git checkout 84d751a019a9792f5b4884e1d598b603c360ec22
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kvm/

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

All errors (new ones prefixed by >>):

   arch/arm64/kvm/arm.c: In function 'kvm_pmu_update_vcpu_events':
>> arch/arm64/kvm/arm.c:764:23: error: 'struct kvm_pmu' has no member named 'events'
     764 |         vcpu->arch.pmu.events = *kvm_get_pmu_events();
         |                       ^
>> arch/arm64/kvm/arm.c:764:33: error: invalid use of undefined type 'struct kvm_pmu_events'
     764 |         vcpu->arch.pmu.events = *kvm_get_pmu_events();
         |                                 ^
--
   In file included from include/asm-generic/percpu.h:7,
                    from arch/arm64/include/asm/percpu.h:248,
                    from arch/arm64/include/asm/smp.h:28,
                    from include/linux/smp.h:113,
                    from include/linux/percpu.h:7,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/kvm_host.h:7,
                    from arch/arm64/kvm/pmu.c:6:
   arch/arm64/kvm/pmu.c: In function 'kvm_get_pmu_events':
>> include/linux/percpu-defs.h:219:59: error: invalid use of undefined type 'struct kvm_pmu_events'
     219 |         const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
         |                                                           ^
   include/linux/percpu-defs.h:241:9: note: in expansion of macro '__verify_pcpu_ptr'
     241 |         __verify_pcpu_ptr(ptr);                                         \
         |         ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
     252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
         |                           ^~~~~~~~~~~
   arch/arm64/kvm/pmu.c:31:16: note: in expansion of macro 'this_cpu_ptr'
      31 |         return this_cpu_ptr(&kvm_pmu_events);
         |                ^~~~~~~~~~~~
   arch/arm64/kvm/pmu.c: In function 'kvm_set_pmu_events':
>> arch/arm64/kvm/pmu.c:46:20: error: invalid use of undefined type 'struct kvm_pmu_events'
      46 |                 pmu->events_host |= set;
         |                    ^~
   arch/arm64/kvm/pmu.c:48:20: error: invalid use of undefined type 'struct kvm_pmu_events'
      48 |                 pmu->events_guest |= set;
         |                    ^~
   arch/arm64/kvm/pmu.c: In function 'kvm_clr_pmu_events':
   arch/arm64/kvm/pmu.c:61:12: error: invalid use of undefined type 'struct kvm_pmu_events'
      61 |         pmu->events_host &= ~clr;
         |            ^~
   arch/arm64/kvm/pmu.c:62:12: error: invalid use of undefined type 'struct kvm_pmu_events'
      62 |         pmu->events_guest &= ~clr;
         |            ^~
   arch/arm64/kvm/pmu.c: In function 'kvm_vcpu_pmu_restore_guest':
   arch/arm64/kvm/pmu.c:186:27: error: invalid use of undefined type 'struct kvm_pmu_events'
     186 |         events_guest = pmu->events_guest;
         |                           ^~
   arch/arm64/kvm/pmu.c:187:26: error: invalid use of undefined type 'struct kvm_pmu_events'
     187 |         events_host = pmu->events_host;
         |                          ^~
   arch/arm64/kvm/pmu.c: In function 'kvm_vcpu_pmu_restore_host':
   arch/arm64/kvm/pmu.c:206:27: error: invalid use of undefined type 'struct kvm_pmu_events'
     206 |         events_guest = pmu->events_guest;
         |                           ^~
   arch/arm64/kvm/pmu.c:207:26: error: invalid use of undefined type 'struct kvm_pmu_events'
     207 |         events_host = pmu->events_host;
         |                          ^~
   In file included from include/asm-generic/percpu.h:7,
                    from arch/arm64/include/asm/percpu.h:248,
                    from arch/arm64/include/asm/smp.h:28,
                    from include/linux/smp.h:113,
                    from include/linux/percpu.h:7,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/kvm_host.h:7,
                    from arch/arm64/kvm/pmu.c:6:
   arch/arm64/kvm/pmu.c: At top level:
>> arch/arm64/kvm/pmu.c:9:46: error: storage size of 'kvm_pmu_events' isn't known
       9 | static DEFINE_PER_CPU(struct kvm_pmu_events, kvm_pmu_events);
         |                                              ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:104:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
     104 |         __PCPU_ATTRS(sec) __typeof__(type) name
         |                                            ^~~~
   arch/arm64/kvm/pmu.c:9:8: note: in expansion of macro 'DEFINE_PER_CPU'
       9 | static DEFINE_PER_CPU(struct kvm_pmu_events, kvm_pmu_events);
         |        ^~~~~~~~~~~~~~
--
   arch/arm64/kvm/hyp/nvhe/switch.c: In function '__pmu_switch_to_guest':
>> arch/arm64/kvm/hyp/nvhe/switch.c:128:53: error: 'struct kvm_pmu' has no member named 'events'
     128 |         struct kvm_pmu_events *pmu = &vcpu->arch.pmu.events;
         |                                                     ^
>> arch/arm64/kvm/hyp/nvhe/switch.c:130:16: error: invalid use of undefined type 'struct kvm_pmu_events'
     130 |         if (pmu->events_host)
         |                ^~
   In file included from arch/arm64/include/asm/cputype.h:175,
                    from arch/arm64/include/asm/cache.h:8,
                    from include/linux/cache.h:6,
                    from include/linux/printk.h:9,
                    from include/asm-generic/bug.h:22,
                    from arch/arm64/include/asm/bug.h:26,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/percpu.h:5,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/kvm_host.h:7,
                    from arch/arm64/include/asm/kvm_emulate.h:14,
                    from arch/arm64/kvm/hyp/include/hyp/adjust_pc.h:13,
                    from arch/arm64/kvm/hyp/include/hyp/switch.h:10,
                    from arch/arm64/kvm/hyp/nvhe/switch.c:7:
   arch/arm64/kvm/hyp/nvhe/switch.c:131:33: error: invalid use of undefined type 'struct kvm_pmu_events'
     131 |                 write_sysreg(pmu->events_host, pmcntenclr_el0);
         |                                 ^~
   arch/arm64/include/asm/sysreg.h:1300:27: note: in definition of macro 'write_sysreg'
    1300 |         u64 __val = (u64)(v);                                   \
         |                           ^
   arch/arm64/kvm/hyp/nvhe/switch.c:133:16: error: invalid use of undefined type 'struct kvm_pmu_events'
     133 |         if (pmu->events_guest)
         |                ^~
   In file included from arch/arm64/include/asm/cputype.h:175,
                    from arch/arm64/include/asm/cache.h:8,
                    from include/linux/cache.h:6,
                    from include/linux/printk.h:9,
                    from include/asm-generic/bug.h:22,
                    from arch/arm64/include/asm/bug.h:26,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/percpu.h:5,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/kvm_host.h:7,
                    from arch/arm64/include/asm/kvm_emulate.h:14,
                    from arch/arm64/kvm/hyp/include/hyp/adjust_pc.h:13,
                    from arch/arm64/kvm/hyp/include/hyp/switch.h:10,
                    from arch/arm64/kvm/hyp/nvhe/switch.c:7:
   arch/arm64/kvm/hyp/nvhe/switch.c:134:33: error: invalid use of undefined type 'struct kvm_pmu_events'
     134 |                 write_sysreg(pmu->events_guest, pmcntenset_el0);
         |                                 ^~
   arch/arm64/include/asm/sysreg.h:1300:27: note: in definition of macro 'write_sysreg'
    1300 |         u64 __val = (u64)(v);                                   \
         |                           ^
   arch/arm64/kvm/hyp/nvhe/switch.c:136:20: error: invalid use of undefined type 'struct kvm_pmu_events'
     136 |         return (pmu->events_host || pmu->events_guest);
         |                    ^~
   arch/arm64/kvm/hyp/nvhe/switch.c:136:40: error: invalid use of undefined type 'struct kvm_pmu_events'
     136 |         return (pmu->events_host || pmu->events_guest);
         |                                        ^~
   arch/arm64/kvm/hyp/nvhe/switch.c: In function '__pmu_switch_to_host':
   arch/arm64/kvm/hyp/nvhe/switch.c:144:53: error: 'struct kvm_pmu' has no member named 'events'
     144 |         struct kvm_pmu_events *pmu = &vcpu->arch.pmu.events;
         |                                                     ^
   arch/arm64/kvm/hyp/nvhe/switch.c:146:16: error: invalid use of undefined type 'struct kvm_pmu_events'
     146 |         if (pmu->events_guest)
         |                ^~
   In file included from arch/arm64/include/asm/cputype.h:175,
                    from arch/arm64/include/asm/cache.h:8,
                    from include/linux/cache.h:6,
                    from include/linux/printk.h:9,
                    from include/asm-generic/bug.h:22,
                    from arch/arm64/include/asm/bug.h:26,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/percpu.h:5,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/kvm_host.h:7,
                    from arch/arm64/include/asm/kvm_emulate.h:14,
                    from arch/arm64/kvm/hyp/include/hyp/adjust_pc.h:13,
                    from arch/arm64/kvm/hyp/include/hyp/switch.h:10,
                    from arch/arm64/kvm/hyp/nvhe/switch.c:7:
   arch/arm64/kvm/hyp/nvhe/switch.c:147:33: error: invalid use of undefined type 'struct kvm_pmu_events'
     147 |                 write_sysreg(pmu->events_guest, pmcntenclr_el0);
         |                                 ^~
   arch/arm64/include/asm/sysreg.h:1300:27: note: in definition of macro 'write_sysreg'
    1300 |         u64 __val = (u64)(v);                                   \
         |                           ^
   arch/arm64/kvm/hyp/nvhe/switch.c:149:16: error: invalid use of undefined type 'struct kvm_pmu_events'
     149 |         if (pmu->events_host)
         |                ^~
   In file included from arch/arm64/include/asm/cputype.h:175,
                    from arch/arm64/include/asm/cache.h:8,
                    from include/linux/cache.h:6,
                    from include/linux/printk.h:9,
                    from include/asm-generic/bug.h:22,
                    from arch/arm64/include/asm/bug.h:26,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/percpu.h:5,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/kvm_host.h:7,
                    from arch/arm64/include/asm/kvm_emulate.h:14,


vim +764 arch/arm64/kvm/arm.c

   753	
   754	/*
   755	 * Updates the vcpu's view of the pmu events for this cpu.
   756	 * Must be called before every vcpu run after disabling interrupts, to ensure
   757	 * that an interrupt cannot fire and update the structure.
   758	 */
   759	static void kvm_pmu_update_vcpu_events(struct kvm_vcpu *vcpu)
   760	{
   761		if (has_vhe() || !kvm_vcpu_has_pmu(vcpu))
   762			return;
   763	
 > 764		vcpu->arch.pmu.events = *kvm_get_pmu_events();
   765	}
   766	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-05-16 10:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 10:42 kernel test robot [this message]
2022-05-16 12:25 ` [arm-platforms:kvm-arm64/per-vcpu-host-pmu-data 3/4] arch/arm64/kvm/arm.c:764:23: error: 'struct kvm_pmu' has no member named 'events' Marc Zyngier
2022-05-16 12:25   ` Marc Zyngier
2022-05-16 12:37   ` Fuad Tabba
2022-05-16 12:37     ` Fuad Tabba

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=202205161814.KQHpOzsJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=oupton@google.com \
    --cc=tabba@google.com \
    /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.