[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9b5897b-a4a3-0ec1-10d1-520c8b7c89cc@arm.com>
Date: Thu, 7 May 2020 17:21:59 +0100
From: James Morse <james.morse@....com>
To: Pavel Tatashin <pasha.tatashin@...een.com>
Cc: jmorris@...ei.org, sashal@...nel.org, ebiederm@...ssion.com,
kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
corbet@....net, catalin.marinas@....com, will@...nel.org,
linux-arm-kernel@...ts.infradead.org, maz@...nel.org,
vladimir.murzin@....com, matthias.bgg@...il.com,
bhsharma@...hat.com, linux-mm@...ck.org, mark.rutland@....com,
steve.capper@....com, rfontana@...hat.com, tglx@...utronix.de,
selindag@...il.com
Subject: Re: [PATCH v9 15/18] arm64: kexec: kexec EL2 vectors
Hi Pavel,
What happened to the subject?
(it really needs a verb to make any sense)
On 26/03/2020 03:24, Pavel Tatashin wrote:
> If we have a EL2 mode without VHE, the EL2 vectors are needed in order
> to switch to EL2 and jump to new world with hyperivsor privileges.
Yes, but the hyp-stub has an API to let you do this... but you need your own version.
Could you explain why in the commit message?
(spelling: hyperivsor)
> diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c
> index ab571fca9bd1..bd398def7627 100644
> --- a/arch/arm64/kernel/machine_kexec.c
> +++ b/arch/arm64/kernel/machine_kexec.c
> @@ -84,6 +84,11 @@ int machine_kexec_post_load(struct kimage *kimage)
> kern_reloc_arg->head = kimage->head;
> kern_reloc_arg->entry_addr = kimage->start;
> kern_reloc_arg->kern_arg0 = kimage->arch.dtb_mem;
> + /* Setup vector table only when EL2 is available, but no VHE */
> + if (is_hyp_mode_available() && !is_kernel_in_hyp_mode()) {
> + kern_reloc_arg->el2_vector = __pa(reloc_code)
> + + kexec_el2_vectors_offset;
> + }
Why does the asm relocation code need to know where the vector is? It must access it via HVC.
Thanks,
James
Powered by blists - more mailing lists