ANDROID: KVM: arm64: Filter-out non-kernel addresses in kern_hyp_va
kern_hyp_va() is idempotent for the hypervisor linear space. This is
handy for the nVHE hypervisor callers handling kvm_vcpu or kvm_arch
pointers. Those pointers can be either from the hypervisor space (when
protected mode is enabled, we don't trust the kernel and the hypervisor
uses its own version) or from the kernel space (we do trust the kernel
in "non-protected" nVHE).
This idempotence doesn't apply for addresses within the hypervisor private
range, like the ones you get from the heap allocator (hyp_alloc()). We
can however still distinguish kernel addresses based on PAGE_OFFSET.
Leaving the assembly version untouched as no one is using it.
Bug: 278749606
Bug: 273748186
Change-Id: I915ff584f76437452c97c8fbfddf0b79abe1879f
Signed-off-by:
Vincent Donnefort <vdonnefort@google.com>
Loading
Please sign in to comment