Index: trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk	(revision 88839)
@@ -361,4 +361,26 @@
 	$(REDIRECT) -0 /dev/null -- $(VBOX_BLD_PYTHON) $< $@
 
+# Timer Interrupts
+MISCBINS += bs3-timers-1
+bs3-timers-1_TEMPLATE = VBoxBS3KitImg
+bs3-timers-1_INCS  = .
+bs3-timers-1_DEFS  =  BS3_CMN_INSTANTIATE_FILE1=bs3-timers-1-template.c
+bs3-timers-1_DEFS += BS3_MODE_INSTANTIATE_FILE1=bs3-timers-1-template.c
+ ifeq ($(KBUILD_HOST),win)
+bs3-timers-1_DEFS += HAVE_OMF_CONVERTER
+ endif
+bs3-timers-1_SOURCES = \
+	bs3kit/bs3-first-rm.asm \
+	bs3-timers-1.c \
+	bs3-timers-1-x0.c
+#       bs3kit/bs3-cmn-instantiate-x0.c16 \
+#       bs3kit/bs3-cmn-instantiate.c32 \
+#       bs3kit/bs3-cmn-instantiate.c64
+#bs3-timers-1-template.o:: \
+#	$$(bs3-timers-1_0_OUTDIR)/bs3kit/bs3-cmn-instantiate-x0.o16 \
+#	$$(bs3-timers-1_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o32 \
+#	$$(bs3-timers-1_0_OUTDIR)/bs3kit/bs3-cmn-instantiate.o64 \
+#	$$(bs3-timers-1_0_OUTDIR)/bs3-timers-1-asm.o16
+
 endif # VBOX_WITH_BS3KIT
 
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3-timers-1-x0.c
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3-timers-1-x0.c	(revision 88839)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3-timers-1-x0.c	(revision 88839)
@@ -0,0 +1,92 @@
+/* $Id$ */
+/** @file
+ * BS3Kit - bs3-timers-1, C test driver code (16-bit).
+ */
+
+/*
+ * Copyright (C) 2007-2021 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define BS3_USE_X0_TEXT_SEG
+#include <bs3kit.h>
+#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
+
+
+static uint8_t bs3Timers1_Pit(uint8_t bMode, uint16_t uHz, uint32_t cNsMaxDiviation)
+{
+    uint32_t const  cTargetTicks = uHz * 3;
+    uint16_t        uActualHz;
+    uint64_t        cNsElapsed;
+    int64_t         cNsDelta;
+    uint64_t        cNsDeltaAbs;
+
+    Bs3PitSetupAndEnablePeriodTimer(uHz);
+    cNsElapsed = Bs3TestNow();
+    ASMIntEnable();
+    uActualHz  = g_cBs3PitIntervalHz;
+
+    while (g_cBs3PitTicks < cTargetTicks)
+        ASMHalt();
+
+    Bs3PitDisable();
+    ASMIntDisable();
+    cNsElapsed = Bs3TestNow() - cNsElapsed;
+
+    /* Calculate the absolute delta and fail the test if the diviation is too high... */
+    cNsDelta    = cNsElapsed - RT_NS_1SEC * 3;
+    cNsDeltaAbs = RT_ABS(cNsDelta);
+    /*Bs3TestPrintf("cNsElapsed=%RU64 g_cBs3PitTicks=%RU32 uHz=%u -> %RU64ns\n",
+                  cNsElapsed, g_cBs3PitTicks, uActualHz, cNsDeltaAbs);*/
+    if (cNsDeltaAbs > cNsMaxDiviation)
+        Bs3TestFailedF("delta %c%RU64 ns (%RI32 ms), max %RU32 ns", cNsDelta < 0 ? '-' : '+', cNsDeltaAbs,
+                       (int32_t)((uint64_t)cNsDelta / RT_NS_1MS), cNsMaxDiviation);
+
+    return 0;
+}
+
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_FAR_NM(bs3Timers1_Pit_100Hz)(uint8_t bMode)
+{
+    return bs3Timers1_Pit(bMode, 100, RT_NS_10MS);
+}
+
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_FAR_NM(bs3Timers1_Pit_1000Hz)(uint8_t bMode)
+{
+    return bs3Timers1_Pit(bMode, 1000, RT_NS_10MS);
+}
+
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_FAR_NM(bs3Timers1_Pit_2000Hz)(uint8_t bMode)
+{
+    return bs3Timers1_Pit(bMode, 2000, RT_NS_10MS*2);
+}
+
+
+BS3_DECL_FAR(uint8_t) BS3_CMN_FAR_NM(bs3Timers1_Pit_4000Hz)(uint8_t bMode)
+{
+    return bs3Timers1_Pit(bMode, 4000, RT_NS_10MS*4);
+}
+
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3-timers-1.c
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3-timers-1.c	(revision 88839)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3-timers-1.c	(revision 88839)
@@ -0,0 +1,65 @@
+/* $Id$ */
+/** @file
+ * BS3Kit - bs3-timers-1, 16-bit C code.
+ */
+
+/*
+ * Copyright (C) 2007-2021 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <bs3kit.h>
+#include <iprt/asm-amd64-x86.h>
+
+
+/*********************************************************************************************************************************
+*   Internal Functions                                                                                                           *
+*********************************************************************************************************************************/
+FNBS3TESTDOMODE             bs3Timers1_Pit_100Hz_f16;
+FNBS3TESTDOMODE             bs3Timers1_Pit_1000Hz_f16;
+FNBS3TESTDOMODE             bs3Timers1_Pit_2000Hz_f16;
+FNBS3TESTDOMODE             bs3Timers1_Pit_4000Hz_f16;
+
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
+static const BS3TESTMODEBYONEENTRY g_aModeByOneTests[] =
+{
+    { "pit-100Hz",      bs3Timers1_Pit_100Hz_f16,  BS3TESTMODEBYONEENTRY_F_MINIMAL },
+    { "pit-1000Hz",     bs3Timers1_Pit_1000Hz_f16, BS3TESTMODEBYONEENTRY_F_MINIMAL },
+    { "pit-2000Hz",     bs3Timers1_Pit_2000Hz_f16, BS3TESTMODEBYONEENTRY_F_MINIMAL },
+    { "pit-4000Hz",     bs3Timers1_Pit_4000Hz_f16, BS3TESTMODEBYONEENTRY_F_MINIMAL },
+};
+
+
+BS3_DECL(void) Main_rm()
+{
+    Bs3InitAll_rm();
+    Bs3TestInit("bs3-timers-1");
+
+    Bs3TestDoModesByOne_rm(g_aModeByOneTests, RT_ELEMENTS(g_aModeByOneTests), 0);
+
+    Bs3TestTerm();
+}
+
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk	(revision 88839)
@@ -184,4 +184,5 @@
        bs3-cmn-TestInit.c \
        bs3-cmn-TestFailed.c \
+	bs3-cmn-TestNow.asm \
        bs3-cmn-TestSkipped.c \
        bs3-cmn-TestSub.c \
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PitIrqHandler.c	(revision 88839)
@@ -47,7 +47,7 @@
 /** The current interval in milliseconds (approximately).
  * This is 0 if not yet started (used for checking the state internally). */
-uint16_t volatile   g_cBs3PitIntervalMs = 0;
+uint16_t            g_cBs3PitIntervalMs = 0;
 /** The current PIT frequency (approximately).  0 if not yet started.  */
-uint16_t            g_cBs3PitIntervalHz = 0;
+uint16_t volatile   g_cBs3PitIntervalHz = 0;
 #endif
 
@@ -55,8 +55,7 @@
 BS3_DECL_NEAR_CALLBACK(void) BS3_CMN_NM(bs3PitIrqHandler)(PBS3TRAPFRAME pTrapFrame)
 {
-    uint16_t cMsIntercal = g_cBs3PitIntervalMs;
-    if (cMsIntercal)
+    if (g_cBs3PitIntervalHz)
     {
-        g_cBs3PitMs += cMsIntercal;
+        g_cBs3PitMs += g_cBs3PitIntervalMs;
         g_cBs3PitNs += g_cBs3PitIntervalNs;
         g_cBs3PitTicks++;
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestNow.asm
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestNow.asm	(revision 88839)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestNow.asm	(revision 88839)
@@ -0,0 +1,101 @@
+; $Id$
+;; @file
+; BS3Kit - Bs3TestNow.
+;
+
+;
+; Copyright (C) 2007-2021 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+; The contents of this file may alternatively be used under the terms
+; of the Common Development and Distribution License Version 1.0
+; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+; VirtualBox OSE distribution, in which case the provisions of the
+; CDDL are applicable instead of those of the GPL.
+;
+; You may elect to license modified versions of this file under the
+; terms and conditions of either the GPL or the CDDL or both.
+;
+
+%include "bs3kit-template-header.mac"
+%include "VBox/VMMDevTesting.mac"
+
+BS3_EXTERN_DATA16 g_fbBs3VMMDevTesting
+TMPL_BEGIN_TEXT
+
+;;
+; @cproto   BS3_DECL(uint64_t) Bs3TestNow(void);
+;
+BS3_PROC_BEGIN_CMN Bs3TestNow, BS3_PBC_HYBRID
+        BS3_CALL_CONV_PROLOG 0
+        push    xBP
+        mov     xBP, xSP
+%if __BITS__ == 16
+BONLY16 push    sAX
+%else
+        push    xCX
+BONLY64 push    xDX
+%endif
+
+        cmp     byte [BS3_DATA16_WRT(g_fbBs3VMMDevTesting)], 0
+        je      .no_vmmdev
+
+        ; Read the lower timestamp.
+        mov     dx, VMMDEV_TESTING_IOPORT_TS_LOW
+        in      eax, dx
+%if __BITS__ == 16
+        mov     bx, ax                  ; Save the first word in BX (returned in DX).
+        shr     eax, 16
+        mov     cx, ax                  ; The second word is returned in CX.
+%else
+        mov     ecx, eax
+%endif
+
+        ; Read the high timestamp (latached in above read).
+        mov     dx, VMMDEV_TESTING_IOPORT_TS_HIGH
+        in      eax, dx
+%if __BITS__ == 16
+        mov     dx, bx                  ; The first word is returned in DX.
+        mov     bx, ax                  ; The third word is returned in BX.
+        shr     eax, 16                 ; The fourth word is returned in AX.
+%elif __BITS__ == 32
+        mov     edx, eax
+        mov     eax, eax
+%else
+        shr     rax, 32
+        or      rax, rcx
+%endif
+
+.return:
+%if __BITS__ == 16
+        mov     [bp - sCB], ax          ; Update the AX part of the saved EAX.
+        pop     sAX
+%else
+        pop     xCX
+BONLY64 pop     xDX
+%endif
+        pop     xBP
+        BS3_CALL_CONV_EPILOG 0
+        BS3_HYBRID_RET
+
+.no_vmmdev:
+        ; No fallback, just zero the result.
+%if __BITS__ == 16
+        xor     ax, ax
+        xor     bx, bx
+        xor     cx, cx
+        xor     dx, dx
+%else
+        xor     eax, eax
+BONLY32 xor     edx, edx
+%endif
+        jmp     .return
+BS3_PROC_END_CMN   Bs3TestNow
+
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-pit.c	(revision 88839)
@@ -65,4 +65,11 @@
 
     /*
+     * Reset the counters.
+     */
+    g_cBs3PitNs         = 0;
+    g_cBs3PitMs         = 0;
+    g_cBs3PitTicks      = 0;
+
+    /*
      * Calculate an interval.
      */
@@ -119,5 +126,5 @@
 BS3_CMN_DEF(void, Bs3PitDisable,(void))
 {
-    if (g_cBs3PitIntervalMs != 0)
+    if (g_cBs3PitIntervalHz != 0)
     {
         RTCCUINTREG fSaved = ASMIntDisableFlags();
@@ -145,9 +152,6 @@
 
     /*
-     * Reset all the values.
+     * Reset the interval values (leave the ticks and elapsed ns/ms values as-is).
      */
-    g_cBs3PitNs         = 0;
-    g_cBs3PitMs         = 0;
-    g_cBs3PitTicks      = 0;
     g_cBs3PitIntervalNs = 0;
     g_cBs3PitIntervalMs = 0;
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c	(revision 88839)
@@ -103,4 +103,7 @@
         bool        fSkipped    = true;
         bool const  fOnlyPaging = RT_BOOL(paEntries[i].fFlags & BS3TESTMODEBYONEENTRY_F_ONLY_PAGING);
+        bool const  fMinimal    = RT_BOOL(paEntries[i].fFlags & BS3TESTMODEBYONEENTRY_F_MINIMAL);
+        bool const  fCurDoV86Modes      = fDoV86Modes && !fMinimal;
+        bool const  fCurDoWeirdV86Modes = fDoWeirdV86Modes && fCurDoV86Modes;
         uint8_t     bErrNo;
         Bs3TestSub(paEntries[i].pszSubTest);
@@ -141,5 +144,5 @@
          * Unpaged prot mode.
          */
-        if (!fOnlyPaging)
+        if (!fOnlyPaging && (!fMinimal || bCpuType < BS3CPU_80386))
         {
             PRE_DO_CALL(g_szBs3ModeName_pe16);
@@ -169,5 +172,5 @@
         }
 
-        if (fDoWeirdV86Modes && !fOnlyPaging)
+        if (fCurDoWeirdV86Modes && !fOnlyPaging)
         {
             PRE_DO_CALL(g_szBs3ModeName_pe16_v86);
@@ -191,5 +194,5 @@
         }
 
-        if (!fOnlyPaging)
+        if (!fOnlyPaging && !fMinimal)
         {
             PRE_DO_CALL(g_szBs3ModeName_pe32_16);
@@ -202,5 +205,5 @@
         }
 
-        if (fDoV86Modes && !fOnlyPaging)
+        if (fCurDoV86Modes && !fOnlyPaging)
         {
             PRE_DO_CALL(g_szBs3ModeName_pev86);
@@ -216,39 +219,39 @@
          * Paged protected mode.
          */
+        if (!fMinimal)
+        {
+            PRE_DO_CALL(g_szBs3ModeName_pp16);
+# if ARCH_BITS == 16
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16)(CONV_TO_PROT_FAR16(paEntries[i].pfnWorker));
+# else
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16)(CONV_TO_PROT_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
+# endif
+            CHECK_RESULT(g_szBs3ModeName_pp16);
+        }
+
+        if (!fMinimal)
+        {
+            PRE_DO_CALL(g_szBs3ModeName_pp16_32);
+# if ARCH_BITS == 32
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PP16_32);
+# else
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PP16_32);
+# endif
+            CHECK_RESULT(g_szBs3ModeName_pp16_32);
+        }
+
+        if (fCurDoWeirdV86Modes)
+        {
+            PRE_DO_CALL(g_szBs3ModeName_pp16_v86);
+# if ARCH_BITS == 16
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnWorker));
+# else
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_V86)(CONV_TO_RM_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
+# endif
+            CHECK_RESULT(g_szBs3ModeName_pp16_v86);
+        }
+
         if (true)
         {
-            PRE_DO_CALL(g_szBs3ModeName_pp16);
-# if ARCH_BITS == 16
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16)(CONV_TO_PROT_FAR16(paEntries[i].pfnWorker));
-# else
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16)(CONV_TO_PROT_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
-# endif
-            CHECK_RESULT(g_szBs3ModeName_pp16);
-        }
-
-        if (true)
-        {
-            PRE_DO_CALL(g_szBs3ModeName_pp16_32);
-# if ARCH_BITS == 32
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PP16_32);
-# else
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PP16_32);
-# endif
-            CHECK_RESULT(g_szBs3ModeName_pp16_32);
-        }
-
-        if (fDoWeirdV86Modes)
-        {
-            PRE_DO_CALL(g_szBs3ModeName_pp16_v86);
-# if ARCH_BITS == 16
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnWorker));
-# else
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_V86)(CONV_TO_RM_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
-# endif
-            CHECK_RESULT(g_szBs3ModeName_pp16_v86);
-        }
-
-        if (true)
-        {
             PRE_DO_CALL(g_szBs3ModeName_pp32);
 # if ARCH_BITS == 32
@@ -260,5 +263,5 @@
         }
 
-        if (true)
+        if (!fMinimal)
         {
             PRE_DO_CALL(g_szBs3ModeName_pp32_16);
@@ -271,5 +274,5 @@
         }
 
-        if (fDoV86Modes)
+        if (fCurDoV86Modes)
         {
             PRE_DO_CALL(g_szBs3ModeName_ppv86);
@@ -286,39 +289,39 @@
          * Protected mode with PAE paging.
          */
+        if (!fMinimal)
+        {
+            PRE_DO_CALL(g_szBs3ModeName_pae16);
+# if ARCH_BITS == 16
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16)(CONV_TO_PROT_FAR16(paEntries[i].pfnWorker));
+# else
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16)(CONV_TO_PROT_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
+# endif
+            CHECK_RESULT(g_szBs3ModeName_pae16);
+        }
+
+        if (!fMinimal)
+        {
+            PRE_DO_CALL(g_szBs3ModeName_pae16_32);
+# if ARCH_BITS == 32
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PAE16_32);
+# else
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PAE16_32);
+# endif
+            CHECK_RESULT(g_szBs3ModeName_pae16_32);
+        }
+
+        if (fCurDoWeirdV86Modes)
+        {
+            PRE_DO_CALL(g_szBs3ModeName_pae16_v86);
+# if ARCH_BITS == 16
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnWorker));
+# else
+            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_V86)(CONV_TO_RM_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
+# endif
+            CHECK_RESULT(g_szBs3ModeName_pae16_v86);
+        }
+
         if (true)
         {
-            PRE_DO_CALL(g_szBs3ModeName_pae16);
-# if ARCH_BITS == 16
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16)(CONV_TO_PROT_FAR16(paEntries[i].pfnWorker));
-# else
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16)(CONV_TO_PROT_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
-# endif
-            CHECK_RESULT(g_szBs3ModeName_pae16);
-        }
-
-        if (true)
-        {
-            PRE_DO_CALL(g_szBs3ModeName_pae16_32);
-# if ARCH_BITS == 32
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PAE16_32);
-# else
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PAE16_32);
-# endif
-            CHECK_RESULT(g_szBs3ModeName_pae16_32);
-        }
-
-        if (fDoWeirdV86Modes)
-        {
-            PRE_DO_CALL(g_szBs3ModeName_pae16_v86);
-# if ARCH_BITS == 16
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnWorker));
-# else
-            bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_V86)(CONV_TO_RM_FAR16(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_f16)));
-# endif
-            CHECK_RESULT(g_szBs3ModeName_pae16_v86);
-        }
-
-        if (true)
-        {
             PRE_DO_CALL(g_szBs3ModeName_pae32);
 # if ARCH_BITS == 32
@@ -330,5 +333,5 @@
         }
 
-        if (true)
+        if (!fMinimal)
         {
             PRE_DO_CALL(g_szBs3ModeName_pae32_16);
@@ -341,5 +344,5 @@
         }
 
-        if (fDoV86Modes)
+        if (fCurDoV86Modes)
         {
             PRE_DO_CALL(g_szBs3ModeName_paev86);
@@ -364,5 +367,5 @@
         }
 
-        if (true)
+        if (!fMinimal)
         {
             PRE_DO_CALL(g_szBs3ModeName_lm16);
@@ -375,5 +378,5 @@
         }
 
-        if (true)
+        if (!fMinimal)
         {
             PRE_DO_CALL(g_szBs3ModeName_lm32);
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk	(revision 88839)
@@ -70,4 +70,5 @@
 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelFar32ToFlat32)
 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelProtFar32ToFlat32)
+$(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestNow)
 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapSetDpl)
 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemAlloc)
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h	(revision 88839)
@@ -160,4 +160,5 @@
 #define Bs3TestHostPrintfV BS3_CMN_MANGLER(Bs3TestHostPrintfV)
 #define Bs3TestInit BS3_CMN_MANGLER(Bs3TestInit)
+#define Bs3TestNow BS3_CMN_MANGLER(Bs3TestNow)
 #define Bs3TestPrintf BS3_CMN_MANGLER(Bs3TestPrintf)
 #define Bs3TestPrintfV BS3_CMN_MANGLER(Bs3TestPrintfV)
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h	(revision 88839)
@@ -160,4 +160,5 @@
 #undef Bs3TestHostPrintfV
 #undef Bs3TestInit
+#undef Bs3TestNow
 #undef Bs3TestPrintf
 #undef Bs3TestPrintfV
Index: trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
===================================================================
--- trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h	(revision 88632)
+++ trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h	(revision 88839)
@@ -2459,5 +2459,5 @@
 BS3_CMN_PROTO_STUB(void, Bs3PitDisable,(void));
 
-/** Nano seconds (approx) since last the PIT timer was started. */
+/** Nanoseconds (approx) since last the PIT timer was started. */
 extern uint64_t volatile    g_cBs3PitNs;
 /** Milliseconds seconds (very approx) since last the PIT timer was started. */
@@ -2465,11 +2465,14 @@
 /** Number of ticks since last the PIT timer was started.  */
 extern uint32_t volatile    g_cBs3PitTicks;
-/** The current interval in nanon seconds.  */
+/** The current interval in nanoseconds.
+ * This is 0 if not yet started (cleared by Bs3PitDisable). */
 extern uint32_t             g_cBs3PitIntervalNs;
 /** The current interval in milliseconds (approximately).
- * This is 0 if not yet started (used for checking the state internally). */
-extern uint16_t volatile    g_cBs3PitIntervalMs;
-/** The current PIT frequency (approximately).  0 if not yet started.  */
-extern uint16_t             g_cBs3PitIntervalHz;
+ * This is 0 if not yet started (cleared by Bs3PitDisable). */
+extern uint16_t             g_cBs3PitIntervalMs;
+/** The current PIT frequency (approximately).
+ * 0 if not yet started (cleared by Bs3PitDisable; used for checking the
+ * state internally). */
+extern uint16_t volatile    g_cBs3PitIntervalHz;
 
 
@@ -3205,4 +3208,12 @@
 
 /**
+ * Get nanosecond host timestamp.
+ *
+ * This only works when testing is enabled and will not work in VMs configured
+ * with a 286, 186 or 8086/8088 CPU profile.
+ */
+BS3_CMN_PROTO_STUB(uint64_t, Bs3TestNow,(void));
+
+/**
  * Equivalent to RTTestIPrintf with RTTESTLVL_ALWAYS.
  *
@@ -3659,4 +3670,6 @@
 /** Only test modes that has paging enabled. */
 #define BS3TESTMODEBYONEENTRY_F_ONLY_PAGING     RT_BIT_32(0)
+/** Minimal mode selection. */
+#define BS3TESTMODEBYONEENTRY_F_MINIMAL         RT_BIT_32(1)
 /** @} */
 
