Re: [PATCH v3 07/11] kvm: arm64: Duplicate arm64_ssbd_callback_required for nVHE hyp
From: David Brazdil <hidden>
Date: 2020-09-22 18:07:50
Also in:
kvmarm, lkml
From: David Brazdil <hidden>
Date: 2020-09-22 18:07:50
Also in:
kvmarm, lkml
quoted
u64 *ptr; - ptr = per_cpu_ptr(&arm64_ssbd_callback_required, cpu); + ptr = per_cpu_ptr_nvhe(arm64_ssbd_callback_required, cpu); err = create_hyp_mappings(ptr, ptr + 1, PAGE_HYP); if (err) return err; + + /* Copy value from kernel to hyp. */ + *ptr = per_cpu(arm64_ssbd_callback_required, cpu);Hmm. Is this correct for late arriving CPUs, where we don't know whether a callback is required at the point we do the copy? That sounds fiddly to resolve, but this _might_ all be moot because I'm about to post a series that allows us to remove the hyp mapping of this variable entirely. So leave this for now, but maybe stick a comment in that it doesn't work for late cpus.
Ah, good point. I'll move the value copy at the end of cpu_init_hyp_mode(). It must be known at that point. And if your series gets rid of this completely, even better. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel