All of lore.kernel.org
 help / color / mirror / Atom feed
* [avpatel:riscv_kvm_v17 19/22] arch/riscv/kvm/vcpu_sbi.c:89:7: error: use of undeclared identifier 'SBI_EXT_0_1_CONSOLE_GETCHAR'
@ 2021-02-18 19:23 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-18 19:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8589 bytes --]

tree:   https://github.com/avpatel/linux.git riscv_kvm_v17
head:   ba7ce7de0cc0281ef05082cf82d498222443c9bf
commit: 0de9ca2d7cf641c1bdf1efaa2a6e57bcb854af70 [19/22] RISC-V: KVM: Add SBI v0.1 support
config: riscv-randconfig-r005-20210217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/avpatel/linux/commit/0de9ca2d7cf641c1bdf1efaa2a6e57bcb854af70
        git remote add avpatel https://github.com/avpatel/linux.git
        git fetch --no-tags avpatel riscv_kvm_v17
        git checkout 0de9ca2d7cf641c1bdf1efaa2a6e57bcb854af70
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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/riscv/kvm/vcpu_sbi.c:89:7: error: use of undeclared identifier 'SBI_EXT_0_1_CONSOLE_GETCHAR'
           case SBI_EXT_0_1_CONSOLE_GETCHAR:
                ^
>> arch/riscv/kvm/vcpu_sbi.c:90:7: error: use of undeclared identifier 'SBI_EXT_0_1_CONSOLE_PUTCHAR'
           case SBI_EXT_0_1_CONSOLE_PUTCHAR:
                ^
>> arch/riscv/kvm/vcpu_sbi.c:99:7: error: use of undeclared identifier 'SBI_EXT_0_1_SET_TIMER'; did you mean 'SBI_EXT_TIME_SET_TIMER'?
           case SBI_EXT_0_1_SET_TIMER:
                ^~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_TIME_SET_TIMER
   arch/riscv/include/asm/sbi.h:44:2: note: 'SBI_EXT_TIME_SET_TIMER' declared here
           SBI_EXT_TIME_SET_TIMER = 0,
           ^
>> arch/riscv/kvm/vcpu_sbi.c:107:7: error: use of undeclared identifier 'SBI_EXT_0_1_CLEAR_IPI'; did you mean 'SBI_EXT_IPI_SEND_IPI'?
           case SBI_EXT_0_1_CLEAR_IPI:
                ^~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_IPI_SEND_IPI
   arch/riscv/include/asm/sbi.h:48:2: note: 'SBI_EXT_IPI_SEND_IPI' declared here
           SBI_EXT_IPI_SEND_IPI = 0,
           ^
>> arch/riscv/kvm/vcpu_sbi.c:110:7: error: use of undeclared identifier 'SBI_EXT_0_1_SEND_IPI'; did you mean 'SBI_EXT_IPI_SEND_IPI'?
           case SBI_EXT_0_1_SEND_IPI:
                ^~~~~~~~~~~~~~~~~~~~
                SBI_EXT_IPI_SEND_IPI
   arch/riscv/include/asm/sbi.h:48:2: note: 'SBI_EXT_IPI_SEND_IPI' declared here
           SBI_EXT_IPI_SEND_IPI = 0,
           ^
>> arch/riscv/kvm/vcpu_sbi.c:127:7: error: use of undeclared identifier 'SBI_EXT_0_1_SHUTDOWN'
           case SBI_EXT_0_1_SHUTDOWN:
                ^
>> arch/riscv/kvm/vcpu_sbi.c:132:7: error: use of undeclared identifier 'SBI_EXT_0_1_REMOTE_FENCE_I'; did you mean 'SBI_EXT_RFENCE_REMOTE_FENCE_I'?
           case SBI_EXT_0_1_REMOTE_FENCE_I:
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_RFENCE_REMOTE_FENCE_I
   arch/riscv/include/asm/sbi.h:52:2: note: 'SBI_EXT_RFENCE_REMOTE_FENCE_I' declared here
           SBI_EXT_RFENCE_REMOTE_FENCE_I = 0,
           ^
>> arch/riscv/kvm/vcpu_sbi.c:133:7: error: use of undeclared identifier 'SBI_EXT_0_1_REMOTE_SFENCE_VMA'; did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'?
           case SBI_EXT_0_1_REMOTE_SFENCE_VMA:
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_RFENCE_REMOTE_SFENCE_VMA
   arch/riscv/include/asm/sbi.h:53:2: note: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA' declared here
           SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
           ^
>> arch/riscv/kvm/vcpu_sbi.c:134:7: error: use of undeclared identifier 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID'; did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID'?
           case SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID:
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID
   arch/riscv/include/asm/sbi.h:54:2: note: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID' declared here
           SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID,
           ^
   arch/riscv/kvm/vcpu_sbi.c:154:17: error: use of undeclared identifier 'SBI_EXT_0_1_REMOTE_FENCE_I'; did you mean 'SBI_EXT_RFENCE_REMOTE_FENCE_I'?
                   if (cp->a7 == SBI_EXT_0_1_REMOTE_FENCE_I)
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                 SBI_EXT_RFENCE_REMOTE_FENCE_I
   arch/riscv/include/asm/sbi.h:52:2: note: 'SBI_EXT_RFENCE_REMOTE_FENCE_I' declared here
           SBI_EXT_RFENCE_REMOTE_FENCE_I = 0,
           ^
   arch/riscv/kvm/vcpu_sbi.c:156:22: error: use of undeclared identifier 'SBI_EXT_0_1_REMOTE_SFENCE_VMA'; did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'?
                   else if (cp->a7 == SBI_EXT_0_1_REMOTE_SFENCE_VMA)
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      SBI_EXT_RFENCE_REMOTE_SFENCE_VMA
   arch/riscv/include/asm/sbi.h:53:2: note: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA' declared here
           SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
           ^
>> arch/riscv/kvm/vcpu_sbi.c:107:7: error: duplicate case value: 'SBI_EXT_TIME_SET_TIMER' and 'SBI_EXT_IPI_SEND_IPI' both equal '0'
           case SBI_EXT_0_1_CLEAR_IPI:
                ^
   arch/riscv/kvm/vcpu_sbi.c:99:7: note: previous case defined here
           case SBI_EXT_0_1_SET_TIMER:
                ^
>> arch/riscv/kvm/vcpu_sbi.c:110:7: error: duplicate case value 'SBI_EXT_IPI_SEND_IPI'
           case SBI_EXT_0_1_SEND_IPI:
                ^
   arch/riscv/kvm/vcpu_sbi.c:107:7: note: previous case defined here
           case SBI_EXT_0_1_CLEAR_IPI:
                ^
>> arch/riscv/kvm/vcpu_sbi.c:132:7: error: duplicate case value: 'SBI_EXT_IPI_SEND_IPI' and 'SBI_EXT_RFENCE_REMOTE_FENCE_I' both equal '0'
           case SBI_EXT_0_1_REMOTE_FENCE_I:
                ^
   arch/riscv/kvm/vcpu_sbi.c:110:7: note: previous case defined here
           case SBI_EXT_0_1_SEND_IPI:
                ^
   14 errors generated.


vim +/SBI_EXT_0_1_CONSOLE_GETCHAR +89 arch/riscv/kvm/vcpu_sbi.c

    72	
    73	int kvm_riscv_vcpu_sbi_ecall(struct kvm_vcpu *vcpu, struct kvm_run *run)
    74	{
    75		ulong hmask;
    76		int i, ret = 1;
    77		u64 next_cycle;
    78		struct kvm_vcpu *rvcpu;
    79		bool next_sepc = true;
    80		struct cpumask cm, hm;
    81		struct kvm *kvm = vcpu->kvm;
    82		struct kvm_cpu_trap utrap = { 0 };
    83		struct kvm_cpu_context *cp = &vcpu->arch.guest_context;
    84	
    85		if (!cp)
    86			return -EINVAL;
    87	
    88		switch (cp->a7) {
  > 89		case SBI_EXT_0_1_CONSOLE_GETCHAR:
  > 90		case SBI_EXT_0_1_CONSOLE_PUTCHAR:
    91			/*
    92			 * The CONSOLE_GETCHAR/CONSOLE_PUTCHAR SBI calls cannot be
    93			 * handled in kernel so we forward these to user-space
    94			 */
    95			kvm_riscv_vcpu_sbi_forward(vcpu, run);
    96			next_sepc = false;
    97			ret = 0;
    98			break;
  > 99		case SBI_EXT_0_1_SET_TIMER:
   100	#if __riscv_xlen == 32
   101			next_cycle = ((u64)cp->a1 << 32) | (u64)cp->a0;
   102	#else
   103			next_cycle = (u64)cp->a0;
   104	#endif
   105			kvm_riscv_vcpu_timer_next_event(vcpu, next_cycle);
   106			break;
 > 107		case SBI_EXT_0_1_CLEAR_IPI:
   108			kvm_riscv_vcpu_unset_interrupt(vcpu, IRQ_VS_SOFT);
   109			break;
 > 110		case SBI_EXT_0_1_SEND_IPI:
   111			if (cp->a0)
   112				hmask = kvm_riscv_vcpu_unpriv_read(vcpu, false, cp->a0,
   113								   &utrap);
   114			else
   115				hmask = (1UL << atomic_read(&kvm->online_vcpus)) - 1;
   116			if (utrap.scause) {
   117				utrap.sepc = cp->sepc;
   118				kvm_riscv_vcpu_trap_redirect(vcpu, &utrap);
   119				next_sepc = false;
   120				break;
   121			}
   122			for_each_set_bit(i, &hmask, BITS_PER_LONG) {
   123				rvcpu = kvm_get_vcpu_by_id(vcpu->kvm, i);
   124				kvm_riscv_vcpu_set_interrupt(rvcpu, IRQ_VS_SOFT);
   125			}
   126			break;
 > 127		case SBI_EXT_0_1_SHUTDOWN:
   128			kvm_sbi_system_shutdown(vcpu, run, KVM_SYSTEM_EVENT_SHUTDOWN);
   129			next_sepc = false;
   130			ret = 0;
   131			break;
 > 132		case SBI_EXT_0_1_REMOTE_FENCE_I:
 > 133		case SBI_EXT_0_1_REMOTE_SFENCE_VMA:
 > 134		case SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID:

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25446 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-18 19:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 19:23 [avpatel:riscv_kvm_v17 19/22] arch/riscv/kvm/vcpu_sbi.c:89:7: error: use of undeclared identifier 'SBI_EXT_0_1_CONSOLE_GETCHAR' 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.