* [android-common:android15-6.1 2/14] arch/arm64/kvm/hyp_events.c:260:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
@ 2024-04-08 16:47 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-08 16:47 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://android.googlesource.com/kernel/common android15-6.1
head: cf7d2542ca250f0f7a6468288f6d7c7cb8a5dd88
commit: ea75c0835c8fcd34d65b62f6299bf8bdc7744740 [2/14] ANDROID: KVM: arm64: Allow registration of pKVM module hyp events
config: arm64-randconfig-r111-20240408 (https://download.01.org/0day-ci/archive/20240409/202404090046.mgHTeCi1-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce: (https://download.01.org/0day-ci/archive/20240409/202404090046.mgHTeCi1-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/202404090046.mgHTeCi1-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
arch/arm64/kvm/hyp_events.c: note: in included file (through arch/arm64/include/asm/kvm_define_hypevents.h):
arch/arm64/include/asm/kvm_hypevents.h:14:1: sparse: sparse: symbol 'hyp_event_trace_hyp_enter' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:23:1: sparse: sparse: symbol 'hyp_event_trace_hyp_exit' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:32:1: sparse: sparse: symbol 'hyp_event_trace_host_hcall' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:46:1: sparse: sparse: symbol 'hyp_event_trace_host_smc' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:61:1: sparse: sparse: symbol 'hyp_event_trace_host_mem_abort' was not declared. Should it be static?
arch/arm64/kvm/hyp_events.c: note: in included file (through arch/arm64/include/asm/kvm_define_hypevents.h):
arch/arm64/include/asm/kvm_hypevents.h:14:1: sparse: sparse: symbol 'hyp_event_hyp_enter' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:23:1: sparse: sparse: symbol 'hyp_event_hyp_exit' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:32:1: sparse: sparse: symbol 'hyp_event_host_hcall' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:46:1: sparse: sparse: symbol 'hyp_event_host_smc' was not declared. Should it be static?
arch/arm64/include/asm/kvm_hypevents.h:61:1: sparse: sparse: symbol 'hyp_event_host_mem_abort' was not declared. Should it be static?
>> arch/arm64/kvm/hyp_events.c:260:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
arch/arm64/kvm/hyp_events.c:260:25: sparse: struct hyp_event_table [noderef] __rcu *
arch/arm64/kvm/hyp_events.c:260:25: sparse: struct hyp_event_table *
arch/arm64/kvm/hyp_events.c:379:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
arch/arm64/kvm/hyp_events.c:379:18: sparse: struct hyp_event_table [noderef] __rcu *
arch/arm64/kvm/hyp_events.c:379:18: sparse: struct hyp_event_table *
arch/arm64/kvm/hyp_events.c:379:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
arch/arm64/kvm/hyp_events.c:379:18: sparse: struct hyp_event_table [noderef] __rcu *
arch/arm64/kvm/hyp_events.c:379:18: sparse: struct hyp_event_table *
vim +260 arch/arm64/kvm/hyp_events.c
198
> 199 bool hyp_trace_init_event_early(void)
200 {
201 char *token, *buf = early_events;
202 bool enabled = false;
203
204 while (true) {
205 token = strsep(&buf, ",");
206
207 if (!token)
208 break;
209
210 if (*token) {
211 struct hyp_event *event;
212 int ret;
213
214 event = find_hyp_event(token);
215 if (event) {
216 ret = enable_hyp_event(event, true);
217 if (ret)
218 pr_warn("Couldn't enable hyp event %s:%d\n",
219 token, ret);
220 else
221 enabled = true;
222 } else {
223 pr_warn("Couldn't find hyp event %s\n", token);
224 }
225 }
226
227 if (buf)
228 *(buf - 1) = ',';
229 }
230
231 return enabled;
232 }
233
234 static struct dentry *event_tracefs;
235 static unsigned int last_event_id;
236
237 struct hyp_event_table {
238 struct hyp_event *start;
239 unsigned long nr_events;
240 };
241 static struct hyp_event_mod_tables {
242 struct hyp_event_table *tables;
243 unsigned long nr_tables;
244 } mod_event_tables;
245
246 #define nr_events(__start, __stop) \
247 (((unsigned long)__stop - (unsigned long)__start) / sizeof(*__start))
248
249 struct hyp_event *hyp_trace_find_event(int id)
250 {
251 struct hyp_event *event = __hyp_events_start + id;
252
253 if ((unsigned long)event >= (unsigned long)__hyp_events_end) {
254 struct hyp_event_table *table;
255
256 event = NULL;
257 id -= nr_events(__hyp_events_start, __hyp_events_end);
258
259 rcu_read_lock();
> 260 table = rcu_dereference(mod_event_tables.tables);
261
262 for (int i = 0; i < mod_event_tables.nr_tables; i++) {
263 if (table->nr_events < id) {
264 id -= table->nr_events;
265 table++;
266 continue;
267 }
268
269 event = table->start + id;
270 break;
271 }
272 rcu_read_unlock();
273 }
274
275 return event;
276 }
277
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-08 16:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 16:47 [android-common:android15-6.1 2/14] arch/arm64/kvm/hyp_events.c:260:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel test robot
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.