kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/30] KVM: arm64: Preamble for pKVM
@ 2024-04-23 15:05 Fuad Tabba
  2024-04-23 15:05 ` [PATCH v4 01/30] KVM: arm64: Initialize the kvm host data's fpsimd_state pointer in pKVM Fuad Tabba
                   ` (31 more replies)
  0 siblings, 32 replies; 50+ messages in thread
From: Fuad Tabba @ 2024-04-23 15:05 UTC (permalink / raw)
  To: kvmarm
  Cc: maz, will, qperret, tabba, seanjc, alexandru.elisei,
	catalin.marinas, philmd, james.morse, suzuki.poulose,
	oliver.upton, mark.rutland, broonie, joey.gouly, rananta,
	smostafa

Changes from V3 [0]:
- Rebased on latest kvmarm/next (dcbf421a8c08)
- Dropped atomic and locking patches for now, while we rework them
- Misc fixes (Oliver)

We are getting closer to upstreaming the remaining part of pKVM
[1]. To make the process easier for us and for our dear
reviewers, we are sending out this patch series as a preamble to
the upcoming patches.

This series is based on Linux 6.9-rc3 -- kvmarm/next
(dcbf421a8c08). Most of the patches in this series are
self-standing, and can be applied directly. Patches 1 to 13 are
fixes.

This series is a bit of a bombay-mix of patches we've been
carrying. There's no one overarching theme, but they do improve
the code by fixing existing bugs in pKVM, refactoring code to
make it more readable and easier to re-use for pKVM, or adding
functionality to the existing pKVM code upstream.

For a technical deep dive into pKVM, please refer to Quentin
Perret's KVM Forum Presentation [2, 3]. The pKVM core series,
which we plan on sending for review next, the code is here [1].

Cheers,
Fuad, Quentin, Will, and Marc

[0] https://lore.kernel.org/all/20240419075941.4085061-1-tabba@google.com/

[1] https://android-kvm.googlesource.com/linux/+/refs/heads/for-upstream/pkvm-core

[2] Protected KVM on arm64 (slides)
https://static.sched.com/hosted_files/kvmforum2022/88/KVM%20forum%202022%20-%20pKVM%20deep%20dive.pdf

[3] Protected KVM on arm64 (video)
https://www.youtube.com/watch?v=9npebeVFbFw

Fuad Tabba (18):
  KVM: arm64: Initialize the kvm host data's fpsimd_state pointer in
    pKVM
  KVM: arm64: Move guest_owns_fp_regs() to increase its scope
  KVM: arm64: Refactor checks for FP state ownership
  KVM: arm64: Do not re-initialize the KVM lock
  KVM: arm64: Rename __tlb_switch_to_{guest,host}() in VHE
  KVM: arm64: Do not map the host fpsimd state to hyp in pKVM
  KVM: arm64: Fix comment for __pkvm_vcpu_init_traps()
  KVM: arm64: Change kvm_handle_mmio_return() return polarity
  KVM: arm64: Move setting the page as dirty out of the critical section
  KVM: arm64: Introduce and use predicates that check for protected VMs
  KVM: arm64: Move pstate reset value definitions to kvm_arm.h
  KVM: arm64: Clarify rationale for ZCR_EL1 value restored on guest exit
  KVM: arm64: Refactor calculating SVE state size to use helpers
  KVM: arm64: Move some kvm_psci functions to a shared header
  KVM: arm64: Refactor reset_mpidr() to extract its computation
  KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp use
  KVM: arm64: Refactor setting the return value in
    kvm_vm_ioctl_enable_cap()
  KVM: arm64: Restrict supported capabilities for protected VMs

Marc Zyngier (3):
  KVM: arm64: Check for PTE validity when checking for
    executable/cacheable
  KVM: arm64: Simplify vgic-v3 hypercalls
  KVM: arm64: Force injection of a data abort on NISV MMIO exit

Quentin Perret (4):
  KVM: arm64: Issue CMOs when tearing down guest s2 pages
  KVM: arm64: Avoid BUG-ing from the host abort path
  KVM: arm64: Prevent kmemleak from accessing .hyp.data
  KVM: arm64: Add is_pkvm_initialized() helper

Will Deacon (5):
  KVM: arm64: Avoid BBM when changing only s/w bits in Stage-2 PTE
  KVM: arm64: Support TLB invalidation in guest context
  KVM: arm64: Reformat/beautify PTP hypercall documentation
  KVM: arm64: Rename firmware pseudo-register documentation file
  KVM: arm64: Document the KVM/arm64-specific calls in hypercalls.rst

 Documentation/virt/kvm/api.rst                |   7 +
 .../virt/kvm/arm/fw-pseudo-registers.rst      | 138 ++++++++++++++
 Documentation/virt/kvm/arm/hypercalls.rst     | 180 +++++-------------
 Documentation/virt/kvm/arm/index.rst          |   1 +
 Documentation/virt/kvm/arm/ptp_kvm.rst        |  38 ++--
 arch/arm64/include/asm/kvm_arm.h              |  12 ++
 arch/arm64/include/asm/kvm_asm.h              |   8 +-
 arch/arm64/include/asm/kvm_emulate.h          |  11 +-
 arch/arm64/include/asm/kvm_host.h             |  39 ++--
 arch/arm64/include/asm/kvm_hyp.h              |   4 +-
 arch/arm64/include/asm/virt.h                 |  12 +-
 arch/arm64/kvm/arm.c                          |  63 ++++--
 arch/arm64/kvm/fpsimd.c                       |  60 +++---
 arch/arm64/kvm/hyp/include/hyp/switch.h       |   8 +-
 arch/arm64/kvm/hyp/include/nvhe/pkvm.h        |   6 +
 arch/arm64/kvm/hyp/nvhe/hyp-main.c            |  24 +--
 arch/arm64/kvm/hyp/nvhe/mem_protect.c         |   8 +-
 arch/arm64/kvm/hyp/nvhe/pkvm.c                |  14 +-
 arch/arm64/kvm/hyp/nvhe/setup.c               |   1 +
 arch/arm64/kvm/hyp/nvhe/switch.c              |  10 +-
 arch/arm64/kvm/hyp/nvhe/tlb.c                 | 115 ++++++++---
 arch/arm64/kvm/hyp/pgtable.c                  |  21 +-
 arch/arm64/kvm/hyp/vgic-v3-sr.c               |  27 ++-
 arch/arm64/kvm/hyp/vhe/switch.c               |   4 +-
 arch/arm64/kvm/hyp/vhe/tlb.c                  |  26 +--
 arch/arm64/kvm/mmio.c                         |  12 +-
 arch/arm64/kvm/mmu.c                          |   8 +-
 arch/arm64/kvm/pkvm.c                         |   2 +-
 arch/arm64/kvm/psci.c                         |  28 ---
 arch/arm64/kvm/reset.c                        |  20 +-
 arch/arm64/kvm/sys_regs.c                     |  14 +-
 arch/arm64/kvm/sys_regs.h                     |  19 ++
 arch/arm64/kvm/vgic/vgic-v2.c                 |   9 +-
 arch/arm64/kvm/vgic/vgic-v3.c                 |  23 +--
 arch/arm64/kvm/vgic/vgic.c                    |  11 --
 arch/arm64/kvm/vgic/vgic.h                    |   2 -
 include/kvm/arm_psci.h                        |  29 +++
 include/kvm/arm_vgic.h                        |   1 -
 38 files changed, 597 insertions(+), 418 deletions(-)
 create mode 100644 Documentation/virt/kvm/arm/fw-pseudo-registers.rst


base-commit: dcbf421a8c082f52f3b8cc19cff736374df123d6
-- 
2.44.0.769.g3c40516874-goog


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2024-05-13  9:51 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23 15:05 [PATCH v4 00/30] KVM: arm64: Preamble for pKVM Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 01/30] KVM: arm64: Initialize the kvm host data's fpsimd_state pointer in pKVM Fuad Tabba
2024-05-09 14:09   ` Zenghui Yu
2024-05-09 17:46     ` Fuad Tabba
2024-05-10  2:39       ` Zenghui Yu
2024-05-10  6:44         ` Fuad Tabba
2024-05-10  7:59           ` Marc Zyngier
2024-05-10  8:00             ` Fuad Tabba
2024-05-10 10:49               ` Zenghui Yu
2024-05-11 18:15               ` Oliver Upton
2024-05-12 15:46                 ` Fuad Tabba
2024-05-13  9:51                   ` Marc Zyngier
2024-04-23 15:05 ` [PATCH v4 02/30] KVM: arm64: Move guest_owns_fp_regs() to increase its scope Fuad Tabba
2024-05-01 14:16   ` Mark Brown
2024-04-23 15:05 ` [PATCH v4 03/30] KVM: arm64: Refactor checks for FP state ownership Fuad Tabba
2024-05-01 14:17   ` Mark Brown
2024-04-23 15:05 ` [PATCH v4 04/30] KVM: arm64: Do not re-initialize the KVM lock Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 05/30] KVM: arm64: Issue CMOs when tearing down guest s2 pages Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 06/30] KVM: arm64: Avoid BUG-ing from the host abort path Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 07/30] KVM: arm64: Check for PTE validity when checking for executable/cacheable Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 08/30] KVM: arm64: Avoid BBM when changing only s/w bits in Stage-2 PTE Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 09/30] KVM: arm64: Support TLB invalidation in guest context Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 10/30] KVM: arm64: Rename __tlb_switch_to_{guest,host}() in VHE Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 11/30] KVM: arm64: Do not map the host fpsimd state to hyp in pKVM Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 12/30] KVM: arm64: Prevent kmemleak from accessing .hyp.data Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 13/30] KVM: arm64: Fix comment for __pkvm_vcpu_init_traps() Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 14/30] KVM: arm64: Change kvm_handle_mmio_return() return polarity Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 15/30] KVM: arm64: Move setting the page as dirty out of the critical section Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 16/30] KVM: arm64: Simplify vgic-v3 hypercalls Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 17/30] KVM: arm64: Add is_pkvm_initialized() helper Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 18/30] KVM: arm64: Introduce and use predicates that check for protected VMs Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 19/30] KVM: arm64: Move pstate reset value definitions to kvm_arm.h Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 20/30] KVM: arm64: Clarify rationale for ZCR_EL1 value restored on guest exit Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 21/30] KVM: arm64: Refactor calculating SVE state size to use helpers Fuad Tabba
2024-04-25 22:55   ` Oliver Upton
2024-04-26  2:05     ` Mark Brown
2024-04-26  7:20     ` Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 22/30] KVM: arm64: Move some kvm_psci functions to a shared header Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 23/30] KVM: arm64: Refactor reset_mpidr() to extract its computation Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 24/30] KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp use Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 25/30] KVM: arm64: Reformat/beautify PTP hypercall documentation Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 26/30] KVM: arm64: Rename firmware pseudo-register documentation file Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 27/30] KVM: arm64: Document the KVM/arm64-specific calls in hypercalls.rst Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 28/30] KVM: arm64: Refactor setting the return value in kvm_vm_ioctl_enable_cap() Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 29/30] KVM: arm64: Restrict supported capabilities for protected VMs Fuad Tabba
2024-04-23 15:05 ` [PATCH v4 30/30] KVM: arm64: Force injection of a data abort on NISV MMIO exit Fuad Tabba
2024-04-30  8:12 ` [PATCH v4 00/30] KVM: arm64: Preamble for pKVM Oliver Upton
2024-04-30 15:36   ` Fuad Tabba
2024-05-01 15:43     ` Marc Zyngier
2024-05-01 16:01 ` (subset) " Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).