From: Greg Kroah-Hartman Date: Sat, 12 Aug 2023 17:43:46 +0000 (+0200) Subject: 6.4-stable patches X-Git-Tag: v4.14.323~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37f20a3093d676bb5f8e5a345fc53a2f45353049;p=thirdparty%2Fkernel%2Fstable-queue.git 6.4-stable patches added patches: dmaengine-xilinx-xdma-fix-judgment-of-the-return-value.patch dmaengine-xilinx-xdma-fix-typo.patch interconnect-qcom-add-support-for-mask-based-bcms.patch interconnect-qcom-sa8775p-add-enable_mask-for-bcm-nodes.patch interconnect-qcom-sm8450-add-enable_mask-for-bcm-nodes.patch interconnect-qcom-sm8550-add-enable_mask-for-bcm-nodes.patch kvm-arm64-fix-hardware-enable-disable-flows-for-pkvm.patch selftests-bpf-fix-a-ci-failure-caused-by-vsock-sockmap-test.patch selftests-forwarding-bridge_mdb-check-iproute2-version.patch selftests-forwarding-bridge_mdb_max-check-iproute2-version.patch selftests-forwarding-ethtool_mm-skip-when-mac-merge-is-not-supported.patch selftests-forwarding-tc_tunnel_key-make-filters-more-specific.patch selftests-rseq-fix-build-with-undefined-__weak.patch --- diff --git a/queue-6.4/dmaengine-xilinx-xdma-fix-judgment-of-the-return-value.patch b/queue-6.4/dmaengine-xilinx-xdma-fix-judgment-of-the-return-value.patch new file mode 100644 index 00000000000..7730fec32f6 --- /dev/null +++ b/queue-6.4/dmaengine-xilinx-xdma-fix-judgment-of-the-return-value.patch @@ -0,0 +1,32 @@ +From a68b48afc050a9456ed4ed19d8755e0f925b44e6 Mon Sep 17 00:00:00 2001 +From: Minjie Du +Date: Wed, 5 Jul 2023 19:39:12 +0800 +Subject: dmaengine: xilinx: xdma: Fix Judgment of the return value + +From: Minjie Du + +commit a68b48afc050a9456ed4ed19d8755e0f925b44e6 upstream. + +Fix: make IS_ERR() judge the devm_ioremap_resource() function return. + +Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver") +Signed-off-by: Minjie Du +Acked-by: Michal Simek +Link: https://lore.kernel.org/r/20230705113912.16247-1-duminjie@vivo.com +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman +--- + drivers/dma/xilinx/xdma.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/dma/xilinx/xdma.c ++++ b/drivers/dma/xilinx/xdma.c +@@ -894,7 +894,7 @@ static int xdma_probe(struct platform_de + } + + reg_base = devm_ioremap_resource(&pdev->dev, res); +- if (!reg_base) { ++ if (IS_ERR(reg_base)) { + xdma_err(xdev, "ioremap failed"); + goto failed; + } diff --git a/queue-6.4/dmaengine-xilinx-xdma-fix-typo.patch b/queue-6.4/dmaengine-xilinx-xdma-fix-typo.patch new file mode 100644 index 00000000000..f1f7bfc4205 --- /dev/null +++ b/queue-6.4/dmaengine-xilinx-xdma-fix-typo.patch @@ -0,0 +1,32 @@ +From 422dbc66b7702ae797326d5480c3c9b6467053da Mon Sep 17 00:00:00 2001 +From: Miquel Raynal +Date: Mon, 31 Jul 2023 12:14:40 +0200 +Subject: dmaengine: xilinx: xdma: Fix typo + +From: Miquel Raynal + +commit 422dbc66b7702ae797326d5480c3c9b6467053da upstream. + +Probably a copy/paste error with the previous block, here we are +actually managing C2H IRQs. + +Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver") +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/r/20230731101442.792514-3-miquel.raynal@bootlin.com +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman +--- + drivers/dma/xilinx/xdma.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/dma/xilinx/xdma.c ++++ b/drivers/dma/xilinx/xdma.c +@@ -717,7 +717,7 @@ static int xdma_irq_init(struct xdma_dev + ret = request_irq(irq, xdma_channel_isr, 0, + "xdma-c2h-channel", &xdev->c2h_chans[j]); + if (ret) { +- xdma_err(xdev, "H2C channel%d request irq%d failed: %d", ++ xdma_err(xdev, "C2H channel%d request irq%d failed: %d", + j, irq, ret); + goto failed_init_c2h; + } diff --git a/queue-6.4/interconnect-qcom-add-support-for-mask-based-bcms.patch b/queue-6.4/interconnect-qcom-add-support-for-mask-based-bcms.patch new file mode 100644 index 00000000000..3566bc208e5 --- /dev/null +++ b/queue-6.4/interconnect-qcom-add-support-for-mask-based-bcms.patch @@ -0,0 +1,61 @@ +From d8630f050d3fd2079f8617dd6c00c6509109c755 Mon Sep 17 00:00:00 2001 +From: Mike Tipton +Date: Fri, 23 Jun 2023 14:50:42 +0200 +Subject: interconnect: qcom: Add support for mask-based BCMs + +From: Mike Tipton + +commit d8630f050d3fd2079f8617dd6c00c6509109c755 upstream. + +Some BCMs aren't directly associated with the data path (i.e. ACV) and +therefore don't communicate using BW. Instead, they are simply +enabled/disabled with a simple bit mask. Add support for these. + +Origin commit retrieved from: +https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/commit/2d1573e0206998151b342e6b52a4c0f7234d7e36 + +Signed-off-by: Mike Tipton +[narmstrong: removed copyright change from original commit] +Signed-off-by: Neil Armstrong +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-1-709474b151cc@linaro.org +Fixes: fafc114a468e ("interconnect: qcom: Add SM8450 interconnect provider driver") +Signed-off-by: Georgi Djakov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/interconnect/qcom/bcm-voter.c | 5 +++++ + drivers/interconnect/qcom/icc-rpmh.h | 2 ++ + 2 files changed, 7 insertions(+) + +--- a/drivers/interconnect/qcom/bcm-voter.c ++++ b/drivers/interconnect/qcom/bcm-voter.c +@@ -83,6 +83,11 @@ static void bcm_aggregate(struct qcom_ic + + temp = agg_peak[bucket] * bcm->vote_scale; + bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit); ++ ++ if (bcm->enable_mask && (bcm->vote_x[bucket] || bcm->vote_y[bucket])) { ++ bcm->vote_x[bucket] = 0; ++ bcm->vote_y[bucket] = bcm->enable_mask; ++ } + } + + if (bcm->keepalive && bcm->vote_x[QCOM_ICC_BUCKET_AMC] == 0 && +--- a/drivers/interconnect/qcom/icc-rpmh.h ++++ b/drivers/interconnect/qcom/icc-rpmh.h +@@ -81,6 +81,7 @@ struct qcom_icc_node { + * @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm + * @vote_y: aggregated threshold values, represents peak_bw when @type is bw bcm + * @vote_scale: scaling factor for vote_x and vote_y ++ * @enable_mask: optional mask to send as vote instead of vote_x/vote_y + * @dirty: flag used to indicate whether the bcm needs to be committed + * @keepalive: flag used to indicate whether a keepalive is required + * @aux_data: auxiliary data used when calculating threshold values and +@@ -97,6 +98,7 @@ struct qcom_icc_bcm { + u64 vote_x[QCOM_ICC_NUM_BUCKETS]; + u64 vote_y[QCOM_ICC_NUM_BUCKETS]; + u64 vote_scale; ++ u32 enable_mask; + bool dirty; + bool keepalive; + struct bcm_db aux_data; diff --git a/queue-6.4/interconnect-qcom-sa8775p-add-enable_mask-for-bcm-nodes.patch b/queue-6.4/interconnect-qcom-sa8775p-add-enable_mask-for-bcm-nodes.patch new file mode 100644 index 00000000000..dc7312e482d --- /dev/null +++ b/queue-6.4/interconnect-qcom-sa8775p-add-enable_mask-for-bcm-nodes.patch @@ -0,0 +1,36 @@ +From 3cb11fe244d516f757c1022cfa971528d525fe65 Mon Sep 17 00:00:00 2001 +From: Neil Armstrong +Date: Fri, 23 Jun 2023 14:50:45 +0200 +Subject: interconnect: qcom: sa8775p: add enable_mask for bcm nodes + +From: Neil Armstrong + +commit 3cb11fe244d516f757c1022cfa971528d525fe65 upstream. + +Set the proper enable_mask the ACV node requiring such value +to be used instead of a bandwidth when voting. + +The masks was copied from the downstream implementation at [1]. + +[1] https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/blob/kernel.lnx.5.15.r32-rel/drivers/interconnect/qcom/lemans.c + +Signed-off-by: Neil Armstrong +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-4-709474b151cc@linaro.org +Fixes: 3655a63f9661 ("interconnect: qcom: add a driver for sa8775p") +Signed-off-by: Georgi Djakov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/interconnect/qcom/sa8775p.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/interconnect/qcom/sa8775p.c ++++ b/drivers/interconnect/qcom/sa8775p.c +@@ -1873,6 +1873,7 @@ static struct qcom_icc_node srvc_snoc = + + static struct qcom_icc_bcm bcm_acv = { + .name = "ACV", ++ .enable_mask = 0x8, + .num_nodes = 1, + .nodes = { &ebi }, + }; diff --git a/queue-6.4/interconnect-qcom-sm8450-add-enable_mask-for-bcm-nodes.patch b/queue-6.4/interconnect-qcom-sm8450-add-enable_mask-for-bcm-nodes.patch new file mode 100644 index 00000000000..cb5b81ac701 --- /dev/null +++ b/queue-6.4/interconnect-qcom-sm8450-add-enable_mask-for-bcm-nodes.patch @@ -0,0 +1,100 @@ +From be02db24cf840bc0fdfbecc78ad803619dd143e6 Mon Sep 17 00:00:00 2001 +From: Neil Armstrong +Date: Fri, 23 Jun 2023 14:50:43 +0200 +Subject: interconnect: qcom: sm8450: add enable_mask for bcm nodes + +From: Neil Armstrong + +commit be02db24cf840bc0fdfbecc78ad803619dd143e6 upstream. + +Set the proper enable_mask to nodes requiring such value +to be used instead of a bandwidth when voting. + +The masks were copied from the downstream implementation at [1]. + +[1] https://git.codelinaro.org/clo/la/kernel/msm-5.10/-/blob/KERNEL.PLATFORM.1.0.r2-05600-WAIPIOLE.0/drivers/interconnect/qcom/waipio.c + +Signed-off-by: Neil Armstrong +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-2-709474b151cc@linaro.org +Fixes: fafc114a468e ("interconnect: qcom: Add SM8450 interconnect provider driver") +Signed-off-by: Georgi Djakov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/interconnect/qcom/sm8450.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/interconnect/qcom/sm8450.c ++++ b/drivers/interconnect/qcom/sm8450.c +@@ -1337,6 +1337,7 @@ static struct qcom_icc_node qns_mem_noc_ + + static struct qcom_icc_bcm bcm_acv = { + .name = "ACV", ++ .enable_mask = 0x8, + .num_nodes = 1, + .nodes = { &ebi }, + }; +@@ -1349,6 +1350,7 @@ static struct qcom_icc_bcm bcm_ce0 = { + + static struct qcom_icc_bcm bcm_cn0 = { + .name = "CN0", ++ .enable_mask = 0x1, + .keepalive = true, + .num_nodes = 55, + .nodes = { &qnm_gemnoc_cnoc, &qnm_gemnoc_pcie, +@@ -1383,6 +1385,7 @@ static struct qcom_icc_bcm bcm_cn0 = { + + static struct qcom_icc_bcm bcm_co0 = { + .name = "CO0", ++ .enable_mask = 0x1, + .num_nodes = 2, + .nodes = { &qxm_nsp, &qns_nsp_gemnoc }, + }; +@@ -1403,6 +1406,7 @@ static struct qcom_icc_bcm bcm_mm0 = { + + static struct qcom_icc_bcm bcm_mm1 = { + .name = "MM1", ++ .enable_mask = 0x1, + .num_nodes = 12, + .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp, + &qnm_camnoc_sf, &qnm_mdp, +@@ -1445,6 +1449,7 @@ static struct qcom_icc_bcm bcm_sh0 = { + + static struct qcom_icc_bcm bcm_sh1 = { + .name = "SH1", ++ .enable_mask = 0x1, + .num_nodes = 7, + .nodes = { &alm_gpu_tcu, &alm_sys_tcu, + &qnm_nsp_gemnoc, &qnm_pcie, +@@ -1461,6 +1466,7 @@ static struct qcom_icc_bcm bcm_sn0 = { + + static struct qcom_icc_bcm bcm_sn1 = { + .name = "SN1", ++ .enable_mask = 0x1, + .num_nodes = 4, + .nodes = { &qhm_gic, &qxm_pimem, + &xm_gic, &qns_gemnoc_gc }, +@@ -1492,6 +1498,7 @@ static struct qcom_icc_bcm bcm_sn7 = { + + static struct qcom_icc_bcm bcm_acv_disp = { + .name = "ACV", ++ .enable_mask = 0x1, + .num_nodes = 1, + .nodes = { &ebi_disp }, + }; +@@ -1510,6 +1517,7 @@ static struct qcom_icc_bcm bcm_mm0_disp + + static struct qcom_icc_bcm bcm_mm1_disp = { + .name = "MM1", ++ .enable_mask = 0x1, + .num_nodes = 3, + .nodes = { &qnm_mdp_disp, &qnm_rot_disp, + &qns_mem_noc_sf_disp }, +@@ -1523,6 +1531,7 @@ static struct qcom_icc_bcm bcm_sh0_disp + + static struct qcom_icc_bcm bcm_sh1_disp = { + .name = "SH1", ++ .enable_mask = 0x1, + .num_nodes = 1, + .nodes = { &qnm_pcie_disp }, + }; diff --git a/queue-6.4/interconnect-qcom-sm8550-add-enable_mask-for-bcm-nodes.patch b/queue-6.4/interconnect-qcom-sm8550-add-enable_mask-for-bcm-nodes.patch new file mode 100644 index 00000000000..24297dca381 --- /dev/null +++ b/queue-6.4/interconnect-qcom-sm8550-add-enable_mask-for-bcm-nodes.patch @@ -0,0 +1,168 @@ +From 0dc82bd9e4627065dbc6ac8468296aa18f13c840 Mon Sep 17 00:00:00 2001 +From: Neil Armstrong +Date: Fri, 23 Jun 2023 14:50:44 +0200 +Subject: interconnect: qcom: sm8550: add enable_mask for bcm nodes + +From: Neil Armstrong + +commit 0dc82bd9e4627065dbc6ac8468296aa18f13c840 upstream. + +Set the proper enable_mask to nodes requiring such value +to be used instead of a bandwidth when voting. + +The masks were copied from the downstream implementation at [1]. + +[1] https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/blob/kernel.lnx.5.15.r1-rel/drivers/interconnect/qcom/kalama.c + +Reviewed-by: Konrad Dybcio +Signed-off-by: Neil Armstrong +Link: https://lore.kernel.org/r/20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-3-709474b151cc@linaro.org +Fixes: e6f0d6a30f73 ("interconnect: qcom: Add SM8550 interconnect provider driver") +Signed-off-by: Georgi Djakov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/interconnect/qcom/sm8550.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/drivers/interconnect/qcom/sm8550.c b/drivers/interconnect/qcom/sm8550.c +index d823ba988ef6..0864ed285375 100644 +--- a/drivers/interconnect/qcom/sm8550.c ++++ b/drivers/interconnect/qcom/sm8550.c +@@ -1473,6 +1473,7 @@ static struct qcom_icc_node qns_mem_noc_sf_cam_ife_2 = { + + static struct qcom_icc_bcm bcm_acv = { + .name = "ACV", ++ .enable_mask = 0x8, + .num_nodes = 1, + .nodes = { &ebi }, + }; +@@ -1485,6 +1486,7 @@ static struct qcom_icc_bcm bcm_ce0 = { + + static struct qcom_icc_bcm bcm_cn0 = { + .name = "CN0", ++ .enable_mask = 0x1, + .keepalive = true, + .num_nodes = 54, + .nodes = { &qsm_cfg, &qhs_ahb2phy0, +@@ -1524,6 +1526,7 @@ static struct qcom_icc_bcm bcm_cn1 = { + + static struct qcom_icc_bcm bcm_co0 = { + .name = "CO0", ++ .enable_mask = 0x1, + .num_nodes = 2, + .nodes = { &qxm_nsp, &qns_nsp_gemnoc }, + }; +@@ -1549,6 +1552,7 @@ static struct qcom_icc_bcm bcm_mm0 = { + + static struct qcom_icc_bcm bcm_mm1 = { + .name = "MM1", ++ .enable_mask = 0x1, + .num_nodes = 8, + .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp, + &qnm_camnoc_sf, &qnm_vapss_hcp, +@@ -1589,6 +1593,7 @@ static struct qcom_icc_bcm bcm_sh0 = { + + static struct qcom_icc_bcm bcm_sh1 = { + .name = "SH1", ++ .enable_mask = 0x1, + .num_nodes = 13, + .nodes = { &alm_gpu_tcu, &alm_sys_tcu, + &chm_apps, &qnm_gpu, +@@ -1608,6 +1613,7 @@ static struct qcom_icc_bcm bcm_sn0 = { + + static struct qcom_icc_bcm bcm_sn1 = { + .name = "SN1", ++ .enable_mask = 0x1, + .num_nodes = 3, + .nodes = { &qhm_gic, &xm_gic, + &qns_gemnoc_gc }, +@@ -1633,6 +1639,7 @@ static struct qcom_icc_bcm bcm_sn7 = { + + static struct qcom_icc_bcm bcm_acv_disp = { + .name = "ACV", ++ .enable_mask = 0x1, + .num_nodes = 1, + .nodes = { &ebi_disp }, + }; +@@ -1657,12 +1664,14 @@ static struct qcom_icc_bcm bcm_sh0_disp = { + + static struct qcom_icc_bcm bcm_sh1_disp = { + .name = "SH1", ++ .enable_mask = 0x1, + .num_nodes = 2, + .nodes = { &qnm_mnoc_hf_disp, &qnm_pcie_disp }, + }; + + static struct qcom_icc_bcm bcm_acv_cam_ife_0 = { + .name = "ACV", ++ .enable_mask = 0x0, + .num_nodes = 1, + .nodes = { &ebi_cam_ife_0 }, + }; +@@ -1681,6 +1690,7 @@ static struct qcom_icc_bcm bcm_mm0_cam_ife_0 = { + + static struct qcom_icc_bcm bcm_mm1_cam_ife_0 = { + .name = "MM1", ++ .enable_mask = 0x1, + .num_nodes = 4, + .nodes = { &qnm_camnoc_hf_cam_ife_0, &qnm_camnoc_icp_cam_ife_0, + &qnm_camnoc_sf_cam_ife_0, &qns_mem_noc_sf_cam_ife_0 }, +@@ -1694,6 +1704,7 @@ static struct qcom_icc_bcm bcm_sh0_cam_ife_0 = { + + static struct qcom_icc_bcm bcm_sh1_cam_ife_0 = { + .name = "SH1", ++ .enable_mask = 0x1, + .num_nodes = 3, + .nodes = { &qnm_mnoc_hf_cam_ife_0, &qnm_mnoc_sf_cam_ife_0, + &qnm_pcie_cam_ife_0 }, +@@ -1701,6 +1712,7 @@ static struct qcom_icc_bcm bcm_sh1_cam_ife_0 = { + + static struct qcom_icc_bcm bcm_acv_cam_ife_1 = { + .name = "ACV", ++ .enable_mask = 0x0, + .num_nodes = 1, + .nodes = { &ebi_cam_ife_1 }, + }; +@@ -1719,6 +1731,7 @@ static struct qcom_icc_bcm bcm_mm0_cam_ife_1 = { + + static struct qcom_icc_bcm bcm_mm1_cam_ife_1 = { + .name = "MM1", ++ .enable_mask = 0x1, + .num_nodes = 4, + .nodes = { &qnm_camnoc_hf_cam_ife_1, &qnm_camnoc_icp_cam_ife_1, + &qnm_camnoc_sf_cam_ife_1, &qns_mem_noc_sf_cam_ife_1 }, +@@ -1732,6 +1745,7 @@ static struct qcom_icc_bcm bcm_sh0_cam_ife_1 = { + + static struct qcom_icc_bcm bcm_sh1_cam_ife_1 = { + .name = "SH1", ++ .enable_mask = 0x1, + .num_nodes = 3, + .nodes = { &qnm_mnoc_hf_cam_ife_1, &qnm_mnoc_sf_cam_ife_1, + &qnm_pcie_cam_ife_1 }, +@@ -1739,6 +1753,7 @@ static struct qcom_icc_bcm bcm_sh1_cam_ife_1 = { + + static struct qcom_icc_bcm bcm_acv_cam_ife_2 = { + .name = "ACV", ++ .enable_mask = 0x0, + .num_nodes = 1, + .nodes = { &ebi_cam_ife_2 }, + }; +@@ -1757,6 +1772,7 @@ static struct qcom_icc_bcm bcm_mm0_cam_ife_2 = { + + static struct qcom_icc_bcm bcm_mm1_cam_ife_2 = { + .name = "MM1", ++ .enable_mask = 0x1, + .num_nodes = 4, + .nodes = { &qnm_camnoc_hf_cam_ife_2, &qnm_camnoc_icp_cam_ife_2, + &qnm_camnoc_sf_cam_ife_2, &qns_mem_noc_sf_cam_ife_2 }, +@@ -1770,6 +1786,7 @@ static struct qcom_icc_bcm bcm_sh0_cam_ife_2 = { + + static struct qcom_icc_bcm bcm_sh1_cam_ife_2 = { + .name = "SH1", ++ .enable_mask = 0x1, + .num_nodes = 3, + .nodes = { &qnm_mnoc_hf_cam_ife_2, &qnm_mnoc_sf_cam_ife_2, + &qnm_pcie_cam_ife_2 }, +-- +2.41.0 + diff --git a/queue-6.4/kvm-arm64-fix-hardware-enable-disable-flows-for-pkvm.patch b/queue-6.4/kvm-arm64-fix-hardware-enable-disable-flows-for-pkvm.patch new file mode 100644 index 00000000000..b3da82f7da2 --- /dev/null +++ b/queue-6.4/kvm-arm64-fix-hardware-enable-disable-flows-for-pkvm.patch @@ -0,0 +1,71 @@ +From c718ca0e99401d80d2480c08e1b02cf5f7cd7033 Mon Sep 17 00:00:00 2001 +From: Raghavendra Rao Ananta +Date: Wed, 19 Jul 2023 17:54:00 +0000 +Subject: KVM: arm64: Fix hardware enable/disable flows for pKVM + +From: Raghavendra Rao Ananta + +commit c718ca0e99401d80d2480c08e1b02cf5f7cd7033 upstream. + +When running in protected mode, the hyp stub is disabled after pKVM is +initialized, meaning the host cannot enable/disable the hyp at +runtime. As such, kvm_arm_hardware_enabled is always 1 after +initialization, and kvm_arch_hardware_enable() never enables the vgic +maintenance irq or timer irqs. + +Unconditionally enable/disable the vgic + timer irqs in the respective +calls, instead relying on the percpu bookkeeping in the generic code +to keep track of which cpus have the interrupts unmasked. + +Fixes: 466d27e48d7c ("KVM: arm64: Simplify the CPUHP logic") +Reported-by: Oliver Upton +Suggested-by: Oliver Upton +Signed-off-by: Raghavendra Rao Ananta +Link: https://lore.kernel.org/r/20230719175400.647154-1-rananta@google.com +Acked-by: Marc Zyngier +Signed-off-by: Oliver Upton +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/kvm/arm.c | 15 ++++----------- + 1 file changed, 4 insertions(+), 11 deletions(-) + +--- a/arch/arm64/kvm/arm.c ++++ b/arch/arm64/kvm/arm.c +@@ -1800,8 +1800,6 @@ static void _kvm_arch_hardware_enable(vo + + int kvm_arch_hardware_enable(void) + { +- int was_enabled; +- + /* + * Most calls to this function are made with migration + * disabled, but not with preemption disabled. The former is +@@ -1810,13 +1808,10 @@ int kvm_arch_hardware_enable(void) + */ + preempt_disable(); + +- was_enabled = __this_cpu_read(kvm_arm_hardware_enabled); + _kvm_arch_hardware_enable(NULL); + +- if (!was_enabled) { +- kvm_vgic_cpu_up(); +- kvm_timer_cpu_up(); +- } ++ kvm_vgic_cpu_up(); ++ kvm_timer_cpu_up(); + + preempt_enable(); + +@@ -1833,10 +1828,8 @@ static void _kvm_arch_hardware_disable(v + + void kvm_arch_hardware_disable(void) + { +- if (__this_cpu_read(kvm_arm_hardware_enabled)) { +- kvm_timer_cpu_down(); +- kvm_vgic_cpu_down(); +- } ++ kvm_timer_cpu_down(); ++ kvm_vgic_cpu_down(); + + if (!is_protected_kvm_enabled()) + _kvm_arch_hardware_disable(NULL); diff --git a/queue-6.4/selftests-bpf-fix-a-ci-failure-caused-by-vsock-sockmap-test.patch b/queue-6.4/selftests-bpf-fix-a-ci-failure-caused-by-vsock-sockmap-test.patch new file mode 100644 index 00000000000..e4425e46f57 --- /dev/null +++ b/queue-6.4/selftests-bpf-fix-a-ci-failure-caused-by-vsock-sockmap-test.patch @@ -0,0 +1,62 @@ +From 90f0074cd9f9a24b7b6c4d5afffa676aee48c0e9 Mon Sep 17 00:00:00 2001 +From: Xu Kuohai +Date: Fri, 4 Aug 2023 03:37:39 -0400 +Subject: selftests/bpf: fix a CI failure caused by vsock sockmap test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Xu Kuohai + +commit 90f0074cd9f9a24b7b6c4d5afffa676aee48c0e9 upstream. + +BPF CI has reported the following failure: + +Error: #200/79 sockmap_listen/sockmap VSOCK test_vsock_redir + Error: #200/79 sockmap_listen/sockmap VSOCK test_vsock_redir + ./test_progs:vsock_unix_redir_connectible:1506: egress: write: Transport endpoint is not connected + vsock_unix_redir_connectible:FAIL:1506 + ./test_progs:vsock_unix_redir_connectible:1506: ingress: write: Transport endpoint is not connected + vsock_unix_redir_connectible:FAIL:1506 + ./test_progs:vsock_unix_redir_connectible:1506: egress: write: Transport endpoint is not connected + vsock_unix_redir_connectible:FAIL:1506 + ./test_progs:vsock_unix_redir_connectible:1514: ingress: recv() err, errno=11 + vsock_unix_redir_connectible:FAIL:1514 + ./test_progs:vsock_unix_redir_connectible:1518: ingress: vsock socket map failed, a != b + vsock_unix_redir_connectible:FAIL:1518 + ./test_progs:vsock_unix_redir_connectible:1525: ingress: want pass count 1, have 0 + +It’s because the recv(... MSG_DONTWAIT) syscall in the test case is +called before the queued work sk_psock_backlog() in the kernel finishes +executing. So the data to be read is still queued in psock->ingress_skb +and cannot be read by the user program. Therefore, the non-blocking +recv() reads nothing and reports an EAGAIN error. + +So replace recv(... MSG_DONTWAIT) with xrecv_nonblock(), which calls +select() to wait for data to be readable or timeout before calls recv(). + +Fixes: d61bd8c1fd02 ("selftests/bpf: add a test case for vsock sockmap") +Signed-off-by: Xu Kuohai +Link: https://lore.kernel.org/r/20230804073740.194770-4-xukuohai@huaweicloud.com +Signed-off-by: Martin KaFai Lau +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +index b4f6f3a50ae5..ba35bcc66e7e 100644 +--- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c ++++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +@@ -1432,7 +1432,7 @@ static void vsock_unix_redir_connectible(int sock_mapfd, int verd_mapfd, + if (n < 1) + goto out; + +- n = recv(mode == REDIR_INGRESS ? u0 : u1, &b, sizeof(b), MSG_DONTWAIT); ++ n = xrecv_nonblock(mode == REDIR_INGRESS ? u0 : u1, &b, sizeof(b), 0); + if (n < 0) + FAIL("%s: recv() err, errno=%d", log_prefix, errno); + if (n == 0) +-- +2.41.0 + diff --git a/queue-6.4/selftests-forwarding-bridge_mdb-check-iproute2-version.patch b/queue-6.4/selftests-forwarding-bridge_mdb-check-iproute2-version.patch new file mode 100644 index 00000000000..02f4e5022aa --- /dev/null +++ b/queue-6.4/selftests-forwarding-bridge_mdb-check-iproute2-version.patch @@ -0,0 +1,62 @@ +From ab2eda04e2c2116910b9d77ccc82e727efa71d49 Mon Sep 17 00:00:00 2001 +From: Ido Schimmel +Date: Tue, 8 Aug 2023 17:14:49 +0300 +Subject: selftests: forwarding: bridge_mdb: Check iproute2 version + +From: Ido Schimmel + +commit ab2eda04e2c2116910b9d77ccc82e727efa71d49 upstream. + +The selftest relies on iproute2 changes present in version 6.3, but the +test does not check for it, resulting in error: + + # ./bridge_mdb.sh + + INFO: # Host entries configuration tests + TEST: Common host entries configuration tests (IPv4) [FAIL] + Managed to add IPv4 host entry with a filter mode + TEST: Common host entries configuration tests (IPv6) [FAIL] + Managed to add IPv6 host entry with a filter mode + TEST: Common host entries configuration tests (L2) [FAIL] + Managed to add L2 host entry with a filter mode + + INFO: # Port group entries configuration tests - (*, G) + Command "replace" is unknown, try "bridge mdb help". + [...] + +Fix by skipping the test if iproute2 is too old. + +Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") +Reported-by: Mirsad Todorovac +Closes: https://lore.kernel.org/netdev/6b04b2ba-2372-6f6b-3ac8-b7cba1cfae83@alu.unizg.hr/ +Signed-off-by: Ido Schimmel +Reviewed-by: Petr Machata +Tested-by: Mirsad Todorovac +Reviewed-by: Hangbin Liu +Acked-by: Nikolay Aleksandrov +Link: https://lore.kernel.org/r/20230808141503.4060661-4-idosch@nvidia.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/net/forwarding/bridge_mdb.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh +index ae3f9462a2b6..6f830b5f03c9 100755 +--- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh ++++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh +@@ -1206,6 +1206,11 @@ ctrl_test() + ctrl_mldv2_is_in_test + } + ++if ! bridge mdb help 2>&1 | grep -q "replace"; then ++ echo "SKIP: iproute2 too old, missing bridge mdb replace support" ++ exit $ksft_skip ++fi ++ + trap cleanup EXIT + + setup_prepare +-- +2.41.0 + diff --git a/queue-6.4/selftests-forwarding-bridge_mdb_max-check-iproute2-version.patch b/queue-6.4/selftests-forwarding-bridge_mdb_max-check-iproute2-version.patch new file mode 100644 index 00000000000..1e63dfad784 --- /dev/null +++ b/queue-6.4/selftests-forwarding-bridge_mdb_max-check-iproute2-version.patch @@ -0,0 +1,58 @@ +From 6bdf3d9765f4e0eebfd919e70acc65bce5daa9b9 Mon Sep 17 00:00:00 2001 +From: Ido Schimmel +Date: Tue, 8 Aug 2023 17:14:50 +0300 +Subject: selftests: forwarding: bridge_mdb_max: Check iproute2 version + +From: Ido Schimmel + +commit 6bdf3d9765f4e0eebfd919e70acc65bce5daa9b9 upstream. + +The selftest relies on iproute2 changes present in version 6.3, but the +test does not check for it, resulting in errors: + + # ./bridge_mdb_max.sh + INFO: 802.1d tests + TEST: cfg4: port: ngroups reporting [FAIL] + Number of groups was null, now is null, but 5 expected + TEST: ctl4: port: ngroups reporting [FAIL] + Number of groups was null, now is null, but 5 expected + TEST: cfg6: port: ngroups reporting [FAIL] + Number of groups was null, now is null, but 5 expected + [...] + +Fix by skipping the test if iproute2 is too old. + +Fixes: 3446dcd7df05 ("selftests: forwarding: bridge_mdb_max: Add a new selftest") +Reported-by: Mirsad Todorovac +Closes: https://lore.kernel.org/netdev/6b04b2ba-2372-6f6b-3ac8-b7cba1cfae83@alu.unizg.hr/ +Signed-off-by: Ido Schimmel +Reviewed-by: Petr Machata +Tested-by: Mirsad Todorovac +Reviewed-by: Hangbin Liu +Acked-by: Nikolay Aleksandrov +Link: https://lore.kernel.org/r/20230808141503.4060661-5-idosch@nvidia.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/net/forwarding/bridge_mdb_max.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh +index ae255b662ba3..fa762b716288 100755 +--- a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh ++++ b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh +@@ -1328,6 +1328,11 @@ test_8021qvs() + switch_destroy + } + ++if ! bridge link help 2>&1 | grep -q "mcast_max_groups"; then ++ echo "SKIP: iproute2 too old, missing bridge \"mcast_max_groups\" support" ++ exit $ksft_skip ++fi ++ + trap cleanup EXIT + + setup_prepare +-- +2.41.0 + diff --git a/queue-6.4/selftests-forwarding-ethtool_mm-skip-when-mac-merge-is-not-supported.patch b/queue-6.4/selftests-forwarding-ethtool_mm-skip-when-mac-merge-is-not-supported.patch new file mode 100644 index 00000000000..7904a74819e --- /dev/null +++ b/queue-6.4/selftests-forwarding-ethtool_mm-skip-when-mac-merge-is-not-supported.patch @@ -0,0 +1,70 @@ +From 23fb886a1ced6f885ddd541cc86d45c415ce705c Mon Sep 17 00:00:00 2001 +From: Ido Schimmel +Date: Tue, 8 Aug 2023 17:14:56 +0300 +Subject: selftests: forwarding: ethtool_mm: Skip when MAC Merge is not supported + +From: Ido Schimmel + +commit 23fb886a1ced6f885ddd541cc86d45c415ce705c upstream. + +MAC Merge cannot be tested with veth pairs, resulting in failures: + + # ./ethtool_mm.sh + [...] + TEST: Manual configuration with verification: swp1 to swp2 [FAIL] + Verification did not succeed + +Fix by skipping the test when the interfaces do not support MAC Merge. + +Fixes: e6991384ace5 ("selftests: forwarding: add a test for MAC Merge layer") +Reported-by: Mirsad Todorovac +Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ +Signed-off-by: Ido Schimmel +Reviewed-by: Hangbin Liu +Acked-by: Nikolay Aleksandrov +Link: https://lore.kernel.org/r/20230808141503.4060661-11-idosch@nvidia.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + .../selftests/net/forwarding/ethtool_mm.sh | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/tools/testing/selftests/net/forwarding/ethtool_mm.sh b/tools/testing/selftests/net/forwarding/ethtool_mm.sh +index c580ad623848..39e736f30322 100755 +--- a/tools/testing/selftests/net/forwarding/ethtool_mm.sh ++++ b/tools/testing/selftests/net/forwarding/ethtool_mm.sh +@@ -258,11 +258,6 @@ h2_destroy() + + setup_prepare() + { +- check_ethtool_mm_support +- check_tc_fp_support +- require_command lldptool +- bail_on_lldpad "autoconfigure the MAC Merge layer" "configure it manually" +- + h1=${NETIFS[p1]} + h2=${NETIFS[p2]} + +@@ -278,6 +273,19 @@ cleanup() + h1_destroy + } + ++check_ethtool_mm_support ++check_tc_fp_support ++require_command lldptool ++bail_on_lldpad "autoconfigure the MAC Merge layer" "configure it manually" ++ ++for netif in ${NETIFS[@]}; do ++ ethtool --show-mm $netif 2>&1 &> /dev/null ++ if [[ $? -ne 0 ]]; then ++ echo "SKIP: $netif does not support MAC Merge" ++ exit $ksft_skip ++ fi ++done ++ + trap cleanup EXIT + + setup_prepare +-- +2.41.0 + diff --git a/queue-6.4/selftests-forwarding-tc_tunnel_key-make-filters-more-specific.patch b/queue-6.4/selftests-forwarding-tc_tunnel_key-make-filters-more-specific.patch new file mode 100644 index 00000000000..abcc938deda --- /dev/null +++ b/queue-6.4/selftests-forwarding-tc_tunnel_key-make-filters-more-specific.patch @@ -0,0 +1,67 @@ +From 11604178fdc3404d46518e5332f1fe865d30c4a1 Mon Sep 17 00:00:00 2001 +From: Ido Schimmel +Date: Tue, 8 Aug 2023 17:14:59 +0300 +Subject: selftests: forwarding: tc_tunnel_key: Make filters more specific + +From: Ido Schimmel + +commit 11604178fdc3404d46518e5332f1fe865d30c4a1 upstream. + +The test installs filters that match on various IP fragments (e.g., no +fragment, first fragment) and expects a certain amount of packets to hit +each filter. This is problematic as the filters are not specific enough +and can match IP packets (e.g., IGMP) generated by the stack, resulting +in failures [1]. + +Fix by making the filters more specific and match on more fields in the +IP header: Source IP, destination IP and protocol. + +[1] + # timeout set to 0 + # selftests: net/forwarding: tc_tunnel_key.sh + # TEST: tunnel_key nofrag (skip_hw) [FAIL] + # packet smaller than MTU was not tunneled + # INFO: Could not test offloaded functionality + not ok 89 selftests: net/forwarding: tc_tunnel_key.sh # exit=1 + +Fixes: 533a89b1940f ("selftests: forwarding: add tunnel_key "nofrag" test case") +Reported-by: Mirsad Todorovac +Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ +Signed-off-by: Ido Schimmel +Reviewed-by: Petr Machata +Tested-by: Mirsad Todorovac +Acked-by: Davide Caratti +Reviewed-by: Hangbin Liu +Acked-by: Nikolay Aleksandrov +Link: https://lore.kernel.org/r/20230808141503.4060661-14-idosch@nvidia.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/net/forwarding/tc_tunnel_key.sh | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh b/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh +index 5ac184d51809..5a5dd9034819 100755 +--- a/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh ++++ b/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh +@@ -104,11 +104,14 @@ tunnel_key_nofrag_test() + local i + + tc filter add dev $swp1 ingress protocol ip pref 100 handle 100 \ +- flower ip_flags nofrag action drop ++ flower src_ip 192.0.2.1 dst_ip 192.0.2.2 ip_proto udp \ ++ ip_flags nofrag action drop + tc filter add dev $swp1 ingress protocol ip pref 101 handle 101 \ +- flower ip_flags firstfrag action drop ++ flower src_ip 192.0.2.1 dst_ip 192.0.2.2 ip_proto udp \ ++ ip_flags firstfrag action drop + tc filter add dev $swp1 ingress protocol ip pref 102 handle 102 \ +- flower ip_flags nofirstfrag action drop ++ flower src_ip 192.0.2.1 dst_ip 192.0.2.2 ip_proto udp \ ++ ip_flags nofirstfrag action drop + + # test 'nofrag' set + tc filter add dev h1-et egress protocol all pref 1 handle 1 matchall $tcflags \ +-- +2.41.0 + diff --git a/queue-6.4/selftests-rseq-fix-build-with-undefined-__weak.patch b/queue-6.4/selftests-rseq-fix-build-with-undefined-__weak.patch new file mode 100644 index 00000000000..3dd2c10e110 --- /dev/null +++ b/queue-6.4/selftests-rseq-fix-build-with-undefined-__weak.patch @@ -0,0 +1,64 @@ +From d5ad9aae13dcced333c1a7816ff0a4fbbb052466 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Fri, 4 Aug 2023 20:22:11 +0100 +Subject: selftests/rseq: Fix build with undefined __weak + +From: Mark Brown + +commit d5ad9aae13dcced333c1a7816ff0a4fbbb052466 upstream. + +Commit 3bcbc20942db ("selftests/rseq: Play nice with binaries statically +linked against glibc 2.35+") which is now in Linus' tree introduced uses +of __weak but did nothing to ensure that a definition is provided for it +resulting in build failures for the rseq tests: + +rseq.c:41:1: error: unknown type name '__weak' +__weak ptrdiff_t __rseq_offset; +^ +rseq.c:41:17: error: expected ';' after top level declarator +__weak ptrdiff_t __rseq_offset; + ^ + ; +rseq.c:42:1: error: unknown type name '__weak' +__weak unsigned int __rseq_size; +^ +rseq.c:43:1: error: unknown type name '__weak' +__weak unsigned int __rseq_flags; + +Fix this by using the definition from tools/include compiler.h. + +Fixes: 3bcbc20942db ("selftests/rseq: Play nice with binaries statically linked against glibc 2.35+") +Signed-off-by: Mark Brown +Message-Id: <20230804-kselftest-rseq-build-v1-1-015830b66aa9@kernel.org> +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/rseq/Makefile | 4 +++- + tools/testing/selftests/rseq/rseq.c | 2 ++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +--- a/tools/testing/selftests/rseq/Makefile ++++ b/tools/testing/selftests/rseq/Makefile +@@ -4,8 +4,10 @@ ifneq ($(shell $(CC) --version 2>&1 | he + CLANG_FLAGS += -no-integrated-as + endif + ++top_srcdir = ../../../.. ++ + CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -L$(OUTPUT) -Wl,-rpath=./ \ +- $(CLANG_FLAGS) ++ $(CLANG_FLAGS) -I$(top_srcdir)/tools/include + LDLIBS += -lpthread -ldl + + # Own dependencies because we only want to build against 1st prerequisite, but +--- a/tools/testing/selftests/rseq/rseq.c ++++ b/tools/testing/selftests/rseq/rseq.c +@@ -31,6 +31,8 @@ + #include + #include + ++#include ++ + #include "../kselftest.h" + #include "rseq.h" + diff --git a/queue-6.4/series b/queue-6.4/series index caecc1e4742..9efcd25c772 100644 --- a/queue-6.4/series +++ b/queue-6.4/series @@ -94,3 +94,16 @@ netfilter-nft_set_hash-mark-set-element-as-dead-when-deleting-from-packet-path.p iio-imu-lsm6dsx-fix-mount-matrix-retrieval.patch iio-core-prevent-invalid-memory-access-when-there-is-no-parent.patch iio-light-bu27034-fix-scale-format.patch +interconnect-qcom-add-support-for-mask-based-bcms.patch +interconnect-qcom-sa8775p-add-enable_mask-for-bcm-nodes.patch +interconnect-qcom-sm8450-add-enable_mask-for-bcm-nodes.patch +interconnect-qcom-sm8550-add-enable_mask-for-bcm-nodes.patch +selftests-forwarding-tc_tunnel_key-make-filters-more-specific.patch +selftests-forwarding-ethtool_mm-skip-when-mac-merge-is-not-supported.patch +selftests-forwarding-bridge_mdb_max-check-iproute2-version.patch +selftests-forwarding-bridge_mdb-check-iproute2-version.patch +kvm-arm64-fix-hardware-enable-disable-flows-for-pkvm.patch +dmaengine-xilinx-xdma-fix-typo.patch +dmaengine-xilinx-xdma-fix-judgment-of-the-return-value.patch +selftests-bpf-fix-a-ci-failure-caused-by-vsock-sockmap-test.patch +selftests-rseq-fix-build-with-undefined-__weak.patch