Re: [PATCH net 1/3] bnxt_en: extend RTNL to VF check in devlink driver_reinit
by kernel test robot
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt_en-Bug-fixes/2...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 1aa3b2207e889a948049c9a8016cedb0218c2389
config: mips-randconfig-r031-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/b17bc036418692ffb8055b7cbcdff979e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Chan/bnxt_en-Bug-fixes/20211115-154005
git checkout b17bc036418692ffb8055b7cbcdff979ec378e37
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/
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 >>):
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:363:62: warning: format specifies type 'char' but the argument has type 'int' [-Wformat]
netdev_err(bp->dev, "Unexpected live patch error: %hhd\n", err);
~~~~ ^~~
%d
>> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:445:48: error: no member named 'sriov_cfg' in 'struct bnxt'
if (BNXT_PF(bp) && (bp->pf.active_vfs || bp->sriov_cfg)) {
~~ ^
1 warning and 1 error generated.
vim +445 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
433
434 static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
435 enum devlink_reload_action action,
436 enum devlink_reload_limit limit,
437 struct netlink_ext_ack *extack)
438 {
439 struct bnxt *bp = bnxt_get_bp_from_dl(dl);
440 int rc = 0;
441
442 switch (action) {
443 case DEVLINK_RELOAD_ACTION_DRIVER_REINIT: {
444 rtnl_lock();
> 445 if (BNXT_PF(bp) && (bp->pf.active_vfs || bp->sriov_cfg)) {
446 NL_SET_ERR_MSG_MOD(extack,
447 "reload is unsupported while VFs are allocated or being configured");
448 rtnl_unlock();
449 return -EOPNOTSUPP;
450 }
451 if (bp->dev->reg_state == NETREG_UNREGISTERED) {
452 rtnl_unlock();
453 return -ENODEV;
454 }
455 bnxt_ulp_stop(bp);
456 if (netif_running(bp->dev)) {
457 rc = bnxt_close_nic(bp, true, true);
458 if (rc) {
459 NL_SET_ERR_MSG_MOD(extack, "Failed to close");
460 dev_close(bp->dev);
461 rtnl_unlock();
462 break;
463 }
464 }
465 bnxt_vf_reps_free(bp);
466 rc = bnxt_hwrm_func_drv_unrgtr(bp);
467 if (rc) {
468 NL_SET_ERR_MSG_MOD(extack, "Failed to deregister");
469 if (netif_running(bp->dev))
470 dev_close(bp->dev);
471 rtnl_unlock();
472 break;
473 }
474 bnxt_cancel_reservations(bp, false);
475 bnxt_free_ctx_mem(bp);
476 kfree(bp->ctx);
477 bp->ctx = NULL;
478 break;
479 }
480 case DEVLINK_RELOAD_ACTION_FW_ACTIVATE: {
481 if (limit == DEVLINK_RELOAD_LIMIT_NO_RESET)
482 return bnxt_dl_livepatch_activate(bp, extack);
483 if (~bp->fw_cap & BNXT_FW_CAP_HOT_RESET) {
484 NL_SET_ERR_MSG_MOD(extack, "Device not capable, requires reboot");
485 return -EOPNOTSUPP;
486 }
487 if (!bnxt_hwrm_reset_permitted(bp)) {
488 NL_SET_ERR_MSG_MOD(extack,
489 "Reset denied by firmware, it may be inhibited by remote driver");
490 return -EPERM;
491 }
492 rtnl_lock();
493 if (bp->dev->reg_state == NETREG_UNREGISTERED) {
494 rtnl_unlock();
495 return -ENODEV;
496 }
497 if (netif_running(bp->dev))
498 set_bit(BNXT_STATE_FW_ACTIVATE, &bp->state);
499 rc = bnxt_hwrm_firmware_reset(bp->dev,
500 FW_RESET_REQ_EMBEDDED_PROC_TYPE_CHIP,
501 FW_RESET_REQ_SELFRST_STATUS_SELFRSTASAP,
502 FW_RESET_REQ_FLAGS_RESET_GRACEFUL |
503 FW_RESET_REQ_FLAGS_FW_ACTIVATION);
504 if (rc) {
505 NL_SET_ERR_MSG_MOD(extack, "Failed to activate firmware");
506 clear_bit(BNXT_STATE_FW_ACTIVATE, &bp->state);
507 rtnl_unlock();
508 }
509 break;
510 }
511 default:
512 rc = -EOPNOTSUPP;
513 }
514
515 return rc;
516 }
517
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[toke:xdp-traffic-gen-01 4/5] net/bpf/test_run.c:117: undefined reference to `page_pool_task_get'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-traffic-gen-01
head: 3aaa72cb5c608f64b941ccc8d69caff51e89f67a
commit: f0b693d10bc20904d60329b0a202d0aa2c666e8d [4/5] bpf: Add XDP_REDIRECT support to XDP for bpf_prog_run()
config: x86_64-randconfig-a013-20211116 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/commit/?id...
git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
git fetch --no-tags toke xdp-traffic-gen-01
git checkout f0b693d10bc20904d60329b0a202d0aa2c666e8d
# save the attached .config 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 >>):
vmlinux.o: warning: objtool: do_machine_check()+0x6d1: call to queue_task_work() leaves .noinstr.text section
vmlinux.o: warning: objtool: enter_from_user_mode()+0x4e: call to on_thread_stack() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode()+0x53: call to on_thread_stack() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare()+0x4e: call to on_thread_stack() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_enter_from_user_mode()+0x4e: call to on_thread_stack() leaves .noinstr.text section
ld: net/bpf/test_run.o: in function `bpf_test_run_xdp_init':
>> net/bpf/test_run.c:117: undefined reference to `page_pool_task_get'
vim +117 net/bpf/test_run.c
111
112 static int bpf_test_run_xdp_init(struct bpf_test_timer *t,
113 struct bpf_prog *prog, struct xdp_buff *orig_ctx)
114 {
115 struct page_pool *pp;
116
> 117 pp = page_pool_task_get(current);
118 if (IS_ERR(pp))
119 return PTR_ERR(pp);
120
121 t->xdp.pp = pp;
122
123 /* We create a 'fake' RXQ referencing the original dev, but with an
124 * xdp_mem_info pointing to our page_pool
125 */
126 xdp_rxq_info_reg(&t->xdp.rxq, orig_ctx->rxq->dev, 0, 0);
127 t->xdp.rxq.mem.type = MEM_TYPE_PAGE_POOL;
128 t->xdp.rxq.mem.id = pp->xdp_mem_id;
129
130 return 0;
131 }
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [RFC][PATCH 1/5] fsverity: Introduce fsverity_get_file_digest()
by kernel test robot
Hi Roberto,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on hnaz-mm/master]
[also build test ERROR on linus/master fscrypt/fsverity v5.16-rc1]
[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/Roberto-Sassu/shmem-fsverity-Pre...
base: https://github.com/hnaz/linux-mm master
config: i386-randconfig-c021-20211116 (attached as .config)
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/b954223b18edd435d0bc93893ee4fa0fe...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Roberto-Sassu/shmem-fsverity-Prepare-for-mandatory-integrity-enforcement/20211112-204742
git checkout b954223b18edd435d0bc93893ee4fa0fe47261d2
# save the attached .config 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 >>):
ld: fs/verity/open.o: in function `fsverity_get_file_digest':
>> fs/verity/open.c:232: undefined reference to `hash_algo_name'
>> ld: fs/verity/open.c:237: undefined reference to `hash_digest_size'
ld: fs/verity/open.c:242: undefined reference to `hash_digest_size'
vim +232 fs/verity/open.c
220
221 /*
222 * Copy the file digest and associated algorithm taken from the passed
223 * fsverity_info structure to the locations supplied by the caller.
224 *
225 * Return: the digest size on success, a negative value on error
226 */
227 ssize_t fsverity_get_file_digest(struct fsverity_info *info, u8 *buf,
228 size_t bufsize, enum hash_algo *algo)
229 {
230 enum hash_algo a;
231
> 232 a = match_string(hash_algo_name, HASH_ALGO__LAST,
233 info->tree_params.hash_alg->name);
234 if (a < 0)
235 return a;
236
> 237 if (bufsize < hash_digest_size[a])
238 return -ERANGE;
239
240 *algo = a;
241 memcpy(buf, info->file_digest, hash_digest_size[*algo]);
242 return hash_digest_size[*algo];
243 }
244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c8c109546a19613d323a319d0c921cb1f317e629
commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
date: 4 weeks ago
config: i386-buildonly-randconfig-r005-20211114 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
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 >>):
>> drivers/platform/x86/thinkpad_acpi.c:4475:35: error: unused variable 'fwbug_cards_ids' [-Werror,-Wunused-const-variable]
static const struct pci_device_id fwbug_cards_ids[] __initconst = {
^
1 error generated.
vim +/fwbug_cards_ids +4475 drivers/platform/x86/thinkpad_acpi.c
f7db839fccf087 Jiaxun Yang 2019-03-07 4474
f7db839fccf087 Jiaxun Yang 2019-03-07 @4475 static const struct pci_device_id fwbug_cards_ids[] __initconst = {
f7db839fccf087 Jiaxun Yang 2019-03-07 4476 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
f7db839fccf087 Jiaxun Yang 2019-03-07 4477 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
f7db839fccf087 Jiaxun Yang 2019-03-07 4478 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
f7db839fccf087 Jiaxun Yang 2019-03-07 4479 {}
f7db839fccf087 Jiaxun Yang 2019-03-07 4480 };
f7db839fccf087 Jiaxun Yang 2019-03-07 4481
f7db839fccf087 Jiaxun Yang 2019-03-07 4482
:::::: The code at line 4475 was first introduced by commit
:::::: f7db839fccf087664e5587966220821289b6a9cb platform/x86: thinkpad_acpi: Disable Bluetooth for some machines
:::::: TO: Jiaxun Yang <jiaxun.yang(a)flygoat.com>
:::::: CC: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/mfd/arizona-i2c.c:108:27: sparse: sparse: symbol 'arizona_i2c_of_match' was not declared. Should it be static?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 3f65555c417c9c2eee235a137b5e5088a65439e4 mfd: arizona: Split of_match table into I2C and SPI versions
date: 11 days ago
config: sparc64-randconfig-s031-20211116 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3f65555c417c9c2eee235a137b5e5088a65439e4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/mfd/
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/mfd/arizona-i2c.c:108:27: sparse: sparse: symbol 'arizona_i2c_of_match' was not declared. Should it be static?
--
>> drivers/mfd/arizona-spi.c:229:27: sparse: sparse: symbol 'arizona_spi_of_match' was not declared. Should it be static?
vim +/arizona_i2c_of_match +108 drivers/mfd/arizona-i2c.c
106
107 #ifdef CONFIG_OF
> 108 const struct of_device_id arizona_i2c_of_match[] = {
109 { .compatible = "wlf,wm5102", .data = (void *)WM5102 },
110 { .compatible = "wlf,wm5110", .data = (void *)WM5110 },
111 { .compatible = "wlf,wm8280", .data = (void *)WM8280 },
112 { .compatible = "wlf,wm8997", .data = (void *)WM8997 },
113 { .compatible = "wlf,wm8998", .data = (void *)WM8998 },
114 { .compatible = "wlf,wm1814", .data = (void *)WM1814 },
115 {},
116 };
117 #endif
118
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array offset 'cpu_port_index' after use.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: debe436e77c72fcee804fb867f275e6d31aa999c
commit: 5654ec78dd7e64b1e04777b24007344329e6a63b net: dsa: qca8k: rework rgmii delay logic and scan for cpu port 6
config: i386-randconfig-m021-20211025 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/dsa/qca8k.c:944 qca8k_parse_port_config() error: testing array offset 'cpu_port_index' after use.
vim +/cpu_port_index +944 drivers/net/dsa/qca8k.c
6c43809bf1bee7 Ansuel Smith 2021-10-14 934 static int
6c43809bf1bee7 Ansuel Smith 2021-10-14 935 qca8k_parse_port_config(struct qca8k_priv *priv)
6c43809bf1bee7 Ansuel Smith 2021-10-14 936 {
5654ec78dd7e64 Ansuel Smith 2021-10-14 937 int port, cpu_port_index = 0, ret;
6c43809bf1bee7 Ansuel Smith 2021-10-14 938 struct device_node *port_dn;
6c43809bf1bee7 Ansuel Smith 2021-10-14 939 phy_interface_t mode;
6c43809bf1bee7 Ansuel Smith 2021-10-14 940 struct dsa_port *dp;
5654ec78dd7e64 Ansuel Smith 2021-10-14 941 u32 delay;
6c43809bf1bee7 Ansuel Smith 2021-10-14 942
6c43809bf1bee7 Ansuel Smith 2021-10-14 943 /* We have 2 CPU port. Check them */
5654ec78dd7e64 Ansuel Smith 2021-10-14 @944 for (port = 0; port < QCA8K_NUM_PORTS && cpu_port_index < QCA8K_NUM_CPU_PORTS; port++) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Assume cpu_port_index = QCA8K_NUM_CPU_PORTS - 1;
6c43809bf1bee7 Ansuel Smith 2021-10-14 945 /* Skip every other port */
6c43809bf1bee7 Ansuel Smith 2021-10-14 946 if (port != 0 && port != 6)
6c43809bf1bee7 Ansuel Smith 2021-10-14 947 continue;
6c43809bf1bee7 Ansuel Smith 2021-10-14 948
6c43809bf1bee7 Ansuel Smith 2021-10-14 949 dp = dsa_to_port(priv->ds, port);
6c43809bf1bee7 Ansuel Smith 2021-10-14 950 port_dn = dp->dn;
5654ec78dd7e64 Ansuel Smith 2021-10-14 951 cpu_port_index++;
^^^^^^^^^^^^^^^^^
cpu_port_index is now out of bounds.
6c43809bf1bee7 Ansuel Smith 2021-10-14 952
6c43809bf1bee7 Ansuel Smith 2021-10-14 953 if (!of_device_is_available(port_dn))
6c43809bf1bee7 Ansuel Smith 2021-10-14 954 continue;
6c43809bf1bee7 Ansuel Smith 2021-10-14 955
6c43809bf1bee7 Ansuel Smith 2021-10-14 956 ret = of_get_phy_mode(port_dn, &mode);
6c43809bf1bee7 Ansuel Smith 2021-10-14 957 if (ret)
6c43809bf1bee7 Ansuel Smith 2021-10-14 958 continue;
6c43809bf1bee7 Ansuel Smith 2021-10-14 959
5654ec78dd7e64 Ansuel Smith 2021-10-14 960 switch (mode) {
5654ec78dd7e64 Ansuel Smith 2021-10-14 961 case PHY_INTERFACE_MODE_RGMII:
5654ec78dd7e64 Ansuel Smith 2021-10-14 962 case PHY_INTERFACE_MODE_RGMII_ID:
5654ec78dd7e64 Ansuel Smith 2021-10-14 963 case PHY_INTERFACE_MODE_RGMII_TXID:
5654ec78dd7e64 Ansuel Smith 2021-10-14 964 case PHY_INTERFACE_MODE_RGMII_RXID:
5654ec78dd7e64 Ansuel Smith 2021-10-14 965 delay = 0;
5654ec78dd7e64 Ansuel Smith 2021-10-14 966
5654ec78dd7e64 Ansuel Smith 2021-10-14 967 if (!of_property_read_u32(port_dn, "tx-internal-delay-ps", &delay))
5654ec78dd7e64 Ansuel Smith 2021-10-14 968 /* Switch regs accept value in ns, convert ps to ns */
5654ec78dd7e64 Ansuel Smith 2021-10-14 969 delay = delay / 1000;
5654ec78dd7e64 Ansuel Smith 2021-10-14 970 else if (mode == PHY_INTERFACE_MODE_RGMII_ID ||
5654ec78dd7e64 Ansuel Smith 2021-10-14 971 mode == PHY_INTERFACE_MODE_RGMII_TXID)
5654ec78dd7e64 Ansuel Smith 2021-10-14 972 delay = 1;
5654ec78dd7e64 Ansuel Smith 2021-10-14 973
5654ec78dd7e64 Ansuel Smith 2021-10-14 974 if (delay > QCA8K_MAX_DELAY) {
5654ec78dd7e64 Ansuel Smith 2021-10-14 975 dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to the max value");
5654ec78dd7e64 Ansuel Smith 2021-10-14 976 delay = 3;
5654ec78dd7e64 Ansuel Smith 2021-10-14 977 }
5654ec78dd7e64 Ansuel Smith 2021-10-14 978
5654ec78dd7e64 Ansuel Smith 2021-10-14 979 priv->rgmii_tx_delay[cpu_port_index] = delay;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Out of bounds
5654ec78dd7e64 Ansuel Smith 2021-10-14 980
5654ec78dd7e64 Ansuel Smith 2021-10-14 981 delay = 0;
5654ec78dd7e64 Ansuel Smith 2021-10-14 982
5654ec78dd7e64 Ansuel Smith 2021-10-14 983 if (!of_property_read_u32(port_dn, "rx-internal-delay-ps", &delay))
5654ec78dd7e64 Ansuel Smith 2021-10-14 984 /* Switch regs accept value in ns, convert ps to ns */
5654ec78dd7e64 Ansuel Smith 2021-10-14 985 delay = delay / 1000;
5654ec78dd7e64 Ansuel Smith 2021-10-14 986 else if (mode == PHY_INTERFACE_MODE_RGMII_ID ||
5654ec78dd7e64 Ansuel Smith 2021-10-14 987 mode == PHY_INTERFACE_MODE_RGMII_RXID)
5654ec78dd7e64 Ansuel Smith 2021-10-14 988 delay = 2;
5654ec78dd7e64 Ansuel Smith 2021-10-14 989
5654ec78dd7e64 Ansuel Smith 2021-10-14 990 if (delay > QCA8K_MAX_DELAY) {
5654ec78dd7e64 Ansuel Smith 2021-10-14 991 dev_err(priv->dev, "rgmii rx delay is limited to a max value of 3ns, setting to the max value");
5654ec78dd7e64 Ansuel Smith 2021-10-14 992 delay = 3;
5654ec78dd7e64 Ansuel Smith 2021-10-14 993 }
5654ec78dd7e64 Ansuel Smith 2021-10-14 994
5654ec78dd7e64 Ansuel Smith 2021-10-14 995 priv->rgmii_rx_delay[cpu_port_index] = delay;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Out of bounds
5654ec78dd7e64 Ansuel Smith 2021-10-14 996
5654ec78dd7e64 Ansuel Smith 2021-10-14 997 break;
5654ec78dd7e64 Ansuel Smith 2021-10-14 998 case PHY_INTERFACE_MODE_SGMII:
6c43809bf1bee7 Ansuel Smith 2021-10-14 999 if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge"))
6c43809bf1bee7 Ansuel Smith 2021-10-14 1000 priv->sgmii_tx_clk_falling_edge = true;
6c43809bf1bee7 Ansuel Smith 2021-10-14 1001
6c43809bf1bee7 Ansuel Smith 2021-10-14 1002 if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge"))
6c43809bf1bee7 Ansuel Smith 2021-10-14 1003 priv->sgmii_rx_clk_falling_edge = true;
5654ec78dd7e64 Ansuel Smith 2021-10-14 1004
5654ec78dd7e64 Ansuel Smith 2021-10-14 1005 break;
5654ec78dd7e64 Ansuel Smith 2021-10-14 1006 default:
5654ec78dd7e64 Ansuel Smith 2021-10-14 1007 continue;
6c43809bf1bee7 Ansuel Smith 2021-10-14 1008 }
6c43809bf1bee7 Ansuel Smith 2021-10-14 1009 }
6c43809bf1bee7 Ansuel Smith 2021-10-14 1010
6c43809bf1bee7 Ansuel Smith 2021-10-14 1011 return 0;
6c43809bf1bee7 Ansuel Smith 2021-10-14 1012 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[toke:xdp-traffic-gen-01 4/5] net/bpf/test_run.c:133:5: warning: no previous prototype for function 'bpf_test_run_init_ctx'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-traffic-gen-01
head: 3aaa72cb5c608f64b941ccc8d69caff51e89f67a
commit: f0b693d10bc20904d60329b0a202d0aa2c666e8d [4/5] bpf: Add XDP_REDIRECT support to XDP for bpf_prog_run()
config: hexagon-randconfig-r041-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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/toke/linux.git/commit/?id...
git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
git fetch --no-tags toke xdp-traffic-gen-01
git checkout f0b693d10bc20904d60329b0a202d0aa2c666e8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
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 >>):
>> net/bpf/test_run.c:133:5: warning: no previous prototype for function 'bpf_test_run_init_ctx' [-Wmissing-prototypes]
int bpf_test_run_init_ctx(struct bpf_test_timer *t,
^
net/bpf/test_run.c:133:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int bpf_test_run_init_ctx(struct bpf_test_timer *t,
^
static
net/bpf/test_run.c:273:14: warning: no previous prototype for function 'bpf_fentry_test1' [-Wmissing-prototypes]
int noinline bpf_fentry_test1(int a)
^
net/bpf/test_run.c:273:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test1(int a)
^
static
net/bpf/test_run.c:278:14: warning: no previous prototype for function 'bpf_fentry_test2' [-Wmissing-prototypes]
int noinline bpf_fentry_test2(int a, u64 b)
^
net/bpf/test_run.c:278:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test2(int a, u64 b)
^
static
net/bpf/test_run.c:283:14: warning: no previous prototype for function 'bpf_fentry_test3' [-Wmissing-prototypes]
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
net/bpf/test_run.c:283:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
static
net/bpf/test_run.c:288:14: warning: no previous prototype for function 'bpf_fentry_test4' [-Wmissing-prototypes]
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
net/bpf/test_run.c:288:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
static
net/bpf/test_run.c:293:14: warning: no previous prototype for function 'bpf_fentry_test5' [-Wmissing-prototypes]
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
net/bpf/test_run.c:293:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
static
net/bpf/test_run.c:298:14: warning: no previous prototype for function 'bpf_fentry_test6' [-Wmissing-prototypes]
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
net/bpf/test_run.c:298:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
static
net/bpf/test_run.c:307:14: warning: no previous prototype for function 'bpf_fentry_test7' [-Wmissing-prototypes]
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:307:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:312:14: warning: no previous prototype for function 'bpf_fentry_test8' [-Wmissing-prototypes]
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
net/bpf/test_run.c:312:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
^
static
net/bpf/test_run.c:317:14: warning: no previous prototype for function 'bpf_modify_return_test' [-Wmissing-prototypes]
int noinline bpf_modify_return_test(int a, int *b)
^
net/bpf/test_run.c:317:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_modify_return_test(int a, int *b)
^
static
net/bpf/test_run.c:323:14: warning: no previous prototype for function 'bpf_kfunc_call_test1' [-Wmissing-prototypes]
u64 noinline bpf_kfunc_call_test1(struct sock *sk, u32 a, u64 b, u32 c, u64 d)
^
net/bpf/test_run.c:323:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u64 noinline bpf_kfunc_call_test1(struct sock *sk, u32 a, u64 b, u32 c, u64 d)
^
static
net/bpf/test_run.c:328:14: warning: no previous prototype for function 'bpf_kfunc_call_test2' [-Wmissing-prototypes]
int noinline bpf_kfunc_call_test2(struct sock *sk, u32 a, u32 b)
^
net/bpf/test_run.c:328:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_kfunc_call_test2(struct sock *sk, u32 a, u32 b)
^
static
net/bpf/test_run.c:333:24: warning: no previous prototype for function 'bpf_kfunc_call_test3' [-Wmissing-prototypes]
struct sock * noinline bpf_kfunc_call_test3(struct sock *sk)
^
net/bpf/test_run.c:333:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct sock * noinline bpf_kfunc_call_test3(struct sock *sk)
^
static
13 warnings generated.
vim +/bpf_test_run_init_ctx +133 net/bpf/test_run.c
132
> 133 int bpf_test_run_init_ctx(struct bpf_test_timer *t,
134 struct xdp_buff *new_ctx,
135 struct xdp_buff *orig_ctx)
136 {
137 size_t frm_len = orig_ctx->data_end - orig_ctx->data_meta;
138 u32 headroom = XDP_PACKET_HEADROOM;
139 struct page *page;
140 void *data;
141
142 page = page_pool_dev_alloc_pages(t->xdp.pp);
143 if (!page)
144 return -ENOMEM;
145
146 data = phys_to_virt(page_to_phys(page));
147 memcpy(data + headroom, orig_ctx->data_meta, frm_len);
148
149 xdp_init_buff(new_ctx, PAGE_SIZE, &t->xdp.rxq);
150 xdp_prepare_buff(new_ctx, data, headroom, frm_len, true);
151 return 0;
152 }
153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/platform/x86/thinkpad_acpi.c:918:30: error: unused variable 'dispatch_proc_ops'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 66f4beaa6c1d28161f534471484b2daa2de1dce0
commit: fd96e35ea7b95f1e216277805be89d66e4ae962d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
date: 4 weeks ago
config: i386-buildonly-randconfig-r002-20211109 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 63ef0e17e28827eae53133b3467bdac7d9729318)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout fd96e35ea7b95f1e216277805be89d66e4ae962d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
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 >>):
>> drivers/platform/x86/thinkpad_acpi.c:918:30: error: unused variable 'dispatch_proc_ops' [-Werror,-Wunused-const-variable]
static const struct proc_ops dispatch_proc_ops = {
^
1 error generated.
vim +/dispatch_proc_ops +918 drivers/platform/x86/thinkpad_acpi.c
^1da177e4c3f41 drivers/acpi/ibm_acpi.c Linus Torvalds 2005-04-16 917
97a32539b9568b drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2020-02-03 @918 static const struct proc_ops dispatch_proc_ops = {
97a32539b9568b drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2020-02-03 919 .proc_open = dispatch_proc_open,
97a32539b9568b drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2020-02-03 920 .proc_read = seq_read,
97a32539b9568b drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2020-02-03 921 .proc_lseek = seq_lseek,
97a32539b9568b drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2020-02-03 922 .proc_release = single_release,
97a32539b9568b drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2020-02-03 923 .proc_write = dispatch_proc_write,
887965e6576a78 drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2009-12-15 924 };
887965e6576a78 drivers/platform/x86/thinkpad_acpi.c Alexey Dobriyan 2009-12-15 925
:::::: The code at line 918 was first introduced by commit
:::::: 97a32539b9568bb653683349e5a76d02ff3c3e2c proc: convert everything to "struct proc_ops"
:::::: TO: Alexey Dobriyan <adobriyan(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[morse:mpam/snapshot/v5.15 72/139] drivers/irqchip/irq-gic.c:1075:8: error: use of undeclared identifier 'GIC_IRQ_TYPE_GSI'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v5.15
head: ce3629841262f725a5f3a327403fcaf0e604a85e
commit: dcb27679932e5dbe7dbc20cd40bcb4b184ccaee5 [72/139] irqchip/gic, gic-v3: Translate fwspec for DT and ACPI systems in the same way
config: arm-randconfig-r031-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?i...
git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
git fetch --no-tags morse mpam/snapshot/v5.15
git checkout dcb27679932e5dbe7dbc20cd40bcb4b184ccaee5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/irqchip/
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 >>):
>> drivers/irqchip/irq-gic.c:1075:8: error: use of undeclared identifier 'GIC_IRQ_TYPE_GSI'
case GIC_IRQ_TYPE_GSI: /* GSI */
^
1 error generated.
vim +/GIC_IRQ_TYPE_GSI +1075 drivers/irqchip/irq-gic.c
1050
1051 static int gic_irq_domain_translate(struct irq_domain *d,
1052 struct irq_fwspec *fwspec,
1053 unsigned long *hwirq,
1054 unsigned int *type)
1055 {
1056 if (fwspec->param_count == 1 && fwspec->param[0] < 16) {
1057 *hwirq = fwspec->param[0];
1058 *type = IRQ_TYPE_EDGE_RISING;
1059 return 0;
1060 }
1061
1062
1063 if (is_of_node(fwspec->fwnode) ||
1064 is_fwnode_irqchip(fwspec->fwnode)) {
1065 if (fwspec->param_count < 3)
1066 return -EINVAL;
1067
1068 switch (fwspec->param[0]) {
1069 case 0: /* SPI */
1070 *hwirq = fwspec->param[1] + 32;
1071 break;
1072 case 1: /* PPI */
1073 *hwirq = fwspec->param[1] + 16;
1074 break;
> 1075 case GIC_IRQ_TYPE_GSI: /* GSI */
1076 *hwirq = fwspec->param[1];
1077 break;
1078 default:
1079 return -EINVAL;
1080 }
1081
1082 *type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
1083
1084 /* Make it clear that broken DTs are... broken */
1085 WARN_ON(*type == IRQ_TYPE_NONE);
1086 return 0;
1087 }
1088
1089 return -EINVAL;
1090 }
1091
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
arch/x86/kvm/x86.c:3354:1: error: unsupported size for integer register
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c8c109546a19613d323a319d0c921cb1f317e629
commit: 7e2175ebd695f17860c5bd4ad7616cce12ed4591 KVM: x86: Fix recording of guest steal time / preempted status
date: 3 days ago
config: i386-randconfig-a004-20210930 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7e2175ebd695f17860c5bd4ad7616cce12ed4591
# save the attached .config 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 errors (new ones prefixed by >>):
arch/x86/kvm/x86.c: In function 'record_steal_time':
>> arch/x86/kvm/x86.c:3354:1: error: unsupported size for integer register
3354 | }
| ^
vim +3354 arch/x86/kvm/x86.c
0baedd79271306 Vitaly Kuznetsov 2020-03-25 3260
c9aaa8957f203b Glauber Costa 2011-07-11 3261 static void record_steal_time(struct kvm_vcpu *vcpu)
c9aaa8957f203b Glauber Costa 2011-07-11 3262 {
7e2175ebd695f1 David Woodhouse 2021-11-02 3263 struct gfn_to_hva_cache *ghc = &vcpu->arch.st.cache;
7e2175ebd695f1 David Woodhouse 2021-11-02 3264 struct kvm_steal_time __user *st;
7e2175ebd695f1 David Woodhouse 2021-11-02 3265 struct kvm_memslots *slots;
7e2175ebd695f1 David Woodhouse 2021-11-02 3266 u64 steal;
7e2175ebd695f1 David Woodhouse 2021-11-02 3267 u32 version;
b043138246a410 Boris Ostrovsky 2019-12-05 3268
30b5c851af7991 David Woodhouse 2021-03-01 3269 if (kvm_xen_msr_enabled(vcpu->kvm)) {
30b5c851af7991 David Woodhouse 2021-03-01 3270 kvm_xen_runstate_set_running(vcpu);
30b5c851af7991 David Woodhouse 2021-03-01 3271 return;
30b5c851af7991 David Woodhouse 2021-03-01 3272 }
30b5c851af7991 David Woodhouse 2021-03-01 3273
c9aaa8957f203b Glauber Costa 2011-07-11 3274 if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED))
c9aaa8957f203b Glauber Costa 2011-07-11 3275 return;
c9aaa8957f203b Glauber Costa 2011-07-11 3276
7e2175ebd695f1 David Woodhouse 2021-11-02 3277 if (WARN_ON_ONCE(current->mm != vcpu->kvm->mm))
c9aaa8957f203b Glauber Costa 2011-07-11 3278 return;
c9aaa8957f203b Glauber Costa 2011-07-11 3279
7e2175ebd695f1 David Woodhouse 2021-11-02 3280 slots = kvm_memslots(vcpu->kvm);
7e2175ebd695f1 David Woodhouse 2021-11-02 3281
7e2175ebd695f1 David Woodhouse 2021-11-02 3282 if (unlikely(slots->generation != ghc->generation ||
7e2175ebd695f1 David Woodhouse 2021-11-02 3283 kvm_is_error_hva(ghc->hva) || !ghc->memslot)) {
7e2175ebd695f1 David Woodhouse 2021-11-02 3284 gfn_t gfn = vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS;
7e2175ebd695f1 David Woodhouse 2021-11-02 3285
7e2175ebd695f1 David Woodhouse 2021-11-02 3286 /* We rely on the fact that it fits in a single page. */
7e2175ebd695f1 David Woodhouse 2021-11-02 3287 BUILD_BUG_ON((sizeof(*st) - 1) & KVM_STEAL_VALID_BITS);
7e2175ebd695f1 David Woodhouse 2021-11-02 3288
7e2175ebd695f1 David Woodhouse 2021-11-02 3289 if (kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc, gfn, sizeof(*st)) ||
7e2175ebd695f1 David Woodhouse 2021-11-02 3290 kvm_is_error_hva(ghc->hva) || !ghc->memslot)
7e2175ebd695f1 David Woodhouse 2021-11-02 3291 return;
7e2175ebd695f1 David Woodhouse 2021-11-02 3292 }
7e2175ebd695f1 David Woodhouse 2021-11-02 3293
7e2175ebd695f1 David Woodhouse 2021-11-02 3294 st = (struct kvm_steal_time __user *)ghc->hva;
7e2175ebd695f1 David Woodhouse 2021-11-02 3295 if (!user_access_begin(st, sizeof(*st)))
7e2175ebd695f1 David Woodhouse 2021-11-02 3296 return;
b043138246a410 Boris Ostrovsky 2019-12-05 3297
f38a7b75267f1f Wanpeng Li 2017-12-12 3298 /*
f38a7b75267f1f Wanpeng Li 2017-12-12 3299 * Doing a TLB flush here, on the guest's behalf, can avoid
f38a7b75267f1f Wanpeng Li 2017-12-12 3300 * expensive IPIs.
f38a7b75267f1f Wanpeng Li 2017-12-12 3301 */
66570e966dd9cb Oliver Upton 2020-08-18 3302 if (guest_pv_has(vcpu, KVM_FEATURE_PV_TLB_FLUSH)) {
7e2175ebd695f1 David Woodhouse 2021-11-02 3303 u8 st_preempted = 0;
7e2175ebd695f1 David Woodhouse 2021-11-02 3304 int err = -EFAULT;
7e2175ebd695f1 David Woodhouse 2021-11-02 3305
7e2175ebd695f1 David Woodhouse 2021-11-02 3306 asm volatile("1: xchgb %0, %2\n"
7e2175ebd695f1 David Woodhouse 2021-11-02 3307 "xor %1, %1\n"
7e2175ebd695f1 David Woodhouse 2021-11-02 3308 "2:\n"
7e2175ebd695f1 David Woodhouse 2021-11-02 3309 _ASM_EXTABLE_UA(1b, 2b)
7e2175ebd695f1 David Woodhouse 2021-11-02 3310 : "+r" (st_preempted),
7e2175ebd695f1 David Woodhouse 2021-11-02 3311 "+&r" (err)
7e2175ebd695f1 David Woodhouse 2021-11-02 3312 : "m" (st->preempted));
7e2175ebd695f1 David Woodhouse 2021-11-02 3313 if (err)
7e2175ebd695f1 David Woodhouse 2021-11-02 3314 goto out;
7e2175ebd695f1 David Woodhouse 2021-11-02 3315
7e2175ebd695f1 David Woodhouse 2021-11-02 3316 user_access_end();
7e2175ebd695f1 David Woodhouse 2021-11-02 3317
7e2175ebd695f1 David Woodhouse 2021-11-02 3318 vcpu->arch.st.preempted = 0;
af3511ff7fa210 Lai Jiangshan 2021-06-01 3319
b382f44e98506b Wanpeng Li 2019-08-05 3320 trace_kvm_pv_tlb_flush(vcpu->vcpu_id,
af3511ff7fa210 Lai Jiangshan 2021-06-01 3321 st_preempted & KVM_VCPU_FLUSH_TLB);
af3511ff7fa210 Lai Jiangshan 2021-06-01 3322 if (st_preempted & KVM_VCPU_FLUSH_TLB)
0baedd79271306 Vitaly Kuznetsov 2020-03-25 3323 kvm_vcpu_flush_tlb_guest(vcpu);
0b9f6c4615c993 Pan Xinhui 2016-11-02 3324
7e2175ebd695f1 David Woodhouse 2021-11-02 3325 if (!user_access_begin(st, sizeof(*st)))
7e2175ebd695f1 David Woodhouse 2021-11-02 3326 goto dirty;
7e2175ebd695f1 David Woodhouse 2021-11-02 3327 } else {
7e2175ebd695f1 David Woodhouse 2021-11-02 3328 unsafe_put_user(0, &st->preempted, out);
a6bd811f1209fe Boris Ostrovsky 2019-12-06 3329 vcpu->arch.st.preempted = 0;
7e2175ebd695f1 David Woodhouse 2021-11-02 3330 }
35f3fae1784979 Wanpeng Li 2016-05-03 3331
7e2175ebd695f1 David Woodhouse 2021-11-02 3332 unsafe_get_user(version, &st->version, out);
7e2175ebd695f1 David Woodhouse 2021-11-02 3333 if (version & 1)
7e2175ebd695f1 David Woodhouse 2021-11-02 3334 version += 1; /* first time write, random junk */
35f3fae1784979 Wanpeng Li 2016-05-03 3335
7e2175ebd695f1 David Woodhouse 2021-11-02 3336 version += 1;
7e2175ebd695f1 David Woodhouse 2021-11-02 3337 unsafe_put_user(version, &st->version, out);
35f3fae1784979 Wanpeng Li 2016-05-03 3338
35f3fae1784979 Wanpeng Li 2016-05-03 3339 smp_wmb();
35f3fae1784979 Wanpeng Li 2016-05-03 3340
7e2175ebd695f1 David Woodhouse 2021-11-02 3341 unsafe_get_user(steal, &st->steal, out);
7e2175ebd695f1 David Woodhouse 2021-11-02 3342 steal += current->sched_info.run_delay -
c54cdf141c40a5 Liang Chen 2016-03-16 3343 vcpu->arch.st.last_steal;
c54cdf141c40a5 Liang Chen 2016-03-16 3344 vcpu->arch.st.last_steal = current->sched_info.run_delay;
7e2175ebd695f1 David Woodhouse 2021-11-02 3345 unsafe_put_user(steal, &st->steal, out);
35f3fae1784979 Wanpeng Li 2016-05-03 3346
7e2175ebd695f1 David Woodhouse 2021-11-02 3347 version += 1;
7e2175ebd695f1 David Woodhouse 2021-11-02 3348 unsafe_put_user(version, &st->version, out);
c9aaa8957f203b Glauber Costa 2011-07-11 3349
7e2175ebd695f1 David Woodhouse 2021-11-02 3350 out:
7e2175ebd695f1 David Woodhouse 2021-11-02 3351 user_access_end();
7e2175ebd695f1 David Woodhouse 2021-11-02 3352 dirty:
7e2175ebd695f1 David Woodhouse 2021-11-02 3353 mark_page_dirty_in_slot(vcpu->kvm, ghc->memslot, gpa_to_gfn(ghc->gpa));
c9aaa8957f203b Glauber Costa 2011-07-11 @3354 }
c9aaa8957f203b Glauber Costa 2011-07-11 3355
:::::: The code at line 3354 was first introduced by commit
:::::: c9aaa8957f203bd6df83b002fb40b98390bed078 KVM: Steal time implementation
:::::: TO: Glauber Costa <glommer(a)redhat.com>
:::::: CC: Avi Kivity <avi(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week