Message ID | 20221010112729.42522-2-emil.renner.berthing@canonical.com |
---|---|
State | New |
Headers | show |
Series | [SRU,K,1/1] UBUNTU: SAUCE: riscv: mm: Force disable sv57 | expand |
Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> On Mon, 10 Oct 2022 at 12:28, Emil Renner Berthing <emil.renner.berthing@canonical.com> wrote: > > From: Alexandre Ghiti <alexandre.ghiti@canonical.com> > > BugLink: https://launchpad.net/bugs/1991790 > > The Kinetic userspace is not yet ready for 5-level page tables. Eg. Go > programs use too many of the higher bits for pointer tagging. > So force disable sv57 even on Qemu which advertices support for it. > > Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com> > Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> > --- > arch/riscv/mm/init.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > index 2c4a64e97aec..18a0c70ed313 100644 > --- a/arch/riscv/mm/init.c > +++ b/arch/riscv/mm/init.c > @@ -775,6 +775,10 @@ static __init void set_satp_mode(void) > disable_pgtable_l4(); > } > > + /* UBUNTU: Force disable sv57 and fallback to sv48 */ > + if (pgtable_l5_enabled) > + disable_pgtable_l5(); > + > memset(early_pg_dir, 0, PAGE_SIZE); > memset(early_p4d, 0, PAGE_SIZE); > memset(early_pud, 0, PAGE_SIZE); > -- > 2.37.2 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 2c4a64e97aec..18a0c70ed313 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -775,6 +775,10 @@ static __init void set_satp_mode(void) disable_pgtable_l4(); } + /* UBUNTU: Force disable sv57 and fallback to sv48 */ + if (pgtable_l5_enabled) + disable_pgtable_l5(); + memset(early_pg_dir, 0, PAGE_SIZE); memset(early_p4d, 0, PAGE_SIZE); memset(early_pud, 0, PAGE_SIZE);