1. 23 4月, 2022 10 次提交
  2. 08 4月, 2022 1 次提交
  3. 06 4月, 2022 1 次提交
    • R
      KVM: arm64: mixed-width check should be skipped for uninitialized vCPUs · 26bf74bd
      Reiji Watanabe 提交于
      KVM allows userspace to configure either all EL1 32bit or 64bit vCPUs
      for a guest.  At vCPU reset, vcpu_allowed_register_width() checks
      if the vcpu's register width is consistent with all other vCPUs'.
      Since the checking is done even against vCPUs that are not initialized
      (KVM_ARM_VCPU_INIT has not been done) yet, the uninitialized vCPUs
      are erroneously treated as 64bit vCPU, which causes the function to
      incorrectly detect a mixed-width VM.
      
      Introduce KVM_ARCH_FLAG_EL1_32BIT and KVM_ARCH_FLAG_REG_WIDTH_CONFIGURED
      bits for kvm->arch.flags.  A value of the EL1_32BIT bit indicates that
      the guest needs to be configured with all 32bit or 64bit vCPUs, and
      a value of the REG_WIDTH_CONFIGURED bit indicates if a value of the
      EL1_32BIT bit is valid (already set up). Values in those bits are set at
      the first KVM_ARM_VCPU_INIT for the guest based on KVM_ARM_VCPU_EL1_32BIT
      configuration for the vCPU.
      
      Check vcpu's register width against those new bits at the vcpu's
      KVM_ARM_VCPU_INIT (instead of against other vCPUs' register width).
      
      Fixes: 66e94d5c ("KVM: arm64: Prevent mixed-width VM creation")
      Signed-off-by: NReiji Watanabe <reijiw@google.com>
      Reviewed-by: NOliver Upton <oupton@google.com>
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20220329031924.619453-2-reijiw@google.com
      26bf74bd
  4. 04 4月, 2022 1 次提交
  5. 25 3月, 2022 2 次提交
  6. 23 3月, 2022 1 次提交
  7. 18 3月, 2022 4 次提交
  8. 11 3月, 2022 1 次提交
  9. 10 3月, 2022 1 次提交
    • N
      arm64: Do not include __READ_ONCE() block in assembly files · 52c9f93a
      Nathan Chancellor 提交于
      When building arm64 defconfig + CONFIG_LTO_CLANG_{FULL,THIN}=y after
      commit 558c303c ("arm64: Mitigate spectre style branch history side
      channels"), the following error occurs:
      
        <instantiation>:4:2: error: invalid fixup for movz/movk instruction
         mov w0, #ARM_SMCCC_ARCH_WORKAROUND_3
         ^
      
      Marc figured out that moving "#include <linux/init.h>" in
      include/linux/arm-smccc.h into a !__ASSEMBLY__ block resolves it. The
      full include chain with CONFIG_LTO=y from include/linux/arm-smccc.h:
      
      include/linux/init.h
      include/linux/compiler.h
      arch/arm64/include/asm/rwonce.h
      arch/arm64/include/asm/alternative-macros.h
      arch/arm64/include/asm/assembler.h
      
      The asm/alternative-macros.h include in asm/rwonce.h only happens when
      CONFIG_LTO is set, which ultimately casues asm/assembler.h to be
      included before the definition of ARM_SMCCC_ARCH_WORKAROUND_3. As a
      result, the preprocessor does not expand ARM_SMCCC_ARCH_WORKAROUND_3 in
      __mitigate_spectre_bhb_fw, which results in the error above.
      
      Avoid this problem by just avoiding the CONFIG_LTO=y __READ_ONCE() block
      in asm/rwonce.h with assembly files, as nothing in that block is useful
      to assembly files, which allows ARM_SMCCC_ARCH_WORKAROUND_3 to be
      properly expanded with CONFIG_LTO=y builds.
      
      Fixes: e35123d8 ("arm64: lto: Strengthen READ_ONCE() to acquire when CONFIG_LTO=y")
      Cc: <stable@vger.kernel.org> # 5.11.x
      Link: https://lore.kernel.org/r/20220309155716.3988480-1-maz@kernel.org/Reported-by: NMarc Zyngier <maz@kernel.org>
      Acked-by: NJames Morse <james.morse@arm.com>
      Signed-off-by: NNathan Chancellor <nathan@kernel.org>
      Link: https://lore.kernel.org/r/20220309191633.2307110-1-nathan@kernel.orgSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      52c9f93a
  10. 09 3月, 2022 1 次提交
  11. 08 3月, 2022 8 次提交
  12. 25 2月, 2022 9 次提交