Skip to content

KVM: arm64: Base support for the pKVM hypervisor at EL2

Will Deacon kvm kvmarm linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest89 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/89KVM: arm64: Handle all ID registers trapped for a protected VMarch/arm64/kvm/hyp/nvhe/sys_regs.c+34 -80 replies
2/89KVM: arm64: Remove redundant hyp_assert_lock_held() assertionsarch/arm64/kvm/hyp/nvhe/mem_protect.c+0 -40 replies
3/89KVM: arm64: Return error from kvm_arch_init_vm() on allocation failurearch/arm64/kvm/arm.c+3 -12 replies
4/89KVM: arm64: Ignore 'kvm-arm.mode=protected' when using VHEDocumentation/admin-guide/kernel-parameters.txt arch/arm64/kernel/cpufeature.c arch/arm64/kvm/arm.c+6 -110 replies
5/89KVM: arm64: Extend comment in has_vhe()arch/arm64/include/asm/virt.h+3 -00 replies
6/89KVM: arm64: Drop stale commentarch/arm64/include/asm/kvm_host.h+0 -50 replies
7/89KVM: arm64: Move hyp refcount manipulation helpersarch/arm64/kvm/hyp/include/nvhe/memory.h arch/arm64/kvm/hyp/nvhe/page_alloc.c+18 -190 replies
8/89KVM: arm64: Back hyp_vmemmap for all of memoryarch/arm64/include/asm/kvm_pkvm.h arch/arm64/kvm/hyp/include/nvhe/mm.h arch/arm64/kvm/hyp/nvhe/mm.c +3 more+60 -400 replies
9/89KVM: arm64: Unify identifiers used to distinguish host and hypervisorarch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c arch/arm64/kvm/hyp/nvhe/setup.c+6 -100 replies
10/89KVM: arm64: Implement do_donate() helper for donating memoryarch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c+241 -00 replies
11/89KVM: arm64: Prevent the donation of no-map pagesarch/arm64/kvm/hyp/nvhe/mem_protect.c+16 -60 replies
12/89KVM: arm64: Add helpers to pin memory shared with hyparch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/include/nvhe/memory.h arch/arm64/kvm/hyp/nvhe/mem_protect.c+57 -10 replies
13/89KVM: arm64: Include asm/kvm_mmu.h in nvhe/mem_protect.harch/arm64/kvm/hyp/include/nvhe/mem_protect.h+1 -00 replies
14/89KVM: arm64: Add hyp_spinlock_t static initializerarch/arm64/kvm/hyp/include/nvhe/spinlock.h+9 -10 replies
15/89KVM: arm64: Introduce shadow VM state at EL2arch/arm64/include/asm/kvm_asm.h arch/arm64/include/asm/kvm_host.h arch/arm64/include/asm/kvm_pgtable.h +9 more+539 -00 replies
16/89KVM: arm64: Instantiate VM shadow data from EL1arch/arm64/include/asm/kvm_host.h arch/arm64/include/asm/kvm_pkvm.h arch/arm64/kvm/arm.c +2 more+139 -00 replies
17/89KVM: arm64: Make hyp stage-1 refcnt correct on the whole rangearch/arm64/kvm/hyp/nvhe/setup.c+43 -190 replies
18/89KVM: arm64: Factor out private range VA allocationarch/arm64/kvm/hyp/nvhe/mm.c+19 -90 replies
19/89KVM: arm64: Add pcpu fixmap infrastructure at EL2arch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/include/nvhe/mm.h arch/arm64/kvm/hyp/nvhe/mem_protect.c +2 more+95 -10 replies
20/89KVM: arm64: Provide I-cache invalidation by VA at EL2arch/arm64/include/asm/kvm_hyp.h arch/arm64/kernel/image-vars.h arch/arm64/kvm/arm.c +2 more+16 -30 replies
21/89KVM: arm64: Allow non-coallescable pages in a hyp_poolarch/arm64/kvm/hyp/nvhe/page_alloc.c+5 -00 replies
22/89KVM: arm64: Add generic hyp_memcache helpersarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mm.c +1 more+118 -00 replies
23/89KVM: arm64: Instantiate guest stage-2 page-tables at EL2arch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/mem_protect.c+130 -30 replies
24/89KVM: arm64: Return guest memory from EL2 via dedicated teardown memcachearch/arm64/include/asm/kvm_host.h arch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c +2 more+21 -240 replies
25/89KVM: arm64: Add flags to struct hyp_pagearch/arm64/kvm/hyp/include/nvhe/gfp.h arch/arm64/kvm/hyp/include/nvhe/memory.h arch/arm64/kvm/hyp/nvhe/page_alloc.c+12 -110 replies
26/89KVM: arm64: Provide a hypercall for the host to reclaim guest memoryarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/include/nvhe/memory.h +2 more+107 -10 replies
27/89KVM: arm64: Extend memory sharing to allow host-to-guest transitionsarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c+108 -20 replies
28/89KVM: arm64: Consolidate stage-2 init in one functionarch/arm64/include/asm/kvm_arm.h arch/arm64/include/asm/kvm_host.h arch/arm64/include/asm/kvm_mmu.h +3 more+41 -480 replies
29/89KVM: arm64: Check for PTE validity when checking for executable/cacheablearch/arm64/kvm/hyp/pgtable.c+4 -50 replies
30/89KVM: arm64: Do not allow memslot changes after first VM run under pKVMarch/arm64/kvm/mmu.c+11 -00 replies
31/89KVM: arm64: Disallow dirty logging and RO memslots with pKVMarch/arm64/kvm/mmu.c+11 -50 replies
32/89KVM: arm64: Use the shadow vCPU structure in handle___kvm_vcpu_run()arch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/pkvm.c+111 -20 replies
33/89KVM: arm64: Handle guest stage-2 page-tables entirely at EL2arch/arm64/include/asm/kvm_asm.h arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arm.c +3 more+212 -85 replies
34/89KVM: arm64: Don't access kvm_arm_hyp_percpu_base at EL1arch/arm64/kvm/pmu.c+12 -40 replies
35/89KVM: arm64: Unmap kvm_arm_hyp_percpu_base from the hostarch/arm64/include/asm/kvm_asm.h arch/arm64/kernel/image-vars.h arch/arm64/kvm/arm.c +1 more+8 -100 replies
36/89KVM: arm64: Maintain a copy of 'kvm_arm_vmid_bits' at EL2arch/arm64/include/asm/kvm_hyp.h arch/arm64/kernel/image-vars.h arch/arm64/kvm/arm.c +1 more+6 -30 replies
37/89KVM: arm64: Explicitly map kvm_vgic_global_state at EL2arch/arm64/kvm/hyp/nvhe/setup.c+5 -00 replies
38/89KVM: arm64: Don't map host sections in pkvmarch/arm64/kernel/image-vars.h arch/arm64/kvm/hyp/nvhe/setup.c+3 -170 replies
39/89KVM: arm64: Extend memory donation to allow host-to-guest transitionsarch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c arch/arm64/kvm/hyp/pgtable.c+64 -10 replies
40/89KVM: arm64: Split up nvhe/fixed_config.harch/arm64/include/asm/kvm_pkvm.h arch/arm64/kvm/hyp/include/nvhe/fixed_config.h arch/arm64/kvm/hyp/include/nvhe/pkvm.h +4 more+197 -2100 replies
41/89KVM: arm64: Make vcpu_{read,write}_sys_reg available to HYP codearch/arm64/include/asm/kvm_host.h arch/arm64/kvm/sys_regs.c+27 -230 replies
42/89KVM: arm64: Simplify vgic-v3 hypercallsarch/arm64/include/asm/kvm_asm.h arch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c +7 more+47 -840 replies
43/89KVM: arm64: Add the {flush,sync}_vgic_state() primitivesarch/arm64/kvm/hyp/nvhe/hyp-main.c+43 -70 replies
44/89KVM: arm64: Introduce predicates to check for protected statearch/arm64/include/asm/kvm_host.h arch/arm64/kvm/hyp/include/nvhe/pkvm.h+15 -40 replies
45/89KVM: arm64: Add the {flush,sync}_timer_state() primitivesarch/arm64/kvm/hyp/nvhe/hyp-main.c+34 -00 replies
46/89KVM: arm64: Introduce the pkvm_vcpu_{load,put} hypercallsarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/include/nvhe/pkvm.h +3 more+100 -220 replies
47/89KVM: arm64: Add current vcpu and shadow_state lookup primitivearch/arm64/kvm/hyp/nvhe/hyp-main.c+35 -60 replies
48/89KVM: arm64: Skip __kvm_adjust_pc() for protected vcpusarch/arm64/kvm/hyp/nvhe/hyp-main.c+15 -20 replies
49/89KVM: arm64: Add hyp per_cpu variable to track current physical cpu numberarch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/nvhe/hyp-smp.c+9 -00 replies
50/89KVM: arm64: Ensure that TLBs and I-cache are private to each vcpuarch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/pkvm.c +1 more+70 -100 replies
51/89KVM: arm64: Introduce per-EC entry/exit handlersarch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c+94 -80 replies
52/89KVM: arm64: Introduce lazy-ish state sync for non-protected VMsarch/arm64/include/asm/kvm_asm.h arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arm.c +2 more+95 -10 replies
53/89KVM: arm64: Lazy host FP save/restorearch/arm64/kvm/hyp/nvhe/hyp-main.c+51 -60 replies
54/89KVM: arm64: Reduce host/shadow vcpu state copyingarch/arm64/kvm/hyp/nvhe/hyp-main.c+12 -110 replies
55/89KVM: arm64: Do not pass the vcpu to __pkvm_host_map_guest()arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/mmu.c+7 -140 replies
56/89KVM: arm64: Check directly whether the vcpu is protectedarch/arm64/kvm/hyp/nvhe/switch.c+2 -40 replies
57/89KVM: arm64: Trap debug break and watch from guestarch/arm64/kvm/hyp/nvhe/pkvm.c arch/arm64/kvm/hyp/nvhe/sys_regs.c+12 -10 replies
58/89KVM: arm64: Restrict protected VM capabilitiesarch/arm64/include/asm/kvm_pkvm.h arch/arm64/kvm/arm.c+95 -10 replies
59/89KVM: arm64: Do not support MTE for protected VMsarch/arm64/kvm/arm.c+3 -19 replies
60/89KVM: arm64: Refactor reset_mpidr to extract its computationarch/arm64/kvm/sys_regs.c arch/arm64/kvm/sys_regs.h+20 -130 replies
61/89KVM: arm64: Reset sysregs for protected VMsarch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/sys_regs.c+84 -10 replies
62/89KVM: arm64: Move pkvm_vcpu_init_traps to shadow vcpu initarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/include/nvhe/trap_handler.h +2 more+3 -200 replies
63/89KVM: arm64: Fix initializing traps in protected modearch/arm64/kvm/hyp/nvhe/pkvm.c+31 -170 replies
64/89KVM: arm64: Advertise GICv3 sysreg interface to protected guestsarch/arm64/include/asm/kvm_pkvm.h+2 -00 replies
65/89KVM: arm64: Force injection of a data abort on NISV MMIO exitDocumentation/virt/kvm/api.rst arch/arm64/kvm/arm.c arch/arm64/kvm/mmio.c+26 -40 replies
66/89KVM: arm64: Donate memory to protected guestsarch/arm64/kvm/hyp/nvhe/hyp-main.c+4 -10 replies
67/89KVM: arm64: Add EL2 entry/exit handlers for pKVM guestsarch/arm64/kvm/hyp/nvhe/hyp-main.c+228 -20 replies
68/89KVM: arm64: Move vgic state between host and shadow vcpu structuresarch/arm64/kvm/hyp/nvhe/hyp-main.c+61 -40 replies
69/89KVM: arm64: Do not update virtual timer state for protected VMsarch/arm64/kvm/arch_timer.c+6 -10 replies
70/89KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp usearch/arm64/include/asm/kvm_emulate.h arch/arm64/kvm/reset.c+16 -160 replies
71/89KVM: arm64: Initialize shadow vm state at hyparch/arm64/kvm/hyp/nvhe/pkvm.c+71 -00 replies
72/89KVM: arm64: Track the SVE state in the shadow vcpuarch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/pkvm.c+38 -40 replies
73/89KVM: arm64: Add HVC handling for protected guests at EL2arch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/pkvm.c +1 more+49 -00 replies
74/89KVM: arm64: Move pstate reset values to kvm_arm.harch/arm64/include/asm/kvm_arm.h arch/arm64/kvm/reset.c+9 -90 replies
75/89KVM: arm64: Move some kvm_psci functions to a shared headerarch/arm64/include/asm/kvm_emulate.h arch/arm64/kvm/psci.c+30 -280 replies
76/89KVM: arm64: Factor out vcpu_reset code for core registers and PSCIarch/arm64/include/asm/kvm_emulate.h arch/arm64/kvm/reset.c+48 -380 replies
77/89KVM: arm64: Handle PSCI for protected VMs in EL2arch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/pkvm.c+399 -30 replies
78/89KVM: arm64: Don't expose TLBI hypercalls after de-privilegearch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c+8 -80 replies
79/89KVM: arm64: Add is_pkvm_initialized() helperarch/arm64/include/asm/virt.h+8 -40 replies
80/89KVM: arm64: Refactor enter_exception64()arch/arm64/include/asm/kvm_emulate.h arch/arm64/kvm/hyp/exception.c+57 -370 replies
81/89KVM: arm64: Inject SIGSEGV on illegal accessesarch/arm64/kvm/hyp/nvhe/mem_protect.c arch/arm64/mm/fault.c+71 -10 replies
82/89KVM: arm64: Support TLB invalidation in guest contextarch/arm64/kvm/hyp/nvhe/tlb.c+78 -180 replies
83/89KVM: arm64: Avoid BBM when changing only s/w bits in Stage-2 PTEarch/arm64/kvm/hyp/pgtable.c+10 -10 replies
84/89KVM: arm64: Extend memory sharing to allow guest-to-host transitionsarch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c+234 -00 replies
85/89KVM: arm64: Document the KVM/arm64-specific calls in hypercalls.rstDocumentation/virt/kvm/arm/hypercalls.rst Documentation/virt/kvm/arm/index.rst+47 -00 replies
86/89KVM: arm64: Reformat/beautify PTP hypercall documentationDocumentation/virt/kvm/arm/ptp_kvm.rst+24 -140 replies
87/89KVM: arm64: Expose memory sharing hypercalls to protected guestsDocumentation/virt/kvm/arm/hypercalls.rst arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/pkvm.c +1 more+223 -30 replies
88/89KVM: arm64: Introduce KVM_VM_TYPE_ARM_PROTECTED machine type for PVMsarch/arm64/include/asm/kvm_pkvm.h arch/arm64/kvm/arm.c arch/arm64/kvm/mmu.c +2 more+20 -60 replies
89/89Documentation: KVM: Add some documentation for Protected KVM on arm64Documentation/admin-guide/kernel-parameters.txt Documentation/virt/kvm/arm/index.rst Documentation/virt/kvm/arm/pkvm.rst+100 -11 reply

Reviews trailers per patch

3 of 89 patches have a Reviewed-by or Acked-by.

PatchMark RutlandAlexandru Elisei
1/89
2/89
3/89R-b
4/89A-b
5/89A-b
6/89
7/89
8/89
9/89
10/89
11/89
12/89
13/89
14/89
15/89
16/89
17/89
18/89
19/89
20/89
21/89
22/89
23/89
24/89
25/89
26/89
27/89
28/89
29/89
30/89
31/89
32/89
33/89
34/89
35/89
36/89
37/89
38/89
39/89
40/89
41/89
42/89
43/89
44/89
45/89
46/89
47/89
48/89
49/89
50/89
51/89
52/89
53/89
54/89
55/89
56/89
57/89
58/89
59/89
60/89
61/89
62/89
63/89
64/89
65/89
66/89
67/89
68/89
69/89
70/89
71/89
72/89
73/89
74/89
75/89
76/89
77/89
78/89
79/89
80/89
81/89
82/89
83/89
84/89
85/89
86/89
87/89
88/89
89/89

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/89] KVM: arm64: Base support for the pKVM hypervisor at EL2

Hi all,

This rather large series (based on -rc2) builds on top of the limited pKVM support available upstream and gets us to a point where the hypervisor code at EL2 is capable of running guests in both non-protected and protected mode on the same system. For more background information about pKVM, the following (slightly dated) LWN article may be informative:

https://lwn.net/Articles/836693/

The structure of this series is roughly as follows:

* Patches 01-06 :
- Some small cleanups and minor fixes.

* Patches 07-12 :
- Memory management changes at EL2 to allow the donation of memory from the host to the hypervisor and the "pinning" of shared memory at EL2.

* Patches 13-16 :
- Introduction of shadow VM and vCPU state at EL2 so that the hypervisor can manage guest state using its own private data structures, initially populated from the host structures.

* Patches 17-33 :
- Further memory management changes at EL2 to allow the allocation and reclaim of guest memory by the host. This then allows us to manage guest stage-2 page-tables entirely at EL2, with the host issuing hypercalls to map guest pages in response to faults.

* Patches 34-78 :
- Gradual reduction of EL2 trust in host data; rather than copy blindly between the host and shadow structures, we instead selectively sync/flush between them and reduce the amount of host data that is accessed directly by EL2.

* Patches 79-81 :
- Inject an abort into the host if it tries to access a guest page for which it does not have permission. This will then deliver a SEGV if the access originated from userspace.

* Patches 82-87 :
- Expose hypercalls to protected guests for sharing memory back with the host

* Patches 88-89 :
- Introduce the new machine type and add some documentation.

We considered splitting this into multiple series, but decided to keep everything together initially so that reviewers can more easily get an idea of what we're trying to do and also take it for a spin. The patches are also available in our git tree here:

https://android-kvm.googlesource.com/linux/+/refs/heads/for-upstream/pkvm-base-v1

It's worth pointing out that, although we've been tracking the fd-based proposal around KVM private memory [1], for now the approach taken here interacts directly with anonymous pages using a longterm GUP pin. We're expecting to prototype an fd-based implementation once the discussion at
[2] has converged. In the meantime, we hope to progress the non-protected VM support.

Finally, there are still some features that we have not included in this posting and will come later on:

- Support for read-only memslots and dirty logging for non-protected VMs. We currently document that this doesn't work (setting the memslot flags will fail), but we're working to enable this.

- Support for IOMMU configuration to protect guest memory from DMA attacks by the host.

- Support for optional loading of the guest's initial firmware by the hypervisor.

- Proxying of host interactions with Trustzone, intercepting and validating FF-A [3] calls at EL2.

- Support for restricted MMIO exits to only regions designated as MMIO by the guest. An earlier version of this work was previously posted at [4].

- Hardware debug and PMU support for non-protected guests -- this builds on the separate series posted at [5] and which is now queued for 5.19.

- Guest-side changes to issue the new pKVM hypercalls, for example sharing back the SWIOTLB buffer with the host for virtio traffic.

Please enjoy,

Will, Quentin, Fuad and Marc

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/r/[email protected]
[3] https://developer.arm.com/documentation/den0077/latest
[4] https://lore.kernel.org/all/[email protected]/
[5] https://lore.kernel.org/all/[email protected]/

Cc Ard Biesheuvel <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc Will Deacon <[email protected]>
Cc Alexandru Elisei <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc James Morse <[email protected]>
Cc Chao Peng <[email protected]>
Cc Quentin Perret <[email protected]>
Cc Suzuki K Poulose <[email protected]>
Cc Michael Roth <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Fuad Tabba <[email protected]>
Cc Oliver Upton <[email protected]>
Cc Marc Zyngier <[email protected]>

--->8

Fuad Tabba (23):
KVM: arm64: Add hyp_spinlock_t static initializer
KVM: arm64: Introduce shadow VM state at EL2
KVM: arm64: Instantiate VM shadow data from EL1
KVM: arm64: Do not allow memslot changes after first VM run under pKVM
KVM: arm64: Add hyp per_cpu variable to track current physical cpu
number
KVM: arm64: Ensure that TLBs and I-cache are private to each vcpu
KVM: arm64: Do not pass the vcpu to __pkvm_host_map_guest()
KVM: arm64: Check directly whether the vcpu is protected
KVM: arm64: Trap debug break and watch from guest
KVM: arm64: Restrict protected VM capabilities
KVM: arm64: Do not support MTE for protected VMs
KVM: arm64: Refactor reset_mpidr to extract its computation
KVM: arm64: Reset sysregs for protected VMs
KVM: arm64: Move pkvm_vcpu_init_traps to shadow vcpu init
KVM: arm64: Fix initializing traps in protected mode
KVM: arm64: Add EL2 entry/exit handlers for pKVM guests
KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp use
KVM: arm64: Initialize shadow vm state at hyp
KVM: arm64: Add HVC handling for protected guests at EL2
KVM: arm64: Move pstate reset values to kvm_arm.h
KVM: arm64: Move some kvm_psci functions to a shared header
KVM: arm64: Factor out vcpu_reset code for core registers and PSCI
KVM: arm64: Handle PSCI for protected VMs in EL2

Marc Zyngier (20):
KVM: arm64: Handle all ID registers trapped for a protected VM
KVM: arm64: Drop stale comment
KVM: arm64: Check for PTE validity when checking for
executable/cacheable
KVM: arm64: Make vcpu_{read,write}_sys_reg available to HYP code
KVM: arm64: Simplify vgic-v3 hypercalls
KVM: arm64: Add the {flush,sync}_vgic_state() primitives
KVM: arm64: Introduce predicates to check for protected state
KVM: arm64: Add the {flush,sync}_timer_state() primitives
KVM: arm64: Introduce the pkvm_vcpu_{load,put} hypercalls
KVM: arm64: Add current vcpu and shadow_state lookup primitive
KVM: arm64: Skip __kvm_adjust_pc() for protected vcpus
KVM: arm64: Introduce per-EC entry/exit handlers
KVM: arm64: Introduce lazy-ish state sync for non-protected VMs
KVM: arm64: Lazy host FP save/restore
KVM: arm64: Reduce host/shadow vcpu state copying
KVM: arm64: Force injection of a data abort on NISV MMIO exit
KVM: arm64: Donate memory to protected guests
KVM: arm64: Move vgic state between host and shadow vcpu structures
KVM: arm64: Do not update virtual timer state for protected VMs
KVM: arm64: Track the SVE state in the shadow vcpu

Quentin Perret (22):
KVM: arm64: Move hyp refcount manipulation helpers
KVM: arm64: Back hyp_vmemmap for all of memory
KVM: arm64: Implement do_donate() helper for donating memory
KVM: arm64: Prevent the donation of no-map pages
KVM: arm64: Add helpers to pin memory shared with hyp
KVM: arm64: Make hyp stage-1 refcnt correct on the whole range
KVM: arm64: Factor out private range VA allocation
KVM: arm64: Add pcpu fixmap infrastructure at EL2
KVM: arm64: Allow non-coallescable pages in a hyp_pool
KVM: arm64: Add generic hyp_memcache helpers
KVM: arm64: Instantiate guest stage-2 page-tables at EL2
KVM: arm64: Return guest memory from EL2 via dedicated teardown
memcache
KVM: arm64: Add flags to struct hyp_page
KVM: arm64: Consolidate stage-2 init in one function
KVM: arm64: Disallow dirty logging and RO memslots with pKVM
KVM: arm64: Don't access kvm_arm_hyp_percpu_base at EL1
KVM: arm64: Unmap kvm_arm_hyp_percpu_base from the host
KVM: arm64: Explicitly map kvm_vgic_global_state at EL2
KVM: arm64: Don't map host sections in pkvm
KVM: arm64: Add is_pkvm_initialized() helper
KVM: arm64: Refactor enter_exception64()
KVM: arm64: Inject SIGSEGV on illegal accesses

Will Deacon (24):
KVM: arm64: Remove redundant hyp_assert_lock_held() assertions
KVM: arm64: Return error from kvm_arch_init_vm() on allocation failure
KVM: arm64: Ignore 'kvm-arm.mode=protected' when using VHE
KVM: arm64: Extend comment in has_vhe()
KVM: arm64: Unify identifiers used to distinguish host and hypervisor
KVM: arm64: Include asm/kvm_mmu.h in nvhe/mem_protect.h
KVM: arm64: Provide I-cache invalidation by VA at EL2
KVM: arm64: Provide a hypercall for the host to reclaim guest memory
KVM: arm64: Extend memory sharing to allow host-to-guest transitions
KVM: arm64: Use the shadow vCPU structure in handle___kvm_vcpu_run()
KVM: arm64: Handle guest stage-2 page-tables entirely at EL2
KVM: arm64: Maintain a copy of 'kvm_arm_vmid_bits' at EL2
KVM: arm64: Extend memory donation to allow host-to-guest transitions
KVM: arm64: Split up nvhe/fixed_config.h
KVM: arm64: Advertise GICv3 sysreg interface to protected guests
KVM: arm64: Don't expose TLBI hypercalls after de-privilege
KVM: arm64: Support TLB invalidation in guest context
KVM: arm64: Avoid BBM when changing only s/w bits in Stage-2 PTE
KVM: arm64: Extend memory sharing to allow guest-to-host transitions
KVM: arm64: Document the KVM/arm64-specific calls in hypercalls.rst
KVM: arm64: Reformat/beautify PTP hypercall documentation
KVM: arm64: Expose memory sharing hypercalls to protected guests
KVM: arm64: Introduce KVM_VM_TYPE_ARM_PROTECTED machine type for PVMs
Documentation: KVM: Add some documentation for Protected KVM on arm64

 .../admin-guide/kernel-parameters.txt         |    5 +-
 Documentation/virt/kvm/api.rst                |    7 +
 Documentation/virt/kvm/arm/hypercalls.rst     |  118 ++
 Documentation/virt/kvm/arm/index.rst          |    2 +
 Documentation/virt/kvm/arm/pkvm.rst           |   96 ++
 Documentation/virt/kvm/arm/ptp_kvm.rst        |   38 +-
 arch/arm64/include/asm/kvm_arm.h              |   11 +-
 arch/arm64/include/asm/kvm_asm.h              |   28 +-
 arch/arm64/include/asm/kvm_emulate.h          |   92 ++
 arch/arm64/include/asm/kvm_host.h             |  123 +-
 arch/arm64/include/asm/kvm_hyp.h              |   10 +-
 arch/arm64/include/asm/kvm_mmu.h              |    2 +-
 arch/arm64/include/asm/kvm_pgtable.h          |    8 +
 arch/arm64/include/asm/kvm_pkvm.h             |  257 ++++
 arch/arm64/include/asm/virt.h                 |   15 +-
 arch/arm64/kernel/cpufeature.c                |   10 +-
 arch/arm64/kernel/image-vars.h                |   15 -
 arch/arm64/kvm/arch_timer.c                   |    7 +-
 arch/arm64/kvm/arm.c                          |  194 ++-
 arch/arm64/kvm/handle_exit.c                  |   22 +
 arch/arm64/kvm/hyp/exception.c                |   89 +-
 arch/arm64/kvm/hyp/hyp-constants.c            |    3 +
 .../arm64/kvm/hyp/include/nvhe/fixed_config.h |  205 ---
 arch/arm64/kvm/hyp/include/nvhe/gfp.h         |    6 +-
 arch/arm64/kvm/hyp/include/nvhe/mem_protect.h |   25 +-
 arch/arm64/kvm/hyp/include/nvhe/memory.h      |   33 +-
 arch/arm64/kvm/hyp/include/nvhe/mm.h          |   18 +-
 arch/arm64/kvm/hyp/include/nvhe/pkvm.h        |  119 ++
 arch/arm64/kvm/hyp/include/nvhe/spinlock.h    |   10 +-
 .../arm64/kvm/hyp/include/nvhe/trap_handler.h |    2 -
 arch/arm64/kvm/hyp/nvhe/cache.S               |   11 +
 arch/arm64/kvm/hyp/nvhe/hyp-main.c            |  937 +++++++++++++-
 arch/arm64/kvm/hyp/nvhe/hyp-smp.c             |    4 +
 arch/arm64/kvm/hyp/nvhe/mem_protect.c         | 1035 +++++++++++++++-
 arch/arm64/kvm/hyp/nvhe/mm.c                  |  177 ++-
 arch/arm64/kvm/hyp/nvhe/page_alloc.c          |   42 +-
 arch/arm64/kvm/hyp/nvhe/pkvm.c                | 1095 ++++++++++++++++-
 arch/arm64/kvm/hyp/nvhe/setup.c               |   97 +-
 arch/arm64/kvm/hyp/nvhe/switch.c              |    9 +-
 arch/arm64/kvm/hyp/nvhe/sys_regs.c            |  139 ++-
 arch/arm64/kvm/hyp/nvhe/tlb.c                 |   96 +-
 arch/arm64/kvm/hyp/pgtable.c                  |   31 +-
 arch/arm64/kvm/hyp/vgic-v3-sr.c               |   27 +-
 arch/arm64/kvm/mmio.c                         |    9 +
 arch/arm64/kvm/mmu.c                          |  202 ++-
 arch/arm64/kvm/pkvm.c                         |  156 ++-
 arch/arm64/kvm/pmu.c                          |   16 +-
 arch/arm64/kvm/psci.c                         |   28 -
 arch/arm64/kvm/reset.c                        |   99 +-
 arch/arm64/kvm/sys_regs.c                     |   34 +-
 arch/arm64/kvm/sys_regs.h                     |   19 +
 arch/arm64/kvm/vgic/vgic-v2.c                 |    9 +-
 arch/arm64/kvm/vgic/vgic-v3.c                 |   28 +-
 arch/arm64/kvm/vgic/vgic.c                    |   17 +-
 arch/arm64/kvm/vgic/vgic.h                    |    6 +-
 arch/arm64/mm/fault.c                         |   22 +
 include/kvm/arm_vgic.h                        |    3 +-
 include/linux/arm-smccc.h                     |   21 +
 include/uapi/linux/kvm.h                      |    6 +
 59 files changed, 5128 insertions(+), 817 deletions(-)
 create mode 100644 Documentation/virt/kvm/arm/hypercalls.rst
 create mode 100644 Documentation/virt/kvm/arm/pkvm.rst
 delete mode 100644 arch/arm64/kvm/hyp/include/nvhe/fixed_config.h
 create mode 100644 arch/arm64/kvm/hyp/include/nvhe/pkvm.h
Signature · 6 lines
2.36.1.124.g0e6072fb45-goog

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm