Re: [PATCH v4 17/26] kvm: arm64: Add offset for hyp VA <-> PA conversion

2020-12-08 Thread David Brazdil
Hi Qian, > > +/* > > + * Store a hyp VA <-> PA offset into a hyp-owned variable. > > + */ > > +static void init_hyp_physvirt_offset(void) > > +{ > > + extern s64 kvm_nvhe_sym(hyp_physvirt_offset); > > + u64 kern_va, hyp_va; > > + > > + /* Compute the offset from the hyp VA and PA of a random

Re: [PATCH v4 17/26] kvm: arm64: Add offset for hyp VA <-> PA conversion

2020-12-07 Thread Qian Cai
On Wed, 2020-12-02 at 18:41 +, David Brazdil wrote: > Add a host-initialized constant to KVM nVHE hyp code for converting > between EL2 linear map virtual addresses and physical addresses. > Also add `__hyp_pa` macro that performs the conversion. > > Signed-off-by: David Brazdil > --- > arch

[PATCH v4 17/26] kvm: arm64: Add offset for hyp VA <-> PA conversion

2020-12-02 Thread David Brazdil
Add a host-initialized constant to KVM nVHE hyp code for converting between EL2 linear map virtual addresses and physical addresses. Also add `__hyp_pa` macro that performs the conversion. Signed-off-by: David Brazdil --- arch/arm64/kvm/hyp/nvhe/psci-relay.c | 3 +++ arch/arm64/kvm/va_layout.c