Skip to content

Commit 0d56f71

Browse files
committed
Merge tag 'v6.12.18' into 6.12-main
This is the 6.12.18 stable release # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmfLLCUACgkQONu9yGCS # aT7PHxAAx8vhCAkxlbs9y5NnlZ4eue3QktFvqPtgpjUat7WhPlWoJ8HqgduHUEdX # HQZ5tAOeAW99/eEVP91Zk9iVmhcyUPjkRS5OeZcNKUMirPO+T/0CRD+1vtMYHjz8 # rC7IR87Cpf6tBtxYb6y1xkTZmb5WjVH4Asn04UsuplrF3MK0/it5+VVOEK3PGFWJ # XI41xzL3X112lLyFXajMDigEjzH8WghHQp7fYrWJ7BYSvCgOnYbNy8qOw+og2cxU # iqfT7johueiBq2FbRcZ+BlTJWD7yHDk2QP1cRjSGMX5SP97F7+/Yt1JAxkwCKOlq # ba3E88OPmkm7cEhuMC9Sa6gv4ta/jFujfZHyW57JoHUPAIdygWCJYKov8R01yJn6 # ss7ALyZ+zgjkE6zoljGOprHK5O3dwHhMrRGm11mNBqGA24NLZwWXRbC2yw0zU99i # E5KggvM22ITzYFFjo8SF2HDWOBHkvzlQM4xrSzc7eBqKrIxcR+R1CSYyQEo8R/9a # XpddJzTnISOtoBmRdx4eFZ7lwYLfvPZK9q7KyiLZti1yVRqN2TkvVSdh1CkO8DyS # Mj7NUWV9EF6EVAo/bQ7f29RzqBMSo68Om+SEBmRZoXE7TAXISv9oI6lMiuzRhzAx # TCReFIpq82vurxkXxFlDpPOAwtvjpnvFVsfel8kAyeP/9Iuul1A= # =EWm4 # -----END PGP SIGNATURE----- # gpg: Signature made Fri Mar 7 18:25:57 2025 CET # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Can't check signature: No public key
2 parents be28b47 + 105a319 commit 0d56f71

173 files changed

Lines changed: 2929 additions & 1406 deletions

File tree

Some content is hidden

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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 12
4-
SUBLEVEL = 17
4+
SUBLEVEL = 18
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

arch/arm64/include/asm/kvm_host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ int kvm_arm_pvtime_has_attr(struct kvm_vcpu *vcpu,
12431243
extern unsigned int __ro_after_init kvm_arm_vmid_bits;
12441244
int __init kvm_arm_vmid_alloc_init(void);
12451245
void __init kvm_arm_vmid_alloc_free(void);
1246-
bool kvm_arm_vmid_update(struct kvm_vmid *kvm_vmid);
1246+
void kvm_arm_vmid_update(struct kvm_vmid *kvm_vmid);
12471247
void kvm_arm_vmid_clear_active(void);
12481248

12491249
static inline void kvm_arm_pvtime_vcpu_init(struct kvm_vcpu_arch *vcpu_arch)

arch/arm64/kvm/arm.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,16 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
580580
mmu = vcpu->arch.hw_mmu;
581581
last_ran = this_cpu_ptr(mmu->last_vcpu_ran);
582582

583+
/*
584+
* Ensure a VMID is allocated for the MMU before programming VTTBR_EL2,
585+
* which happens eagerly in VHE.
586+
*
587+
* Also, the VMID allocator only preserves VMIDs that are active at the
588+
* time of rollover, so KVM might need to grab a new VMID for the MMU if
589+
* this is called from kvm_sched_in().
590+
*/
591+
kvm_arm_vmid_update(&mmu->vmid);
592+
583593
/*
584594
* We guarantee that both TLBs and I-cache are private to each
585595
* vcpu. If detecting that a vcpu from the same VM has
@@ -1155,18 +1165,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
11551165
*/
11561166
preempt_disable();
11571167

1158-
/*
1159-
* The VMID allocator only tracks active VMIDs per
1160-
* physical CPU, and therefore the VMID allocated may not be
1161-
* preserved on VMID roll-over if the task was preempted,
1162-
* making a thread's VMID inactive. So we need to call
1163-
* kvm_arm_vmid_update() in non-premptible context.
1164-
*/
1165-
if (kvm_arm_vmid_update(&vcpu->arch.hw_mmu->vmid) &&
1166-
has_vhe())
1167-
__load_stage2(vcpu->arch.hw_mmu,
1168-
vcpu->arch.hw_mmu->arch);
1169-
11701168
kvm_pmu_flush_hwstate(vcpu);
11711169

11721170
local_irq_disable();

arch/arm64/kvm/vmid.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,10 @@ void kvm_arm_vmid_clear_active(void)
135135
atomic64_set(this_cpu_ptr(&active_vmids), VMID_ACTIVE_INVALID);
136136
}
137137

138-
bool kvm_arm_vmid_update(struct kvm_vmid *kvm_vmid)
138+
void kvm_arm_vmid_update(struct kvm_vmid *kvm_vmid)
139139
{
140140
unsigned long flags;
141141
u64 vmid, old_active_vmid;
142-
bool updated = false;
143142

144143
vmid = atomic64_read(&kvm_vmid->id);
145144

@@ -157,21 +156,17 @@ bool kvm_arm_vmid_update(struct kvm_vmid *kvm_vmid)
157156
if (old_active_vmid != 0 && vmid_gen_match(vmid) &&
158157
0 != atomic64_cmpxchg_relaxed(this_cpu_ptr(&active_vmids),
159158
old_active_vmid, vmid))
160-
return false;
159+
return;
161160

162161
raw_spin_lock_irqsave(&cpu_vmid_lock, flags);
163162

164163
/* Check that our VMID belongs to the current generation. */
165164
vmid = atomic64_read(&kvm_vmid->id);
166-
if (!vmid_gen_match(vmid)) {
165+
if (!vmid_gen_match(vmid))
167166
vmid = new_vmid(kvm_vmid);
168-
updated = true;
169-
}
170167

171168
atomic64_set(this_cpu_ptr(&active_vmids), vmid);
172169
raw_spin_unlock_irqrestore(&cpu_vmid_lock, flags);
173-
174-
return updated;
175170
}
176171

177172
/*

arch/arm64/mm/init.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,7 @@ void __init arm64_memblock_init(void)
278278

279279
if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) {
280280
extern u16 memstart_offset_seed;
281-
282-
/*
283-
* Use the sanitised version of id_aa64mmfr0_el1 so that linear
284-
* map randomization can be enabled by shrinking the IPA space.
285-
*/
286-
u64 mmfr0 = read_sanitised_ftr_reg(SYS_ID_AA64MMFR0_EL1);
281+
u64 mmfr0 = read_cpuid(ID_AA64MMFR0_EL1);
287282
int parange = cpuid_feature_extract_unsigned_field(
288283
mmfr0, ID_AA64MMFR0_EL1_PARANGE_SHIFT);
289284
s64 range = linear_region_size -

arch/riscv/include/asm/futex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
9393
_ASM_EXTABLE_UACCESS_ERR(1b, 3b, %[r]) \
9494
_ASM_EXTABLE_UACCESS_ERR(2b, 3b, %[r]) \
9595
: [r] "+r" (ret), [v] "=&r" (val), [u] "+m" (*uaddr), [t] "=&r" (tmp)
96-
: [ov] "Jr" (oldval), [nv] "Jr" (newval)
96+
: [ov] "Jr" ((long)(int)oldval), [nv] "Jr" (newval)
9797
: "memory");
9898
__disable_user_access();
9999

arch/riscv/kernel/cacheinfo.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ int populate_cache_leaves(unsigned int cpu)
108108
if (!np)
109109
return -ENOENT;
110110

111-
if (of_property_read_bool(np, "cache-size"))
111+
if (of_property_present(np, "cache-size"))
112112
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
113-
if (of_property_read_bool(np, "i-cache-size"))
113+
if (of_property_present(np, "i-cache-size"))
114114
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
115-
if (of_property_read_bool(np, "d-cache-size"))
115+
if (of_property_present(np, "d-cache-size"))
116116
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
117117

118118
prev = np;
@@ -125,11 +125,11 @@ int populate_cache_leaves(unsigned int cpu)
125125
break;
126126
if (level <= levels)
127127
break;
128-
if (of_property_read_bool(np, "cache-size"))
128+
if (of_property_present(np, "cache-size"))
129129
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
130-
if (of_property_read_bool(np, "i-cache-size"))
130+
if (of_property_present(np, "i-cache-size"))
131131
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
132-
if (of_property_read_bool(np, "d-cache-size"))
132+
if (of_property_present(np, "d-cache-size"))
133133
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
134134
levels = level;
135135
}

arch/riscv/kernel/cpufeature.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ static void __init riscv_resolve_isa(unsigned long *source_isa,
454454
if (bit < RISCV_ISA_EXT_BASE)
455455
*this_hwcap |= isa2hwcap[bit];
456456
}
457-
} while (loop && memcmp(prev_resolved_isa, resolved_isa, sizeof(prev_resolved_isa)));
457+
} while (loop && !bitmap_equal(prev_resolved_isa, resolved_isa, RISCV_ISA_EXT_MAX));
458458
}
459459

460460
static void __init match_isa_ext(const char *name, const char *name_end, unsigned long *bitmap)

arch/riscv/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ void __init setup_arch(char **cmdline_p)
288288

289289
riscv_init_cbo_blocksizes();
290290
riscv_fill_hwcap();
291-
init_rt_signal_env();
292291
apply_boot_alternatives();
292+
init_rt_signal_env();
293293

294294
if (IS_ENABLED(CONFIG_RISCV_ISA_ZICBOM) &&
295295
riscv_isa_extension_available(NULL, ZICBOM))

arch/riscv/kernel/signal.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ static size_t get_rt_frame_size(bool cal_all)
215215
if (cal_all || riscv_v_vstate_query(task_pt_regs(current)))
216216
total_context_size += riscv_v_sc_size;
217217
}
218-
/*
219-
* Preserved a __riscv_ctx_hdr for END signal context header if an
220-
* extension uses __riscv_extra_ext_header
221-
*/
222-
if (total_context_size)
223-
total_context_size += sizeof(struct __riscv_ctx_hdr);
224218

225219
frame_size += total_context_size;
226220

0 commit comments

Comments
 (0)