[kvalo-ath:pending 53/57] drivers/net/wireless/ath/ath11k/wmi.c:5657:3: warning: variable 'len' is uninitialized when used here
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head: 6cce4964a399f7eb43e75e57de0def72561a162c
commit: b368704018cc51a0908adf79649fd692624e75da [53/57] ath11k: report rssi of each chain to mac80211 for QCA6390/WCN6855
config: x86_64-randconfig-a003-20211213 (https://download.01.org/0day-ci/archive/20211214/202112141834.pliLIgBL-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/kvalo/ath.git/commit/?id=...
git remote add kvalo-ath https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
git fetch --no-tags kvalo-ath pending
git checkout b368704018cc51a0908adf79649fd692624e75da
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/wireless/ath/ath11k/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/ath/ath11k/wmi.c:5657:3: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
len -= sizeof(*src);
^~~
drivers/net/wireless/ath/ath11k/wmi.c:5637:9: note: initialize the variable 'len' to silence this warning
u32 len;
^
= 0
1 warning generated.
vim +/len +5657 drivers/net/wireless/ath/ath11k/wmi.c
b368704018cc51 Wen Gong 2021-12-13 5628
b368704018cc51 Wen Gong 2021-12-13 5629 static int ath11k_wmi_tlv_fw_stats_data_parse(struct ath11k_base *ab,
b368704018cc51 Wen Gong 2021-12-13 5630 struct wmi_tlv_fw_stats_parse *parse,
b368704018cc51 Wen Gong 2021-12-13 5631 const void *ptr)
b368704018cc51 Wen Gong 2021-12-13 5632 {
b368704018cc51 Wen Gong 2021-12-13 5633 struct ath11k_fw_stats *stats = parse->stats;
b368704018cc51 Wen Gong 2021-12-13 5634 const struct wmi_stats_event *ev = parse->ev;
b368704018cc51 Wen Gong 2021-12-13 5635 int i;
b368704018cc51 Wen Gong 2021-12-13 5636 const void *data = ptr;
b368704018cc51 Wen Gong 2021-12-13 5637 u32 len;
b368704018cc51 Wen Gong 2021-12-13 5638
b368704018cc51 Wen Gong 2021-12-13 5639 if (!ev) {
b368704018cc51 Wen Gong 2021-12-13 5640 ath11k_warn(ab, "failed to fetch update stats ev");
b368704018cc51 Wen Gong 2021-12-13 5641 return -EPROTO;
b368704018cc51 Wen Gong 2021-12-13 5642 }
d5c65159f28953 Kalle Valo 2019-11-23 5643
d5c65159f28953 Kalle Valo 2019-11-23 5644 stats->stats_id = 0;
d5c65159f28953 Kalle Valo 2019-11-23 5645
d5c65159f28953 Kalle Valo 2019-11-23 5646 for (i = 0; i < ev->num_pdev_stats; i++) {
d5c65159f28953 Kalle Valo 2019-11-23 5647 const struct wmi_pdev_stats *src;
d5c65159f28953 Kalle Valo 2019-11-23 5648 struct ath11k_fw_stats_pdev *dst;
d5c65159f28953 Kalle Valo 2019-11-23 5649
d5c65159f28953 Kalle Valo 2019-11-23 5650 src = data;
b368704018cc51 Wen Gong 2021-12-13 5651 if (len < sizeof(*src))
d5c65159f28953 Kalle Valo 2019-11-23 5652 return -EPROTO;
d5c65159f28953 Kalle Valo 2019-11-23 5653
d5c65159f28953 Kalle Valo 2019-11-23 5654 stats->stats_id = WMI_REQUEST_PDEV_STAT;
d5c65159f28953 Kalle Valo 2019-11-23 5655
d5c65159f28953 Kalle Valo 2019-11-23 5656 data += sizeof(*src);
d5c65159f28953 Kalle Valo 2019-11-23 @5657 len -= sizeof(*src);
d5c65159f28953 Kalle Valo 2019-11-23 5658
d5c65159f28953 Kalle Valo 2019-11-23 5659 dst = kzalloc(sizeof(*dst), GFP_ATOMIC);
d5c65159f28953 Kalle Valo 2019-11-23 5660 if (!dst)
d5c65159f28953 Kalle Valo 2019-11-23 5661 continue;
d5c65159f28953 Kalle Valo 2019-11-23 5662
d5c65159f28953 Kalle Valo 2019-11-23 5663 ath11k_wmi_pull_pdev_stats_base(&src->base, dst);
d5c65159f28953 Kalle Valo 2019-11-23 5664 ath11k_wmi_pull_pdev_stats_tx(&src->tx, dst);
d5c65159f28953 Kalle Valo 2019-11-23 5665 ath11k_wmi_pull_pdev_stats_rx(&src->rx, dst);
d5c65159f28953 Kalle Valo 2019-11-23 5666 list_add_tail(&dst->list, &stats->pdevs);
d5c65159f28953 Kalle Valo 2019-11-23 5667 }
d5c65159f28953 Kalle Valo 2019-11-23 5668
d5c65159f28953 Kalle Valo 2019-11-23 5669 for (i = 0; i < ev->num_vdev_stats; i++) {
d5c65159f28953 Kalle Valo 2019-11-23 5670 const struct wmi_vdev_stats *src;
d5c65159f28953 Kalle Valo 2019-11-23 5671 struct ath11k_fw_stats_vdev *dst;
d5c65159f28953 Kalle Valo 2019-11-23 5672
d5c65159f28953 Kalle Valo 2019-11-23 5673 src = data;
b368704018cc51 Wen Gong 2021-12-13 5674 if (len < sizeof(*src))
d5c65159f28953 Kalle Valo 2019-11-23 5675 return -EPROTO;
d5c65159f28953 Kalle Valo 2019-11-23 5676
d5c65159f28953 Kalle Valo 2019-11-23 5677 stats->stats_id = WMI_REQUEST_VDEV_STAT;
d5c65159f28953 Kalle Valo 2019-11-23 5678
d5c65159f28953 Kalle Valo 2019-11-23 5679 data += sizeof(*src);
d5c65159f28953 Kalle Valo 2019-11-23 5680 len -= sizeof(*src);
d5c65159f28953 Kalle Valo 2019-11-23 5681
d5c65159f28953 Kalle Valo 2019-11-23 5682 dst = kzalloc(sizeof(*dst), GFP_ATOMIC);
d5c65159f28953 Kalle Valo 2019-11-23 5683 if (!dst)
d5c65159f28953 Kalle Valo 2019-11-23 5684 continue;
d5c65159f28953 Kalle Valo 2019-11-23 5685
d5c65159f28953 Kalle Valo 2019-11-23 5686 ath11k_wmi_pull_vdev_stats(src, dst);
d5c65159f28953 Kalle Valo 2019-11-23 5687 list_add_tail(&dst->list, &stats->vdevs);
d5c65159f28953 Kalle Valo 2019-11-23 5688 }
d5c65159f28953 Kalle Valo 2019-11-23 5689
d5c65159f28953 Kalle Valo 2019-11-23 5690 for (i = 0; i < ev->num_bcn_stats; i++) {
d5c65159f28953 Kalle Valo 2019-11-23 5691 const struct wmi_bcn_stats *src;
d5c65159f28953 Kalle Valo 2019-11-23 5692 struct ath11k_fw_stats_bcn *dst;
d5c65159f28953 Kalle Valo 2019-11-23 5693
d5c65159f28953 Kalle Valo 2019-11-23 5694 src = data;
b368704018cc51 Wen Gong 2021-12-13 5695 if (len < sizeof(*src))
d5c65159f28953 Kalle Valo 2019-11-23 5696 return -EPROTO;
d5c65159f28953 Kalle Valo 2019-11-23 5697
d5c65159f28953 Kalle Valo 2019-11-23 5698 stats->stats_id = WMI_REQUEST_BCN_STAT;
d5c65159f28953 Kalle Valo 2019-11-23 5699
d5c65159f28953 Kalle Valo 2019-11-23 5700 data += sizeof(*src);
d5c65159f28953 Kalle Valo 2019-11-23 5701 len -= sizeof(*src);
d5c65159f28953 Kalle Valo 2019-11-23 5702
d5c65159f28953 Kalle Valo 2019-11-23 5703 dst = kzalloc(sizeof(*dst), GFP_ATOMIC);
d5c65159f28953 Kalle Valo 2019-11-23 5704 if (!dst)
d5c65159f28953 Kalle Valo 2019-11-23 5705 continue;
d5c65159f28953 Kalle Valo 2019-11-23 5706
d5c65159f28953 Kalle Valo 2019-11-23 5707 ath11k_wmi_pull_bcn_stats(src, dst);
d5c65159f28953 Kalle Valo 2019-11-23 5708 list_add_tail(&dst->list, &stats->bcn);
d5c65159f28953 Kalle Valo 2019-11-23 5709 }
d5c65159f28953 Kalle Valo 2019-11-23 5710
d5c65159f28953 Kalle Valo 2019-11-23 5711 return 0;
d5c65159f28953 Kalle Valo 2019-11-23 5712 }
d5c65159f28953 Kalle Valo 2019-11-23 5713
:::::: The code at line 5657 was first introduced by commit
:::::: d5c65159f2895379e11ca13f62feabe93278985d ath11k: driver for Qualcomm IEEE 802.11ax devices
:::::: TO: Kalle Valo <kvalo(a)codeaurora.org>
:::::: CC: Kalle Valo <kvalo(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [RFC PATCH] KVM: x86: add kvm per-vCPU exits disable capability
by kernel test robot
Hi Kechen,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on kvm/queue]
[also build test ERROR on mst-vhost/linux-next tip/master linux/master linus/master v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kechen-Lu/KVM-x86-add-kvm-per-vC...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-randconfig-a012-20211213 (https://download.01.org/0day-ci/archive/20211214/202112141758.daZ9vc3P-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/08f20df47a09e327aee3e73a8d7c77b1f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kechen-Lu/KVM-x86-add-kvm-per-vCPU-exits-disable-capability/20211214-113446
git checkout 08f20df47a09e327aee3e73a8d7c77b1ffc01bc0
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kvm_host.h:38,
from arch/x86/kvm/x86.c:19:
arch/x86/kvm/x86.c: In function 'kvm_vm_ioctl_enable_cap':
>> include/uapi/linux/kvm.h:801:51: error: left shift count >= width of type [-Werror=shift-count-overflow]
801 | #define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
| ^~
include/uapi/linux/kvm.h:806:12: note: in expansion of macro 'KVM_X86_DISABLE_EXITS_PER_VCPU'
806 | KVM_X86_DISABLE_EXITS_PER_VCPU)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:5775:23: note: in expansion of macro 'KVM_X86_DISABLE_VALID_EXITS'
5775 | if (cap->args[0] & ~KVM_X86_DISABLE_VALID_EXITS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/uapi/linux/kvm.h:801:51: error: left shift count >= width of type [-Werror=shift-count-overflow]
801 | #define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
| ^~
arch/x86/kvm/x86.c:5787:23: note: in expansion of macro 'KVM_X86_DISABLE_EXITS_PER_VCPU'
5787 | if ((cap->args[0] & KVM_X86_DISABLE_EXITS_PER_VCPU) &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +801 include/uapi/linux/kvm.h
796
797 #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
798 #define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
799 #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
800 #define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3)
> 801 #define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
802 #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
803 KVM_X86_DISABLE_EXITS_HLT | \
804 KVM_X86_DISABLE_EXITS_PAUSE | \
805 KVM_X86_DISABLE_EXITS_CSTATE| \
806 KVM_X86_DISABLE_EXITS_PER_VCPU)
807
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 06/17] fortify: Detect struct member overflows in memcpy() at compile-time
by kernel test robot
Hi Kees,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc5]
[cannot apply to rdma/for-next axboe-block/for-next kvm/queue tip/x86/core mkp-scsi/for-next jejb-scsi/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kees-Cook/Enable-strict-compile-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git aa50faff4416c869b52dff68a937c84d29e12f4b
config: x86_64-randconfig-s022-20211213 (https://download.01.org/0day-ci/archive/20211214/202112141639.6sg1Fhdq-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/80c8d2aae95aae6bd09e3ef84b74d0afe...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kees-Cook/Enable-strict-compile-time-memcpy-fortify-checks/20211214-064002
git checkout 80c8d2aae95aae6bd09e3ef84b74d0afe631abae
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/acpi/apei/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/acpi/apei/erst.c:272:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *src @@ got void [noderef] __iomem * @@
drivers/acpi/apei/erst.c:272:13: sparse: expected void *src
drivers/acpi/apei/erst.c:272:13: sparse: got void [noderef] __iomem *
drivers/acpi/apei/erst.c:275:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *dst @@ got void [noderef] __iomem * @@
drivers/acpi/apei/erst.c:275:13: sparse: expected void *dst
drivers/acpi/apei/erst.c:275:13: sparse: got void [noderef] __iomem *
drivers/acpi/apei/erst.c:277:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *src @@
drivers/acpi/apei/erst.c:277:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/acpi/apei/erst.c:277:25: sparse: got void *src
drivers/acpi/apei/erst.c:283:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *src @@
drivers/acpi/apei/erst.c:283:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/acpi/apei/erst.c:283:17: sparse: got void *src
drivers/acpi/apei/erst.c:284:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *dst @@
drivers/acpi/apei/erst.c:284:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/acpi/apei/erst.c:284:17: sparse: got void *dst
>> drivers/acpi/apei/erst.c:792:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:792:9: sparse: expected void const *
drivers/acpi/apei/erst.c:792:9: sparse: got void [noderef] __iomem *static [toplevel] vaddr
>> drivers/acpi/apei/erst.c:792:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:792:9: sparse: expected void const *
drivers/acpi/apei/erst.c:792:9: sparse: got void [noderef] __iomem *static [toplevel] vaddr
drivers/acpi/apei/erst.c:792:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:792:9: sparse: expected void *
drivers/acpi/apei/erst.c:792:9: sparse: got void [noderef] __iomem *static [toplevel] vaddr
drivers/acpi/apei/erst.c:793:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cper_record_header *rcd_erange @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:793:20: sparse: expected struct cper_record_header *rcd_erange
drivers/acpi/apei/erst.c:793:20: sparse: got void [noderef] __iomem *static [toplevel] vaddr
drivers/acpi/apei/erst.c:830:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cper_record_header *rcd_tmp @@ got void [noderef] __iomem * @@
drivers/acpi/apei/erst.c:830:17: sparse: expected struct cper_record_header *rcd_tmp
drivers/acpi/apei/erst.c:830:17: sparse: got void [noderef] __iomem *
vim +792 drivers/acpi/apei/erst.c
a08f82d08053fb Huang Ying 2010-05-18 766
a08f82d08053fb Huang Ying 2010-05-18 767 int erst_write(const struct cper_record_header *record)
a08f82d08053fb Huang Ying 2010-05-18 768 {
a08f82d08053fb Huang Ying 2010-05-18 769 int rc;
a08f82d08053fb Huang Ying 2010-05-18 770 unsigned long flags;
a08f82d08053fb Huang Ying 2010-05-18 771 struct cper_record_header *rcd_erange;
a08f82d08053fb Huang Ying 2010-05-18 772
a08f82d08053fb Huang Ying 2010-05-18 773 if (erst_disable)
a08f82d08053fb Huang Ying 2010-05-18 774 return -ENODEV;
a08f82d08053fb Huang Ying 2010-05-18 775
a08f82d08053fb Huang Ying 2010-05-18 776 if (memcmp(record->signature, CPER_SIG_RECORD, CPER_SIG_SIZE))
a08f82d08053fb Huang Ying 2010-05-18 777 return -EINVAL;
a08f82d08053fb Huang Ying 2010-05-18 778
a08f82d08053fb Huang Ying 2010-05-18 779 if (erst_erange.attr & ERST_RANGE_NVRAM) {
3b38bb5f7f0635 Huang Ying 2010-12-02 780 if (!raw_spin_trylock_irqsave(&erst_lock, flags))
a08f82d08053fb Huang Ying 2010-05-18 781 return -EBUSY;
a08f82d08053fb Huang Ying 2010-05-18 782 rc = __erst_write_to_nvram(record);
3b38bb5f7f0635 Huang Ying 2010-12-02 783 raw_spin_unlock_irqrestore(&erst_lock, flags);
a08f82d08053fb Huang Ying 2010-05-18 784 return rc;
a08f82d08053fb Huang Ying 2010-05-18 785 }
a08f82d08053fb Huang Ying 2010-05-18 786
a08f82d08053fb Huang Ying 2010-05-18 787 if (record->record_length > erst_erange.size)
a08f82d08053fb Huang Ying 2010-05-18 788 return -EINVAL;
a08f82d08053fb Huang Ying 2010-05-18 789
3b38bb5f7f0635 Huang Ying 2010-12-02 790 if (!raw_spin_trylock_irqsave(&erst_lock, flags))
a08f82d08053fb Huang Ying 2010-05-18 791 return -EBUSY;
a08f82d08053fb Huang Ying 2010-05-18 @792 memcpy(erst_erange.vaddr, record, record->record_length);
a08f82d08053fb Huang Ying 2010-05-18 793 rcd_erange = erst_erange.vaddr;
a08f82d08053fb Huang Ying 2010-05-18 794 /* signature for serialization system */
a08f82d08053fb Huang Ying 2010-05-18 795 memcpy(&rcd_erange->persistence_information, "ER", 2);
a08f82d08053fb Huang Ying 2010-05-18 796
a08f82d08053fb Huang Ying 2010-05-18 797 rc = __erst_write_to_storage(0);
3b38bb5f7f0635 Huang Ying 2010-12-02 798 raw_spin_unlock_irqrestore(&erst_lock, flags);
a08f82d08053fb Huang Ying 2010-05-18 799
a08f82d08053fb Huang Ying 2010-05-18 800 return rc;
a08f82d08053fb Huang Ying 2010-05-18 801 }
a08f82d08053fb Huang Ying 2010-05-18 802 EXPORT_SYMBOL_GPL(erst_write);
a08f82d08053fb Huang Ying 2010-05-18 803
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[chrome-os:chromeos-5.15 6/21] drivers/gpu/arm/bifrost/mali_kbase_mem.c:1610:48: warning: this statement may fall through
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.15
head: afcd0189c8b20e4125e0b60089c6ce401080f794
commit: 47053c9ca1fca9a873ad8981b4e7115d40ed9d03 [6/21] CHROMIUM: Mali: Build Mali Bifrost
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20211214/202112141618.8kcM2vnl-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.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
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.15
git checkout 47053c9ca1fca9a873ad8981b4e7115d40ed9d03
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/arm/bifrost/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
cc1: warning: kbuild/src/consumer/drivers/gpu/arm/bifrost: No such file or directory [-Wmissing-include-dirs]
drivers/gpu/arm/bifrost/mali_kbase_mem.c: In function 'kbase_gpu_munmap':
>> drivers/gpu/arm/bifrost/mali_kbase_mem.c:1610:48: warning: this statement may fall through [-Wimplicit-fallthrough=]
1610 | case KBASE_MEM_TYPE_IMPORTED_USER_BUF: {
| ^
drivers/gpu/arm/bifrost/mali_kbase_mem.c:1626:9: note: here
1626 | default:
| ^~~~~~~
In file included from drivers/gpu/arm/bifrost/mali_kbase_defs.h:31,
from drivers/gpu/arm/bifrost/mali_kbase.h:55,
from drivers/gpu/arm/bifrost/mali_kbase_mem.c:36:
At top level:
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:416:35: warning: 'base_hw_features_tVAx' defined but not used [-Wunused-const-variable=]
416 | static const enum base_hw_feature base_hw_features_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:389:35: warning: 'base_hw_features_tGRx' defined but not used [-Wunused-const-variable=]
389 | static const enum base_hw_feature base_hw_features_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:362:35: warning: 'base_hw_features_tODx' defined but not used [-Wunused-const-variable=]
362 | static const enum base_hw_feature base_hw_features_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:334:35: warning: 'base_hw_features_tDUx' defined but not used [-Wunused-const-variable=]
334 | static const enum base_hw_feature base_hw_features_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:306:35: warning: 'base_hw_features_tBAx' defined but not used [-Wunused-const-variable=]
306 | static const enum base_hw_feature base_hw_features_tBAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:278:35: warning: 'base_hw_features_tBEx' defined but not used [-Wunused-const-variable=]
278 | static const enum base_hw_feature base_hw_features_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:251:35: warning: 'base_hw_features_tNAx' defined but not used [-Wunused-const-variable=]
251 | static const enum base_hw_feature base_hw_features_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:224:35: warning: 'base_hw_features_tTRx' defined but not used [-Wunused-const-variable=]
224 | static const enum base_hw_feature base_hw_features_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:196:35: warning: 'base_hw_features_tGOx' defined but not used [-Wunused-const-variable=]
196 | static const enum base_hw_feature base_hw_features_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:168:35: warning: 'base_hw_features_tNOx' defined but not used [-Wunused-const-variable=]
168 | static const enum base_hw_feature base_hw_features_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:142:35: warning: 'base_hw_features_tDVx' defined but not used [-Wunused-const-variable=]
142 | static const enum base_hw_feature base_hw_features_tDVx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:116:35: warning: 'base_hw_features_tSIx' defined but not used [-Wunused-const-variable=]
116 | static const enum base_hw_feature base_hw_features_tSIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:90:35: warning: 'base_hw_features_tHEx' defined but not used [-Wunused-const-variable=]
90 | static const enum base_hw_feature base_hw_features_tHEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:65:35: warning: 'base_hw_features_tMIx' defined but not used [-Wunused-const-variable=]
65 | static const enum base_hw_feature base_hw_features_tMIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:61:35: warning: 'base_hw_features_generic' defined but not used [-Wunused-const-variable=]
61 | static const enum base_hw_feature base_hw_features_generic[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
cc1: warning: kbuild/src/consumer/drivers/gpu/arm/bifrost: No such file or directory [-Wmissing-include-dirs]
drivers/gpu/arm/bifrost/mali_kbase_pm.c: In function 'kbase_pm_context_active_handle_suspend':
>> drivers/gpu/arm/bifrost/mali_kbase_pm.c:77:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
77 | if (kbdev->pm.active_count != 0)
| ^
drivers/gpu/arm/bifrost/mali_kbase_pm.c:80:17: note: here
80 | case KBASE_PM_SUSPEND_HANDLER_DONT_INCREASE:
| ^~~~
In file included from drivers/gpu/arm/bifrost/mali_kbase_defs.h:31,
from drivers/gpu/arm/bifrost/mali_kbase.h:55,
from drivers/gpu/arm/bifrost/mali_kbase_pm.c:26:
At top level:
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:416:35: warning: 'base_hw_features_tVAx' defined but not used [-Wunused-const-variable=]
416 | static const enum base_hw_feature base_hw_features_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:389:35: warning: 'base_hw_features_tGRx' defined but not used [-Wunused-const-variable=]
389 | static const enum base_hw_feature base_hw_features_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:362:35: warning: 'base_hw_features_tODx' defined but not used [-Wunused-const-variable=]
362 | static const enum base_hw_feature base_hw_features_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:334:35: warning: 'base_hw_features_tDUx' defined but not used [-Wunused-const-variable=]
334 | static const enum base_hw_feature base_hw_features_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:306:35: warning: 'base_hw_features_tBAx' defined but not used [-Wunused-const-variable=]
306 | static const enum base_hw_feature base_hw_features_tBAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:278:35: warning: 'base_hw_features_tBEx' defined but not used [-Wunused-const-variable=]
278 | static const enum base_hw_feature base_hw_features_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:251:35: warning: 'base_hw_features_tNAx' defined but not used [-Wunused-const-variable=]
251 | static const enum base_hw_feature base_hw_features_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:224:35: warning: 'base_hw_features_tTRx' defined but not used [-Wunused-const-variable=]
224 | static const enum base_hw_feature base_hw_features_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:196:35: warning: 'base_hw_features_tGOx' defined but not used [-Wunused-const-variable=]
196 | static const enum base_hw_feature base_hw_features_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:168:35: warning: 'base_hw_features_tNOx' defined but not used [-Wunused-const-variable=]
168 | static const enum base_hw_feature base_hw_features_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:142:35: warning: 'base_hw_features_tDVx' defined but not used [-Wunused-const-variable=]
142 | static const enum base_hw_feature base_hw_features_tDVx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:116:35: warning: 'base_hw_features_tSIx' defined but not used [-Wunused-const-variable=]
116 | static const enum base_hw_feature base_hw_features_tSIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:90:35: warning: 'base_hw_features_tHEx' defined but not used [-Wunused-const-variable=]
90 | static const enum base_hw_feature base_hw_features_tHEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:65:35: warning: 'base_hw_features_tMIx' defined but not used [-Wunused-const-variable=]
65 | static const enum base_hw_feature base_hw_features_tMIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:61:35: warning: 'base_hw_features_generic' defined but not used [-Wunused-const-variable=]
61 | static const enum base_hw_feature base_hw_features_generic[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
cc1: warning: kbuild/src/consumer/drivers/gpu/arm/bifrost: No such file or directory [-Wmissing-include-dirs]
drivers/gpu/arm/bifrost/mali_kbase_mem_linux.c: In function 'kbase_mem_do_sync_imported':
>> drivers/gpu/arm/bifrost/mali_kbase_mem_linux.c:1025:25: warning: variable 'dma_buf' set but not used [-Wunused-but-set-variable]
1025 | struct dma_buf *dma_buf;
| ^~~~~~~
In file included from drivers/gpu/arm/bifrost/mali_kbase_defs.h:31,
from drivers/gpu/arm/bifrost/mali_kbase.h:55,
from drivers/gpu/arm/bifrost/mali_kbase_mem_linux.c:42:
At top level:
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:416:35: warning: 'base_hw_features_tVAx' defined but not used [-Wunused-const-variable=]
416 | static const enum base_hw_feature base_hw_features_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:389:35: warning: 'base_hw_features_tGRx' defined but not used [-Wunused-const-variable=]
389 | static const enum base_hw_feature base_hw_features_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:362:35: warning: 'base_hw_features_tODx' defined but not used [-Wunused-const-variable=]
362 | static const enum base_hw_feature base_hw_features_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:334:35: warning: 'base_hw_features_tDUx' defined but not used [-Wunused-const-variable=]
334 | static const enum base_hw_feature base_hw_features_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:306:35: warning: 'base_hw_features_tBAx' defined but not used [-Wunused-const-variable=]
306 | static const enum base_hw_feature base_hw_features_tBAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:278:35: warning: 'base_hw_features_tBEx' defined but not used [-Wunused-const-variable=]
278 | static const enum base_hw_feature base_hw_features_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:251:35: warning: 'base_hw_features_tNAx' defined but not used [-Wunused-const-variable=]
251 | static const enum base_hw_feature base_hw_features_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:224:35: warning: 'base_hw_features_tTRx' defined but not used [-Wunused-const-variable=]
224 | static const enum base_hw_feature base_hw_features_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:196:35: warning: 'base_hw_features_tGOx' defined but not used [-Wunused-const-variable=]
196 | static const enum base_hw_feature base_hw_features_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:168:35: warning: 'base_hw_features_tNOx' defined but not used [-Wunused-const-variable=]
168 | static const enum base_hw_feature base_hw_features_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:142:35: warning: 'base_hw_features_tDVx' defined but not used [-Wunused-const-variable=]
142 | static const enum base_hw_feature base_hw_features_tDVx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:116:35: warning: 'base_hw_features_tSIx' defined but not used [-Wunused-const-variable=]
116 | static const enum base_hw_feature base_hw_features_tSIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:90:35: warning: 'base_hw_features_tHEx' defined but not used [-Wunused-const-variable=]
90 | static const enum base_hw_feature base_hw_features_tHEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:65:35: warning: 'base_hw_features_tMIx' defined but not used [-Wunused-const-variable=]
65 | static const enum base_hw_feature base_hw_features_tMIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:61:35: warning: 'base_hw_features_generic' defined but not used [-Wunused-const-variable=]
61 | static const enum base_hw_feature base_hw_features_generic[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
cc1: warning: kbuild/src/consumer/drivers/gpu/arm/bifrost: No such file or directory [-Wmissing-include-dirs]
drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c: In function 'kbase_jd_debugfs_fence_info':
>> drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c:78:46: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
78 | "Sd(%llu#%u: %s) ",
| ~^
| |
| unsigned int
| %llu
79 | #endif
80 | fence->context, fence->seqno,
| ~~~~~~~~~~~~
| |
| u64 {aka long long unsigned int}
drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c:97:46: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
97 | "Wd(%llu#%u: %s) ",
| ~^
| |
| unsigned int
| %llu
98 | #endif
99 | fence->context, fence->seqno,
| ~~~~~~~~~~~~
| |
| u64 {aka long long unsigned int}
In file included from drivers/gpu/arm/bifrost/mali_kbase_defs.h:31,
from drivers/gpu/arm/bifrost/mali_kbase.h:55,
from drivers/gpu/arm/bifrost/mali_kbase_jd_debugfs.c:25:
At top level:
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:416:35: warning: 'base_hw_features_tVAx' defined but not used [-Wunused-const-variable=]
416 | static const enum base_hw_feature base_hw_features_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:389:35: warning: 'base_hw_features_tGRx' defined but not used [-Wunused-const-variable=]
389 | static const enum base_hw_feature base_hw_features_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:362:35: warning: 'base_hw_features_tODx' defined but not used [-Wunused-const-variable=]
362 | static const enum base_hw_feature base_hw_features_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:334:35: warning: 'base_hw_features_tDUx' defined but not used [-Wunused-const-variable=]
334 | static const enum base_hw_feature base_hw_features_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:306:35: warning: 'base_hw_features_tBAx' defined but not used [-Wunused-const-variable=]
306 | static const enum base_hw_feature base_hw_features_tBAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:278:35: warning: 'base_hw_features_tBEx' defined but not used [-Wunused-const-variable=]
278 | static const enum base_hw_feature base_hw_features_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:251:35: warning: 'base_hw_features_tNAx' defined but not used [-Wunused-const-variable=]
251 | static const enum base_hw_feature base_hw_features_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:224:35: warning: 'base_hw_features_tTRx' defined but not used [-Wunused-const-variable=]
224 | static const enum base_hw_feature base_hw_features_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:196:35: warning: 'base_hw_features_tGOx' defined but not used [-Wunused-const-variable=]
196 | static const enum base_hw_feature base_hw_features_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:168:35: warning: 'base_hw_features_tNOx' defined but not used [-Wunused-const-variable=]
168 | static const enum base_hw_feature base_hw_features_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:142:35: warning: 'base_hw_features_tDVx' defined but not used [-Wunused-const-variable=]
142 | static const enum base_hw_feature base_hw_features_tDVx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:116:35: warning: 'base_hw_features_tSIx' defined but not used [-Wunused-const-variable=]
116 | static const enum base_hw_feature base_hw_features_tSIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:90:35: warning: 'base_hw_features_tHEx' defined but not used [-Wunused-const-variable=]
90 | static const enum base_hw_feature base_hw_features_tHEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:65:35: warning: 'base_hw_features_tMIx' defined but not used [-Wunused-const-variable=]
65 | static const enum base_hw_feature base_hw_features_tMIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:61:35: warning: 'base_hw_features_generic' defined but not used [-Wunused-const-variable=]
61 | static const enum base_hw_feature base_hw_features_generic[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
>> drivers/gpu/arm/bifrost/mali_kbase_mem_profile_debugfs.c:27: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Show callback for the @c mem_profile debugfs file.
--
>> drivers/gpu/arm/bifrost/mali_kbase_vinstr.c:942: warning: expecting prototype for The hwcnt reader's ioctl command(). Prototype was for kbasep_vinstr_hwcnt_reader_ioctl_get_api_version() instead
--
cc1: warning: kbuild/src/consumer/drivers/gpu/arm/bifrost: No such file or directory [-Wmissing-include-dirs]
>> drivers/gpu/arm/bifrost/backend/gpu/mali_kbase_irq_linux.c:182:13: warning: no previous prototype for 'kbase_gpu_irq_test_handler' [-Wmissing-prototypes]
182 | irqreturn_t kbase_gpu_irq_test_handler(int irq, void *data, u32 val)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/arm/bifrost/backend/gpu/mali_kbase_irq_linux.c:210:5: warning: no previous prototype for 'kbase_set_custom_irq_handler' [-Wmissing-prototypes]
210 | int kbase_set_custom_irq_handler(struct kbase_device *kbdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/arm/bifrost/mali_kbase_defs.h:31,
from drivers/gpu/arm/bifrost/mali_kbase.h:55,
from drivers/gpu/arm/bifrost/backend/gpu/mali_kbase_irq_linux.c:22:
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:416:35: warning: 'base_hw_features_tVAx' defined but not used [-Wunused-const-variable=]
416 | static const enum base_hw_feature base_hw_features_tVAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:389:35: warning: 'base_hw_features_tGRx' defined but not used [-Wunused-const-variable=]
389 | static const enum base_hw_feature base_hw_features_tGRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:362:35: warning: 'base_hw_features_tODx' defined but not used [-Wunused-const-variable=]
362 | static const enum base_hw_feature base_hw_features_tODx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:334:35: warning: 'base_hw_features_tDUx' defined but not used [-Wunused-const-variable=]
334 | static const enum base_hw_feature base_hw_features_tDUx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:306:35: warning: 'base_hw_features_tBAx' defined but not used [-Wunused-const-variable=]
306 | static const enum base_hw_feature base_hw_features_tBAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:278:35: warning: 'base_hw_features_tBEx' defined but not used [-Wunused-const-variable=]
278 | static const enum base_hw_feature base_hw_features_tBEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:251:35: warning: 'base_hw_features_tNAx' defined but not used [-Wunused-const-variable=]
251 | static const enum base_hw_feature base_hw_features_tNAx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:224:35: warning: 'base_hw_features_tTRx' defined but not used [-Wunused-const-variable=]
224 | static const enum base_hw_feature base_hw_features_tTRx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:196:35: warning: 'base_hw_features_tGOx' defined but not used [-Wunused-const-variable=]
196 | static const enum base_hw_feature base_hw_features_tGOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:168:35: warning: 'base_hw_features_tNOx' defined but not used [-Wunused-const-variable=]
168 | static const enum base_hw_feature base_hw_features_tNOx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:142:35: warning: 'base_hw_features_tDVx' defined but not used [-Wunused-const-variable=]
142 | static const enum base_hw_feature base_hw_features_tDVx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:116:35: warning: 'base_hw_features_tSIx' defined but not used [-Wunused-const-variable=]
116 | static const enum base_hw_feature base_hw_features_tSIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:90:35: warning: 'base_hw_features_tHEx' defined but not used [-Wunused-const-variable=]
90 | static const enum base_hw_feature base_hw_features_tHEx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:65:35: warning: 'base_hw_features_tMIx' defined but not used [-Wunused-const-variable=]
65 | static const enum base_hw_feature base_hw_features_tMIx[] = {
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/arm/bifrost/mali_base_hwconfig_features.h:61:35: warning: 'base_hw_features_generic' defined but not used [-Wunused-const-variable=]
61 | static const enum base_hw_feature base_hw_features_generic[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
..
vim +1610 drivers/gpu/arm/bifrost/mali_kbase_mem.c
97b1271a1316e9 Fei Shao 2021-12-06 1575
97b1271a1316e9 Fei Shao 2021-12-06 1576 static void kbase_jd_user_buf_unmap(struct kbase_context *kctx,
97b1271a1316e9 Fei Shao 2021-12-06 1577 struct kbase_mem_phy_alloc *alloc, bool writeable);
97b1271a1316e9 Fei Shao 2021-12-06 1578
97b1271a1316e9 Fei Shao 2021-12-06 1579 int kbase_gpu_munmap(struct kbase_context *kctx, struct kbase_va_region *reg)
97b1271a1316e9 Fei Shao 2021-12-06 1580 {
97b1271a1316e9 Fei Shao 2021-12-06 1581 int err = 0;
97b1271a1316e9 Fei Shao 2021-12-06 1582
97b1271a1316e9 Fei Shao 2021-12-06 1583 if (reg->start_pfn == 0)
97b1271a1316e9 Fei Shao 2021-12-06 1584 return 0;
97b1271a1316e9 Fei Shao 2021-12-06 1585
97b1271a1316e9 Fei Shao 2021-12-06 1586 if (!reg->gpu_alloc)
97b1271a1316e9 Fei Shao 2021-12-06 1587 return -EINVAL;
97b1271a1316e9 Fei Shao 2021-12-06 1588
97b1271a1316e9 Fei Shao 2021-12-06 1589 /* Tear down down GPU page tables, depending on memory type. */
97b1271a1316e9 Fei Shao 2021-12-06 1590 switch (reg->gpu_alloc->type) {
97b1271a1316e9 Fei Shao 2021-12-06 1591 case KBASE_MEM_TYPE_ALIAS: /* Fall-through */
97b1271a1316e9 Fei Shao 2021-12-06 1592 case KBASE_MEM_TYPE_IMPORTED_UMM:
97b1271a1316e9 Fei Shao 2021-12-06 1593 err = kbase_mmu_teardown_pages(kctx->kbdev, &kctx->mmu,
97b1271a1316e9 Fei Shao 2021-12-06 1594 reg->start_pfn, reg->nr_pages, kctx->as_nr);
97b1271a1316e9 Fei Shao 2021-12-06 1595 break;
97b1271a1316e9 Fei Shao 2021-12-06 1596 default:
97b1271a1316e9 Fei Shao 2021-12-06 1597 err = kbase_mmu_teardown_pages(kctx->kbdev, &kctx->mmu,
97b1271a1316e9 Fei Shao 2021-12-06 1598 reg->start_pfn, kbase_reg_current_backed_size(reg),
97b1271a1316e9 Fei Shao 2021-12-06 1599 kctx->as_nr);
97b1271a1316e9 Fei Shao 2021-12-06 1600 break;
97b1271a1316e9 Fei Shao 2021-12-06 1601 }
97b1271a1316e9 Fei Shao 2021-12-06 1602
97b1271a1316e9 Fei Shao 2021-12-06 1603 /* Update tracking, and other cleanup, depending on memory type. */
97b1271a1316e9 Fei Shao 2021-12-06 1604 switch (reg->gpu_alloc->type) {
97b1271a1316e9 Fei Shao 2021-12-06 1605 case KBASE_MEM_TYPE_ALIAS:
97b1271a1316e9 Fei Shao 2021-12-06 1606 /* We mark the source allocs as unmapped from the GPU when
97b1271a1316e9 Fei Shao 2021-12-06 1607 * putting reg's allocs
97b1271a1316e9 Fei Shao 2021-12-06 1608 */
97b1271a1316e9 Fei Shao 2021-12-06 1609 break;
97b1271a1316e9 Fei Shao 2021-12-06 @1610 case KBASE_MEM_TYPE_IMPORTED_USER_BUF: {
97b1271a1316e9 Fei Shao 2021-12-06 1611 struct kbase_alloc_import_user_buf *user_buf =
97b1271a1316e9 Fei Shao 2021-12-06 1612 ®->gpu_alloc->imported.user_buf;
97b1271a1316e9 Fei Shao 2021-12-06 1613
97b1271a1316e9 Fei Shao 2021-12-06 1614 if (user_buf->current_mapping_usage_count & PINNED_ON_IMPORT) {
97b1271a1316e9 Fei Shao 2021-12-06 1615 user_buf->current_mapping_usage_count &=
97b1271a1316e9 Fei Shao 2021-12-06 1616 ~PINNED_ON_IMPORT;
97b1271a1316e9 Fei Shao 2021-12-06 1617
97b1271a1316e9 Fei Shao 2021-12-06 1618 /* The allocation could still have active mappings. */
97b1271a1316e9 Fei Shao 2021-12-06 1619 if (user_buf->current_mapping_usage_count == 0) {
97b1271a1316e9 Fei Shao 2021-12-06 1620 kbase_jd_user_buf_unmap(kctx, reg->gpu_alloc,
97b1271a1316e9 Fei Shao 2021-12-06 1621 (reg->flags & KBASE_REG_GPU_WR));
97b1271a1316e9 Fei Shao 2021-12-06 1622 }
97b1271a1316e9 Fei Shao 2021-12-06 1623 }
97b1271a1316e9 Fei Shao 2021-12-06 1624 }
97b1271a1316e9 Fei Shao 2021-12-06 1625 /* Fall-through */
97b1271a1316e9 Fei Shao 2021-12-06 1626 default:
97b1271a1316e9 Fei Shao 2021-12-06 1627 kbase_mem_phy_alloc_gpu_unmapped(reg->gpu_alloc);
97b1271a1316e9 Fei Shao 2021-12-06 1628 break;
97b1271a1316e9 Fei Shao 2021-12-06 1629 }
97b1271a1316e9 Fei Shao 2021-12-06 1630
97b1271a1316e9 Fei Shao 2021-12-06 1631 return err;
97b1271a1316e9 Fei Shao 2021-12-06 1632 }
97b1271a1316e9 Fei Shao 2021-12-06 1633
:::::: The code at line 1610 was first introduced by commit
:::::: 97b1271a1316e9353e0192e8883921e859e08446 CHROMIUM: Mali: Apply Bifrost r32p0 EAC release
:::::: TO: Fei Shao <fshao(a)chromium.org>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[tglx-devel:x86/fpu-kvm 1/6] arch/x86/kernel/fpu/xstate.c:1625:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-kvm
head: e16d6eec3c9e60abfb29d0d77f08411d326142dd
commit: 8a4ae8c80ec211646b5824b7c89d64cf7d286625 [1/6] x86/fpu: Extend fpu_xstate_prctl() with guest permissions
config: x86_64-randconfig-r035-20211213 (https://download.01.org/0day-ci/archive/20211214/202112141631.KodrezTK-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/tglx/devel.git/commit/?id...
git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
git fetch --no-tags tglx-devel x86/fpu-kvm
git checkout 8a4ae8c80ec211646b5824b7c89d64cf7d286625
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/fpu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/kernel/fpu/xstate.c:1625:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (!guest) {
^~~~~~
arch/x86/kernel/fpu/xstate.c:1637:9: note: uninitialized use occurs here
return ret;
^~~
arch/x86/kernel/fpu/xstate.c:1625:2: note: remove the 'if' if its condition is always true
if (!guest) {
^~~~~~~~~~~~
arch/x86/kernel/fpu/xstate.c:1611:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +1625 arch/x86/kernel/fpu/xstate.c
1597
1598 static int __xstate_request_perm(u64 permitted, u64 requested, bool guest)
1599 {
1600 /*
1601 * This deliberately does not exclude !XSAVES as we still might
1602 * decide to optionally context switch XCR0 or talk the silicon
1603 * vendors into extending XFD for the pre AMX states, especially
1604 * AVX512.
1605 */
1606 bool compacted = cpu_feature_enabled(X86_FEATURE_XSAVES);
1607 struct fpu *fpu = ¤t->group_leader->thread.fpu;
1608 struct fpu_state_perm *perm;
1609 unsigned int ksize, usize;
1610 u64 mask;
1611 int ret;
1612
1613 /* Check whether fully enabled */
1614 if ((permitted & requested) == requested)
1615 return 0;
1616
1617 /* Calculate the resulting kernel state size */
1618 mask = permitted | requested;
1619 ksize = xstate_calculate_size(mask, compacted);
1620
1621 /* Calculate the resulting user state size */
1622 mask &= XFEATURE_MASK_USER_SUPPORTED;
1623 usize = xstate_calculate_size(mask, false);
1624
> 1625 if (!guest) {
1626 ret = validate_sigaltstack(usize);
1627 if (ret)
1628 return ret;
1629 }
1630
1631 perm = guest ? &fpu->guest_perm : &fpu->perm;
1632 /* Pairs with the READ_ONCE() in xstate_get_group_perm() */
1633 WRITE_ONCE(perm->__state_perm, requested);
1634 /* Protected by sighand lock */
1635 perm->__state_size = ksize;
1636 perm->__user_state_size = usize;
1637 return ret;
1638 }
1639
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [RFC PATCH] KVM: x86: add kvm per-vCPU exits disable capability
by kernel test robot
Hi Kechen,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on kvm/queue]
[also build test WARNING on mst-vhost/linux-next tip/master linux/master linus/master v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kechen-Lu/KVM-x86-add-kvm-per-vC...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-randconfig-a014-20211213 (https://download.01.org/0day-ci/archive/20211214/202112141530.ZQIO4PKE-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/08f20df47a09e327aee3e73a8d7c77b1f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kechen-Lu/KVM-x86-add-kvm-per-vCPU-exits-disable-capability/20211214-113446
git checkout 08f20df47a09e327aee3e73a8d7c77b1ffc01bc0
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kvm_host.h:38,
from arch/x86/kvm/x86.c:19:
arch/x86/kvm/x86.c: In function 'kvm_vm_ioctl_enable_cap':
>> include/uapi/linux/kvm.h:801:51: warning: left shift count >= width of type [-Wshift-count-overflow]
801 | #define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
| ^~
include/uapi/linux/kvm.h:806:12: note: in expansion of macro 'KVM_X86_DISABLE_EXITS_PER_VCPU'
806 | KVM_X86_DISABLE_EXITS_PER_VCPU)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:5775:23: note: in expansion of macro 'KVM_X86_DISABLE_VALID_EXITS'
5775 | if (cap->args[0] & ~KVM_X86_DISABLE_VALID_EXITS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/uapi/linux/kvm.h:801:51: warning: left shift count >= width of type [-Wshift-count-overflow]
801 | #define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
| ^~
arch/x86/kvm/x86.c:5787:23: note: in expansion of macro 'KVM_X86_DISABLE_EXITS_PER_VCPU'
5787 | if ((cap->args[0] & KVM_X86_DISABLE_EXITS_PER_VCPU) &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +801 include/uapi/linux/kvm.h
796
797 #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
798 #define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
799 #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
800 #define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3)
> 801 #define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
802 #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
803 KVM_X86_DISABLE_EXITS_HLT | \
804 KVM_X86_DISABLE_EXITS_PAUSE | \
805 KVM_X86_DISABLE_EXITS_CSTATE| \
806 KVM_X86_DISABLE_EXITS_PER_VCPU)
807
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [RFC PATCH] KVM: x86: add kvm per-vCPU exits disable capability
by kernel test robot
Hi Kechen,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on kvm/queue]
[also build test WARNING on mst-vhost/linux-next tip/master linux/master linus/master v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kechen-Lu/KVM-x86-add-kvm-per-vC...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-buildonly-randconfig-r004-20211213 (https://download.01.org/0day-ci/archive/20211214/202112141509.dBVwl6Ux-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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://github.com/0day-ci/linux/commit/08f20df47a09e327aee3e73a8d7c77b1f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kechen-Lu/KVM-x86-add-kvm-per-vCPU-exits-disable-capability/20211214-113446
git checkout 08f20df47a09e327aee3e73a8d7c77b1ffc01bc0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/kvm/x86.c:5775:23: warning: shift count >= width of type [-Wshift-count-overflow]
if (cap->args[0] & ~KVM_X86_DISABLE_VALID_EXITS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/kvm.h:806:12: note: expanded from macro 'KVM_X86_DISABLE_VALID_EXITS'
KVM_X86_DISABLE_EXITS_PER_VCPU)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/kvm.h:801:51: note: expanded from macro 'KVM_X86_DISABLE_EXITS_PER_VCPU'
#define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
^ ~~
arch/x86/kvm/x86.c:5787:23: warning: shift count >= width of type [-Wshift-count-overflow]
if ((cap->args[0] & KVM_X86_DISABLE_EXITS_PER_VCPU) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/kvm.h:801:51: note: expanded from macro 'KVM_X86_DISABLE_EXITS_PER_VCPU'
#define KVM_X86_DISABLE_EXITS_PER_VCPU (1UL << 63)
^ ~~
arch/x86/kvm/x86.c:2335:19: warning: unused function 'gtod_is_based_on_tsc' [-Wunused-function]
static inline int gtod_is_based_on_tsc(int mode)
^
3 warnings generated.
vim +5775 arch/x86/kvm/x86.c
23d43cf998275bc Christoffer Dall 2012-07-24 5724
e5d83c74a5800c2 Paolo Bonzini 2017-02-16 5725 int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
90de4a1875180f8 Nadav Amit 2015-04-13 5726 struct kvm_enable_cap *cap)
90de4a1875180f8 Nadav Amit 2015-04-13 5727 {
90de4a1875180f8 Nadav Amit 2015-04-13 5728 int r;
90de4a1875180f8 Nadav Amit 2015-04-13 5729
90de4a1875180f8 Nadav Amit 2015-04-13 5730 if (cap->flags)
90de4a1875180f8 Nadav Amit 2015-04-13 5731 return -EINVAL;
90de4a1875180f8 Nadav Amit 2015-04-13 5732
90de4a1875180f8 Nadav Amit 2015-04-13 5733 switch (cap->cap) {
90de4a1875180f8 Nadav Amit 2015-04-13 5734 case KVM_CAP_DISABLE_QUIRKS:
90de4a1875180f8 Nadav Amit 2015-04-13 5735 kvm->arch.disabled_quirks = cap->args[0];
90de4a1875180f8 Nadav Amit 2015-04-13 5736 r = 0;
90de4a1875180f8 Nadav Amit 2015-04-13 5737 break;
49df6397edfc5a8 Steve Rutherford 2015-07-29 5738 case KVM_CAP_SPLIT_IRQCHIP: {
49df6397edfc5a8 Steve Rutherford 2015-07-29 5739 mutex_lock(&kvm->lock);
b053b2aef25d007 Steve Rutherford 2015-07-29 5740 r = -EINVAL;
b053b2aef25d007 Steve Rutherford 2015-07-29 5741 if (cap->args[0] > MAX_NR_RESERVED_IOAPIC_PINS)
b053b2aef25d007 Steve Rutherford 2015-07-29 5742 goto split_irqchip_unlock;
49df6397edfc5a8 Steve Rutherford 2015-07-29 5743 r = -EEXIST;
49df6397edfc5a8 Steve Rutherford 2015-07-29 5744 if (irqchip_in_kernel(kvm))
49df6397edfc5a8 Steve Rutherford 2015-07-29 5745 goto split_irqchip_unlock;
557abc40d121358 Paolo Bonzini 2016-06-13 5746 if (kvm->created_vcpus)
49df6397edfc5a8 Steve Rutherford 2015-07-29 5747 goto split_irqchip_unlock;
49df6397edfc5a8 Steve Rutherford 2015-07-29 5748 r = kvm_setup_empty_irq_routing(kvm);
5c0aea0e8d98e38 David Hildenbrand 2017-04-28 5749 if (r)
49df6397edfc5a8 Steve Rutherford 2015-07-29 5750 goto split_irqchip_unlock;
49df6397edfc5a8 Steve Rutherford 2015-07-29 5751 /* Pairs with irqchip_in_kernel. */
49df6397edfc5a8 Steve Rutherford 2015-07-29 5752 smp_wmb();
49776faf93f8074 Radim Krčmář 2016-12-16 5753 kvm->arch.irqchip_mode = KVM_IRQCHIP_SPLIT;
b053b2aef25d007 Steve Rutherford 2015-07-29 5754 kvm->arch.nr_reserved_ioapic_pins = cap->args[0];
ef8b4b7203682cc Paolo Bonzini 2021-11-30 5755 kvm_request_apicv_update(kvm, true, APICV_INHIBIT_REASON_ABSENT);
49df6397edfc5a8 Steve Rutherford 2015-07-29 5756 r = 0;
49df6397edfc5a8 Steve Rutherford 2015-07-29 5757 split_irqchip_unlock:
49df6397edfc5a8 Steve Rutherford 2015-07-29 5758 mutex_unlock(&kvm->lock);
49df6397edfc5a8 Steve Rutherford 2015-07-29 5759 break;
49df6397edfc5a8 Steve Rutherford 2015-07-29 5760 }
3713131345fbea2 Radim Krčmář 2016-07-12 5761 case KVM_CAP_X2APIC_API:
3713131345fbea2 Radim Krčmář 2016-07-12 5762 r = -EINVAL;
3713131345fbea2 Radim Krčmář 2016-07-12 5763 if (cap->args[0] & ~KVM_X2APIC_API_VALID_FLAGS)
3713131345fbea2 Radim Krčmář 2016-07-12 5764 break;
3713131345fbea2 Radim Krčmář 2016-07-12 5765
3713131345fbea2 Radim Krčmář 2016-07-12 5766 if (cap->args[0] & KVM_X2APIC_API_USE_32BIT_IDS)
3713131345fbea2 Radim Krčmář 2016-07-12 5767 kvm->arch.x2apic_format = true;
c519265f2aa348b Radim Krčmář 2016-07-12 5768 if (cap->args[0] & KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK)
c519265f2aa348b Radim Krčmář 2016-07-12 5769 kvm->arch.x2apic_broadcast_quirk_disabled = true;
3713131345fbea2 Radim Krčmář 2016-07-12 5770
3713131345fbea2 Radim Krčmář 2016-07-12 5771 r = 0;
3713131345fbea2 Radim Krčmář 2016-07-12 5772 break;
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5773 case KVM_CAP_X86_DISABLE_EXITS:
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5774 r = -EINVAL;
4d5422cea3b61f1 Wanpeng Li 2018-03-12 @5775 if (cap->args[0] & ~KVM_X86_DISABLE_VALID_EXITS)
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5776 break;
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5777
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5778 if ((cap->args[0] & KVM_X86_DISABLE_EXITS_MWAIT) &&
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5779 kvm_can_mwait_in_guest())
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5780 kvm->arch.mwait_in_guest = true;
766d3571d8e50d3 Michael S. Tsirkin 2018-06-08 5781 if (cap->args[0] & KVM_X86_DISABLE_EXITS_HLT)
caa057a2cad647f Wanpeng Li 2018-03-12 5782 kvm->arch.hlt_in_guest = true;
b31c114b82b2b55 Wanpeng Li 2018-03-12 5783 if (cap->args[0] & KVM_X86_DISABLE_EXITS_PAUSE)
b31c114b82b2b55 Wanpeng Li 2018-03-12 5784 kvm->arch.pause_in_guest = true;
b51700632e0e532 Wanpeng Li 2019-05-21 5785 if (cap->args[0] & KVM_X86_DISABLE_EXITS_CSTATE)
b51700632e0e532 Wanpeng Li 2019-05-21 5786 kvm->arch.cstate_in_guest = true;
08f20df47a09e32 Kechen Lu 2021-12-13 5787 if ((cap->args[0] & KVM_X86_DISABLE_EXITS_PER_VCPU) &&
08f20df47a09e32 Kechen Lu 2021-12-13 5788 cap->args[1])
08f20df47a09e32 Kechen Lu 2021-12-13 5789 kvm->arch.exits_disable_vcpu_mask = cap->args[1];
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5790 r = 0;
4d5422cea3b61f1 Wanpeng Li 2018-03-12 5791 break;
6fbbde9a1969dfb Drew Schmitt 2018-08-20 5792 case KVM_CAP_MSR_PLATFORM_INFO:
6fbbde9a1969dfb Drew Schmitt 2018-08-20 5793 kvm->arch.guest_can_read_msr_platform_info = cap->args[0];
6fbbde9a1969dfb Drew Schmitt 2018-08-20 5794 r = 0;
c4f55198c7c2b87 Jim Mattson 2018-10-16 5795 break;
c4f55198c7c2b87 Jim Mattson 2018-10-16 5796 case KVM_CAP_EXCEPTION_PAYLOAD:
c4f55198c7c2b87 Jim Mattson 2018-10-16 5797 kvm->arch.exception_payload_enabled = cap->args[0];
c4f55198c7c2b87 Jim Mattson 2018-10-16 5798 r = 0;
6fbbde9a1969dfb Drew Schmitt 2018-08-20 5799 break;
1ae099540e8c7f1 Alexander Graf 2020-09-25 5800 case KVM_CAP_X86_USER_SPACE_MSR:
1ae099540e8c7f1 Alexander Graf 2020-09-25 5801 kvm->arch.user_space_msr_mask = cap->args[0];
1ae099540e8c7f1 Alexander Graf 2020-09-25 5802 r = 0;
1ae099540e8c7f1 Alexander Graf 2020-09-25 5803 break;
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5804 case KVM_CAP_X86_BUS_LOCK_EXIT:
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5805 r = -EINVAL;
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5806 if (cap->args[0] & ~KVM_BUS_LOCK_DETECTION_VALID_MODE)
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5807 break;
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5808
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5809 if ((cap->args[0] & KVM_BUS_LOCK_DETECTION_OFF) &&
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5810 (cap->args[0] & KVM_BUS_LOCK_DETECTION_EXIT))
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5811 break;
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5812
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5813 if (kvm_has_bus_lock_exit &&
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5814 cap->args[0] & KVM_BUS_LOCK_DETECTION_EXIT)
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5815 kvm->arch.bus_lock_detection_enabled = true;
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5816 r = 0;
fe6b6bc802b4008 Chenyi Qiang 2020-11-06 5817 break;
fe7e948837f312d Sean Christopherson 2021-04-12 5818 #ifdef CONFIG_X86_SGX_KVM
fe7e948837f312d Sean Christopherson 2021-04-12 5819 case KVM_CAP_SGX_ATTRIBUTE: {
fe7e948837f312d Sean Christopherson 2021-04-12 5820 unsigned long allowed_attributes = 0;
fe7e948837f312d Sean Christopherson 2021-04-12 5821
fe7e948837f312d Sean Christopherson 2021-04-12 5822 r = sgx_set_attribute(&allowed_attributes, cap->args[0]);
fe7e948837f312d Sean Christopherson 2021-04-12 5823 if (r)
fe7e948837f312d Sean Christopherson 2021-04-12 5824 break;
fe7e948837f312d Sean Christopherson 2021-04-12 5825
fe7e948837f312d Sean Christopherson 2021-04-12 5826 /* KVM only supports the PROVISIONKEY privileged attribute. */
fe7e948837f312d Sean Christopherson 2021-04-12 5827 if ((allowed_attributes & SGX_ATTR_PROVISIONKEY) &&
fe7e948837f312d Sean Christopherson 2021-04-12 5828 !(allowed_attributes & ~SGX_ATTR_PROVISIONKEY))
fe7e948837f312d Sean Christopherson 2021-04-12 5829 kvm->arch.sgx_provisioning_allowed = true;
fe7e948837f312d Sean Christopherson 2021-04-12 5830 else
fe7e948837f312d Sean Christopherson 2021-04-12 5831 r = -EINVAL;
fe7e948837f312d Sean Christopherson 2021-04-12 5832 break;
fe7e948837f312d Sean Christopherson 2021-04-12 5833 }
fe7e948837f312d Sean Christopherson 2021-04-12 5834 #endif
54526d1fd59338f Nathan Tempelman 2021-04-08 5835 case KVM_CAP_VM_COPY_ENC_CONTEXT_FROM:
54526d1fd59338f Nathan Tempelman 2021-04-08 5836 r = -EINVAL;
54526d1fd59338f Nathan Tempelman 2021-04-08 5837 if (kvm_x86_ops.vm_copy_enc_context_from)
54526d1fd59338f Nathan Tempelman 2021-04-08 5838 r = kvm_x86_ops.vm_copy_enc_context_from(kvm, cap->args[0]);
54526d1fd59338f Nathan Tempelman 2021-04-08 5839 return r;
b56639318bb2be6 Peter Gonda 2021-10-21 5840 case KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM:
b56639318bb2be6 Peter Gonda 2021-10-21 5841 r = -EINVAL;
b56639318bb2be6 Peter Gonda 2021-10-21 5842 if (kvm_x86_ops.vm_move_enc_context_from)
b56639318bb2be6 Peter Gonda 2021-10-21 5843 r = kvm_x86_ops.vm_move_enc_context_from(
b56639318bb2be6 Peter Gonda 2021-10-21 5844 kvm, cap->args[0]);
b56639318bb2be6 Peter Gonda 2021-10-21 5845 return r;
0dbb11230437895 Ashish Kalra 2021-06-08 5846 case KVM_CAP_EXIT_HYPERCALL:
0dbb11230437895 Ashish Kalra 2021-06-08 5847 if (cap->args[0] & ~KVM_EXIT_HYPERCALL_VALID_MASK) {
0dbb11230437895 Ashish Kalra 2021-06-08 5848 r = -EINVAL;
0dbb11230437895 Ashish Kalra 2021-06-08 5849 break;
0dbb11230437895 Ashish Kalra 2021-06-08 5850 }
0dbb11230437895 Ashish Kalra 2021-06-08 5851 kvm->arch.hypercall_exit_enabled = cap->args[0];
0dbb11230437895 Ashish Kalra 2021-06-08 5852 r = 0;
0dbb11230437895 Ashish Kalra 2021-06-08 5853 break;
19238e75bd8ed8f Aaron Lewis 2021-05-10 5854 case KVM_CAP_EXIT_ON_EMULATION_FAILURE:
19238e75bd8ed8f Aaron Lewis 2021-05-10 5855 r = -EINVAL;
19238e75bd8ed8f Aaron Lewis 2021-05-10 5856 if (cap->args[0] & ~1)
19238e75bd8ed8f Aaron Lewis 2021-05-10 5857 break;
19238e75bd8ed8f Aaron Lewis 2021-05-10 5858 kvm->arch.exit_on_emulation_error = cap->args[0];
19238e75bd8ed8f Aaron Lewis 2021-05-10 5859 r = 0;
19238e75bd8ed8f Aaron Lewis 2021-05-10 5860 break;
90de4a1875180f8 Nadav Amit 2015-04-13 5861 default:
90de4a1875180f8 Nadav Amit 2015-04-13 5862 r = -EINVAL;
90de4a1875180f8 Nadav Amit 2015-04-13 5863 break;
90de4a1875180f8 Nadav Amit 2015-04-13 5864 }
90de4a1875180f8 Nadav Amit 2015-04-13 5865 return r;
90de4a1875180f8 Nadav Amit 2015-04-13 5866 }
90de4a1875180f8 Nadav Amit 2015-04-13 5867
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v2 1/2] block: Avoid sleeping function called from invalid context bug
by kernel test robot
Hi Wander,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on axboe-block/for-next]
[also build test ERROR on linux/master linus/master v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Wander-Lairson-Costa/Fix-warning...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20211214/202112141554.2175ujH7-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/e53f7f8c1ce0b19fef6164247fea08d17...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Wander-Lairson-Costa/Fix-warnings-in-blktrace/20211213-204207
git checkout e53f7f8c1ce0b19fef6164247fea08d17d5f771d
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
block/blk-cgroup.c: In function 'blk_cgroup_bio_start':
>> block/blk-cgroup.c:1915:8: error: implicit declaration of function 'get_cpu_light'; did you mean 'em_cpu_get'? [-Werror=implicit-function-declaration]
1915 | cpu = get_cpu_light();
| ^~~~~~~~~~~~~
| em_cpu_get
>> block/blk-cgroup.c:1932:2: error: implicit declaration of function 'put_cpu_light'; did you mean 'fput_light'? [-Werror=implicit-function-declaration]
1932 | put_cpu_light();
| ^~~~~~~~~~~~~
| fput_light
cc1: some warnings being treated as errors
vim +1915 block/blk-cgroup.c
1908
1909 void blk_cgroup_bio_start(struct bio *bio)
1910 {
1911 int rwd = blk_cgroup_io_type(bio), cpu;
1912 struct blkg_iostat_set *bis;
1913 unsigned long flags;
1914
> 1915 cpu = get_cpu_light();
1916 bis = per_cpu_ptr(bio->bi_blkg->iostat_cpu, cpu);
1917 flags = u64_stats_update_begin_irqsave(&bis->sync);
1918
1919 /*
1920 * If the bio is flagged with BIO_CGROUP_ACCT it means this is a split
1921 * bio and we would have already accounted for the size of the bio.
1922 */
1923 if (!bio_flagged(bio, BIO_CGROUP_ACCT)) {
1924 bio_set_flag(bio, BIO_CGROUP_ACCT);
1925 bis->cur.bytes[rwd] += bio->bi_iter.bi_size;
1926 }
1927 bis->cur.ios[rwd]++;
1928
1929 u64_stats_update_end_irqrestore(&bis->sync, flags);
1930 if (cgroup_subsys_on_dfl(io_cgrp_subsys))
1931 cgroup_rstat_updated(bio->bi_blkg->blkcg->css.cgroup, cpu);
> 1932 put_cpu_light();
1933 }
1934
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week