Re: [PATCH v3 04/11] kvm: arm64: Remove __hyp_this_cpu_read

2020-09-21 Thread David Brazdil
Hi Will, > > +static inline unsigned long __hyp_my_cpu_offset(void) > > +{ > > + unsigned long off; > > + > > + /* > > +* We want to allow caching the value, so avoid using volatile and > > +* instead use a fake stack read to hazard against barrier(). > > +*/ > > I don't think we

Re: [PATCH v3 04/11] kvm: arm64: Remove __hyp_this_cpu_read

2020-09-18 Thread Will Deacon
On Wed, Sep 16, 2020 at 06:34:32PM +0100, David Brazdil wrote: > this_cpu_ptr is meant for use in kernel proper because it selects between > TPIDR_EL1/2 based on nVHE/VHE. __hyp_this_cpu_ptr was used in hyp to always > select TPIDR_EL2. Unify all users behind this_cpu_ptr and friends by >

[PATCH v3 04/11] kvm: arm64: Remove __hyp_this_cpu_read

2020-09-16 Thread David Brazdil
this_cpu_ptr is meant for use in kernel proper because it selects between TPIDR_EL1/2 based on nVHE/VHE. __hyp_this_cpu_ptr was used in hyp to always select TPIDR_EL2. Unify all users behind this_cpu_ptr and friends by selecting _EL2 register under __KVM_VHE/NVHE_HYPERVISOR__. Under