Transform the host into a vCPU
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest37 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/37 | smccc: Make constants available to assemblyinclude/ | +22 | 0 replies | |
| 2/37 | KVM: arm64: Move clearing of vcpu debug dirty bitarch/ arch/ arch/ | +3 | 0 replies | |
| 3/37 | KVM: arm64: Track running vCPU outside of the CPU contextarch/ arch/ arch/ +7 more | +27 | 0 replies | |
| 4/37 | KVM: arm64: nVHE: Pass pointers consistently to hyp-initarch/ arch/ | +1 | 0 replies | |
| 5/37 | KVM: arm64: nVHE: Break out of the hyp-init idmaparch/ arch/ arch/ +1 more | +31 | 0 replies | |
| 6/37 | KVM: arm64: Only check pending interrupts if it would traparch/ | +7 | 1 reply | |
| 7/37 | KVM: arm64: Separate SError detection from VAXorcismarch/ arch/ arch/ +1 more | +25 | 6 replies | |
| 8/37 | KVM: arm64: nVHE: Introduce a hyp run loop for the hostarch/ arch/ arch/ +7 more | +154 | 0 replies | |
| 9/37 | smccc: Cast arguments to unsigned longinclude/ | +10 | 0 replies | |
| 10/37 | KVM: arm64: nVHE: Migrate hyp interface to SMCCCarch/ arch/ arch/ +2 more | +139 | 0 replies | |
| 11/37 | KVM: arm64: nVHE: Migrate hyp-init to SMCCCarch/ arch/ arch/ +3 more | +48 | 0 replies | |
| 12/37 | KVM: arm64: nVHE: Fix pointers during SMCCC convertionarch/ arch/ arch/ +1 more | +8 | 0 replies | |
| 13/37 | KVM: arm64: Rename workaround 2 helpersarch/ arch/ arch/ | +10 | 0 replies | |
| 14/37 | KVM: arm64: nVHE: Use __kvm_vcpu_run for the host vcpuarch/ arch/ | +74 | 0 replies | |
| 15/37 | KVM: arm64: Share some context save and restore macrosarch/ arch/ arch/ | +39 | 0 replies | |
| 16/37 | KVM: arm64: nVHE: Handle stub HVCs in the host looparch/ arch/ arch/ | +65 | 0 replies | |
| 17/37 | KVM: arm64: nVHE: Store host sysregs in host vcpuarch/ | +7 | 0 replies | |
| 18/37 | KVM: arm64: nVHE: Access pmu_events directly in kvm_host_dataarch/ | +6 | 0 replies | |
| 19/37 | KVM: arm64: nVHE: Drop host_ctxt argument for context switchingarch/ | +4 | 0 replies | |
| 20/37 | KVM: arm64: nVHE: Use host vcpu context for host debug statearch/ arch/ arch/ +3 more | +44 | 0 replies | |
| 21/37 | KVM: arm64: Move host debug state from vcpu to percpuarch/ arch/ arch/ +3 more | +22 | 0 replies | |
| 22/37 | KVM: arm64: nVHE: Store host's mdcr_el2 and hcr_el2 in its vcpuarch/ arch/ | +12 | 0 replies | |
| 23/37 | KVM: arm64: Skip __hyp_panic and go direct to hyp_panicarch/ arch/ arch/ +1 more | +7 | 0 replies | |
| 24/37 | KVM: arm64: Break apart kvm_host_dataarch/ arch/ arch/ +11 more | +79 | 0 replies | |
| 25/37 | KVM: arm64: nVHE: Unify sysreg state saving pathsarch/ | +8 | 0 replies | |
| 26/37 | KVM: arm64: nVHE: Unify 32-bit sysreg saving pathsarch/ | +1 | 0 replies | |
| 27/37 | KVM: arm64: nVHE: Unify vgic save and restorearch/ | +9 | 0 replies | |
| 28/37 | KVM: arm64: nVHE: Unify fpexc32 saving pathsarch/ arch/ arch/ | +6 | 0 replies | |
| 29/37 | KVM: arm64: nVHE: Separate the save and restore of debug statearch/ arch/ arch/ +2 more | +65 | 0 replies | |
| 30/37 | KVM: arm64: nVHE: Remove MMU assumption in speculative AT workaroundarch/ arch/ | +15 | 0 replies | |
| 31/37 | KVM: arm64: Move speculative AT ISBs into contextarch/ arch/ arch/ +1 more | +4 | 0 replies | |
| 32/37 | KVM: arm64: nVHE: Unify sysreg state restoration pathsarch/ arch/ | +54 | 0 replies | |
| 33/37 | KVM: arm64: Remove __activate_vm wrapperarch/ arch/ arch/ | +6 | 0 replies | |
| 34/37 | KVM: arm64: nVHE: Unify timer restore pathsarch/ arch/ arch/ | +16 | 0 replies | |
| 35/37 | KVM: arm64: nVHE: Unify PMU event restoration pathsarch/ | +15 | 0 replies | |
| 36/37 | KVM: arm64: nVHE: Unify GIC PMR restoration pathsarch/ | +22 | 0 replies | |
| 37/37 | KVM: arm64: Separate save and restore of vcpu trap statearch/ arch/ arch/ | +14 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/37] Transform the host into a vCPU
As part of the effort to isolate hyp from the host on nVHE, this series provides hyp with its very own context and views the host as a vcpu from the point of view of context switching.
The journey begins by preparing for hyp-init to instantiate a run loop in hyp that __guest_enters back into the host. The interfaces then migrate to SMCCC rather than the raw function pointer intrface of today.
Next, the host state is fully migrated into its vcpu leaving a distinct context for hyp and host. Finally, the save and restore paths of guests and the host are unified such that __kvm_vcpu_run can switch to and run any vcpu it is given.
It's a long series, but that seems to be the way Marc likes things around here, hehe. I've tried to keep the patches simple where possible but let me know if there's ever too much in one go and I'll try and help you out.
This has been lightly tested on qemu with both VHE and nVHE booting VMs. More rigorous testing will be needed.
The first patch is already in arm64/for-next/misc 7af928851508
The second patch can also be seen in <[email protected]>
Andrew Scull (37):
smccc: Make constants available to assembly
KVM: arm64: Move clearing of vcpu debug dirty bit
KVM: arm64: Track running vCPU outside of the CPU context
KVM: arm64: nVHE: Pass pointers consistently to hyp-init
KVM: arm64: nVHE: Break out of the hyp-init idmap
KVM: arm64: Only check pending interrupts if it would trap
KVM: arm64: Separate SError detection from VAXorcism
KVM: arm64: nVHE: Introduce a hyp run loop for the host
smccc: Cast arguments to unsigned long
KVM: arm64: nVHE: Migrate hyp interface to SMCCC
KVM: arm64: nVHE: Migrate hyp-init to SMCCC
KVM: arm64: nVHE: Fix pointers during SMCCC convertion
KVM: arm64: Rename workaround 2 helpers
KVM: arm64: nVHE: Use __kvm_vcpu_run for the host vcpu
KVM: arm64: Share some context save and restore macros
KVM: arm64: nVHE: Handle stub HVCs in the host loop
KVM: arm64: nVHE: Store host sysregs in host vcpu
KVM: arm64: nVHE: Access pmu_events directly in kvm_host_data
KVM: arm64: nVHE: Drop host_ctxt argument for context switching
KVM: arm64: nVHE: Use host vcpu context for host debug state
KVM: arm64: Move host debug state from vcpu to percpu
KVM: arm64: nVHE: Store host's mdcr_el2 and hcr_el2 in its vcpu
KVM: arm64: Skip __hyp_panic and go direct to hyp_panic
KVM: arm64: Break apart kvm_host_data
KVM: arm64: nVHE: Unify sysreg state saving paths
KVM: arm64: nVHE: Unify 32-bit sysreg saving paths
KVM: arm64: nVHE: Unify vgic save and restore
KVM: arm64: nVHE: Unify fpexc32 saving paths
KVM: arm64: nVHE: Separate the save and restore of debug state
KVM: arm64: nVHE: Remove MMU assumption in speculative AT workaround
KVM: arm64: Move speculative AT ISBs into context
KVM: arm64: nVHE: Unify sysreg state restoration paths
KVM: arm64: Remove __activate_vm wrapper
KVM: arm64: nVHE: Unify timer restore paths
KVM: arm64: nVHE: Unify PMU event restoration paths
KVM: arm64: nVHE: Unify GIC PMR restoration paths
KVM: arm64: Separate save and restore of vcpu trap state
arch/arm64/include/asm/kvm_asm.h | 73 +++++- arch/arm64/include/asm/kvm_host.h | 57 ++--- arch/arm64/include/asm/kvm_hyp.h | 33 ++- arch/arm64/include/asm/kvm_mmu.h | 7 - arch/arm64/kernel/asm-offsets.c | 2 - arch/arm64/kernel/image-vars.h | 6 +- arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/arm.c | 75 +++++- arch/arm64/kvm/debug.c | 2 + arch/arm64/kvm/hyp.S | 34 --- arch/arm64/kvm/hyp/entry.S | 92 +++---- arch/arm64/kvm/hyp/hyp-entry.S | 81 +----- arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 49 +--- arch/arm64/kvm/hyp/include/hyp/switch.h | 30 ++- arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 46 ++-- arch/arm64/kvm/hyp/nvhe/Makefile | 3 +- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 28 +- arch/arm64/kvm/hyp/nvhe/hyp-init.S | 86 ++++--- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 218 ++++++++++++++++ arch/arm64/kvm/hyp/nvhe/hyp-start.S | 49 ++++ arch/arm64/kvm/hyp/nvhe/switch.c | 282 +++++++++++---------- arch/arm64/kvm/hyp/nvhe/timer-sr.c | 35 +-- arch/arm64/kvm/hyp/nvhe/tlb.c | 19 +- arch/arm64/kvm/hyp/vhe/debug-sr.c | 34 ++- arch/arm64/kvm/hyp/vhe/switch.c | 30 +-- arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 4 +- arch/arm64/kvm/hyp/vhe/tlb.c | 4 +- arch/arm64/kvm/pmu.c | 28 +- arch/arm64/kvm/vgic/vgic-v3.c | 4 +- include/linux/arm-smccc.h | 64 ++--- 30 files changed, 873 insertions(+), 604 deletions(-) delete mode 100644 arch/arm64/kvm/hyp.S create mode 100644 arch/arm64/kvm/hyp/nvhe/hyp-main.c create mode 100644 arch/arm64/kvm/hyp/nvhe/hyp-start.S
Signature · 6 lines
2.27.0.389.gc38d7665816-goog _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm