On Tue, May 18, 2021 at 01:14:30PM +0100, Marc Zyngier wrote: > Mark Brown wrote: > > I do see some ifdefery with __KVM_NVHE_HYPERVISOR__ elsewhere which > > could be used to take care of that particular case either by > > providing a __hyp mapping or just not trying to set the flag there > > (the latter seems safer) but I'm guessing there's others. Do we > > have a reliable way of identifying such contexts? > __KVM_NVHE_HYPERVISOR__ usually is a good indication that we're > compiling for the nVHE EL2 object. I guess that skipping the > optimisation would be good enough for KVM, until we decide to provide > a nVHE-specific helper that uses the private per-cpu information. Yes, I think skipping it for now is going to be safest and it's certainly easiest. I didn't *spot* any other affected cases, but eqally I didn't spot this one first time around.