linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Linux kernel set the hypervisor vector table through ATF
@ 2021-05-28  9:26 Dongjiu Geng
  2021-06-01  9:19 ` Mark Rutland
  0 siblings, 1 reply; 7+ messages in thread
From: Dongjiu Geng @ 2021-05-28  9:26 UTC (permalink / raw)
  To: tf-a, catalin.marinas, linux-arm-kernel; +Cc: gengdongjiu.gdj

Hi All,
      when Linux kernel boot from EL1,  there is no method to let
kernel to enter EL2 to enable hypervisor.  so I want to add an SMC
interface between kernel and EL3 ATF to let kernel can set the
hypervisor vector table,  then can enter EL2 to enable hypervisor, as
shown in [1].
Do you agree?  Otherwise there is no method to enter EL2 hypervisor
when kernel boot from EL1, because the hypervisor vector
table(vbar_el2) is unknown.



[1]:
el1_sync:
        cmp     x0, #SMC_SET_VECTORS
        b.ne    2f
        msr     vbar_el2, x1
        b       9f

2:      cmp     x0, #SMC_SOFT_RESTART
        b.ne    3f
        mov     x0, x2
        mov     x2, x4
        mov     x4, x1
        mov     x1, x3
        br      x4                              // no return

3:      cmp     x0, #SMC_RESET_VECTORS
        beq     9f                              // Nothing to reset!

        ldr     x0, =SMC_STUB_ERR
        eret

9:      mov     x0, xzr
        eret
ENDPROC(el1_sync)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-02 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28  9:26 Linux kernel set the hypervisor vector table through ATF Dongjiu Geng
2021-06-01  9:19 ` Mark Rutland
2021-06-01  9:53   ` Dongjiu Geng
2021-06-01 10:09     ` Marc Zyngier
2021-06-01 13:34       ` Dongjiu Geng
2021-06-01 13:43         ` Marc Zyngier
2021-06-02 13:27           ` Dongjiu Geng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).