mbox series

[GIT,PULL] KVM/arm64 updates for 5.12

Message ID 20210212143657.3312035-1-maz@kernel.org (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL] KVM/arm64 updates for 5.12 | expand

Pull-request

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

Message

Marc Zyngier Feb. 12, 2021, 2:36 p.m. UTC
Hi Paolo,

Here's the initial set of KVM/arm64 updates for 5.11.

The most notable change this time is David's work to finally build the
nVHE EL2 object as a relocatable object. This makes the code a lot
cleaner, more reliable (we don't have to assume things about code
generation), and allows... function pointers, with any ugly hack!
Progress, at last, and a huge thank you to David!

We also gained support for the new TRNG standard hypercall, and a nice
optimisation for concurrent translation faults targeting the same
page. The rest is a small batch of fixes and other cleanups.

Note that there is another bunch of changes indirectly affecting
KVM/arm64 that are routed via the arm64 tree, as we turn upside down
the way we boot Linux on a VHE system. It's all good fun.

This pull request also comes with strings attached:
- the kvmarm-fixes-5.11-2 tag in order to avoid ugly conflicts, which
  explains a sense of déjà-vu in the short-log below
- the arm64/for-next/misc branch because of dependencies

Please pull,

	M.

The following changes since commit 19c329f6808995b142b3966301f217c831e7cf31:

  Linux 5.11-rc4 (2021-01-17 16:37:05 -0800)

are available in the Git repository at:

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

for you to fetch changes up to c93199e93e1232b7220482dffa05b7a32a195fe8:

  Merge branch 'kvm-arm64/pmu-debug-fixes-5.11' into kvmarm-master/next (2021-02-12 14:08:41 +0000)

----------------------------------------------------------------
KVM/arm64 updates for Linux 5.12

- Make the nVHE EL2 object relocatable, resulting in much more
  maintainable code
- Handle concurrent translation faults hitting the same page
  in a more elegant way
- Support for the standard TRNG hypervisor call
- A bunch of small PMU/Debug fixes
- Allow the disabling of symbol export from assembly code
- Simplification of the early init hypercall handling

----------------------------------------------------------------
Alexandru Elisei (2):
      KVM: arm64: Use the reg_to_encoding() macro instead of sys_reg()
      KVM: arm64: Correct spelling of DBGDIDR register

Andrew Scull (1):
      KVM: arm64: Simplify __kvm_hyp_init HVC detection

Ard Biesheuvel (2):
      firmware: smccc: Add SMCCC TRNG function call IDs
      KVM: arm64: Implement the TRNG hypervisor call

David Brazdil (9):
      KVM: arm64: Allow PSCI SYSTEM_OFF/RESET to return
      KVM: arm64: Rename .idmap.text in hyp linker script
      KVM: arm64: Set up .hyp.rodata ELF section
      KVM: arm64: Add symbol at the beginning of each hyp section
      KVM: arm64: Generate hyp relocation data
      KVM: arm64: Apply hyp relocations at runtime
      KVM: arm64: Fix constant-pool users in hyp
      KVM: arm64: Remove patching of fn pointers in hyp
      KVM: arm64: Remove hyp_symbol_addr

Marc Zyngier (20):
      KVM: arm64: Hide PMU registers from userspace when not available
      KVM: arm64: Simplify handling of absent PMU system registers
      arm64: Drop workaround for broken 'S' constraint with GCC 4.9
      KVM: arm64: Filter out v8.1+ events on v8.0 HW
      KVM: Forbid the use of tagged userspace addresses for memslots
      Merge branch 'arm64/for-next/misc' into kvm-arm64/hyp-reloc
      KVM: arm64: Make gen-hyprel endianness agnostic
      KVM: arm64: Fix missing RES1 in emulation of DBGBIDR
      KVM: arm64: Fix AArch32 PMUv3 capping
      KVM: arm64: Add handling of AArch32 PCMEID{2,3} PMUv3 registers
      KVM: arm64: Refactor filtering of ID registers
      KVM: arm64: Limit the debug architecture to ARMv8.0
      KVM: arm64: Upgrade PMU support to ARMv8.4
      KVM: arm64: Use symbolic names for the PMU versions
      Merge tag 'kvmarm-fixes-5.11-2' into kvmarm-master/next
      Merge branch 'kvm-arm64/misc-5.12' into kvmarm-master/next
      Merge branch 'kvm-arm64/concurrent-translation-fault' into kvmarm-master/next
      Merge branch 'kvm-arm64/hyp-reloc' into kvmarm-master/next
      Merge branch 'kvm-arm64/rng-5.12' into kvmarm-master/next
      Merge branch 'kvm-arm64/pmu-debug-fixes-5.11' into kvmarm-master/next

Quentin Perret (2):
      asm-generic: export: Stub EXPORT_SYMBOL with __DISABLE_EXPORTS
      KVM: arm64: Stub EXPORT_SYMBOL for nVHE EL2 code

Steven Price (1):
      KVM: arm64: Compute TPIDR_EL2 ignoring MTE tag

Yanan Wang (3):
      KVM: arm64: Adjust partial code of hyp stage-1 map and guest stage-2 map
      KVM: arm64: Filter out the case of only changing permissions from stage-2 map path
      KVM: arm64: Mark the page dirty only if the fault is handled successfully

 Documentation/virt/kvm/api.rst           |   3 +
 arch/arm64/include/asm/hyp_image.h       |  29 +-
 arch/arm64/include/asm/kvm_asm.h         |  26 --
 arch/arm64/include/asm/kvm_host.h        |   2 +
 arch/arm64/include/asm/kvm_mmu.h         |  61 ++---
 arch/arm64/include/asm/kvm_pgtable.h     |   5 +
 arch/arm64/include/asm/sections.h        |   3 +-
 arch/arm64/include/asm/sysreg.h          |   3 +
 arch/arm64/kernel/image-vars.h           |   1 -
 arch/arm64/kernel/smp.c                  |   4 +-
 arch/arm64/kernel/vmlinux.lds.S          |  18 +-
 arch/arm64/kvm/Makefile                  |   2 +-
 arch/arm64/kvm/arm.c                     |  10 +-
 arch/arm64/kvm/hyp/include/hyp/switch.h  |   4 +-
 arch/arm64/kvm/hyp/nvhe/.gitignore       |   2 +
 arch/arm64/kvm/hyp/nvhe/Makefile         |  33 ++-
 arch/arm64/kvm/hyp/nvhe/gen-hyprel.c     | 438 +++++++++++++++++++++++++++++++
 arch/arm64/kvm/hyp/nvhe/host.S           |  29 +-
 arch/arm64/kvm/hyp/nvhe/hyp-init.S       |  19 +-
 arch/arm64/kvm/hyp/nvhe/hyp-main.c       |  11 +-
 arch/arm64/kvm/hyp/nvhe/hyp-smp.c        |   4 +-
 arch/arm64/kvm/hyp/nvhe/hyp.lds.S        |   9 +-
 arch/arm64/kvm/hyp/nvhe/psci-relay.c     |  37 ++-
 arch/arm64/kvm/hyp/pgtable.c             |  83 +++---
 arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c |   2 +-
 arch/arm64/kvm/hypercalls.c              |   6 +
 arch/arm64/kvm/mmu.c                     |  13 +-
 arch/arm64/kvm/pmu-emul.c                |  24 +-
 arch/arm64/kvm/sys_regs.c                | 178 ++++++++-----
 arch/arm64/kvm/trng.c                    |  85 ++++++
 arch/arm64/kvm/va_layout.c               |  34 ++-
 include/asm-generic/export.h             |   2 +-
 include/linux/arm-smccc.h                |  31 +++
 virt/kvm/kvm_main.c                      |   1 +
 34 files changed, 934 insertions(+), 278 deletions(-)
 create mode 100644 arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
 create mode 100644 arch/arm64/kvm/trng.c

Comments

Paolo Bonzini Feb. 12, 2021, 4:24 p.m. UTC | #1
On 12/02/21 15:36, Marc Zyngier wrote:
> Hi Paolo,
> 
> Here's the initial set of KVM/arm64 updates for 5.11.
> 
> The most notable change this time is David's work to finally build the
> nVHE EL2 object as a relocatable object. This makes the code a lot
> cleaner, more reliable (we don't have to assume things about code
> generation), and allows... function pointers, with any ugly hack!
> Progress, at last, and a huge thank you to David!
> 
> We also gained support for the new TRNG standard hypercall, and a nice
> optimisation for concurrent translation faults targeting the same
> page. The rest is a small batch of fixes and other cleanups.
> 
> Note that there is another bunch of changes indirectly affecting
> KVM/arm64 that are routed via the arm64 tree, as we turn upside down
> the way we boot Linux on a VHE system. It's all good fun.
> 
> This pull request also comes with strings attached:
> - the kvmarm-fixes-5.11-2 tag in order to avoid ugly conflicts, which
>    explains a sense of déjà-vu in the short-log below
> - the arm64/for-next/misc branch because of dependencies
> 
> Please pull,
> 
> 	M.
> 
> The following changes since commit 19c329f6808995b142b3966301f217c831e7cf31:
> 
>    Linux 5.11-rc4 (2021-01-17 16:37:05 -0800)
> 
> are available in the Git repository at:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-5.12
> 
> for you to fetch changes up to c93199e93e1232b7220482dffa05b7a32a195fe8:
> 
>    Merge branch 'kvm-arm64/pmu-debug-fixes-5.11' into kvmarm-master/next (2021-02-12 14:08:41 +0000)
> 
> ----------------------------------------------------------------
> KVM/arm64 updates for Linux 5.12
> 
> - Make the nVHE EL2 object relocatable, resulting in much more
>    maintainable code
> - Handle concurrent translation faults hitting the same page
>    in a more elegant way
> - Support for the standard TRNG hypervisor call
> - A bunch of small PMU/Debug fixes
> - Allow the disabling of symbol export from assembly code
> - Simplification of the early init hypercall handling
> 
> ----------------------------------------------------------------
> Alexandru Elisei (2):
>        KVM: arm64: Use the reg_to_encoding() macro instead of sys_reg()
>        KVM: arm64: Correct spelling of DBGDIDR register
> 
> Andrew Scull (1):
>        KVM: arm64: Simplify __kvm_hyp_init HVC detection
> 
> Ard Biesheuvel (2):
>        firmware: smccc: Add SMCCC TRNG function call IDs
>        KVM: arm64: Implement the TRNG hypervisor call
> 
> David Brazdil (9):
>        KVM: arm64: Allow PSCI SYSTEM_OFF/RESET to return
>        KVM: arm64: Rename .idmap.text in hyp linker script
>        KVM: arm64: Set up .hyp.rodata ELF section
>        KVM: arm64: Add symbol at the beginning of each hyp section
>        KVM: arm64: Generate hyp relocation data
>        KVM: arm64: Apply hyp relocations at runtime
>        KVM: arm64: Fix constant-pool users in hyp
>        KVM: arm64: Remove patching of fn pointers in hyp
>        KVM: arm64: Remove hyp_symbol_addr
> 
> Marc Zyngier (20):
>        KVM: arm64: Hide PMU registers from userspace when not available
>        KVM: arm64: Simplify handling of absent PMU system registers
>        arm64: Drop workaround for broken 'S' constraint with GCC 4.9
>        KVM: arm64: Filter out v8.1+ events on v8.0 HW
>        KVM: Forbid the use of tagged userspace addresses for memslots
>        Merge branch 'arm64/for-next/misc' into kvm-arm64/hyp-reloc
>        KVM: arm64: Make gen-hyprel endianness agnostic
>        KVM: arm64: Fix missing RES1 in emulation of DBGBIDR
>        KVM: arm64: Fix AArch32 PMUv3 capping
>        KVM: arm64: Add handling of AArch32 PCMEID{2,3} PMUv3 registers
>        KVM: arm64: Refactor filtering of ID registers
>        KVM: arm64: Limit the debug architecture to ARMv8.0
>        KVM: arm64: Upgrade PMU support to ARMv8.4
>        KVM: arm64: Use symbolic names for the PMU versions
>        Merge tag 'kvmarm-fixes-5.11-2' into kvmarm-master/next
>        Merge branch 'kvm-arm64/misc-5.12' into kvmarm-master/next
>        Merge branch 'kvm-arm64/concurrent-translation-fault' into kvmarm-master/next
>        Merge branch 'kvm-arm64/hyp-reloc' into kvmarm-master/next
>        Merge branch 'kvm-arm64/rng-5.12' into kvmarm-master/next
>        Merge branch 'kvm-arm64/pmu-debug-fixes-5.11' into kvmarm-master/next
> 
> Quentin Perret (2):
>        asm-generic: export: Stub EXPORT_SYMBOL with __DISABLE_EXPORTS
>        KVM: arm64: Stub EXPORT_SYMBOL for nVHE EL2 code
> 
> Steven Price (1):
>        KVM: arm64: Compute TPIDR_EL2 ignoring MTE tag
> 
> Yanan Wang (3):
>        KVM: arm64: Adjust partial code of hyp stage-1 map and guest stage-2 map
>        KVM: arm64: Filter out the case of only changing permissions from stage-2 map path
>        KVM: arm64: Mark the page dirty only if the fault is handled successfully
> 
>   Documentation/virt/kvm/api.rst           |   3 +
>   arch/arm64/include/asm/hyp_image.h       |  29 +-
>   arch/arm64/include/asm/kvm_asm.h         |  26 --
>   arch/arm64/include/asm/kvm_host.h        |   2 +
>   arch/arm64/include/asm/kvm_mmu.h         |  61 ++---
>   arch/arm64/include/asm/kvm_pgtable.h     |   5 +
>   arch/arm64/include/asm/sections.h        |   3 +-
>   arch/arm64/include/asm/sysreg.h          |   3 +
>   arch/arm64/kernel/image-vars.h           |   1 -
>   arch/arm64/kernel/smp.c                  |   4 +-
>   arch/arm64/kernel/vmlinux.lds.S          |  18 +-
>   arch/arm64/kvm/Makefile                  |   2 +-
>   arch/arm64/kvm/arm.c                     |  10 +-
>   arch/arm64/kvm/hyp/include/hyp/switch.h  |   4 +-
>   arch/arm64/kvm/hyp/nvhe/.gitignore       |   2 +
>   arch/arm64/kvm/hyp/nvhe/Makefile         |  33 ++-
>   arch/arm64/kvm/hyp/nvhe/gen-hyprel.c     | 438 +++++++++++++++++++++++++++++++
>   arch/arm64/kvm/hyp/nvhe/host.S           |  29 +-
>   arch/arm64/kvm/hyp/nvhe/hyp-init.S       |  19 +-
>   arch/arm64/kvm/hyp/nvhe/hyp-main.c       |  11 +-
>   arch/arm64/kvm/hyp/nvhe/hyp-smp.c        |   4 +-
>   arch/arm64/kvm/hyp/nvhe/hyp.lds.S        |   9 +-
>   arch/arm64/kvm/hyp/nvhe/psci-relay.c     |  37 ++-
>   arch/arm64/kvm/hyp/pgtable.c             |  83 +++---
>   arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c |   2 +-
>   arch/arm64/kvm/hypercalls.c              |   6 +
>   arch/arm64/kvm/mmu.c                     |  13 +-
>   arch/arm64/kvm/pmu-emul.c                |  24 +-
>   arch/arm64/kvm/sys_regs.c                | 178 ++++++++-----
>   arch/arm64/kvm/trng.c                    |  85 ++++++
>   arch/arm64/kvm/va_layout.c               |  34 ++-
>   include/asm-generic/export.h             |   2 +-
>   include/linux/arm-smccc.h                |  31 +++
>   virt/kvm/kvm_main.c                      |   1 +
>   34 files changed, 934 insertions(+), 278 deletions(-)
>   create mode 100644 arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
>   create mode 100644 arch/arm64/kvm/trng.c
> 

Pulled, thanks!

Paolo