]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
KVM: arm64: Remove redundant kern_hyp_va() in unpin_host_sve_state()
authorFuad Tabba <tabba@google.com>
Fri, 13 Feb 2026 14:38:15 +0000 (14:38 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 13 Feb 2026 14:54:48 +0000 (14:54 +0000)
The `sve_state` pointer in `hyp_vcpu->vcpu.arch` is initialized as a
hypervisor virtual address during vCPU initialization in
`pkvm_vcpu_init_sve()`.

`unpin_host_sve_state()` calls `kern_hyp_va()` on this address. Since
`kern_hyp_va()` is idempotent, it's not a bug. However, it is
unnecessary and potentially confusing. Remove the redundant conversion.

Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260213143815.1732675-5-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/nvhe/pkvm.c

index f3c1c695516342667850c75aba8b06d67b6dd7c7..2f029bfe4755a5088eeb40381248d4748df83f9c 100644 (file)
@@ -392,7 +392,7 @@ static void unpin_host_sve_state(struct pkvm_hyp_vcpu *hyp_vcpu)
        if (!vcpu_has_feature(&hyp_vcpu->vcpu, KVM_ARM_VCPU_SVE))
                return;
 
-       sve_state = kern_hyp_va(hyp_vcpu->vcpu.arch.sve_state);
+       sve_state = hyp_vcpu->vcpu.arch.sve_state;
        hyp_unpin_shared_mem(sve_state,
                             sve_state + vcpu_sve_state_size(&hyp_vcpu->vcpu));
 }