1. 04 12月, 2020 5 次提交
  2. 27 11月, 2020 3 次提交
  3. 10 11月, 2020 2 次提交
    • M
      KVM: arm64: Turn host HVC handling into a dispatch table · 7cd0aaaf
      Marc Zyngier 提交于
      Now that we can use function pointer, use a dispatch table to call
      the individual HVC handlers, leading to more maintainable code.
      
      Further improvements include helpers to declare the mapping of
      local variables to values passed in the host context.
      Reviewed-by: NAlexandru Elisei <alexandru.elisei@arm.com>
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      7cd0aaaf
    • M
      KVM: arm64: Add kimg_hyp_va() helper · 1db9d9de
      Marc Zyngier 提交于
      KVM/arm64 is so far unable to deal with function pointers, as the compiler
      will generate the kernel's runtime VA, and not the linear mapping address,
      meaning that kern_hyp_va() will give the wrong result.
      
      We so far have been able to use PC-relative addressing, but that's not
      always easy to use, and prevents the implementation of things like
      the mapping of an index to a pointer.
      
      To allow this, provide a new helper that computes the required
      translation from the kernel image to the HYP VA space.
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      1db9d9de
  4. 31 10月, 2020 1 次提交
  5. 30 10月, 2020 8 次提交
  6. 29 10月, 2020 1 次提交
  7. 28 10月, 2020 1 次提交
    • S
      KVM: arm64: ARM_SMCCC_ARCH_WORKAROUND_1 doesn't return SMCCC_RET_NOT_REQUIRED · 1de111b5
      Stephen Boyd 提交于
      According to the SMCCC spec[1](7.5.2 Discovery) the
      ARM_SMCCC_ARCH_WORKAROUND_1 function id only returns 0, 1, and
      SMCCC_RET_NOT_SUPPORTED.
      
       0 is "workaround required and safe to call this function"
       1 is "workaround not required but safe to call this function"
       SMCCC_RET_NOT_SUPPORTED is "might be vulnerable or might not be, who knows, I give up!"
      
      SMCCC_RET_NOT_SUPPORTED might as well mean "workaround required, except
      calling this function may not work because it isn't implemented in some
      cases". Wonderful. We map this SMC call to
      
       0 is SPECTRE_MITIGATED
       1 is SPECTRE_UNAFFECTED
       SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE
      
      For KVM hypercalls (hvc), we've implemented this function id to return
      SMCCC_RET_NOT_SUPPORTED, 0, and SMCCC_RET_NOT_REQUIRED. One of those
      isn't supposed to be there. Per the code we call
      arm64_get_spectre_v2_state() to figure out what to return for this
      feature discovery call.
      
       0 is SPECTRE_MITIGATED
       SMCCC_RET_NOT_REQUIRED is SPECTRE_UNAFFECTED
       SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE
      
      Let's clean this up so that KVM tells the guest this mapping:
      
       0 is SPECTRE_MITIGATED
       1 is SPECTRE_UNAFFECTED
       SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE
      
      Note: SMCCC_RET_NOT_AFFECTED is 1 but isn't part of the SMCCC spec
      
      Fixes: c118bbb5 ("arm64: KVM: Propagate full Spectre v2 workaround state to KVM guests")
      Signed-off-by: NStephen Boyd <swboyd@chromium.org>
      Acked-by: NMarc Zyngier <maz@kernel.org>
      Acked-by: NWill Deacon <will@kernel.org>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Steven Price <steven.price@arm.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: stable@vger.kernel.org
      Link: https://developer.arm.com/documentation/den0028/latest [1]
      Link: https://lore.kernel.org/r/20201023154751.1973872-1-swboyd@chromium.orgSigned-off-by: NWill Deacon <will@kernel.org>
      1de111b5
  8. 02 10月, 2020 2 次提交
  9. 01 10月, 2020 1 次提交
  10. 30 9月, 2020 7 次提交
  11. 29 9月, 2020 9 次提交