mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Kossifidis <mick@ics.forth.gr>
To: Nick Kossifidis <mick@ics.forth.gr>
Cc: palmer@dabbelt.com, paul.walmsley@sifive.com,
	aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, Alexandre Ghiti <alex@ghiti.fr>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/3] riscv: Don't use va_pa_offset on kdump
Date: Fri, 07 Jan 2022 20:03:59 +0200	[thread overview]
Message-ID: <70fe8aa8bfe3923308e6248377577f58@mailhost.ics.forth.gr> (raw)
In-Reply-To: <20211126180411.187597-1-mick@ics.forth.gr>

Hello Palmer,

Any updates on those 3 patches ?

Regards,
Nick

Στις 2021-11-26 20:04, Nick Kossifidis έγραψε:
> On kdump instead of using an intermediate step to relocate the kernel,
> that lives in a "control buffer" outside the current kernel's mapping,
> we jump to the crash kernel directly by calling 
> riscv_kexec_norelocate().
> The current implementation uses va_pa_offset while switching to 
> physical
> addressing, however since we moved the kernel outside the linear 
> mapping
> this won't work anymore since riscv_kexec_norelocate() is part of the
> kernel mapping and we should use kernel_map.va_kernel_pa_offset, and 
> also
> take XIP kernel into account.
> 
> We don't really need to use va_pa_offset on riscv_kexec_norelocate, we
> can just set STVEC to the physical address of the new kernel instead 
> and
> let the hart jump to the new kernel on the next instruction after 
> setting
> SATP to zero. This fixes kdump and is also simpler/cleaner.
> 
> I tested this on the latest qemu and HiFive Unmatched and works as
> expected.
> 
> v2: I removed the direct jump after setting satp as suggested.
> 
> Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear 
> mapping")
> 
> Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
> Reviewed-by: Alexandre Ghiti <alex@ghiti.fr>
> Cc: <stable@vger.kernel.org> # 5.13
> Cc: <stable@vger.kernel.org> # 5.14


  parent reply	other threads:[~2022-01-07 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 18:04 Nick Kossifidis
2021-11-26 18:04 ` [PATCH 2/3] riscv: use hart id instead of cpu id on machine_kexec Nick Kossifidis
2021-11-26 18:04 ` [PATCH 3/3] riscv: try to allocate crashkern region from 32bit addressible memory Nick Kossifidis
2022-01-07 18:03 ` Nick Kossifidis [this message]
2022-01-09 18:56   ` [PATCH 1/3] riscv: Don't use va_pa_offset on kdump Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70fe8aa8bfe3923308e6248377577f58@mailhost.ics.forth.gr \
    --to=mick@ics.forth.gr \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome