mbox series

[GIT,PULL] KVM/arm64 updates for 5.17

Message ID 20220107114548.4069893-1-maz@kernel.org
State New
Headers show
Series [GIT,PULL] KVM/arm64 updates for 5.17 | expand

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-5.17

Message

Marc Zyngier Jan. 7, 2022, 11:45 a.m. UTC
Hi Paolo,

Here's the bulk of the KVM/arm64 updates for 5.17. No real new feature
this time around, but a bunch of changes that will make the merging of
upcoming features easier (pKVM is reaching a point where it will
finally be usable, and NV isn't too far off... fingers crossed). This
comes with the usual set of bug fixes and cleanups all over the shop.

We also have a sizeable chunks of selftest updates which probably
account for half of the changes.

Please pull,

	M.

The following changes since commit d58071a8a76d779eedab38033ae4c821c30295a5:

  Linux 5.16-rc3 (2021-11-28 14:09:19 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-5.17

for you to fetch changes up to 1c53a1ae36120997a82f936d044c71075852e521:

  Merge branch kvm-arm64/misc-5.17 into kvmarm-master/next (2022-01-04 17:16:15 +0000)

----------------------------------------------------------------
KVM/arm64 updates for Linux 5.16

- Simplification of the 'vcpu first run' by integrating it into
  KVM's 'pid change' flow

- Refactoring of the FP and SVE state tracking, also leading to
  a simpler state and less shared data between EL1 and EL2 in
  the nVHE case

- Tidy up the header file usage for the nvhe hyp object

- New HYP unsharing mechanism, finally allowing pages to be
  unmapped from the Stage-1 EL2 page-tables

- Various pKVM cleanups around refcounting and sharing

- A couple of vgic fixes for bugs that would trigger once
  the vcpu xarray rework is merged, but not sooner

- Add minimal support for ARMv8.7's PMU extension

- Rework kvm_pgtable initialisation ahead of the NV work

- New selftest for IRQ injection

- Teach selftests about the lack of default IPA space and
  page sizes

- Expand sysreg selftest to deal with Pointer Authentication

- The usual bunch of cleanups and doc update

----------------------------------------------------------------
Andy Shevchenko (1):
      KVM: arm64: vgic: Replace kernel.h with the necessary inclusions

Fuad Tabba (3):
      KVM: arm64: Use defined value for SCTLR_ELx_EE
      KVM: arm64: Fix comment for kvm_reset_vcpu()
      KVM: arm64: Fix comment on barrier in kvm_psci_vcpu_on()

Marc Zyngier (33):
      KVM: arm64: Reorder vcpu flag definitions
      KVM: arm64: Get rid of host SVE tracking/saving
      KVM: arm64: Remove unused __sve_save_state
      KVM: arm64: Introduce flag shadowing TIF_FOREIGN_FPSTATE
      KVM: arm64: Stop mapping current thread_info at EL2
      arm64/fpsimd: Document the use of TIF_FOREIGN_FPSTATE by KVM
      KVM: arm64: Move SVE state mapping at HYP to finalize-time
      KVM: arm64: Move kvm_arch_vcpu_run_pid_change() out of line
      KVM: arm64: Restructure the point where has_run_once is advertised
      KVM: arm64: Merge kvm_arch_vcpu_run_pid_change() and kvm_vcpu_first_run_init()
      KVM: arm64: Drop vcpu->arch.has_run_once for vcpu->pid
      Merge branch kvm-arm64/vcpu-first-run into kvmarm-master/next
      Merge branch kvm-arm64/fpsimd-tracking into kvmarm-master/next
      KVM: arm64: Add minimal handling for the ARMv8.7 PMU
      Merge branch kvm-arm64/hyp-header-split into kvmarm-master/next
      Merge branch kvm-arm64/misc-5.17 into kvmarm-master/next
      KVM: arm64: Drop unused workaround_flags vcpu field
      Merge branch kvm-arm64/pkvm-cleanups-5.17 into kvmarm-master/next
      KVM: arm64: vgic-v3: Fix vcpu index comparison
      KVM: arm64: vgic: Demote userspace-triggered console prints to kvm_debug()
      Merge branch kvm-arm64/vgic-fixes-5.17 into kvmarm-master/next
      Merge branch kvm-arm64/pkvm-hyp-sharing into kvmarm-master/next
      KVM: arm64: Rework kvm_pgtable initialisation
      KVM: selftests: arm64: Initialise default guest mode at test startup time
      KVM: selftests: arm64: Introduce a variable default IPA size
      KVM: selftests: arm64: Check for supported page sizes
      KVM: selftests: arm64: Rework TCR_EL1 configuration
      KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K}
      KVM: selftests: arm64: Add support for various modes with 16kB page size
      KVM: arm64: selftests: get-reg-list: Add pauth configuration
      Merge branch kvm-arm64/selftest/ipa into kvmarm-master/next
      Merge branch kvm-arm64/selftest/irq-injection into kvmarm-master/next
      Merge branch kvm-arm64/misc-5.17 into kvmarm-master/next

Quentin Perret (12):
      KVM: arm64: pkvm: Fix hyp_pool max order
      KVM: arm64: pkvm: Disable GICv2 support
      KVM: arm64: Make the hyp memory pool static
      KVM: arm64: Make __io_map_base static
      KVM: arm64: pkvm: Stub io map functions
      KVM: arm64: pkvm: Make kvm_host_owns_hyp_mappings() robust to VHE
      KVM: arm64: Provide {get,put}_page() stubs for early hyp allocator
      KVM: arm64: Refcount hyp stage-1 pgtable pages
      KVM: arm64: Fixup hyp stage-1 refcount
      KVM: arm64: Introduce kvm_share_hyp()
      KVM: arm64: pkvm: Refcount the pages shared with EL2
      KVM: arm64: pkvm: Unshare guest structs during teardown

Ricardo Koller (17):
      KVM: selftests: aarch64: Move gic_v3.h to shared headers
      KVM: selftests: aarch64: Add function for accessing GICv3 dist and redist registers
      KVM: selftests: aarch64: Add GICv3 register accessor library functions
      KVM: selftests: Add kvm_irq_line library function
      KVM: selftests: aarch64: Add vGIC library functions to deal with vIRQ state
      KVM: selftests: aarch64: Add vgic_irq to test userspace IRQ injection
      KVM: selftests: aarch64: Abstract the injection functions in vgic_irq
      KVM: selftests: aarch64: Cmdline arg to set number of IRQs in vgic_irq test
      KVM: selftests: aarch64: Cmdline arg to set EOI mode in vgic_irq
      KVM: selftests: aarch64: Add preemption tests in vgic_irq
      KVM: selftests: aarch64: Level-sensitive interrupts tests in vgic_irq
      KVM: selftests: aarch64: Add tests for LEVEL_INFO in vgic_irq
      KVM: selftests: aarch64: Add test_inject_fail to vgic_irq
      KVM: selftests: Add IRQ GSI routing library functions
      KVM: selftests: aarch64: Add tests for IRQFD in vgic_irq
      KVM: selftests: aarch64: Add ISPENDR write tests in vgic_irq
      KVM: selftests: aarch64: Add test for restoring active IRQs

Rikard Falkeborn (1):
      KVM: arm64: Constify kvm_io_gic_ops

Vitaly Kuznetsov (1):
      KVM: Drop stale kvm_is_transparent_hugepage() declaration

Will Deacon (11):
      arm64: Add missing include of asm/cpufeature.h to asm/mmu.h
      KVM: arm64: Generate hyp_constants.h for the host
      KVM: arm64: Move host EL1 code out of hyp/ directory
      KVM: arm64: Hook up ->page_count() for hypervisor stage-1 page-table
      KVM: arm64: Implement kvm_pgtable_hyp_unmap() at EL2
      KVM: arm64: Extend pkvm_page_state enumeration to handle absent pages
      KVM: arm64: Introduce wrappers for host and hyp spin lock accessors
      KVM: arm64: Implement do_share() helper for sharing memory
      KVM: arm64: Implement __pkvm_host_share_hyp() using do_share()
      KVM: arm64: Implement do_unshare() helper for unsharing memory
      KVM: arm64: Expose unshare hypercall to the host

Zenghui Yu (1):
      KVM: arm64: Fix comment typo in kvm_vcpu_finalize_sve()

 arch/arm64/include/asm/kvm_asm.h                   |   1 +
 arch/arm64/include/asm/kvm_emulate.h               |   2 +-
 arch/arm64/include/asm/kvm_host.h                  |  46 +-
 arch/arm64/include/asm/kvm_hyp.h                   |   1 -
 arch/arm64/include/asm/kvm_mmu.h                   |   2 +
 arch/arm64/include/asm/kvm_pgtable.h               |  30 +-
 arch/arm64/include/asm/kvm_pkvm.h                  |  71 ++
 arch/arm64/include/asm/mmu.h                       |   1 +
 arch/arm64/include/asm/sysreg.h                    |   1 +
 arch/arm64/kernel/asm-offsets.c                    |   1 -
 arch/arm64/kernel/fpsimd.c                         |   6 +-
 arch/arm64/kvm/.gitignore                          |   2 +
 arch/arm64/kvm/Makefile                            |  18 +-
 arch/arm64/kvm/arm.c                               |  64 +-
 arch/arm64/kvm/fpsimd.c                            |  79 +-
 arch/arm64/kvm/hyp/Makefile                        |   2 +-
 arch/arm64/kvm/hyp/fpsimd.S                        |   6 -
 arch/arm64/kvm/hyp/hyp-constants.c                 |  10 +
 arch/arm64/kvm/hyp/include/hyp/switch.h            |  30 +-
 arch/arm64/kvm/hyp/include/nvhe/mem_protect.h      |   6 +
 arch/arm64/kvm/hyp/include/nvhe/mm.h               |  59 --
 arch/arm64/kvm/hyp/nvhe/early_alloc.c              |   5 +
 arch/arm64/kvm/hyp/nvhe/hyp-main.c                 |   8 +
 arch/arm64/kvm/hyp/nvhe/mem_protect.c              | 505 ++++++++++--
 arch/arm64/kvm/hyp/nvhe/mm.c                       |   4 +-
 arch/arm64/kvm/hyp/nvhe/page_alloc.c               |   2 +-
 arch/arm64/kvm/hyp/nvhe/setup.c                    |  25 +-
 arch/arm64/kvm/hyp/nvhe/switch.c                   |   1 -
 arch/arm64/kvm/hyp/pgtable.c                       | 108 ++-
 arch/arm64/kvm/hyp/vhe/switch.c                    |   1 -
 arch/arm64/kvm/mmu.c                               | 150 +++-
 arch/arm64/kvm/{hyp/reserved_mem.c => pkvm.c}      |   8 +-
 arch/arm64/kvm/pmu-emul.c                          |   1 +
 arch/arm64/kvm/psci.c                              |   2 +-
 arch/arm64/kvm/reset.c                             |  28 +-
 arch/arm64/kvm/vgic/vgic-init.c                    |   2 +-
 arch/arm64/kvm/vgic/vgic-mmio-v3.c                 |   8 +-
 arch/arm64/kvm/vgic/vgic-mmio.c                    |   2 +-
 arch/arm64/kvm/vgic/vgic-mmio.h                    |   2 +-
 arch/arm64/kvm/vgic/vgic-v2.c                      |   9 +-
 arch/arm64/kvm/vgic/vgic-v3.c                      |   6 +-
 include/kvm/arm_vgic.h                             |   4 +-
 include/linux/kvm_host.h                           |   1 -
 tools/testing/selftests/kvm/.gitignore             |   1 +
 tools/testing/selftests/kvm/Makefile               |   1 +
 tools/testing/selftests/kvm/aarch64/arch_timer.c   |   2 +-
 tools/testing/selftests/kvm/aarch64/get-reg-list.c |  50 ++
 tools/testing/selftests/kvm/aarch64/vgic_irq.c     | 853 +++++++++++++++++++++
 tools/testing/selftests/kvm/include/aarch64/gic.h  |  26 +
 .../kvm/{lib => include}/aarch64/gic_v3.h          |  12 +
 .../selftests/kvm/include/aarch64/processor.h      |   3 +
 tools/testing/selftests/kvm/include/aarch64/vgic.h |  18 +-
 tools/testing/selftests/kvm/include/kvm_util.h     |  20 +-
 tools/testing/selftests/kvm/lib/aarch64/gic.c      |  66 ++
 .../selftests/kvm/lib/aarch64/gic_private.h        |  11 +
 tools/testing/selftests/kvm/lib/aarch64/gic_v3.c   | 206 ++++-
 .../testing/selftests/kvm/lib/aarch64/processor.c  |  82 +-
 tools/testing/selftests/kvm/lib/aarch64/vgic.c     | 103 ++-
 tools/testing/selftests/kvm/lib/guest_modes.c      |  49 +-
 tools/testing/selftests/kvm/lib/kvm_util.c         |  94 +++
 60 files changed, 2532 insertions(+), 385 deletions(-)
 create mode 100644 arch/arm64/include/asm/kvm_pkvm.h
 create mode 100644 arch/arm64/kvm/.gitignore
 create mode 100644 arch/arm64/kvm/hyp/hyp-constants.c
 rename arch/arm64/kvm/{hyp/reserved_mem.c => pkvm.c} (94%)
 create mode 100644 tools/testing/selftests/kvm/aarch64/vgic_irq.c
 rename tools/testing/selftests/kvm/{lib => include}/aarch64/gic_v3.h (80%)

Comments

Paolo Bonzini Jan. 7, 2022, 3:43 p.m. UTC | #1
On 1/7/22 12:45, Marc Zyngier wrote:
> Hi Paolo,
> 
> Here's the bulk of the KVM/arm64 updates for 5.17. No real new feature
> this time around, but a bunch of changes that will make the merging of
> upcoming features easier (pKVM is reaching a point where it will
> finally be usable, and NV isn't too far off... fingers crossed). This
> comes with the usual set of bug fixes and cleanups all over the shop.
> 
> We also have a sizeable chunks of selftest updates which probably
> account for half of the changes.

Pulled, thanks!

Paolo