Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1317985

Re: [PATCH v2 20/21] arm64: VHE: Add support for running Linux in EL2 mode

From "Suzuki K. Poulose" <Suzuki.Poulose@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 20/21] arm64: VHE: Add support for running Linux in EL2 mode
Date 2016-01-26 15:40 +0100
Message-ID <qVcWM-5sj-59@gated-at.bofh.it> (permalink)
References <qURIC-68y-3@gated-at.bofh.it> <qURIG-68y-89@gated-at.bofh.it> <qVctI-5ef-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 26/01/16 14:04, Suzuki K. Poulose wrote:
> On 25/01/16 15:53, Marc Zyngier wrote:
>> With ARMv8.1 VHE, the architecture is able to (almost) transparently
>> run the kernel at EL2, despite being written for EL1.
>>
>> This patch takes care of the "almost" part, mostly preventing the kernel
>> from dropping from EL2 to EL1, and setting up the HYP configuration.
>
>>   #ifdef CONFIG_COMPAT
>> @@ -521,6 +542,15 @@ CPU_LE(    movk    x0, #0x30d0, lsl #16    )    // Clear EE and E0E on LE systems
>>       /* Stage-2 translation */
>>       msr    vttbr_el2, xzr
>>
>> +    cbz    x2, install_el2_stub
>
> Though it is apparent, may be its worth adding a comment here that we don't drop to EL1 here ?
>
>> +
>> +    setup_vtcr x4, x5
>> +
>> +    mov    w20, #BOOT_CPU_MODE_EL2        // This CPU booted in EL2
>> +    isb
>> +    ret
>
>> +
>> +install_el2_stub:
>
> And a comment here mentioning, install the hyp stub and drops to EL1 ?

Also, the comments around el2_setup invocation still says, Drop to EL1 which may
need to be updated.

Cheers
Suzuki

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/21] arm64: Virtualization Host Extension support Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 16/21] arm64: KVM: VHE: Add fpsimd enabling on guest access Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 09/21] arm64: KVM: VHE: Differenciate host/guest sysreg save/restore Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 15/21] arm64: KVM: VHE: Use unified sysreg accessors for timer Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 21/21] arm64: Panic when VHE and non VHE CPUs coexist Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
    Re: [PATCH v2 21/21] arm64: Panic when VHE and non VHE CPUs coexist "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-01-26 15:30 +0100
      Re: [PATCH v2 21/21] arm64: Panic when VHE and non VHE CPUs coexist Marc Zyngier <marc.zyngier@arm.com> - 2016-01-26 15:40 +0100
  [PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2 Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 20/21] arm64: VHE: Add support for running Linux in EL2 mode Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
    Re: [PATCH v2 20/21] arm64: VHE: Add support for running Linux in EL2  mode "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-01-26 15:10 +0100
      Re: [PATCH v2 20/21] arm64: VHE: Add support for running Linux in EL2  mode "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-01-26 15:40 +0100
  [PATCH v2 17/21] arm64: KVM: VHE: Add alternative panic handling Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 05/21] arm64: KVM: VHE: Turn VTCR_EL2 setup into a reusable macro Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:00 +0100
  [PATCH v2 11/21] arm64: KVM: VHE: Use unified system register accessors Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  [PATCH v2 03/21] arm64: Add ARM64_HAS_VIRT_HOST_EXTN feature Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  [PATCH v2 08/21] arm64: KVM: VHE: Introduce unified system register accessors Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  [PATCH v2 04/21] arm64: KVM: Skip HYP setup when already running in HYP Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  [PATCH v2 02/21] arm64: Allow the arch timer to use the HYP timer Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  [PATCH v2 13/21] arm64: KVM: VHE: Make __fpsimd_enabled VHE aware Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  [PATCH v2 14/21] arm64: KVM: VHE: Implement VHE activate/deactivate_traps Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  [PATCH v2 07/21] arm64: KVM: VHE: Patch out kern_hyp_va Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:10 +0100
  Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Arnd Bergmann <arnd@arndb.de> - 2016-01-25 17:20 +0100
    Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Arnd Bergmann <arnd@arndb.de> - 2016-01-25 17:30 +0100
    Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:30 +0100
  Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Will Deacon <will.deacon@arm.com> - 2016-01-25 17:30 +0100
    Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 17:40 +0100
      Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Will Deacon <will.deacon@arm.com> - 2016-01-25 17:50 +0100
        Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Marc Zyngier <marc.zyngier@arm.com> - 2016-01-25 20:20 +0100

csiph-web