Skip to content

Commit 83c2a39

Browse files
committed
Rebuild rocky10_1 with kernel-6.12.0-124.13.1.el10_1
Rebuild_History BUILDABLE Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50% Number of commits in upstream range v6.12~1..kernel-mainline: 79692 Number of commits in rpm: 101 Number of commits matched with upstream: 94 (93.07%) Number of commits in upstream but not in rpm: 79598 Number of commits NOT found in upstream: 7 (6.93%) Rebuilding Kernel on Branch rocky10_1_rebuild_kernel-6.12.0-124.13.1.el10_1 for kernel-6.12.0-124.13.1.el10_1 Clean Cherry Picks: 86 (91.49%) Empty Cherry Picks: 8 (8.51%) _______________________________ Full Details Located here: ciq/ciq_backports/kernel-6.12.0-124.13.1.el10_1/rebuild.details.txt Includes: * git commit header above * Empty Commits with upstream SHA * RPM ChangeLog Entries that could not be matched Individual Empty Commit failures contained in the same containing directory. The git message for empty commits will have the path for the failed commit. File names are the first 8 characters of the upstream SHA
1 parent 6d7f3f9 commit 83c2a39

File tree

67 files changed

+158898
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+158898
-184
lines changed

Makefile.rhelver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RHEL_MINOR = 1
1212
#
1313
# Use this spot to avoid future merge conflicts.
1414
# Do not trim this comment.
15-
RHEL_RELEASE = 124.8.1
15+
RHEL_RELEASE = 124.13.1
1616

1717
#
1818
# RHEL_REBASE_NUM

arch/powerpc/include/asm/hvcall.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@
270270
#define H_QUERY_INT_STATE 0x1E4
271271
#define H_POLL_PENDING 0x1D8
272272
#define H_ILLAN_ATTRIBUTES 0x244
273+
#define H_ADD_LOGICAL_LAN_BUFFERS 0x248
273274
#define H_MODIFY_HEA_QP 0x250
274275
#define H_QUERY_HEA_QP 0x254
275276
#define H_QUERY_HEA 0x258

arch/x86/include/asm/kexec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#include <linux/bits.h>
1616

17-
#define RELOC_KERNEL_PRESERVE_CONTEXT BIT(0)
18-
#define RELOC_KERNEL_HOST_MEM_ENC_ACTIVE BIT(1)
17+
#define RELOC_KERNEL_PRESERVE_CONTEXT BIT(0)
18+
#define RELOC_KERNEL_CACHE_INCOHERENT BIT(1)
1919

2020
#endif
2121

arch/x86/include/asm/processor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,8 @@ void __noreturn stop_this_cpu(void *dummy);
744744
void microcode_check(struct cpuinfo_x86 *prev_info);
745745
void store_cpu_caps(struct cpuinfo_x86 *info);
746746

747+
DECLARE_PER_CPU(bool, cache_state_incoherent);
748+
747749
enum l1tf_mitigations {
748750
L1TF_MITIGATION_OFF,
749751
L1TF_MITIGATION_AUTO,

arch/x86/include/asm/tdx.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,11 @@ static inline const char *tdx_dump_mce_info(struct mce *m) { return NULL; }
221221
static inline const struct tdx_sys_info *tdx_get_sysinfo(void) { return NULL; }
222222
#endif /* CONFIG_INTEL_TDX_HOST */
223223

224+
#ifdef CONFIG_KEXEC_CORE
225+
void tdx_cpu_flush_cache_for_kexec(void);
226+
#else
227+
static inline void tdx_cpu_flush_cache_for_kexec(void) { }
228+
#endif
229+
224230
#endif /* !__ASSEMBLY__ */
225231
#endif /* _ASM_X86_TDX_H */

arch/x86/kernel/cpu/amd.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,23 @@ static void early_detect_mem_encrypt(struct cpuinfo_x86 *c)
530530
{
531531
u64 msr;
532532

533+
/*
534+
* Mark using WBINVD is needed during kexec on processors that
535+
* support SME. This provides support for performing a successful
536+
* kexec when going from SME inactive to SME active (or vice-versa).
537+
*
538+
* The cache must be cleared so that if there are entries with the
539+
* same physical address, both with and without the encryption bit,
540+
* they don't race each other when flushed and potentially end up
541+
* with the wrong entry being committed to memory.
542+
*
543+
* Test the CPUID bit directly because with mem_encrypt=off the
544+
* BSP will clear the X86_FEATURE_SME bit and the APs will not
545+
* see it set after that.
546+
*/
547+
if (c->extended_cpuid_level >= 0x8000001f && (cpuid_eax(0x8000001f) & BIT(0)))
548+
__this_cpu_write(cache_state_incoherent, true);
549+
533550
/*
534551
* BIOS support is required for SME and SEV.
535552
* For SME: If BIOS has enabled SME then adjust x86_phys_bits by

arch/x86/kernel/cpu/microcode/intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static enum ucode_state __apply_microcode(struct ucode_cpu_info *uci,
323323
* Writeback and invalidate caches before updating microcode to avoid
324324
* internal issues depending on what the microcode is updating.
325325
*/
326-
native_wbinvd();
326+
wbinvd();
327327

328328
/* write microcode via MSR 0x79 */
329329
native_wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits);

arch/x86/kernel/machine_kexec_64.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <asm/set_memory.h>
3030
#include <asm/cpu.h>
3131
#include <asm/efi.h>
32+
#include <asm/processor.h>
3233

3334
#ifdef CONFIG_ACPI
3435
/*
@@ -404,11 +405,11 @@ void __nocfi machine_kexec(struct kimage *image)
404405
relocate_kernel_flags |= RELOC_KERNEL_PRESERVE_CONTEXT;
405406

406407
/*
407-
* This must be done before load_segments() since if call depth tracking
408-
* is used then GS must be valid to make any function calls.
408+
* This must be done before load_segments() since it resets
409+
* GS to 0 and percpu data needs the correct GS to work.
409410
*/
410-
if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
411-
relocate_kernel_flags |= RELOC_KERNEL_HOST_MEM_ENC_ACTIVE;
411+
if (this_cpu_read(cache_state_incoherent))
412+
relocate_kernel_flags |= RELOC_KERNEL_CACHE_INCOHERENT;
412413

413414
/*
414415
* The segment registers are funny things, they have both a
@@ -419,6 +420,11 @@ void __nocfi machine_kexec(struct kimage *image)
419420
*
420421
* I take advantage of this here by force loading the
421422
* segments, before I zap the gdt with an invalid value.
423+
*
424+
* load_segments() resets GS to 0. Don't make any function call
425+
* after here since call depth tracking uses percpu variables to
426+
* operate (relocate_kernel() is explicitly ignored by call depth
427+
* tracking).
422428
*/
423429
load_segments();
424430
/*

arch/x86/kernel/process.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ EXPORT_PER_CPU_SYMBOL(cpu_tss_rw);
8787
DEFINE_PER_CPU(bool, __tss_limit_invalid);
8888
EXPORT_PER_CPU_SYMBOL_GPL(__tss_limit_invalid);
8989

90+
/*
91+
* The cache may be in an incoherent state and needs flushing during kexec.
92+
* E.g., on SME/TDX platforms, dirty cacheline aliases with and without
93+
* encryption bit(s) can coexist and the cache needs to be flushed before
94+
* booting to the new kernel to avoid the silent memory corruption due to
95+
* dirty cachelines with different encryption property being written back
96+
* to the memory.
97+
*/
98+
DEFINE_PER_CPU(bool, cache_state_incoherent);
99+
90100
/*
91101
* this gets called so that we can store lazy state into memory and copy the
92102
* current task into the new thread.
@@ -813,19 +823,7 @@ void __noreturn stop_this_cpu(void *dummy)
813823
disable_local_APIC();
814824
mcheck_cpu_clear(c);
815825

816-
/*
817-
* Use wbinvd on processors that support SME. This provides support
818-
* for performing a successful kexec when going from SME inactive
819-
* to SME active (or vice-versa). The cache must be cleared so that
820-
* if there are entries with the same physical address, both with and
821-
* without the encryption bit, they don't race each other when flushed
822-
* and potentially end up with the wrong entry being committed to
823-
* memory.
824-
*
825-
* Test the CPUID bit directly because the machine might've cleared
826-
* X86_FEATURE_SME due to cmdline options.
827-
*/
828-
if (c->extended_cpuid_level >= 0x8000001f && (cpuid_eax(0x8000001f) & BIT(0)))
826+
if (this_cpu_read(cache_state_incoherent))
829827
wbinvd();
830828

831829
/*

0 commit comments

Comments
 (0)