]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Move pkvm_vcpu_init_traps() to init_pkvm_hyp_vcpu()
authorFuad Tabba <tabba@google.com>
Fri, 18 Oct 2024 07:48:29 +0000 (08:48 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 31 Oct 2024 18:45:24 +0000 (18:45 +0000)
commit0546d4a925a6ce52b362e528f6d962efd72c84b9
treef8227ce3c48be78a95c270eb5d953a9f40c8f596
parent8aaf3f7dce74605a2e9f31bd421825a996ac7de3
KVM: arm64: Move pkvm_vcpu_init_traps() to init_pkvm_hyp_vcpu()

Move pkvm_vcpu_init_traps() to the initialization of the
hypervisor's vcpu state in init_pkvm_hyp_vcpu(), and remove the
associated hypercall.

In protected mode, traps need to be initialized whenever a VCPU
is initialized anyway, and not only for protected VMs. This also
saves an unnecessary hypercall.

Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20241018074833.2563674-2-tabba@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_asm.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/include/nvhe/trap_handler.h
arch/arm64/kvm/hyp/nvhe/hyp-main.c
arch/arm64/kvm/hyp/nvhe/pkvm.c