Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: arm64: Remove redundant kern_hyp_va() in unpin_host_sve_state()

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>

authored by

Fuad Tabba and committed by
Marc Zyngier
02471a78 7e7c2cf0

+1 -1
+1 -1
arch/arm64/kvm/hyp/nvhe/pkvm.c
··· 392 392 if (!vcpu_has_feature(&hyp_vcpu->vcpu, KVM_ARM_VCPU_SVE)) 393 393 return; 394 394 395 - sve_state = kern_hyp_va(hyp_vcpu->vcpu.arch.sve_state); 395 + sve_state = hyp_vcpu->vcpu.arch.sve_state; 396 396 hyp_unpin_shared_mem(sve_state, 397 397 sve_state + vcpu_sve_state_size(&hyp_vcpu->vcpu)); 398 398 }