Skip to content

Commit 0da125d

Browse files
committed
Merge branch 'master' of https://github.com/torvalds/linux
2 parents 4a7ec7f + d91a46d commit 0da125d

54 files changed

Lines changed: 431 additions & 155 deletions

Some content is hidden

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

‎Documentation/arch/riscv/uabi.rst‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ ISA string ordering in /proc/cpuinfo
77
------------------------------------
88

99
The canonical order of ISA extension names in the ISA string is defined in
10-
chapter 27 of the unprivileged specification.
10+
Chapter 27 of the RISC-V Instruction Set Manual Volume I Unprivileged ISA
11+
(Document Version 20191213).
12+
1113
The specification uses vague wording, such as should, when it comes to ordering,
1214
so for our purposes the following rules apply:
1315

‎Documentation/process/conclave.rst‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
Linux kernel project continuity
4+
===============================
5+
6+
The Linux kernel development project is widely distributed, with over
7+
100 maintainers each working to keep changes moving through their own
8+
repositories. The final step, though, is a centralized one where changes
9+
are pulled into the mainline repository. That is normally done by Linus
10+
Torvalds but, as was demonstrated by the 4.19 release in 2018, there are
11+
others who can do that work when the need arises.
12+
13+
Should the maintainers of that repository become unwilling or unable to
14+
do that work going forward (including facilitating a transition), the
15+
project will need to find one or more replacements without delay. The
16+
process by which that will be done is listed below. $ORGANIZER is the
17+
last Maintainer Summit organizer or the current Linux Foundation (LF)
18+
Technical Advisory Board (TAB) Chair as a backup.
19+
20+
- Within 72 hours, $ORGANIZER will open a discussion with the invitees
21+
of the most recently concluded Maintainers Summit. A meeting of those
22+
invitees and the TAB, either online or in-person, will be set as soon
23+
as possible in a way that maximizes the number of people who can
24+
participate.
25+
26+
- If there has been no Maintainers Summit in the last 15 months, the set of
27+
invitees for this meeting will be determined by the TAB.
28+
29+
- The invitees to this meeting may bring in other maintainers as needed.
30+
31+
- This meeting, chaired by $ORGANIZER, will consider options for the
32+
ongoing management of the top-level kernel repository consistent with
33+
the expectation that it maximizes the long term health of the project
34+
and its community.
35+
36+
- Within two weeks, a representative of this group will communicate to the
37+
broader community, using the ksummit@lists.linux.dev mailing list, what
38+
the next steps will be.
39+
40+
The Linux Foundation, as guided by the TAB, will take the steps
41+
necessary to support and implement this plan.

‎Documentation/process/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ beyond).
6868
stable-kernel-rules
6969
management-style
7070
researcher-guidelines
71+
conclave
7172

7273
Dealing with bugs
7374
-----------------

‎arch/arm64/include/asm/kvm_asm.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ void kvm_get_kimage_voffset(struct alt_instr *alt,
300300
__le32 *origptr, __le32 *updptr, int nr_inst);
301301
void kvm_compute_final_ctr_el0(struct alt_instr *alt,
302302
__le32 *origptr, __le32 *updptr, int nr_inst);
303+
void kvm_pan_patch_el2_entry(struct alt_instr *alt,
304+
__le32 *origptr, __le32 *updptr, int nr_inst);
303305
void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr_virt,
304306
u64 elr_phys, u64 par, uintptr_t vcpu, u64 far, u64 hpfar);
305307

‎arch/arm64/include/asm/kvm_emulate.h‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,6 @@ static inline unsigned long *vcpu_hcr(struct kvm_vcpu *vcpu)
119119
return (unsigned long *)&vcpu->arch.hcr_el2;
120120
}
121121

122-
static inline void vcpu_clear_wfx_traps(struct kvm_vcpu *vcpu)
123-
{
124-
vcpu->arch.hcr_el2 &= ~HCR_TWE;
125-
if (atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count) ||
126-
vcpu->kvm->arch.vgic.nassgireq)
127-
vcpu->arch.hcr_el2 &= ~HCR_TWI;
128-
else
129-
vcpu->arch.hcr_el2 |= HCR_TWI;
130-
}
131-
132-
static inline void vcpu_set_wfx_traps(struct kvm_vcpu *vcpu)
133-
{
134-
vcpu->arch.hcr_el2 |= HCR_TWE;
135-
vcpu->arch.hcr_el2 |= HCR_TWI;
136-
}
137-
138122
static inline unsigned long vcpu_get_vsesr(struct kvm_vcpu *vcpu)
139123
{
140124
return vcpu->arch.vsesr_el2;

‎arch/arm64/include/asm/kvm_pgtable.h‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@ typedef u64 kvm_pte_t;
8787

8888
#define KVM_PTE_LEAF_ATTR_HI_SW GENMASK(58, 55)
8989

90-
#define KVM_PTE_LEAF_ATTR_HI_S1_XN BIT(54)
90+
#define __KVM_PTE_LEAF_ATTR_HI_S1_XN BIT(54)
91+
#define __KVM_PTE_LEAF_ATTR_HI_S1_UXN BIT(54)
92+
#define __KVM_PTE_LEAF_ATTR_HI_S1_PXN BIT(53)
93+
94+
#define KVM_PTE_LEAF_ATTR_HI_S1_XN \
95+
({ cpus_have_final_cap(ARM64_KVM_HVHE) ? \
96+
(__KVM_PTE_LEAF_ATTR_HI_S1_UXN | \
97+
__KVM_PTE_LEAF_ATTR_HI_S1_PXN) : \
98+
__KVM_PTE_LEAF_ATTR_HI_S1_XN; })
9199

92100
#define KVM_PTE_LEAF_ATTR_HI_S2_XN GENMASK(54, 53)
93101

@@ -293,8 +301,8 @@ typedef bool (*kvm_pgtable_force_pte_cb_t)(u64 addr, u64 end,
293301
* children.
294302
* @KVM_PGTABLE_WALK_SHARED: Indicates the page-tables may be shared
295303
* with other software walkers.
296-
* @KVM_PGTABLE_WALK_HANDLE_FAULT: Indicates the page-table walk was
297-
* invoked from a fault handler.
304+
* @KVM_PGTABLE_WALK_IGNORE_EAGAIN: Don't terminate the walk early if
305+
* the walker returns -EAGAIN.
298306
* @KVM_PGTABLE_WALK_SKIP_BBM_TLBI: Visit and update table entries
299307
* without Break-before-make's
300308
* TLB invalidation.
@@ -307,7 +315,7 @@ enum kvm_pgtable_walk_flags {
307315
KVM_PGTABLE_WALK_TABLE_PRE = BIT(1),
308316
KVM_PGTABLE_WALK_TABLE_POST = BIT(2),
309317
KVM_PGTABLE_WALK_SHARED = BIT(3),
310-
KVM_PGTABLE_WALK_HANDLE_FAULT = BIT(4),
318+
KVM_PGTABLE_WALK_IGNORE_EAGAIN = BIT(4),
311319
KVM_PGTABLE_WALK_SKIP_BBM_TLBI = BIT(5),
312320
KVM_PGTABLE_WALK_SKIP_CMO = BIT(6),
313321
};

‎arch/arm64/include/asm/sysreg.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191
*/
9292
#define pstate_field(op1, op2) ((op1) << Op1_shift | (op2) << Op2_shift)
9393
#define PSTATE_Imm_shift CRm_shift
94-
#define SET_PSTATE(x, r) __emit_inst(0xd500401f | PSTATE_ ## r | ((!!x) << PSTATE_Imm_shift))
94+
#define ENCODE_PSTATE(x, r) (0xd500401f | PSTATE_ ## r | ((!!x) << PSTATE_Imm_shift))
95+
#define SET_PSTATE(x, r) __emit_inst(ENCODE_PSTATE(x, r))
9596

9697
#define PSTATE_PAN pstate_field(0, 4)
9798
#define PSTATE_UAO pstate_field(0, 3)

‎arch/arm64/kernel/image-vars.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ KVM_NVHE_ALIAS(kvm_patch_vector_branch);
8686
KVM_NVHE_ALIAS(kvm_update_va_mask);
8787
KVM_NVHE_ALIAS(kvm_get_kimage_voffset);
8888
KVM_NVHE_ALIAS(kvm_compute_final_ctr_el0);
89+
KVM_NVHE_ALIAS(kvm_pan_patch_el2_entry);
8990
KVM_NVHE_ALIAS(spectre_bhb_patch_loop_iter);
9091
KVM_NVHE_ALIAS(spectre_bhb_patch_loop_mitigation_enable);
9192
KVM_NVHE_ALIAS(spectre_bhb_patch_wa3);

‎arch/arm64/kvm/arm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ static bool kvm_vcpu_should_clear_twi(struct kvm_vcpu *vcpu)
569569
return kvm_wfi_trap_policy == KVM_WFX_NOTRAP;
570570

571571
return single_task_running() &&
572+
vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 &&
572573
(atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count) ||
573574
vcpu->kvm->arch.vgic.nassgireq);
574575
}

‎arch/arm64/kvm/at.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ static int walk_s1(struct kvm_vcpu *vcpu, struct s1_walk_info *wi,
403403
struct s1_walk_result *wr, u64 va)
404404
{
405405
u64 va_top, va_bottom, baddr, desc, new_desc, ipa;
406+
struct kvm_s2_trans s2_trans = {};
406407
int level, stride, ret;
407408

408409
level = wi->sl;
@@ -420,8 +421,6 @@ static int walk_s1(struct kvm_vcpu *vcpu, struct s1_walk_info *wi,
420421
ipa = baddr | index;
421422

422423
if (wi->s2) {
423-
struct kvm_s2_trans s2_trans = {};
424-
425424
ret = kvm_walk_nested_s2(vcpu, ipa, &s2_trans);
426425
if (ret) {
427426
fail_s1_walk(wr,
@@ -515,6 +514,11 @@ static int walk_s1(struct kvm_vcpu *vcpu, struct s1_walk_info *wi,
515514
new_desc |= PTE_AF;
516515

517516
if (new_desc != desc) {
517+
if (wi->s2 && !kvm_s2_trans_writable(&s2_trans)) {
518+
fail_s1_walk(wr, ESR_ELx_FSC_PERM_L(level), true);
519+
return -EPERM;
520+
}
521+
518522
ret = kvm_swap_s1_desc(vcpu, ipa, desc, new_desc, wi);
519523
if (ret)
520524
return ret;

0 commit comments

Comments
 (0)