diff --git a/0001-irqchip-gic-v3-Collection-table-support-muti-pages.patch b/0001-irqchip-gic-v3-Collection-table-support-muti-pages.patch new file mode 100644 index 0000000000000000000000000000000000000000..3a56a56a311071976fed7cc6604ee4e3f69a32dd --- /dev/null +++ b/0001-irqchip-gic-v3-Collection-table-support-muti-pages.patch @@ -0,0 +1,40 @@ +From 182c9a59569b2f7adcd0473a1871a9899224d95d Mon Sep 17 00:00:00 2001 +From: wangwudi +Date: Mon, 12 Jun 2023 22:51:24 +0800 +Subject: [PATCH] irqchip: gic-v3: Collection table support muti pages + +driver inclusion +category: bugfix +bugzilla: https://gitee.com/openeuler/kernel/issues/I7CX6S +CVE: NA + +-------------------------------------------------------------------------- + +Only one page is allocated to the collection table. +Recalculate the page number of collection table based on the number of +CPUs. + +Signed-off-by: wangwudi +Signed-off-by: Shengwei Luo +--- + drivers/irqchip/irq-gic-v3-its.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c +index 73ce248da42c..46012ad327e7 100644 +--- a/drivers/irqchip/irq-gic-v3-its.c ++++ b/drivers/irqchip/irq-gic-v3-its.c +@@ -2180,6 +2180,10 @@ static int its_alloc_tables(struct its_node *its) + indirect = its_parse_indirect_baser(its, baser, &order, + ITS_MAX_VPEID_BITS); + break; ++ case GITS_BASER_TYPE_COLLECTION: ++ indirect = its_parse_indirect_baser(its, baser, &order, ++ order_base_2(num_possible_cpus())); ++ break; + } + + err = its_setup_baser(its, baser, cache, shr, order, indirect); +-- +2.27.0 + diff --git a/0002-genirq-Increase-the-number-of-IRQ-descriptors.patch b/0002-genirq-Increase-the-number-of-IRQ-descriptors.patch new file mode 100644 index 0000000000000000000000000000000000000000..90aab4b0e64c3e819dd6f273d67ed8d3190ff020 --- /dev/null +++ b/0002-genirq-Increase-the-number-of-IRQ-descriptors.patch @@ -0,0 +1,64 @@ +From e5a8fe52b7e6506767f457f34ed237ae16f1d73f Mon Sep 17 00:00:00 2001 +From: Kunkun Jiang +Date: Wed, 7 Jun 2023 19:23:45 +0800 +Subject: [PATCH] genirq: Increase the number of IRQ descriptors + +virt inclusion +category: bugfix +bugzilla: https://gitee.com/openeuler/kernel/issues/I7BQMW +CVE: NA + +----------------------------------------------------------------- + +The default value of NR_IRQS is not sufficient to support GICv4.1 +features and ~56K LPIs. This parameter would be too small for certain +server platforms where it has many IO devices and is capable of +direct injection of vSGI and vLPI features. + +Currently, maximum of 64 + 8192 (IRQ_BITMAP_BITS) IRQ descriptors +are allowed. The vCPU creation fails after reaching count ~400 with +kvm-arm.vgic_v4_enable=1. + +This patch increases NR_IRQS to 1^19 to cover 56K LPIs and 262144 +vSGIs (16vPEs x 16). + +------------------------------------------------------------------ + +Tips: This is a temporary fix[1], but it has been able to solve the +problem. The latest upstream version[2] depends on the 'maple tree', +which is inappropriately introduced to the current kernel. + +------------------------------------------------------------------- + +Another Tips: According to Chao Liu and Chang Liao's suggestion, +modifying IRQ_BITMAP_BITS can achieve the same effect with less +impact. Compared with solution[2], solution[1] has a disadvantage: +the memory foot print increases as the number of VMs increases. + +Link: https://lore.kernel.org/linux-arm-kernel/20230104023738.1258925-1-sdonthineni@nvidia.com/ [1] +Link: https://lore.kernel.org/all/20230519134902.1495562-1-sdonthineni@nvidia.com/#t [2] +Signed-off-by: Shanker Donthineni +Signed-off-by: Chao Liu +Signed-off-by: Chang Liao +Signed-off-by: Kunkun Jiang +Signed-off-by: Shengwei Luo +--- + kernel/irq/internals.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h +index f29d6982b3ce..176daa503ad5 100644 +--- a/kernel/irq/internals.h ++++ b/kernel/irq/internals.h +@@ -12,7 +12,7 @@ + #include + + #ifdef CONFIG_SPARSE_IRQ +-# define IRQ_BITMAP_BITS (NR_IRQS + 8196) ++# define IRQ_BITMAP_BITS (1 << 19) + #else + # define IRQ_BITMAP_BITS NR_IRQS + #endif +-- +2.27.0 + diff --git a/kernel.spec b/kernel.spec index e49d0012c6e711279772d3b2109f833e2b9d3b48..c3e24262da34bd479671e5e56d75b3ba00b4770e 100644 --- a/kernel.spec +++ b/kernel.spec @@ -32,7 +32,7 @@ Name: kernel Version: 4.19.90 -Release: %{hulkrelease}.0222 +Release: %{hulkrelease}.0223 Summary: Linux Kernel License: GPLv2 URL: http://www.kernel.org/ @@ -60,6 +60,10 @@ Source9002: series.conf Source9998: patches.tar.bz2 %endif +Patch0001: 0001-irqchip-gic-v3-Collection-table-support-muti-pages.patch +Patch0002: 0002-genirq-Increase-the-number-of-IRQ-descriptors.patch +Patch0003: 0003-ext4-delete-redundant-uptodate-check-for-buffer.patch + #BuildRequires: BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, tar BuildRequires: bzip2, xz, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk @@ -256,6 +260,10 @@ Applypatches() Applypatches series.conf %{_builddir}/kernel-%{version}/linux-%{KernelVer} %endif +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 + touch .scmversion find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null @@ -809,6 +817,11 @@ fi %changelog +* Mon Oct 23 2023 Luo Shengwei - 4.19.90-2310.3.0.0223 +- irqchip: gic-v3: Collection table support muti pages +- genirq: Increase the number of IRQ descriptors +- ext4: delete redundant uptodate check for buffer + * Wed Oct 18 2023 Zhang Changzhong - 4.19.90-2310.3.0.0222 - !2466 x86/microcode/AMD: Make stub function static inline - !2461 perf/core: Fix reentry problem in perf_output_read_group()