lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202409251137.1cRB00WD-lkp@intel.com>
Date: Wed, 25 Sep 2024 12:08:18 +0800
From: kernel test robot <lkp@...el.com>
To: Jordan Niethe <jniethe5@...il.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Michael Ellerman <mpe@...erman.id.au>
Subject: arch/powerpc/kvm/powerpc.c:1732:52: error: implicit declaration of
 function 'kvmppc_get_vrsave'; did you mean 'kvmppc_get_sr'?

Hi Jordan,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   684a64bf32b6e488004e0ad7f0d7e922798f65b6
commit: 7028ac8d174f28220f0e2de0cb3346cd3c31976d KVM: PPC: Use accessors for VCPU registers
date:   1 year ago
config: powerpc64-randconfig-003-20240925 (https://download.01.org/0day-ci/archive/20240925/202409251137.1cRB00WD-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240925/202409251137.1cRB00WD-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409251137.1cRB00WD-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/powerpc/kvm/powerpc.c: In function 'kvmppc_set_vmx_dword':
   arch/powerpc/kvm/powerpc.c:1061:9: error: implicit declaration of function 'kvmppc_get_vsx_vr'; did you mean 'kvmppc_get_sr'? [-Wimplicit-function-declaration]
    1061 |         kvmppc_get_vsx_vr(vcpu, index, &val.vval);
         |         ^~~~~~~~~~~~~~~~~
         |         kvmppc_get_sr
   arch/powerpc/kvm/powerpc.c:1063:9: error: implicit declaration of function 'kvmppc_set_vsx_vr'; did you mean 'kvmppc_set_sr'? [-Wimplicit-function-declaration]
    1063 |         kvmppc_set_vsx_vr(vcpu, index, &val.vval);
         |         ^~~~~~~~~~~~~~~~~
         |         kvmppc_set_sr
   In file included from arch/powerpc/kvm/powerpc.c:25:
   arch/powerpc/kvm/powerpc.c: In function 'kvm_vcpu_ioctl_get_one_reg':
   arch/powerpc/kvm/powerpc.c:1729:52: error: implicit declaration of function 'kvmppc_get_vscr'; did you mean 'kvmppc_get_sr'? [-Wimplicit-function-declaration]
    1729 |                         val = get_reg_val(reg->id, kvmppc_get_vscr(vcpu));
         |                                                    ^~~~~~~~~~~~~~~
   arch/powerpc/include/asm/kvm_ppc.h:412:29: note: in definition of macro 'get_reg_val'
     412 |         case 4: __u.wval = (reg); break;        \
         |                             ^~~
>> arch/powerpc/kvm/powerpc.c:1732:52: error: implicit declaration of function 'kvmppc_get_vrsave'; did you mean 'kvmppc_get_sr'? [-Wimplicit-function-declaration]
    1732 |                         val = get_reg_val(reg->id, kvmppc_get_vrsave(vcpu));
         |                                                    ^~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/kvm_ppc.h:412:29: note: in definition of macro 'get_reg_val'
     412 |         case 4: __u.wval = (reg); break;        \
         |                             ^~~
   arch/powerpc/kvm/powerpc.c: In function 'kvm_vcpu_ioctl_set_one_reg':
   arch/powerpc/kvm/powerpc.c:1780:25: error: implicit declaration of function 'kvmppc_set_vscr'; did you mean 'kvmppc_set_sr'? [-Wimplicit-function-declaration]
    1780 |                         kvmppc_set_vscr(vcpu, set_reg_val(reg->id, val));
         |                         ^~~~~~~~~~~~~~~
         |                         kvmppc_set_sr
>> arch/powerpc/kvm/powerpc.c:1787:25: error: implicit declaration of function 'kvmppc_set_vrsave'; did you mean 'kvmppc_set_sr'? [-Wimplicit-function-declaration]
    1787 |                         kvmppc_set_vrsave(vcpu, set_reg_val(reg->id, val));
         |                         ^~~~~~~~~~~~~~~~~
         |                         kvmppc_set_sr


vim +1732 arch/powerpc/kvm/powerpc.c

  1701	
  1702	int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
  1703	{
  1704		int r = 0;
  1705		union kvmppc_one_reg val;
  1706		int size;
  1707	
  1708		size = one_reg_size(reg->id);
  1709		if (size > sizeof(val))
  1710			return -EINVAL;
  1711	
  1712		r = kvmppc_get_one_reg(vcpu, reg->id, &val);
  1713		if (r == -EINVAL) {
  1714			r = 0;
  1715			switch (reg->id) {
  1716	#ifdef CONFIG_ALTIVEC
  1717			case KVM_REG_PPC_VR0 ... KVM_REG_PPC_VR31:
  1718				if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
  1719					r = -ENXIO;
  1720					break;
  1721				}
  1722				kvmppc_get_vsx_vr(vcpu, reg->id - KVM_REG_PPC_VR0, &val.vval);
  1723				break;
  1724			case KVM_REG_PPC_VSCR:
  1725				if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
  1726					r = -ENXIO;
  1727					break;
  1728				}
  1729				val = get_reg_val(reg->id, kvmppc_get_vscr(vcpu));
  1730				break;
  1731			case KVM_REG_PPC_VRSAVE:
> 1732				val = get_reg_val(reg->id, kvmppc_get_vrsave(vcpu));
  1733				break;
  1734	#endif /* CONFIG_ALTIVEC */
  1735			default:
  1736				r = -EINVAL;
  1737				break;
  1738			}
  1739		}
  1740	
  1741		if (r)
  1742			return r;
  1743	
  1744		if (copy_to_user((char __user *)(unsigned long)reg->addr, &val, size))
  1745			r = -EFAULT;
  1746	
  1747		return r;
  1748	}
  1749	
  1750	int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
  1751	{
  1752		int r;
  1753		union kvmppc_one_reg val;
  1754		int size;
  1755	
  1756		size = one_reg_size(reg->id);
  1757		if (size > sizeof(val))
  1758			return -EINVAL;
  1759	
  1760		if (copy_from_user(&val, (char __user *)(unsigned long)reg->addr, size))
  1761			return -EFAULT;
  1762	
  1763		r = kvmppc_set_one_reg(vcpu, reg->id, &val);
  1764		if (r == -EINVAL) {
  1765			r = 0;
  1766			switch (reg->id) {
  1767	#ifdef CONFIG_ALTIVEC
  1768			case KVM_REG_PPC_VR0 ... KVM_REG_PPC_VR31:
  1769				if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
  1770					r = -ENXIO;
  1771					break;
  1772				}
  1773				kvmppc_set_vsx_vr(vcpu, reg->id - KVM_REG_PPC_VR0, &val.vval);
  1774				break;
  1775			case KVM_REG_PPC_VSCR:
  1776				if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
  1777					r = -ENXIO;
  1778					break;
  1779				}
  1780				kvmppc_set_vscr(vcpu, set_reg_val(reg->id, val));
  1781				break;
  1782			case KVM_REG_PPC_VRSAVE:
  1783				if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
  1784					r = -ENXIO;
  1785					break;
  1786				}
> 1787				kvmppc_set_vrsave(vcpu, set_reg_val(reg->id, val));
  1788				break;
  1789	#endif /* CONFIG_ALTIVEC */
  1790			default:
  1791				r = -EINVAL;
  1792				break;
  1793			}
  1794		}
  1795	
  1796		return r;
  1797	}
  1798	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ