All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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):
Date: Tue, 9 Apr 2024 00:47:26 +0800	[thread overview]
Message-ID: <202404090046.mgHTeCi1-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-04-08 16:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202404090046.mgHTeCi1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --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.