Skip to content

Commit e1a6d24

Browse files
authored
Merge pull request #862 from nathanchance/fix-android14-5.15-kvm-patch
patches: android14-5.15: Use 6.1 version of KVM patch
2 parents 599a114 + 7bb1e9d commit e1a6d24

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

patches/android14-5.15/20250728_justinstitt_kvm_arm64_sys_regs_disable_wuninitialized_const_pointer_warning.patch

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ From git@z Thu Jan 1 00:00:00 1970
22
Subject: [PATCH] KVM: arm64: sys_regs: disable
33
-Wuninitialized-const-pointer warning
44
From: Justin Stitt <[email protected]>
5-
Date: Mon, 28 Jul 2025 14:04:24 -0700
6-
Message-Id: <20250728-b4-stable-disable-uninit-ptr-warn-5-15-v1-1-e373a895b9c5@google.com>
5+
Date: Mon, 28 Jul 2025 14:07:36 -0700
6+
Message-Id: <20250728-stable-disable-unit-ptr-warn-v1-1-958be9b66520@google.com>
77
MIME-Version: 1.0
88
Content-Type: text/plain; charset="utf-8"
99
Content-Transfer-Encoding: 7bit
@@ -13,8 +13,8 @@ get_clidr_el1() is an uninitialized const pointer. get_clidr_el1()
1313
doesn't really care since it casts away the const-ness anyways -- it is
1414
a false positive.
1515

16-
| ../arch/arm64/kvm/sys_regs.c:2838:23: warning: variable 'clidr' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
17-
| 2838 | get_clidr_el1(NULL, &clidr); /* Ugly... */
16+
| ../arch/arm64/kvm/sys_regs.c:2978:23: warning: variable 'clidr' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
17+
| 2978 | get_clidr_el1(NULL, &clidr); /* Ugly... */
1818
| | ^~~~~
1919

2020
Disable this warning for sys_regs.o with an iron fist as it doesn't make
@@ -29,28 +29,31 @@ Cc: [email protected]
2929
Fixes: 7c8c5e6a9101e ("arm64: KVM: system register handling")
3030
Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd091d441f19b319e [1]
3131
Signed-off-by: Justin Stitt <[email protected]>
32-
Link: https://lore.kernel.org/r/20250728-b4-stable-disable-uninit-ptr-warn-5-15-v1-1-e373a895b9c5@google.com
32+
Link: https://lore.kernel.org/r/20250728-stable-disable-unit-ptr-warn-v1-1-958be9b66520@google.com
3333
---
34-
I'm sending a similar patch for 6.1.
34+
I've sent a similar patch for 5.15.
3535
---
3636
arch/arm64/kvm/Makefile | 3 +++
3737
1 file changed, 3 insertions(+)
3838

3939
diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile
40-
index 989bb5dad2c8..109cca425d3e 100644
40+
index 5e33c2d4645a..5fdb5331bfad 100644
4141
--- a/arch/arm64/kvm/Makefile
4242
+++ b/arch/arm64/kvm/Makefile
43-
@@ -25,3 +25,6 @@ kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
44-
vgic/vgic-its.o vgic/vgic-debug.o
43+
@@ -24,6 +24,9 @@ kvm-y += arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
44+
45+
kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o pmu.o
4546

46-
kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o
47-
+
4847
+# Work around a false positive Clang 22 -Wuninitialized-const-pointer warning
4948
+CFLAGS_sys_regs.o := $(call cc-disable-warning, uninitialized-const-pointer)
49+
+
50+
always-y := hyp_constants.h hyp-constants.s
51+
52+
define rule_gen_hyp_constants
5053

5154
---
52-
base-commit: 8bb7eca972ad531c9b149c0a51ab43a417385813
53-
change-id: 20250728-b4-stable-disable-uninit-ptr-warn-5-15-c0c9db3df206
55+
base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
56+
change-id: 20250728-stable-disable-unit-ptr-warn-281fee82539c
5457

5558
Best regards,
5659
--

0 commit comments

Comments
 (0)