1. 16 1月, 2018 4 次提交
  2. 09 1月, 2018 2 次提交
  3. 05 1月, 2018 1 次提交
  4. 23 12月, 2017 1 次提交
  5. 03 11月, 2017 2 次提交
    • D
      arm64/sve: System register and exception syndrome definitions · 67236564
      Dave Martin 提交于
      The SVE architecture adds some system registers, ID register fields
      and a dedicated ESR exception class.
      
      This patch adds the appropriate definitions that will be needed by
      the kernel.
      Signed-off-by: NDave Martin <Dave.Martin@arm.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      67236564
    • D
      arm64: KVM: Hide unsupported AArch64 CPU features from guests · 93390c0a
      Dave Martin 提交于
      Currently, a guest kernel sees the true CPU feature registers
      (ID_*_EL1) when it reads them using MRS instructions.  This means
      that the guest may observe features that are present in the
      hardware but the host doesn't understand or doesn't provide support
      for.  A guest may legimitately try to use such a feature as per the
      architecture, but use of the feature may trap instead of working
      normally, triggering undef injection into the guest.
      
      This is not a problem for the host, but the guest may go wrong when
      running on newer hardware than the host knows about.
      
      This patch hides from guest VMs any AArch64-specific CPU features
      that the host doesn't support, by exposing to the guest the
      sanitised versions of the registers computed by the cpufeatures
      framework, instead of the true hardware registers.  To achieve
      this, HCR_EL2.TID3 is now set for AArch64 guests, and emulation
      code is added to KVM to report the sanitised versions of the
      affected registers in response to MRS and register reads from
      userspace.
      
      The affected registers are removed from invariant_sys_regs[] (since
      the invariant_sys_regs handling is no longer quite correct for
      them) and added to sys_reg_desgs[], with appropriate access(),
      get_user() and set_user() methods.  No runtime vcpu storage is
      allocated for the registers: instead, they are read on demand from
      the cpufeatures framework.  This may need modification in the
      future if there is a need for userspace to customise the features
      visible to the guest.
      
      Attempts by userspace to write the registers are handled similarly
      to the current invariant_sys_regs handling: writes are permitted,
      but only if they don't attempt to change the value.  This is
      sufficient to support VM snapshot/restore from userspace.
      
      Because of the additional registers, restoring a VM on an older
      kernel may not work unless userspace knows how to handle the extra
      VM registers exposed to the KVM user ABI by this patch.
      
      Under the principle of least damage, this patch makes no attempt to
      handle any of the other registers currently in
      invariant_sys_regs[], or to emulate registers for AArch32: however,
      these could be handled in a similar way in future, as necessary.
      Signed-off-by: NDave Martin <Dave.Martin@arm.com>
      Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      93390c0a
  6. 18 10月, 2017 1 次提交
  7. 11 10月, 2017 1 次提交
    • S
      arm64: Expose support for optional ARMv8-A features · f5e035f8
      Suzuki K Poulose 提交于
      ARMv8-A adds a few optional features for ARMv8.2 and ARMv8.3.
      Expose them to the userspace via HWCAPs and mrs emulation.
      
      SHA2-512  - Instruction support for SHA512 Hash algorithm (e.g SHA512H,
      	    SHA512H2, SHA512U0, SHA512SU1)
      SHA3 	  - SHA3 crypto instructions (EOR3, RAX1, XAR, BCAX).
      SM3	  - Instruction support for Chinese cryptography algorithm SM3
      SM4 	  - Instruction support for Chinese cryptography algorithm SM4
      DP	  - Dot Product instructions (UDOT, SDOT).
      
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Dave Martin <dave.martin@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      f5e035f8
  8. 09 8月, 2017 1 次提交
  9. 26 7月, 2017 1 次提交
  10. 23 6月, 2017 1 次提交
  11. 15 6月, 2017 8 次提交
  12. 07 6月, 2017 1 次提交
  13. 21 3月, 2017 3 次提交
  14. 10 3月, 2017 3 次提交
    • M
      arm64: sysreg: add Set/Way sys encodings · 4dc52925
      Mark Rutland 提交于
      Cache maintenance ops fall in the SYS instruction class, and KVM needs
      to handle them. So as to keep all SYS encodings in one place, this
      patch adds them to sysreg.h.
      
      The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-2.
      
      To make it clear that these are instructions rather than registers, and
      to allow us to change the way these are handled in future, a new
      sys_insn() alias for sys_reg() is added and used for these new
      definitions.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      4dc52925
    • M
      arm64: sysreg: add register encodings used by KVM · 14ae7518
      Mark Rutland 提交于
      This patch adds sysreg definitions for registers which KVM needs the
      encodings for, which are not currently describe in <asm/sysregs.h>.
      Subsequent patches will make use of these definitions.
      
      The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-6, but
      this is not an exhaustive addition. Additions are only made for
      registers used today by KVM.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      14ae7518
    • M
      arm64: sysreg: add physical timer registers · 147a70ce
      Mark Rutland 提交于
      This patch adds sysreg definitions for system registers used to control
      the architected physical timer. Subsequent patches will make use of
      these definitions.
      
      The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-6.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      147a70ce
  15. 09 3月, 2017 4 次提交
    • M
      arm64: sysreg: subsume GICv3 sysreg definitions · 0e9884fe
      Mark Rutland 提交于
      Unlike most sysreg defintiions, the GICv3 definitions don't have a SYS_
      prefix, and they don't live in <asm/sysreg.h>. Additionally, some
      definitions are duplicated elsewhere (e.g. in the KVM save/restore
      code).
      
      For consistency, and to make it possible to share a common definition
      for these sysregs, this patch moves the definitions to <asm/sysreg.h>,
      adding a SYS_ prefix, and sorting the registers per their encoding.
      Existing users of the definitions are fixed up so that this change is
      not problematic.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      0e9884fe
    • M
      arm64: sysreg: add performance monitor registers · c7a3c61f
      Mark Rutland 提交于
      This patch adds sysreg definitions for system registers which are part
      of the performance monitors extension. Subsequent patches will make use
      of these definitions.
      
      The set of registers is described in ARM DDI 0487A.k_iss10775, Table
      D5-9. The encodings were taken from Table C5-6 in the same document.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      c7a3c61f
    • M
      arm64: sysreg: add debug system registers · d9801207
      Mark Rutland 提交于
      This patch adds sysreg definitions for system registers in the debug and
      trace system register encoding space. Subsequent patches will make use
      of these definitions.
      
      The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-5.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      d9801207
    • M
      arm64: sysreg: sort by encoding · 47863d41
      Mark Rutland 提交于
      Out sysreg definitions are largely (but not entirely) in ascending order
      of op0:op1:CRn:CRm:op2.
      
      It would be preferable to enforce this sort, as this makes it easier to
      verify the set of encodings against documentation, and provides an
      obvious location for each addition in future, minimising conflicts.
      
      This patch enforces this order, by moving the few items that break it.
      There should be no functional change.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      47863d41
  16. 12 1月, 2017 1 次提交
  17. 11 1月, 2017 1 次提交
  18. 10 1月, 2017 1 次提交
  19. 06 12月, 2016 1 次提交
  20. 02 12月, 2016 1 次提交
  21. 18 10月, 2016 1 次提交
    • W
      arm64: sysreg: Fix use of XZR in write_sysreg_s · 91cb163e
      Will Deacon 提交于
      Commit 8a71f0c6 ("arm64: sysreg: replace open-coded mrs_s/msr_s with
      {read,write}_sysreg_s") introduced a write_sysreg_s macro for writing
      to system registers that are not supported by binutils.
      
      Unfortunately, this was implemented with the wrong template (%0 vs %x0),
      so in the case that we are writing a constant 0, we will generate
      invalid instruction syntax and bail with a cryptic assembler error:
      
        | Error: constant expression required
      
      This patch fixes the template.
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      91cb163e