Index: /trunk/src/VBox/HostDrivers/Support/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 106633)
+++ /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 106634)
@@ -614,4 +614,5 @@
  		| $$(dir $$@)
 	$(SED) \
+		-e '/not-arch-$(KBUILD_TARGET_ARCH)/d' \
 		-f $(dir $<)/SUPR0-def-$(VBOX_LDR_FMT).sed \
 		--output $@ \
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 106633)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 106634)
@@ -253,16 +253,18 @@
         /* Entries with absolute addresses determined at runtime, fixup
            code makes ugly ASSUMPTIONS about the order here: */
-    SUPEXP_CUSTOM(      0,  SUPR0AbsIs64bit,          0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0Abs64bitKernelCS,    0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0Abs64bitKernelSS,    0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0Abs64bitKernelDS,    0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelCS,         0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelSS,         0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelDS,         0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelES,         0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelFS,         0),   /* only-amd64, only-x86 */
-    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelGS,         0),   /* only-amd64, only-x86 */
+#if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
+    SUPEXP_CUSTOM(      0,  SUPR0AbsIs64bit,       0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0Abs64bitKernelCS, 0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0Abs64bitKernelSS, 0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0Abs64bitKernelDS, 0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelCS,      0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelSS,      0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelDS,      0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelES,      0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelFS,      0),  /* not-arch-arm64 */
+    SUPEXP_CUSTOM(      0,  SUPR0AbsKernelGS,      0),  /* not-arch-arm64 */
+#endif
         /* Normal function & data pointers: */
-    SUPEXP_CUSTOM(      0,  g_pSUPGlobalInfoPage,     &g_pSUPGlobalInfoPage),            /* SED: DATA */
+    SUPEXP_CUSTOM(      0,  g_pSUPGlobalInfoPage,  &g_pSUPGlobalInfoPage),            /* SED: DATA */
     SUPEXP_STK_OKAY(    0,  SUPGetGIP),
     SUPEXP_STK_BACK(    1,  SUPReadTscWithDelta),
@@ -277,17 +279,19 @@
     SUPEXP_STK_BACK(    5,  SUPR0ContAlloc),
     SUPEXP_STK_BACK(    2,  SUPR0ContFree),
-    SUPEXP_STK_BACK(    2,  SUPR0ChangeCR4),                /* only-amd64, only-x86 */
-    SUPEXP_STK_BACK(    1,  SUPR0EnableVTx),                /* only-amd64, only-x86 */
+    SUPEXP_STK_OKAY(    0,  SUPR0GetKernelFeatures),
+    SUPEXP_STK_BACK(    0,  SUPR0GetPagingMode),
     SUPEXP_STK_OKAY(    1,  SUPR0FpuBegin),
     SUPEXP_STK_OKAY(    1,  SUPR0FpuEnd),
-    SUPEXP_STK_BACK(    0,  SUPR0SuspendVTxOnCpu),          /* only-amd64, only-x86 */
-    SUPEXP_STK_BACK(    1,  SUPR0ResumeVTxOnCpu),           /* only-amd64, only-x86 */
-    SUPEXP_STK_OKAY(    1,  SUPR0GetCurrentGdtRw),          /* only-amd64, only-x86 */
-    SUPEXP_STK_OKAY(    0,  SUPR0GetKernelFeatures),
-    SUPEXP_STK_BACK(    3,  SUPR0GetHwvirtMsrs),            /* only-amd64, only-x86 */
-    SUPEXP_STK_BACK(    0,  SUPR0GetPagingMode),
-    SUPEXP_STK_BACK(    1,  SUPR0GetSvmUsability),          /* only-amd64, only-x86 */
-    SUPEXP_STK_BACK(    1,  SUPR0GetVTSupport),             /* only-amd64, only-x86 */
-    SUPEXP_STK_BACK(    1,  SUPR0GetVmxUsability),          /* only-amd64, only-x86 */
+#if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
+    SUPEXP_STK_BACK(    2,  SUPR0ChangeCR4),            /* not-arch-arm64 */
+    SUPEXP_STK_BACK(    1,  SUPR0EnableVTx),            /* not-arch-arm64 */
+    SUPEXP_STK_BACK(    0,  SUPR0SuspendVTxOnCpu),      /* not-arch-arm64 */
+    SUPEXP_STK_BACK(    1,  SUPR0ResumeVTxOnCpu),       /* not-arch-arm64 */
+    SUPEXP_STK_OKAY(    1,  SUPR0GetCurrentGdtRw),      /* not-arch-arm64 */
+    SUPEXP_STK_BACK(    3,  SUPR0GetHwvirtMsrs),        /* not-arch-arm64 */
+    SUPEXP_STK_BACK(    1,  SUPR0GetSvmUsability),      /* not-arch-arm64 */
+    SUPEXP_STK_BACK(    1,  SUPR0GetVTSupport),         /* not-arch-arm64 */
+    SUPEXP_STK_BACK(    1,  SUPR0GetVmxUsability),      /* not-arch-arm64 */
+#endif
     SUPEXP_STK_BACK(    2,  SUPR0LdrIsLockOwnerByMod),
     SUPEXP_STK_BACK(    1,  SUPR0LdrLock),
@@ -2411,17 +2415,4 @@
         }
 
-        case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_VT_CAPS):
-        {
-            /* validate */
-            PSUPVTCAPS pReq = (PSUPVTCAPS)pReqHdr;
-            REQ_CHECK_SIZES(SUP_IOCTL_VT_CAPS);
-
-            /* execute */
-            pReq->Hdr.rc = SUPR0QueryVTCaps(pSession, &pReq->u.Out.fCaps);
-            if (RT_FAILURE(pReq->Hdr.rc))
-                pReq->Hdr.cbOut = sizeof(pReq->Hdr);
-            return 0;
-        }
-
         case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_TRACER_OPEN):
         {
@@ -2545,4 +2536,19 @@
         }
 
+#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
+
+        case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_VT_CAPS):
+        {
+            /* validate */
+            PSUPVTCAPS pReq = (PSUPVTCAPS)pReqHdr;
+            REQ_CHECK_SIZES(SUP_IOCTL_VT_CAPS);
+
+            /* execute */
+            pReq->Hdr.rc = SUPR0QueryVTCaps(pSession, &pReq->u.Out.fCaps);
+            if (RT_FAILURE(pReq->Hdr.rc))
+                pReq->Hdr.cbOut = sizeof(pReq->Hdr);
+            return 0;
+        }
+
         case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_UCODE_REV):
         {
@@ -2573,4 +2579,6 @@
             return 0;
         }
+
+#endif /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
 
         default:
@@ -2646,4 +2654,5 @@
         }
 
+#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
         case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_VT_CAPS):
         {
@@ -2658,4 +2667,5 @@
             return 0;
         }
+#endif /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
 
         default:
@@ -4225,4 +4235,6 @@
 
 
+#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
+
 /**
  * Change CR4 and take care of the kernel CR4 shadow if applicable.
@@ -4241,5 +4253,4 @@
 SUPR0DECL(RTCCUINTREG) SUPR0ChangeCR4(RTCCUINTREG fOrMask, RTCCUINTREG fAndMask)
 {
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
 # ifdef RT_OS_LINUX
     return supdrvOSChangeCR4(fOrMask, fAndMask);
@@ -4251,8 +4262,4 @@
     return uOld;
 # endif
-#else
-    RT_NOREF(fOrMask, fAndMask);
-    return RTCCUINTREG_MAX;
-#endif
 }
 SUPR0_EXPORT_SYMBOL(SUPR0ChangeCR4);
@@ -4270,10 +4277,10 @@
 SUPR0DECL(int) SUPR0EnableVTx(bool fEnable)
 {
-#if defined(RT_OS_DARWIN) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
+# if defined(RT_OS_DARWIN) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
     return supdrvOSEnableVTx(fEnable);
-#else
+# else
     RT_NOREF1(fEnable);
     return VERR_NOT_SUPPORTED;
-#endif
+# endif
 }
 SUPR0_EXPORT_SYMBOL(SUPR0EnableVTx);
@@ -4289,9 +4296,9 @@
 SUPR0DECL(bool) SUPR0SuspendVTxOnCpu(void)
 {
-#if defined(RT_OS_DARWIN) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
+# if defined(RT_OS_DARWIN) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
     return supdrvOSSuspendVTxOnCpu();
-#else
+# else
     return false;
-#endif
+# endif
 }
 SUPR0_EXPORT_SYMBOL(SUPR0SuspendVTxOnCpu);
@@ -4307,10 +4314,10 @@
 SUPR0DECL(void) SUPR0ResumeVTxOnCpu(bool fSuspended)
 {
-#if defined(RT_OS_DARWIN) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
+# if defined(RT_OS_DARWIN) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
     supdrvOSResumeVTxOnCpu(fSuspended);
-#else
+# else
     RT_NOREF1(fSuspended);
     Assert(!fSuspended);
-#endif
+# endif
 }
 SUPR0_EXPORT_SYMBOL(SUPR0ResumeVTxOnCpu);
@@ -4319,10 +4326,10 @@
 SUPR0DECL(int) SUPR0GetCurrentGdtRw(RTHCUINTPTR *pGdtRw)
 {
-#if defined(RT_OS_LINUX) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
+# if defined(RT_OS_LINUX) && (defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86))
     return supdrvOSGetCurrentGdtRw(pGdtRw);
-#else
+# else
     NOREF(pGdtRw);
     return VERR_NOT_IMPLEMENTED;
-#endif
+# endif
 }
 SUPR0_EXPORT_SYMBOL(SUPR0GetCurrentGdtRw);
@@ -4341,5 +4348,4 @@
     *pfCaps = 0;
 
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     /* Check if the CPU even supports CPUID (extremely ancient CPUs). */
     if (ASMHasCpuId())
@@ -4392,5 +4398,4 @@
         }
     }
-#endif
     return VERR_UNSUPPORTED_CPU;
 }
@@ -4414,5 +4419,4 @@
 SUPR0DECL(int) SUPR0GetVmxUsability(bool *pfIsSmxModeAmbiguous)
 {
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     uint64_t   fFeatMsr;
     bool       fMaybeSmxMode;
@@ -4473,5 +4477,5 @@
          */
         uint32_t fFeaturesECX, uDummy;
-#ifdef VBOX_STRICT
+# ifdef VBOX_STRICT
         /* Callers should have verified these at some point. */
         uint32_t uMaxId, uVendorEBX, uVendorECX, uVendorEDX;
@@ -4481,5 +4485,5 @@
                || RTX86IsViaCentaurCpu(uVendorEBX, uVendorECX, uVendorEDX)
                || RTX86IsShanghaiCpu(  uVendorEBX, uVendorECX, uVendorEDX));
-#endif
+# endif
         ASMCpuId(1, &uDummy, &uDummy, &fFeaturesECX, &uDummy);
         bool fSmxVmxHwSupport = false;
@@ -4522,10 +4526,4 @@
 
     return rc;
-
-#else  /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
-    if (pfIsSmxModeAmbiguous)
-        *pfIsSmxModeAmbiguous = false;
-    return VERR_UNSUPPORTED_CPU;
-#endif /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
 }
 SUPR0_EXPORT_SYMBOL(SUPR0GetVmxUsability);
@@ -4542,5 +4540,4 @@
 SUPR0DECL(int) SUPR0GetSvmUsability(bool fInitSvm)
 {
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     int      rc;
     uint64_t fVmCr;
@@ -4577,14 +4574,8 @@
         rc = VERR_SVM_DISABLED;
     return rc;
-
-#else  /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
-    RT_NOREF(fInitSvm);
-    return VERR_UNSUPPORTED_CPU;
-#endif /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
 }
 SUPR0_EXPORT_SYMBOL(SUPR0GetSvmUsability);
 
 
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
 /**
  * Queries the AMD-V and VT-x capabilities of the calling CPU.
@@ -4672,5 +4663,4 @@
     return rc;
 }
-#endif /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
 
 
@@ -4701,17 +4691,12 @@
     AssertPtrReturn(pfCaps, VERR_INVALID_POINTER);
 
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     /*
      * Call common worker.
      */
     return supdrvQueryVTCapsInternal(pfCaps);
-#else
-    return VERR_UNSUPPORTED_CPU;
-#endif
 }
 SUPR0_EXPORT_SYMBOL(SUPR0QueryVTCaps);
 
 
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
 /**
  * Queries the CPU microcode revision.
@@ -4780,5 +4765,4 @@
     return rc;
 }
-#endif /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
 
 
@@ -4804,9 +4788,5 @@
      * Call common worker.
      */
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     return supdrvQueryUcodeRev(puRevision);
-#else
-    return VERR_UNSUPPORTED_CPU;
-#endif
 }
 SUPR0_EXPORT_SYMBOL(SUPR0QueryUcodeRev);
@@ -4825,5 +4805,4 @@
 SUPR0DECL(int) SUPR0GetHwvirtMsrs(PSUPHWVIRTMSRS pMsrs, uint32_t fCaps, bool fForce)
 {
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     int rc;
     RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
@@ -4916,11 +4895,8 @@
 
     return rc;
-
-#else  /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
-    RT_NOREF(pMsrs, fCaps, fForce);
-    return VERR_UNSUPPORTED_CPU;
+}
+SUPR0_EXPORT_SYMBOL(SUPR0GetHwvirtMsrs);
+
 #endif /* !defined(RT_ARCH_AMD64) && !defined(RT_ARCH_X86) */
-}
-SUPR0_EXPORT_SYMBOL(SUPR0GetHwvirtMsrs);
 
 
