KVM: arm64: Merge kvm_arch_vcpu_run_pid_change() and kvm_vcpu_first_run_init()
authorMarc Zyngier <maz@kernel.org>
Thu, 14 Oct 2021 10:42:38 +0000 (11:42 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 1 Dec 2021 11:51:21 +0000 (11:51 +0000)
commitb5aa368abfbf4c0e041c792e3340955554eff97e
tree310776b146c2dd74b97dadfb2f7bfbe8c36f77c4
parent1408e73d21feffe77680acd4da611295db0dfcd8
KVM: arm64: Merge kvm_arch_vcpu_run_pid_change() and kvm_vcpu_first_run_init()

The kvm_arch_vcpu_run_pid_change() helper gets called on each PID
change. The kvm_vcpu_first_run_init() helper gets run on the...
first run(!) of a vcpu.

As it turns out, the first run of a vcpu also triggers a PID change
event (vcpu->pid is initially NULL).

Use this property to merge these two helpers and get rid of another
arm64-specific oddity.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/arm.c