Re: [PATCH v2 3/5] KVM: arm64: Add context-switch of ACCDATA_EL1

From: Fuad Tabba

Date: Mon Oct 26 2026 - 13:11:08 EST


On Mon, 26 Oct 2026 at 15:41, Suzuki K Poulose <suzuki.poulose@xxxxxxx> wrote:
[...]
> > +static inline bool ctxt_has_accdata(struct kvm_cpu_context *ctxt)
> > +{
> > + struct kvm_vcpu *vcpu;
> > +
> > + /* The host never uses ACCDATA_EL1 */
> > + if (!cpus_have_final_cap(ARM64_HAS_LS64_ACCDATA) || !ctxt_is_guest(ctxt))
> > + return false;
> > +
> > + vcpu = ctxt_to_vcpu(ctxt);
> > + return kvm_has_feat(kern_hyp_va(vcpu->kvm), ID_AA64ISAR1_EL1, LS64, LS64_ACCDATA);
>
> minor nit: Aligning with the other kvm_has_feat() usecsaes, should we
> wrap this under kvm_has_accdata() (with moving the cpus_have_final_cap()
> to the wrapper ?)

Thanks Suzuki. I'll do this change if I respin.

Cheers,
/fuad