Merge tag 'imx-drm-next-2020-10-30' of git://git.pengutronix.de/git/pza/linux into...
[linux-2.6-microblaze.git] / arch / arm64 / include / asm / virt.h
index 09977ac..6069be5 100644 (file)
@@ -86,13 +86,12 @@ static inline bool is_kernel_in_hyp_mode(void)
 static __always_inline bool has_vhe(void)
 {
        /*
-        * The following macros are defined for code specic to VHE/nVHE.
-        * If has_vhe() is inlined into those compilation units, it can
-        * be determined statically. Otherwise fall back to caps.
+        * Code only run in VHE/NVHE hyp context can assume VHE is present or
+        * absent. Otherwise fall back to caps.
         */
-       if (__is_defined(__KVM_VHE_HYPERVISOR__))
+       if (is_vhe_hyp_code())
                return true;
-       else if (__is_defined(__KVM_NVHE_HYPERVISOR__))
+       else if (is_nvhe_hyp_code())
                return false;
        else
                return cpus_have_final_cap(ARM64_HAS_VIRT_HOST_EXTN);