Skip to content

KVM: arm64: Tidy up is_created

Fuad Tabba kvmarm linux-arm-kernel lkml 1 version Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 1 replyApplied

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: arm64: Drop the unused EL2-side is_created writearch/arm64/kvm/hyp/nvhe/pkvm.c+0 -10 replies
2/3KVM: arm64: Remove unreachable early checks in pkvm_init_host_vm()arch/arm64/kvm/pkvm.c+0 -70 replies
3/3KVM: arm64: Drop redundant READ_ONCE() in pkvm_hyp_vm_is_created()arch/arm64/kvm/pkvm.c+5 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchKeir Fraser
1/3R-b
2/3R-b
3/3R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/3] KVM: arm64: Tidy up is_created

Hi folks,

Changes since v1 [1]:
- Carried Keir's Reviewed-by. No code changes.

This small series tidies up the host-side kvm->arch.pkvm.is_created flag, which tracks whether the hypervisor-side (EL2) VM has been instantiated.

It comes out of the ongoing pKVM (protected KVM) upstreaming work and runs in parallel with it. The changes only remove dead or redundant code around the flag, not any of the functional paths that work touches, so there is no dependency in either direction and the two can be applied in any order.

is_created stays: the pKVM handle is reserved early (so host MMU-notifier TLB invalidations have a valid handle before the first vCPU run), so a non-zero handle no longer implies the EL2 VM exists. is_created is what distinguishes "reserved" from "created", and the teardown path relies on it. Only the cruft around it goes.

Cheers,
/fuad

[1] https://lore.kernel.org/all/[email protected]/

Fuad Tabba (3):
KVM: arm64: Drop the unused EL2-side is_created write
KVM: arm64: Remove unreachable early checks in pkvm_init_host_vm()
KVM: arm64: Drop redundant READ_ONCE() in pkvm_hyp_vm_is_created()

 arch/arm64/kvm/hyp/nvhe/pkvm.c |  1 -
 arch/arm64/kvm/pkvm.c          | 13 +++++--------
 2 files changed, 5 insertions(+), 9 deletions(-)
Signature · 1 line
2.39.5