- 30 11月, 2022 12 次提交
-
-
由 Jian Shen 提交于
driver inclusion category:feature bugzilla: https://gitee.com/openeuler/kernel/issues/I62HX2 ---------------------------------------------------------------------- Currently, the PF check the VF alive by the KEEP_ALVE mailbox from VF. VF keep sending the mailbox per 2 seconds. Once PF lost the mailbox for more than 8 seconds, it will regards the VF is abnormal, and stop notifying the state change to VF, include link state, vf mac, reset, even though it receives the KEEP_ALIVE mailbox again. It's inreasonable. This patch fixes it. PF will record the state change which need to notify VF when lost the VF's KEEP_ALIVE mailbox. And notify VF when receive the mailbox again. Introduce a new flag HCLGE_VPORT_STATE_INITED, used to distinguish the case whether VF driver loaded or not. For VF will query these states when initializing, so it's unnecessary to notify it in this case. Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com> Reviewed-by: NYue Haibing <yuehaibing@huawei.com> Reviewed-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Michal Simek 提交于
mainline inclusion from mainline-v5.13-rc1 commit 6a37d750 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60OLE CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6a37d750037827d385672acdebf5788fc2ffa633 -------------------------------- Static analyzer tool found that the ret variable is not initialized but code expects ret value >=0 when pinconf is skipped in the first pinmux loop. The same expectation is for pinmux in a pinconf loop. That's why initialize ret to 0 to avoid uninitialized ret value in first loop or reusing ret value from first loop in second. Addresses-Coverity: ("Uninitialized variables") Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NColin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/e5203bae68eb94b4b8b4e67e5e7b4d86bb989724.1615534291.git.michal.simek@xilinx.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NYuyao Lin <linyuyao1@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Michal Simek 提交于
mainline inclusion from mainline-v5.13-rc1 commit b991f8c3 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60OLE CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b991f8c3622c8c9d01a1ada382682a731932e651 -------------------------------- Right now the handling order depends on how entries are coming which is corresponding with order in DT. We have reached the case with DT overlays where conf and mux descriptions are exchanged which ends up in sequence that firmware has been asked to perform configuration before requesting the pin. The patch is enforcing the order that pin is requested all the time first followed by pin configuration. This change will ensure that firmware gets requests in the right order. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/cfbe01f791c2dd42a596cbda57e15599969b57aa.1615364211.git.michal.simek@xilinx.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NYuyao Lin <linyuyao1@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Kai Ye 提交于
mainline inclusion from mainline-crypto commit 8f82f4ae category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f82f4ae8946d665f1e38da8e2b39b929d2435b1 ---------------------------------------------------------------------- Because the permission on the VF debugfs file is "0444". So the VF function checking is redundant in qos writing api. Signed-off-by: NKai Ye <yekai13@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Kai Ye 提交于
mainline inclusion from v6.1-rc4 commit 22d7a6c3 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=22d7a6c39cabab811f42cb2daed2343c87b0aca5 ---------------------------------------------------------------------- The pci bdf number check is added for qos written by using the pci api. Directly get the devfn by pci_dev, so delete some redundant code. And use the kstrtoul instead of sscanf to simplify code. Signed-off-by: NKai Ye <yekai13@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Kai Ye 提交于
mainline inclusion from v6.1-rc4 commit 3efe90af category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3efe90af4c0c46c58dba1b306de142827153d9c0 ---------------------------------------------------------------------- Increase the buffer to prevent stack overflow by fuzz test. The maximum length of the qos configuration buffer is 256 bytes. Currently, the value of the 'val buffer' is only 32 bytes. The sscanf does not check the dest memory length. So the 'val buffer' may stack overflow. Signed-off-by: NKai Ye <yekai13@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Weili Qian 提交于
mainline inclusion from v6.1-rc4 commit ee1537fe category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee1537fe3dd89860d0336563891f6cac707d0cb5 ---------------------------------------------------------------------- After the device is reset, the VF needs to re-enable communication interrupt before the VF sends restart complete message to the PF. If the interrupt is re-enabled after the VF notifies the PF, the PF may fail to send messages to the VF after receiving VF's restart complete message. Fixes: 760fe22c ("crypto: hisilicon/qm - update reset flow") Signed-off-by: NWeili Qian <qianweili@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Weili Qian 提交于
mainline inclusion from v6.1-rc4 commit 94adb03f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=94adb03fd58bbe355e3d7a9d0f701889313e4a51 ---------------------------------------------------------------------- Change the value of clock gating register to 0x7fff to enable clock gating of the address prefetch module. When the device is idle, the clock is turned off to save power. Signed-off-by: NWeili Qian <qianweili@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Weili Qian 提交于
mainline inclusion from v6.1-rc4 commit f57e2928 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f57e292897cac13b6ddee078aea21173b234ecb7 ---------------------------------------------------------------------- In qm_get_xqc_depth(), parameters low_bits and high_bits save the values of the corresponding bits. However, the values saved by the two parameters are opposite. As a result, the values returned to the callers are incorrect. Fixes: 129a9f34 ("crypto: hisilicon/qm - get qp num and depth from hardware registers") Signed-off-by: NWeili Qian <qianweili@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Yicong Yang 提交于
mainline inclusion from v6.1-rc4 commit 7001141d category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7001141d34e550854425afa76e960513cf150a62 ---------------------------------------------------------------------- dev_to_node() can handle the case when CONFIG_NUMA is not set, so the check of CONFIG_NUMA is redundant and can be removed. Signed-off-by: NYicong Yang <yangyicong@hisilicon.com> Signed-off-by: NWeili Qian <qianweili@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Zhiqi Song 提交于
mainline inclusion from v6.1-rc4 commit 45e6319b category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45e6319bd5f2154d8b8c9f1eaa4ac030ba0d330c ---------------------------------------------------------------------- In hpre_remove(), when the disable operation of qm sriov failed, the following logic should continue to be executed to release the remaining resources that have been allocated, instead of returning directly, otherwise there will be resource leakage. Signed-off-by: NZhiqi Song <songzhiqi1@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
由 Kai Ye 提交于
mainline inclusion from v6.1-rc4 commit f5b657e5 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZHPY CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f5b657e5dbf830cfcb19b588b784b8190a5164a0 ---------------------------------------------------------------------- The default qos value is not initialized when sriov is repeatedly enabled and disabled. So add the vf qos value initialized in the sriov enable process. Signed-off-by: NKai Ye <yekai13@huawei.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NJiangshui Yang <yangjiangshui@h-partners.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
-
- 29 11月, 2022 2 次提交
-
-
由 Baoqi Zhang 提交于
LoongArch inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB -------------------------------- Signed-off-by: NBaoqi Zhang <zhangbaoqi@loongson.cn> Change-Id: I7d70a63b5a813551b81f60f07dfedbbcd01d4336
-
由 Qing Zhang 提交于
LoongArch inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB -------------------------------- This GMAC module is integrated into the Loongson-2K SoC and the LS7A bridge chip. commit 30bba69d upstream. Backport: stmmac: dwmac-loongson: fix uninitialized variable in loongson_dwmac_probe() stmmac: dwmac-loongson: Fix unsigned comparison to zero stmmac: dwmac-loongson:Fix missing return value stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static stmmac: pci: Add LS7A support for dwmac-loongson This patch also disable dwmac FLOW_AUTO. Since DWMAC_LOONGSON do NOT support FLOW_AUTO. Signed-off-by: NQing Zhang <zhangqing@loongson.cn> Signed-off-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NMing Wang <wangming01@loongson.cn> Change-Id: Ifefac7d47a05373ca7160d22a44d6c07b6a896e5
-
- 25 11月, 2022 26 次提交
-
-
由 Quinn Tran 提交于
mainline inclusion from mainline-v5.15-rc1 commit 85818882 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6337O CVE: NA Reference: https://lore.kernel.org/r/20210810043720.1137-7-njavali@marvell.com ------------------------------------------ Add debug print of 64G link speed. Signed-off-by: NQuinn Tran <qutran@marvell.com> Signed-off-by: NNilesh Javali <njavali@marvell.com> Reviewed-by: NHimanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Nxiaosu3109 <lxshhh@139.com>
-
由 Laura Abbott 提交于
stable inclusion from stable-v5.17 commit 870aaff9 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0 ---------------------------------------------------------------------- The return type of get_config_size is size_t so it makes sense to change the type of the variable holding its result. That said, this already got taken care of (differently, and arguably not as well) by commit 3ed21c14 ("vdpa: check that offsets are within bounds"). The added 'c->off > size' test in that commit will be done as an unsigned comparison on 32-bit (safe due to not being signed). On a 64-bit platform, it will be done as a signed comparison, but in that case the comparison will be done in 64-bit, and 'c->off' being an u32 it will be valid thanks to the extended range (ie both values will be positive in 64 bits). So this was a real bug, but it was already addressed and marked for stable. Signed-off-by: NLaura Abbott <labbott@kernel.org> Reported-by: NLuo Likang <luolikang@nsfocus.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Parav Pandit 提交于
stable inclusion from stable-v5.16 commit ef76eb83 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ef76eb83a17e803a66b64ac95b36ae48b3d17c22 ---------------------------------------------------------------------- Cited patch in the fixes tag clears the features bit during reset. mlx5 vdpa device feature bits are static decided by device capabilities. These feature bits (including VIRTIO_NET_F_MAC) are initialized during device addition time. Clearing features bit in reset callback cleared the VIRTIO_NET_F_MAC. Due to this, MAC address provided by the device is not honored. Fix it by not clearing the static feature bits during reset. Fixes: 0686082d ("vdpa: Add reset callback in vdpa_config_ops") Signed-off-by: NParav Pandit <parav@nvidia.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Link: https://lore.kernel.org/r/20211026175519.87795-7-parav@nvidia.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Parav Pandit 提交于
stable inclusion from stable-v5.16 commit bb47620b category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bb47620be322c5e9e372536cb6b54e17b3a00258 ---------------------------------------------------------------------- virtio device id value can be more than 31. Hence, use BIT_ULL in assignment. Fixes: 33b34750 ("vdpa: Define vdpa mgmt device, ops and a netlink interface") Reported-by: Nkernel test robot <lkp@intel.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NParav Pandit <parav@nvidia.com> Acked-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20211130042949.88958-1-parav@nvidia.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Zhang Min 提交于
stable inclusion from stable-v5.17 commit eb057b44 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=eb057b44dbe35ae14527830236a92f51de8f9184 ---------------------------------------------------------------------- When vp_vdpa driver is unbind, vp_vdpa is freed in vdpa_unregister_device and then vp_vdpa->mdev.pci_dev is dereferenced in vp_modern_remove, triggering use-after-free. Call Trace of unbinding driver free vp_vdpa : do_syscall_64 vfs_write kernfs_fop_write_iter device_release_driver_internal pci_device_remove vp_vdpa_remove vdpa_unregister_device kobject_release device_release kfree Call Trace of dereference vp_vdpa->mdev.pci_dev: vp_modern_remove pci_release_selected_regions pci_release_region pci_resource_len pci_resource_end (dev)->resource[(bar)].end Signed-off-by: NZhang Min <zhang.min9@zte.com.cn> Signed-off-by: NYi Wang <wang.yi59@zte.com.cn> Link: https://lore.kernel.org/r/20220301091059.46869-1-wang.yi59@zte.com.cnSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Fixes: 64b9f64f ("vdpa: introduce virtio pci driver") Reviewed-by: NStefano Garzarella <sgarzare@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Arnd Bergmann 提交于
stable inclusion from stable-v5.16 commit 27d9839f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=27d9839f17940e8edc475df616bbd9cf7ede8d05 ---------------------------------------------------------------------- When neither VIRTIO_PCI_LIB nor VIRTIO are enabled, but the alibaba vdpa driver is, the kernel runs into a link error because the legacy virtio module never gets built: x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features': eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state': eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address': eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready': eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq': eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector' x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset': When VIRTIO_PCI_LIB was added, it was correctly added to drivers/Makefile as well, but for the legacy module, this is missing. Solve this by always entering drivers/virtio during the build and letting its Makefile take care of the individual options, rather than having a separate line for each sub-option. Fixes: 64b9f64f ("vdpa: introduce virtio pci driver") Fixes: e85087be ("eni_vdpa: add vDPA driver for Alibaba ENI") Fixes: d89c8169 ("virtio-pci: introduce legacy device module") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20211206085034.2836099-1-arnd@kernel.orgSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Xie Yongji 提交于
stable inclusion from stable-v5.14 commit 9632e78e category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9632e78e82648aa98340df78eab9106f63da151e ---------------------------------------------------------------------- The vdpa_alloc_device() returns an error pointer upon failure, not NULL. To handle the failure correctly, this replaces NULL check with IS_ERR() check and propagate the error upwards. Fixes: 64b9f64f ("vdpa: introduce virtio pci driver") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NXie Yongji <xieyongji@bytedance.com> Link: https://lore.kernel.org/r/20210715080026.242-2-xieyongji@bytedance.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NStefano Garzarella <sgarzare@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Michael S. Tsirkin 提交于
stable inclusion from stable-v5.13 commit d7bce85a category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d7bce85aa7b92b5de8f69b3bcedfe51d7b1aabe1 ---------------------------------------------------------------------- When switching virtio_pci_modern to use a helper for mappings we lost an __iomem tag. Restore it. Reported-by: Nkernel test robot <lkp@intel.com> Fixes: 9e3bb9b7 ("virtio_pci_modern: introduce helper to map vq notify area") Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Michael S. Tsirkin 提交于
stable inclusion from stable-v5.13 commit 0f8a0b0b category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0f8a0b0b095fd9b301523c0f78686f5ac6fda564 ---------------------------------------------------------------------- When switching virtio_pci_modern to use a helper for mappings we lost an __iomem tag. We should restore it. However, virtio_pci_modern is playing tricks by hiding an iomem pointer in a regular vq->priv pointer. Which is okay as long as it's all contained within a single file, but we need to __force cast the value otherwise we'll get sparse warnings. Reported-by: Nkernel test robot <lkp@intel.com> Fixes: 7dca6c0e ("virtio-pci library: switch to use vp_modern_map_vq_notify()") Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.14 commit 1225c216 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1225c216d9542ed4883027d3af50035c35a7a03c ---------------------------------------------------------------------- We used to fail the set_vq_state() since it was not supported yet by the virtio spec. But if the bus tries to set the state which is equal to the device initial state after reset, we can let it go. This is a must for virtio_vdpa() to set vq state during probe which is required for some vDPA parents. Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210602021536.39525-4-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.14 commit 0140b3d0 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0140b3d07617e71a8d9509776434ced107572fc8 ---------------------------------------------------------------------- This patch introduce a helper to get driver/guest features from the device. Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210602021536.39525-3-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.14 commit 530a5678 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=530a5678bc0083e84f99f38f77ced8fbb3d18434 ---------------------------------------------------------------------- This patch extends the vdpa_vq_state to support packed virtqueue state which is basically the device/driver ring wrap counters and the avail and used index. This will be used for the virito-vdpa support for the packed virtqueue and the future vhost/vhost-vdpa support for the packed virtqueue. Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210602021536.39525-2-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Wu Zongyong 提交于
stable inclusion from stable-v5.16 commit 5bbfea1e category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5bbfea1eacdf584d0d159e38c01ee190162706d9 ---------------------------------------------------------------------- This patch implements the get_vq_irq() callback for virtio pci devices to allow irq offloading. Signed-off-by: NWu Zongyong <wuzongyong@linux.alibaba.com> Acked-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/bb091e5505db704dd620f8854a7aebc921d2a752.1635493219.git.wuzongyong@linux.alibaba.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Xie Yongji 提交于
stable inclusion from stable-v5.15 commit 0686082d category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0686082dbf7a204ca0fab326a820779e31666639 ---------------------------------------------------------------------- This adds a new callback to support device specific reset behavior. The vdpa bus driver will call the reset function instead of setting status to zero during resetting. Signed-off-by: NXie Yongji <xieyongji@bytedance.com> Link: https://lore.kernel.org/r/20210831103634.33-6-xieyongji@bytedance.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.13 commit 526cb858 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=526cb8580bc6b9e5bc14cc5d24ecf4633a84cfa1 ---------------------------------------------------------------------- This patch reports the per vq doorbell location and size to vDPA bus. Userspace can then map the doorbell via mmap() via vhost-vDPA bus driver. Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210415073147.19331-8-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.13 commit 9e311bca category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9e311bcad73dc14bd0a736db6ad3d382227e11fe ---------------------------------------------------------------------- Sometimes it might be useful to report the capability physical address. One example is to report the physical address of the doorbell in order to be mapped by userspace. Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210415073147.19331-7-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.13 commit 11d8ffed category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=11d8ffed00b231356008b35a3b0bc192e42333fa ---------------------------------------------------------------------- This patch switches to use vp_vdpa to use vp_modern_map_notify(). Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210415073147.19331-4-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.13 commit 7dca6c0e category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7dca6c0ea96b9e583ebcf95fe3c14ba3385f467b ---------------------------------------------------------------------- This patch switch to use vp_modern_map_notify() for virtio-pci library. Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210415073147.19331-3-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Jason Wang 提交于
stable inclusion from stable-v5.13 commit 9e3bb9b7 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9e3bb9b79a7131a088cfffbdcc30e747dad9d090 ---------------------------------------------------------------------- This patch factors out the logic of vq notify area mapping. Following patches will switch to use this common helpers for both virtio_pci library and virtio-pci vDPA driver. Signed-off-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210415073147.19331-2-jasowang@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Stefano Garzarella 提交于
stable inclusion from stable-v5.13 commit d6d8bb92 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d6d8bb92fdde6390037bf9da174ed3ab551c04d7 ---------------------------------------------------------------------- Let's use the new 'get_config_size()' callback available instead of using the 'virtio_id' to get the size of the device config space. Signed-off-by: NStefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20210315163450.254396-10-sgarzare@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Stefano Garzarella 提交于
stable inclusion from stable-v5.17 commit 539fec78 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=539fec78edb4e084e7c532affc56cc42d4ceea4b ---------------------------------------------------------------------- `driver_override` allows to control which of the vDPA bus drivers binds to a vDPA device. If `driver_override` is not set, the previous behaviour is followed: devices use the first vDPA bus driver loaded (unless auto binding is disabled). Tested on Fedora 34 with driverctl(8): $ modprobe virtio-vdpa $ modprobe vhost-vdpa $ modprobe vdpa-sim-net $ vdpa dev add mgmtdev vdpasim_net name dev1 # dev1 is attached to the first vDPA bus driver loaded $ driverctl -b vdpa list-devices dev1 virtio_vdpa $ driverctl -b vdpa set-override dev1 vhost_vdpa $ driverctl -b vdpa list-devices dev1 vhost_vdpa [*] Note: driverctl(8) integrates with udev so the binding is preserved. Suggested-by: NJason Wang <jasowang@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NStefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20211126164753.181829-3-sgarzare@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Stefano Garzarella 提交于
stable inclusion from stable-v5.13 commit 899c4d18 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=899c4d187f6a5c11d8eae33506fa0736dbabc39f ---------------------------------------------------------------------- Enable the user to create vDPA block simulator devices using the vdpa management tool: # Show vDPA supported devices $ vdpa mgmtdev show vdpasim_blk: supported_classes block # Create a vDPA block device named as 'blk0' from the management # device vdpasim: $ vdpa dev add mgmtdev vdpasim_blk name blk0 # Show the info of the 'blk0' device just created $ vdpa dev show blk0 -jp { "dev": { "blk0": { "type": "block", "mgmtdev": "vdpasim_blk", "vendor_id": 0, "max_vqs": 1, "max_vq_size": 256 } } } # Delete the vDPA device after its use $ vdpa dev del blk0 Signed-off-by: NStefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20210315163450.254396-15-sgarzare@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Parav Pandit 提交于
stable inclusion from stable-v5.12 commit a3c06ae1 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a3c06ae158dd6fa8336157c31d9234689d068d02 ---------------------------------------------------------------------- Enable user to create vdpasim net simulate devices. Show vdpa management device that supports creating, deleting vdpa devices. $ vdpa mgmtdev show vdpasim_net: supported_classes net $ vdpa mgmtdev show -jp { "show": { "vdpasim_net": { "supported_classes": { "net" } } } Create a vdpa device of type networking named as "foo2" from the management device vdpasim: $ vdpa dev add mgmtdev vdpasim_net name foo2 Show the newly created vdpa device by its name: $ vdpa dev show foo2 foo2: type network mgmtdev vdpasim_net vendor_id 0 max_vqs 2 max_vq_size 256 $ vdpa dev show foo2 -jp { "dev": { "foo2": { "type": "network", "mgmtdev": "vdpasim_net", "vendor_id": 0, "max_vqs": 2, "max_vq_size": 256 } } } Delete the vdpa device after its use: $ vdpa dev del foo2 Signed-off-by: NParav Pandit <parav@nvidia.com> Reviewed-by: NEli Cohen <elic@nvidia.com> Acked-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210105103203.82508-7-parav@nvidia.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Stefano Garzarella 提交于
stable inclusion from stable-v5.11 commit da7af696 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=da7af6967c6e9815f8da60a8db1d0fe35b8e97b9 ---------------------------------------------------------------------- Allow each device to specify the size of the buffer allocated in vdpa_sim. Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NStefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20201215144256.155342-17-sgarzare@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Max Gurtovoy 提交于
stable inclusion from stable-v5.13 commit 0c853c2c category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0c853c2c2924464bd86537164ed18d5d953b4909 ---------------------------------------------------------------------- This will allow running vDPA for virtio block protocol. It's a preliminary implementation with a simple request handling: for each request, only the status (last byte) is set. It's always set to VIRTIO_BLK_S_OK. Also input validation is missing and will be added in the next commits. Signed-off-by: NMax Gurtovoy <mgurtovoy@nvidia.com> [sgarzare: various cleanups/fixes] Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NStefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20210315163450.254396-12-sgarzare@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-
由 Max Gurtovoy 提交于
stable inclusion from stable-v5.11 commit db1e8bb6 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=db1e8bb6c63a77b74b0c6b49662fc50d49d5f90b ---------------------------------------------------------------------- Introduce new vdpa_sim_net and vdpa_sim (core) drivers. This is a preparation for adding a vdpa simulator module for block devices. Signed-off-by: NMax Gurtovoy <mgurtovoy@nvidia.com> [sgarzare: various cleanups/fixes] Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NStefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20201215144256.155342-19-sgarzare@redhat.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
-