]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Rename pkvm.enabled to pkvm.is_protected
authorFuad Tabba <tabba@google.com>
Tue, 9 Sep 2025 07:24:29 +0000 (08:24 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 15 Sep 2025 09:46:55 +0000 (10:46 +0100)
commit58dfb66b1e4cfb998db9e71437a2c0d9b83a93c0
tree1f7b7a0b717d0840bfbb903697c0434bdb9f73cc
parentf9ac33e45d57bc4aa365363ffb650c830e5bb325
KVM: arm64: Rename pkvm.enabled to pkvm.is_protected

The 'pkvm.enabled' field in struct kvm_protected_vm is confusingly
named. Its purpose is to indicate whether a VM is a _protected_ VM under
pKVM, and not whether the VM itself is enabled or running.

For a non-protected VM, the VM can be fully active and running, yet this
field would be false. This ambiguity can lead to incorrect assumptions
about the VM's operational state and makes the code harder to reason
about.

Rename the field to 'is_protected' to make it unambiguous that the flag
tracks the protected status of the VM.

No functional change intended.

Reviewed-by: Kunwu Chan <kunwu.chan@linux.dev>
Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Kunwu Chan <chentao@kylinos.cn>
Tested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/nvhe/pkvm.c