1. 24 Jan, 2022 1 commit
    • Marc Zyngier's avatar
      KVM: arm64: Use shadow SPSR_EL1 when injecting exceptions on !VHE · 27858305
      Marc Zyngier authored
      Injecting an exception into a guest with non-VHE is risky business.
      Instead of writing in the shadow register for the switch code to
      restore it, we override the CPU register instead. Which gets
      overriden a few instructions later by said restore code.
      
      The result is that although the guest correctly gets the exception,
      it will return to the original context in some random state,
      depending on what was there the first place... Boo.
      
      Fix the issue by writing to the shadow register. The original code
      is absolutely fine on VHE, as the state is already loaded, and writing
      to the shadow register in that case would actually be a bug.
      
      Fixes: bb666c47 ("KVM: arm64: Inject AArch64 exceptions from HYP")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Reviewed-by: default avatarFuad Tabba <tabba@google.com>
      Link: https://lore.kernel.org/r/20220121184207.423426-1-maz@kernel.org
      27858305
  2. 22 Jan, 2022 1 commit
  3. 14 Jan, 2022 1 commit
  4. 04 Jan, 2022 6 commits
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/misc-5.17 into kvmarm-master/next · 1c53a1ae
      Marc Zyngier authored
      * kvm-arm64/misc-5.17:
        : .
        : Misc fixes and improvements:
        : - Add minimal support for ARMv8.7's PMU extension
        : - Constify kvm_io_gic_ops
        : - Drop kvm_is_transparent_hugepage() prototype
        : - Drop unused workaround_flags field
        : - Rework kvm_pgtable initialisation
        : - Documentation fixes
        : - Replace open-coded SCTLR_EL1.EE useage with its defined macro
        : - Sysreg list selftest update to handle PAuth
        : - Include cleanups
        : .
        KVM: arm64: vgic: Replace kernel.h with the necessary inclusions
        KVM: arm64: Fix comment typo in kvm_vcpu_finalize_sve()
        KVM: arm64: selftests: get-reg-list: Add pauth configuration
        KVM: arm64: Fix comment on barrier in kvm_psci_vcpu_on()
        KVM: arm64: Fix comment for kvm_reset_vcpu()
        KVM: arm64: Use defined value for SCTLR_ELx_EE
        KVM: arm64: Rework kvm_pgtable initialisation
        KVM: arm64: Drop unused workaround_flags vcpu field
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      1c53a1ae
    • Andy Shevchenko's avatar
      KVM: arm64: vgic: Replace kernel.h with the necessary inclusions · 6c9eeb5f
      Andy Shevchenko authored
      arm_vgic.h does not require all the stuff that kernel.h provides.
      Replace kernel.h inclusion with the list of what is really being used.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20220104151940.55399-1-andriy.shevchenko@linux.intel.com
      6c9eeb5f
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/selftest/irq-injection into kvmarm-master/next · ad7937dc
      Marc Zyngier authored
      * kvm-arm64/selftest/irq-injection:
        : .
        : New tests from Ricardo Koller:
        : "This series adds a new test, aarch64/vgic-irq, that validates the injection of
        : different types of IRQs from userspace using various methods and configurations"
        : .
        KVM: selftests: aarch64: Add test for restoring active IRQs
        KVM: selftests: aarch64: Add ISPENDR write tests in vgic_irq
        KVM: selftests: aarch64: Add tests for IRQFD in vgic_irq
        KVM: selftests: Add IRQ GSI routing library functions
        KVM: selftests: aarch64: Add test_inject_fail to vgic_irq
        KVM: selftests: aarch64: Add tests for LEVEL_INFO in vgic_irq
        KVM: selftests: aarch64: Level-sensitive interrupts tests in vgic_irq
        KVM: selftests: aarch64: Add preemption tests in vgic_irq
        KVM: selftests: aarch64: Cmdline arg to set EOI mode in vgic_irq
        KVM: selftests: aarch64: Cmdline arg to set number of IRQs in vgic_irq test
        KVM: selftests: aarch64: Abstract the injection functions in vgic_irq
        KVM: selftests: aarch64: Add vgic_irq to test userspace IRQ injection
        KVM: selftests: aarch64: Add vGIC library functions to deal with vIRQ state
        KVM: selftests: Add kvm_irq_line library function
        KVM: selftests: aarch64: Add GICv3 register accessor library functions
        KVM: selftests: aarch64: Add function for accessing GICv3 dist and redist registers
        KVM: selftests: aarch64: Move gic_v3.h to shared headers
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      ad7937dc
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/selftest/ipa into kvmarm-master/next · 089606c0
      Marc Zyngier authored
      * kvm-arm64/selftest/ipa:
        : .
        : Expand the KVM/arm64 selftest infrastructure to discover
        : supported page sizes at runtime, support 16kB pages, and
        : find out about the original M1 stupidly small IPA space.
        : .
        KVM: selftests: arm64: Add support for various modes with 16kB page size
        KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K}
        KVM: selftests: arm64: Rework TCR_EL1 configuration
        KVM: selftests: arm64: Check for supported page sizes
        KVM: selftests: arm64: Introduce a variable default IPA size
        KVM: selftests: arm64: Initialise default guest mode at test startup time
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      089606c0
    • Zenghui Yu's avatar
      KVM: arm64: Fix comment typo in kvm_vcpu_finalize_sve() · e938eddb
      Zenghui Yu authored
      kvm_arm_init_arch_resources() was renamed to kvm_arm_init_sve() in
      commit a3be836d ("KVM: arm/arm64: Demote
      kvm_arm_init_arch_resources() to just set up SVE"). Fix the function
      name in comment of kvm_vcpu_finalize_sve().
      Signed-off-by: default avatarZenghui Yu <yuzenghui@huawei.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20211230141535.1389-1-yuzenghui@huawei.com
      e938eddb
    • Marc Zyngier's avatar
      KVM: arm64: selftests: get-reg-list: Add pauth configuration · f15dcf1b
      Marc Zyngier authored
      The get-reg-list test ignores the Pointer Authentication features,
      which is a shame now that we have relatively common HW with this feature.
      
      Define two new configurations (with and without PMU) that exercise the
      KVM capabilities.
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Reviewed-by: default avatarAndrew Jones <drjones@redhat.com>
      Link: https://lore.kernel.org/r/20211228121414.1013250-1-maz@kernel.org
      f15dcf1b
  5. 28 Dec, 2021 23 commits
  6. 20 Dec, 2021 3 commits
  7. 16 Dec, 2021 5 commits