Thread (14 messages) 14 messages, 3 authors, 15d ago

Re: [PATCH v5 2/8] KVM: arm64: Make vcpu_{read,write}_sys_reg available to HYP code

From: Marc Zyngier <maz@kernel.org>
Date: 2026-07-14 15:19:33
Also in: kvmarm, lkml

On Tue, 14 Jul 2026 11:15:55 +0100,
Fuad Tabba [off-list ref] wrote:
The vcpu_{read,write}_sys_reg() accessors are only valid on a VHE host,
so helpers built on them such as kvm_vcpu_set_be()/kvm_vcpu_is_be()
cannot be shared with hyp code. exception.c already wraps them in local
helpers that pick the host- or hyp-side accessor via has_vhe().

Rename the host-only implementations to __vcpu_{read,write}_sysreg_vhe()
I'm a bit puzzled by this. There is nothing that makes these functions
VHE-specific. Look at where they are called from: plenty of non-VHE
uses. These helpers are the canonical accessors for any system
register, and they don't cater for any particular mode.

	m.

-- 
Without deviation from the norm, progress is not possible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help