Skip to content

Commit 640db5f

Browse files
committed
Merge tag 'v5.10.60' into 5.10-main
This is the 5.10.60 stable release # gpg verification failed.
2 parents db304bd + 2c5bd94 commit 640db5f

File tree

106 files changed

+832
-368
lines changed

Some content is hidden

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

106 files changed

+832
-368
lines changed

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 = 5
33
PATCHLEVEL = 10
4-
SUBLEVEL = 59
4+
SUBLEVEL = 60
55
EXTRAVERSION =
66
NAME = Dare mighty things
77

arch/arc/kernel/fpu.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,26 @@ void fpu_save_restore(struct task_struct *prev, struct task_struct *next)
5757

5858
void fpu_init_task(struct pt_regs *regs)
5959
{
60+
const unsigned int fwe = 0x80000000;
61+
6062
/* default rounding mode */
6163
write_aux_reg(ARC_REG_FPU_CTRL, 0x100);
6264

63-
/* set "Write enable" to allow explicit write to exception flags */
64-
write_aux_reg(ARC_REG_FPU_STATUS, 0x80000000);
65+
/* Initialize to zero: setting requires FWE be set */
66+
write_aux_reg(ARC_REG_FPU_STATUS, fwe);
6567
}
6668

6769
void fpu_save_restore(struct task_struct *prev, struct task_struct *next)
6870
{
6971
struct arc_fpu *save = &prev->thread.fpu;
7072
struct arc_fpu *restore = &next->thread.fpu;
73+
const unsigned int fwe = 0x80000000;
7174

7275
save->ctrl = read_aux_reg(ARC_REG_FPU_CTRL);
7376
save->status = read_aux_reg(ARC_REG_FPU_STATUS);
7477

7578
write_aux_reg(ARC_REG_FPU_CTRL, restore->ctrl);
76-
write_aux_reg(ARC_REG_FPU_STATUS, restore->status);
79+
write_aux_reg(ARC_REG_FPU_STATUS, (fwe | restore->status));
7780
}
7881

7982
#endif

arch/powerpc/kernel/kprobes.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ int kprobe_handler(struct pt_regs *regs)
276276
if (user_mode(regs))
277277
return 0;
278278

279-
if (!(regs->msr & MSR_IR) || !(regs->msr & MSR_DR))
279+
if (!IS_ENABLED(CONFIG_BOOKE) &&
280+
(!(regs->msr & MSR_IR) || !(regs->msr & MSR_DR)))
280281
return 0;
281282

282283
/*

arch/powerpc/kernel/sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ static int __init topology_init(void)
11671167
* CPU. For instance, the boot cpu might never be valid
11681168
* for hotplugging.
11691169
*/
1170-
if (smp_ops->cpu_offline_self)
1170+
if (smp_ops && smp_ops->cpu_offline_self)
11711171
c->hotpluggable = 1;
11721172
#endif
11731173

arch/x86/include/asm/svm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
166166
#define V_IGN_TPR_SHIFT 20
167167
#define V_IGN_TPR_MASK (1 << V_IGN_TPR_SHIFT)
168168

169+
#define V_IRQ_INJECTION_BITS_MASK (V_IRQ_MASK | V_INTR_PRIO_MASK | V_IGN_TPR_MASK)
170+
169171
#define V_INTR_MASKING_SHIFT 24
170172
#define V_INTR_MASKING_MASK (1 << V_INTR_MASKING_SHIFT)
171173

arch/x86/kernel/apic/io_apic.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,8 @@ static struct irq_chip ioapic_chip __read_mostly = {
19481948
.irq_set_affinity = ioapic_set_affinity,
19491949
.irq_retrigger = irq_chip_retrigger_hierarchy,
19501950
.irq_get_irqchip_state = ioapic_irq_get_chip_state,
1951-
.flags = IRQCHIP_SKIP_SET_WAKE,
1951+
.flags = IRQCHIP_SKIP_SET_WAKE |
1952+
IRQCHIP_AFFINITY_PRE_STARTUP,
19521953
};
19531954

19541955
static struct irq_chip ioapic_ir_chip __read_mostly = {
@@ -1961,7 +1962,8 @@ static struct irq_chip ioapic_ir_chip __read_mostly = {
19611962
.irq_set_affinity = ioapic_set_affinity,
19621963
.irq_retrigger = irq_chip_retrigger_hierarchy,
19631964
.irq_get_irqchip_state = ioapic_irq_get_chip_state,
1964-
.flags = IRQCHIP_SKIP_SET_WAKE,
1965+
.flags = IRQCHIP_SKIP_SET_WAKE |
1966+
IRQCHIP_AFFINITY_PRE_STARTUP,
19651967
};
19661968

19671969
static inline void init_IO_APIC_traps(void)

arch/x86/kernel/apic/msi.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,13 @@ msi_set_affinity(struct irq_data *irqd, const struct cpumask *mask, bool force)
8686
* The quirk bit is not set in this case.
8787
* - The new vector is the same as the old vector
8888
* - The old vector is MANAGED_IRQ_SHUTDOWN_VECTOR (interrupt starts up)
89+
* - The interrupt is not yet started up
8990
* - The new destination CPU is the same as the old destination CPU
9091
*/
9192
if (!irqd_msi_nomask_quirk(irqd) ||
9293
cfg->vector == old_cfg.vector ||
9394
old_cfg.vector == MANAGED_IRQ_SHUTDOWN_VECTOR ||
95+
!irqd_is_started(irqd) ||
9496
cfg->dest_apicid == old_cfg.dest_apicid) {
9597
irq_msi_update_msg(irqd, cfg);
9698
return ret;
@@ -178,7 +180,8 @@ static struct irq_chip pci_msi_controller = {
178180
.irq_ack = irq_chip_ack_parent,
179181
.irq_retrigger = irq_chip_retrigger_hierarchy,
180182
.irq_set_affinity = msi_set_affinity,
181-
.flags = IRQCHIP_SKIP_SET_WAKE,
183+
.flags = IRQCHIP_SKIP_SET_WAKE |
184+
IRQCHIP_AFFINITY_PRE_STARTUP,
182185
};
183186

184187
int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec,
@@ -247,7 +250,8 @@ static struct irq_chip pci_msi_ir_controller = {
247250
.irq_mask = pci_msi_mask_irq,
248251
.irq_ack = irq_chip_ack_parent,
249252
.irq_retrigger = irq_chip_retrigger_hierarchy,
250-
.flags = IRQCHIP_SKIP_SET_WAKE,
253+
.flags = IRQCHIP_SKIP_SET_WAKE |
254+
IRQCHIP_AFFINITY_PRE_STARTUP,
251255
};
252256

253257
static struct msi_domain_info pci_msi_ir_domain_info = {
@@ -289,7 +293,8 @@ static struct irq_chip dmar_msi_controller = {
289293
.irq_set_affinity = msi_domain_set_affinity,
290294
.irq_retrigger = irq_chip_retrigger_hierarchy,
291295
.irq_write_msi_msg = dmar_msi_write_msg,
292-
.flags = IRQCHIP_SKIP_SET_WAKE,
296+
.flags = IRQCHIP_SKIP_SET_WAKE |
297+
IRQCHIP_AFFINITY_PRE_STARTUP,
293298
};
294299

295300
static int dmar_msi_init(struct irq_domain *domain,
@@ -381,7 +386,7 @@ static struct irq_chip hpet_msi_controller __ro_after_init = {
381386
.irq_set_affinity = msi_domain_set_affinity,
382387
.irq_retrigger = irq_chip_retrigger_hierarchy,
383388
.irq_write_msi_msg = hpet_msi_write_msg,
384-
.flags = IRQCHIP_SKIP_SET_WAKE,
389+
.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP,
385390
};
386391

387392
static int hpet_msi_init(struct irq_domain *domain,

arch/x86/kernel/cpu/resctrl/monitor.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,14 @@ static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr, unsigned int width)
222222
return chunks >>= shift;
223223
}
224224

225-
static int __mon_event_count(u32 rmid, struct rmid_read *rr)
225+
static u64 __mon_event_count(u32 rmid, struct rmid_read *rr)
226226
{
227227
struct mbm_state *m;
228228
u64 chunks, tval;
229229

230230
tval = __rmid_read(rmid, rr->evtid);
231231
if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) {
232-
rr->val = tval;
233-
return -EINVAL;
232+
return tval;
234233
}
235234
switch (rr->evtid) {
236235
case QOS_L3_OCCUP_EVENT_ID:
@@ -242,12 +241,6 @@ static int __mon_event_count(u32 rmid, struct rmid_read *rr)
242241
case QOS_L3_MBM_LOCAL_EVENT_ID:
243242
m = &rr->d->mbm_local[rmid];
244243
break;
245-
default:
246-
/*
247-
* Code would never reach here because
248-
* an invalid event id would fail the __rmid_read.
249-
*/
250-
return -EINVAL;
251244
}
252245

253246
if (rr->first) {
@@ -297,23 +290,29 @@ void mon_event_count(void *info)
297290
struct rdtgroup *rdtgrp, *entry;
298291
struct rmid_read *rr = info;
299292
struct list_head *head;
293+
u64 ret_val;
300294

301295
rdtgrp = rr->rgrp;
302296

303-
if (__mon_event_count(rdtgrp->mon.rmid, rr))
304-
return;
297+
ret_val = __mon_event_count(rdtgrp->mon.rmid, rr);
305298

306299
/*
307-
* For Ctrl groups read data from child monitor groups.
300+
* For Ctrl groups read data from child monitor groups and
301+
* add them together. Count events which are read successfully.
302+
* Discard the rmid_read's reporting errors.
308303
*/
309304
head = &rdtgrp->mon.crdtgrp_list;
310305

311306
if (rdtgrp->type == RDTCTRL_GROUP) {
312307
list_for_each_entry(entry, head, mon.crdtgrp_list) {
313-
if (__mon_event_count(entry->mon.rmid, rr))
314-
return;
308+
if (__mon_event_count(entry->mon.rmid, rr) == 0)
309+
ret_val = 0;
315310
}
316311
}
312+
313+
/* Report error if none of rmid_reads are successful */
314+
if (ret_val)
315+
rr->val = ret_val;
317316
}
318317

319318
/*

arch/x86/kvm/svm/nested.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ void recalc_intercepts(struct vcpu_svm *svm)
147147

148148
for (i = 0; i < MAX_INTERCEPT; i++)
149149
c->intercepts[i] |= g->intercepts[i];
150+
151+
vmcb_set_intercept(c, INTERCEPT_VMLOAD);
152+
vmcb_set_intercept(c, INTERCEPT_VMSAVE);
150153
}
151154

152155
static void copy_vmcb_control_area(struct vmcb_control_area *dst,
@@ -429,17 +432,20 @@ static void nested_prepare_vmcb_save(struct vcpu_svm *svm, struct vmcb *vmcb12)
429432

430433
static void nested_prepare_vmcb_control(struct vcpu_svm *svm)
431434
{
432-
const u32 mask = V_INTR_MASKING_MASK | V_GIF_ENABLE_MASK | V_GIF_MASK;
435+
const u32 int_ctl_vmcb01_bits =
436+
V_INTR_MASKING_MASK | V_GIF_MASK | V_GIF_ENABLE_MASK;
437+
438+
const u32 int_ctl_vmcb12_bits = V_TPR_MASK | V_IRQ_INJECTION_BITS_MASK;
433439

434440
if (nested_npt_enabled(svm))
435441
nested_svm_init_mmu_context(&svm->vcpu);
436442

437443
svm->vmcb->control.tsc_offset = svm->vcpu.arch.tsc_offset =
438444
svm->vcpu.arch.l1_tsc_offset + svm->nested.ctl.tsc_offset;
439445

440-
svm->vmcb->control.int_ctl =
441-
(svm->nested.ctl.int_ctl & ~mask) |
442-
(svm->nested.hsave->control.int_ctl & mask);
446+
svm->vmcb->control.int_ctl =
447+
(svm->nested.ctl.int_ctl & int_ctl_vmcb12_bits) |
448+
(svm->nested.hsave->control.int_ctl & int_ctl_vmcb01_bits);
443449

444450
svm->vmcb->control.virt_ext = svm->nested.ctl.virt_ext;
445451
svm->vmcb->control.int_vector = svm->nested.ctl.int_vector;

arch/x86/kvm/svm/svm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,17 +1486,17 @@ static void svm_set_vintr(struct vcpu_svm *svm)
14861486

14871487
static void svm_clear_vintr(struct vcpu_svm *svm)
14881488
{
1489-
const u32 mask = V_TPR_MASK | V_GIF_ENABLE_MASK | V_GIF_MASK | V_INTR_MASKING_MASK;
14901489
svm_clr_intercept(svm, INTERCEPT_VINTR);
14911490

14921491
/* Drop int_ctl fields related to VINTR injection. */
1493-
svm->vmcb->control.int_ctl &= mask;
1492+
svm->vmcb->control.int_ctl &= ~V_IRQ_INJECTION_BITS_MASK;
14941493
if (is_guest_mode(&svm->vcpu)) {
1495-
svm->nested.hsave->control.int_ctl &= mask;
1494+
svm->nested.hsave->control.int_ctl &= ~V_IRQ_INJECTION_BITS_MASK;
14961495

14971496
WARN_ON((svm->vmcb->control.int_ctl & V_TPR_MASK) !=
14981497
(svm->nested.ctl.int_ctl & V_TPR_MASK));
1499-
svm->vmcb->control.int_ctl |= svm->nested.ctl.int_ctl & ~mask;
1498+
svm->vmcb->control.int_ctl |= svm->nested.ctl.int_ctl &
1499+
V_IRQ_INJECTION_BITS_MASK;
15001500
}
15011501

15021502
vmcb_mark_dirty(svm->vmcb, VMCB_INTR);

0 commit comments

Comments
 (0)