Index: /trunk/include/VBox/vmm/cpum.h
===================================================================
--- /trunk/include/VBox/vmm/cpum.h	(revision 76885)
+++ /trunk/include/VBox/vmm/cpum.h	(revision 76886)
@@ -95,4 +95,5 @@
     CPUMCPUVENDOR_VIA,
     CPUMCPUVENDOR_CYRIX,
+    CPUMCPUVENDOR_SHANGHAI,
     CPUMCPUVENDOR_UNKNOWN,
     /** 32bit hackishness. */
@@ -265,4 +266,9 @@
     kCpumMicroarch_NEC_V30,
     kCpumMicroarch_NEC_End,
+
+    kCpumMicroarch_Shanghai_First,
+    kCpumMicroarch_Shanghai_Wudaokou = kCpumMicroarch_Shanghai_First,
+    kCpumMicroarch_Shanghai_Unknown,
+    kCpumMicroarch_Shanghai_End,
 
     kCpumMicroarch_Unknown,
Index: /trunk/include/iprt/asm-amd64-x86.h
===================================================================
--- /trunk/include/iprt/asm-amd64-x86.h	(revision 76885)
+++ /trunk/include/iprt/asm-amd64-x86.h	(revision 76886)
@@ -1476,4 +1476,34 @@
 
 /**
+ * Tests if it a Shanghai CPU based on the ASMCpuId(0) output.
+ *
+ * @returns true/false.
+ * @param   uEBX    EBX return from ASMCpuId(0).
+ * @param   uECX    ECX return from ASMCpuId(0).
+ * @param   uEDX    EDX return from ASMCpuId(0).
+ */
+DECLINLINE(bool) ASMIsShanghaiCpuEx(uint32_t uEBX, uint32_t uECX, uint32_t uEDX)
+{
+    return uEBX == UINT32_C(0x68532020)
+        && uECX == UINT32_C(0x20206961)
+        && uEDX == UINT32_C(0x68676e61);
+}
+
+
+/**
+ * Tests if this is a Shanghai CPU.
+ *
+ * @returns true/false.
+ * @remarks ASSUMES that cpuid is supported by the CPU.
+ */
+DECLINLINE(bool) ASMIsShanghaiCpu(void)
+{
+    uint32_t uEAX, uEBX, uECX, uEDX;
+    ASMCpuId(0, &uEAX, &uEBX, &uECX, &uEDX);
+    return ASMIsShanghaiCpuEx(uEBX, uECX, uEDX);
+}
+
+
+/**
  * Checks whether ASMCpuId_EAX(0x00000000) indicates a valid range.
  *
Index: /trunk/include/iprt/x86.h
===================================================================
--- /trunk/include/iprt/x86.h	(revision 76885)
+++ /trunk/include/iprt/x86.h	(revision 76886)
@@ -397,4 +397,8 @@
 #define X86_CPUID_VENDOR_VIA_ECX        0x736c7561      /* auls */
 #define X86_CPUID_VENDOR_VIA_EDX        0x48727561      /* aurH */
+
+#define X86_CPUID_VENDOR_SHANGHAI_EBX   0x68532020      /*   Sh */
+#define X86_CPUID_VENDOR_SHANGHAI_ECX   0x20206961      /* ai   */
+#define X86_CPUID_VENDOR_SHANGHAI_EDX   0x68676e61      /* angh */
 /** @} */
 
Index: /trunk/include/iprt/x86.mac
===================================================================
--- /trunk/include/iprt/x86.mac	(revision 76885)
+++ /trunk/include/iprt/x86.mac	(revision 76886)
@@ -28,4 +28,6 @@
 %ifndef IPRT_INCLUDED_x86_h
 %define IPRT_INCLUDED_x86_h
+%ifndef RT_WITHOUT_PRAGMA_ONCE
+%endif
 %ifndef VBOX_FOR_DTRACE_LIB
 %else
@@ -86,4 +88,7 @@
 %define X86_CPUID_VENDOR_VIA_ECX        0x736c7561
 %define X86_CPUID_VENDOR_VIA_EDX        0x48727561
+%define X86_CPUID_VENDOR_SHANGHAI_EBX   0x68532020
+%define X86_CPUID_VENDOR_SHANGHAI_ECX   0x20206961
+%define X86_CPUID_VENDOR_SHANGHAI_EDX   0x68676e61
 %define X86_CPUID_FEATURE_ECX_SSE3      RT_BIT_32(0)
 %define X86_CPUID_FEATURE_ECX_PCLMUL    RT_BIT_32(1)
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 76885)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 76886)
@@ -4150,5 +4150,6 @@
             /* Check if the vendor is Intel (or compatible). */
             if (   ASMIsIntelCpuEx(uVendorEbx, uVendorEcx, uVendorEdx)
-                || ASMIsViaCentaurCpuEx(uVendorEbx, uVendorEcx, uVendorEdx))
+                || ASMIsViaCentaurCpuEx(uVendorEbx, uVendorEcx, uVendorEdx)
+                || ASMIsShanghaiCpuEx(uVendorEbx, uVendorEcx, uVendorEdx))
             {
                 /* Check VT-x support. In addition, VirtualBox requires MSR and FXSAVE/FXRSTOR to function. */
@@ -4198,7 +4199,7 @@
  * @remarks Must be called with preemption disabled.
  *          The caller is also expected to check that the CPU is an Intel (or
- *          VIA) CPU -and- that it supports VT-x.  Otherwise, this function
- *          might throw a \#GP fault as it tries to read/write MSRs that may not
- *          be present!
+ *          VIA/Shanghai) CPU -and- that it supports VT-x.  Otherwise, this
+ *          function might throw a \#GP fault as it tries to read/write MSRs
+ *          that may not be present!
  */
 SUPR0DECL(int) SUPR0GetVmxUsability(bool *pfIsSmxModeAmbiguous)
@@ -4268,5 +4269,6 @@
         Assert(ASMIsValidStdRange(uMaxId));
         Assert(   ASMIsIntelCpuEx(     uVendorEBX, uVendorECX, uVendorEDX)
-               || ASMIsViaCentaurCpuEx(uVendorEBX, uVendorECX, uVendorEDX));
+               || ASMIsViaCentaurCpuEx(uVendorEBX, uVendorECX, uVendorEDX)
+               || ASMIsShanghaiCpuEx(  uVendorEBX, uVendorECX, uVendorEDX));
 #endif
         ASMCpuId(1, &uDummy, &uDummy, &fFeaturesECX, &uDummy);
@@ -4373,5 +4375,5 @@
  * @retval  VERR_SVM_DISABLED
  * @retval  VERR_UNSUPPORTED_CPU if not identifiable as an AMD, Intel or VIA
- *          (centaur) CPU.
+ *          (centaur)/Shanghai CPU.
  *
  * @param   pfCaps          Where to store the capabilities.
@@ -4456,5 +4458,5 @@
  * @retval  VERR_SVM_DISABLED
  * @retval  VERR_UNSUPPORTED_CPU if not identifiable as an AMD, Intel or VIA
- *          (centaur) CPU.
+ *          (centaur)/Shanghai CPU.
  *
  * @param   pSession        The session handle.
Index: /trunk/src/VBox/Main/src-server/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 76885)
+++ /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 76886)
@@ -334,5 +334,6 @@
             /* VT-x? */
             if (   ASMIsIntelCpuEx(uVendorEBX, uVendorECX, uVendorEDX)
-                || ASMIsViaCentaurCpuEx(uVendorEBX, uVendorECX, uVendorEDX))
+                || ASMIsViaCentaurCpuEx(uVendorEBX, uVendorECX, uVendorEDX)
+                || ASMIsShanghaiCpuEx(uVendorEBX, uVendorECX, uVendorEDX))
             {
                 if (    (fFeaturesEcx & X86_CPUID_FEATURE_ECX_VMX)
Index: /trunk/src/VBox/VMM/VMMAll/GIMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/GIMAll.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMAll/GIMAll.cpp	(revision 76886)
@@ -436,4 +436,5 @@
         case CPUMCPUVENDOR_INTEL:
         case CPUMCPUVENDOR_VIA:
+        case CPUMCPUVENDOR_SHANGHAI:
         {
             if (puDisOpcode)
Index: /trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp	(revision 76886)
@@ -1403,5 +1403,6 @@
     if (   (   uDisOpcode == OP_VMCALL
             && (   enmGuestCpuVendor == CPUMCPUVENDOR_INTEL
-                || enmGuestCpuVendor == CPUMCPUVENDOR_VIA))
+                || enmGuestCpuVendor == CPUMCPUVENDOR_VIA
+                || enmGuestCpuVendor == CPUMCPUVENDOR_SHANGHAI))
         || (   uDisOpcode == OP_VMMCALL
             && enmGuestCpuVendor == CPUMCPUVENDOR_AMD))
Index: /trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp	(revision 76886)
@@ -784,5 +784,6 @@
     if (   (   ASMIsIntelCpuEx(u32EBX, u32ECX, u32EDX)
             || ASMIsAmdCpuEx(u32EBX, u32ECX, u32EDX)
-            || ASMIsViaCentaurCpuEx(u32EBX, u32ECX, u32EDX))
+            || ASMIsViaCentaurCpuEx(u32EBX, u32ECX, u32EDX)
+            || ASMIsShanghaiCpuEx(u32EBX, u32ECX, u32EDX))
         && ASMIsValidStdRange(uMaxLeaf))
     {
Index: /trunk/src/VBox/VMM/VMMR3/CPUM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/CPUM.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMR3/CPUM.cpp	(revision 76886)
@@ -1149,5 +1149,6 @@
     PCCPUMFEATURES pGuestFeatures = &pVM->cpum.s.GuestFeatures;
     if (   pHostFeatures->enmCpuVendor == CPUMCPUVENDOR_INTEL
-        || pHostFeatures->enmCpuVendor == CPUMCPUVENDOR_VIA)
+        || pHostFeatures->enmCpuVendor == CPUMCPUVENDOR_VIA
+        || pHostFeatures->enmCpuVendor == CPUMCPUVENDOR_SHANGHAI)
     {
 #define VMXFEATDUMP(a_szDesc, a_Var) \
Index: /trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp	(revision 76886)
@@ -431,4 +431,17 @@
     }
 
+    if (enmVendor == CPUMCPUVENDOR_SHANGHAI)
+    {
+        switch (bFamily)
+        {
+            case 6:
+            case 7:
+                return kCpumMicroarch_Shanghai_Wudaokou;
+            default:
+                break;
+        }
+        return kCpumMicroarch_Shanghai_Unknown;
+    }
+
     if (enmVendor == CPUMCPUVENDOR_CYRIX)
     {
@@ -588,4 +601,7 @@
         CASE_RET_STR(kCpumMicroarch_VIA_Isaiah);
         CASE_RET_STR(kCpumMicroarch_VIA_Unknown);
+
+        CASE_RET_STR(kCpumMicroarch_Shanghai_Wudaokou);
+        CASE_RET_STR(kCpumMicroarch_Shanghai_Unknown);
 
         CASE_RET_STR(kCpumMicroarch_Cyrix_5x86);
@@ -619,4 +635,5 @@
         case kCpumMicroarch_Cyrix_End:
         case kCpumMicroarch_NEC_End:
+        case kCpumMicroarch_Shanghai_End:
         case kCpumMicroarch_32BitHack:
             break;
@@ -1603,4 +1620,7 @@
             return CPUMCPUVENDOR_VIA;
 
+        if (ASMIsShanghaiCpuEx(uEBX, uECX, uEDX))
+            return CPUMCPUVENDOR_SHANGHAI;
+
         if (   uEBX == UINT32_C(0x69727943) /* CyrixInstead */
             && uECX == UINT32_C(0x64616574)
@@ -1634,4 +1654,5 @@
         case CPUMCPUVENDOR_VIA:         return "VIA";
         case CPUMCPUVENDOR_CYRIX:       return "CYRIX";
+        case CPUMCPUVENDOR_SHANGHAI:    return "SHANGHAI";
         case CPUMCPUVENDOR_UNKNOWN:     return "UNKNOWN";
 
Index: /trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp	(revision 76886)
@@ -215,4 +215,6 @@
 #include "cpus/VIA_QuadCore_L4700_1_2_GHz.h"
 
+#include "cpus/ZHAOXIN_KaiXian_KX_U5581_1_8GHz.h"
+
 
 
@@ -304,4 +306,8 @@
 #ifdef VBOX_CPUDB_AMD_Athlon_64_3200_h
     &g_Entry_AMD_Athlon_64_3200,
+#endif
+
+#ifdef VBOX_CPUDB_ZHAOXIN_KaiXian_KX_U5581_1_8GHz_h
+    &g_Entry_ZHAOXIN_KaiXian_KX_U5581_1_8GHz,
 #endif
 
Index: /trunk/src/VBox/VMM/VMMR3/HM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/HM.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMR3/HM.cpp	(revision 76886)
@@ -1090,6 +1090,8 @@
 #undef HM_REG_COUNTER
 
-        const char *const *papszDesc = ASMIsIntelCpu() || ASMIsViaCentaurCpu() ? &g_apszVmxExitReasons[0]
-                                                                               : &g_apszSvmExitReasons[0];
+        const char *const *papszDesc =
+            ASMIsIntelCpu() || ASMIsViaCentaurCpu() || ASMIsShanghaiCpu()
+            ? &g_apszVmxExitReasons[0]
+            : &g_apszSvmExitReasons[0];
 
         /*
Index: /trunk/src/VBox/VMM/VMMR3/TM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/TM.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/VMMR3/TM.cpp	(revision 76886)
@@ -957,4 +957,18 @@
                 return true;
         }
+        else if (CPUMGetHostCpuVendor(pVM) == CPUMCPUVENDOR_SHANGHAI)
+        {
+            /*
+             * Shanghai - Check the model, family and stepping.
+             */
+            /** @todo use ASMGetCpuFamily() and ASMGetCpuModel() here. */
+            ASMCpuId(1, &uEAX, &uEBX, &uECX, &uEDX);
+            unsigned uFamily   = (uEAX >> 8) & 0x0f;
+            if (   uFamily == 0x06
+                || uFamily == 0x07)
+            {
+                return true;
+            }
+        }
     }
     return false;
Index: /trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp
===================================================================
--- /trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp	(revision 76885)
+++ /trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp	(revision 76886)
@@ -548,6 +548,6 @@
                 if (!fGp)
                     fFlags = 0;
-                /* VIA HACK - writing to 0x0000317e on a quad core make the core unresponsive. */
-                else if (uMsr == 0x0000317e && g_enmVendor == CPUMCPUVENDOR_VIA)
+                /* VIA/Shanghai HACK - writing to 0x0000317e on a quad core make the core unresponsive. */
+                else if (uMsr == 0x0000317e && (g_enmVendor == CPUMCPUVENDOR_VIA || g_enmVendor == CPUMCPUVENDOR_SHANGHAI))
                 {
                     uValue = 0;
@@ -601,5 +601,5 @@
                     if (RT_FAILURE(rc))
                         return RTMsgErrorRc(rc, "Out of memory (uMsr=%#x).\n", uMsr);
-                    if (   g_enmVendor != CPUMCPUVENDOR_VIA
+                    if (   (g_enmVendor != CPUMCPUVENDOR_VIA && g_enmVendor != CPUMCPUVENDOR_SHANGHAI)
                         || uValue
                         || fFlags)
@@ -2515,5 +2515,5 @@
         case 0x00001438:
         case 0x0000317f:
-            if (g_enmVendor == CPUMCPUVENDOR_VIA)
+            if (g_enmVendor == CPUMCPUVENDOR_VIA || g_enmVendor == CPUMCPUVENDOR_SHANGHAI)
                 return VBCPUREPBADNESS_BOND_VILLAIN;
             break;
@@ -2602,5 +2602,5 @@
 
 /**
- * Checks if this might be a VIA dummy register.
+ * Checks if this might be a VIA/Shanghai dummy register.
  *
  * @returns true if it's a dummy, false if it isn't.
@@ -2609,7 +2609,7 @@
  * @param   fFlags              The flags.
  */
-static bool isMsrViaDummy(uint32_t uMsr, uint64_t uValue, uint32_t fFlags)
-{
-    if (g_enmVendor != CPUMCPUVENDOR_VIA)
+static bool isMsrViaShanghaiDummy(uint32_t uMsr, uint64_t uValue, uint32_t fFlags)
+{
+    if (g_enmVendor != CPUMCPUVENDOR_VIA && g_enmVendor != CPUMCPUVENDOR_SHANGHAI)
         return false;
 
@@ -3213,5 +3213,5 @@
             || fGpMaskN   != fGpMask0)
         {
-            if (!fEarlyEndOk && !isMsrViaDummy(uMsr, paMsrs[i].uValue, paMsrs[i].fFlags))
+            if (!fEarlyEndOk && !isMsrViaShanghaiDummy(uMsr, paMsrs[i].uValue, paMsrs[i].fFlags))
             {
                 vbCpuRepDebug("MSR %s (%#x) range ended unexpectedly early on %#x: ro=%d ign=%#llx/%#llx gp=%#llx/%#llx [N/0]\n",
@@ -3303,5 +3303,5 @@
 
 /**
- * Reports a VIA dummy range.
+ * Reports a VIA/Shanghai dummy range.
  *
  * @returns VBox status code.
@@ -3311,5 +3311,5 @@
  *                              last MSR entry in the range.
  */
-static int reportMsr_ViaDummyRange(VBCPUREPMSR const *paMsrs, uint32_t cMsrs, uint32_t *pidxLoop)
+static int reportMsr_ViaShanghaiDummyRange(VBCPUREPMSR const *paMsrs, uint32_t cMsrs, uint32_t *pidxLoop)
 {
     /* Figure how many. */
@@ -3318,5 +3318,5 @@
     while (   cRegs < cMsrs
            && paMsrs[cRegs].uMsr == uMsr + cRegs
-           && isMsrViaDummy(paMsrs[cRegs].uMsr, paMsrs[cRegs].uValue, paMsrs[cRegs].fFlags))
+           && isMsrViaShanghaiDummy(paMsrs[cRegs].uMsr, paMsrs[cRegs].uValue, paMsrs[cRegs].fFlags))
     {
         cRegs++;
@@ -3458,5 +3458,5 @@
     while (   cRegs < cMsrs
            && paMsrs[cRegs].uMsr == uMsr + cRegs
-           && !isMsrViaDummy(paMsrs[cRegs].uMsr, paMsrs[cRegs].uValue, paMsrs[cRegs].fFlags) )
+           && !isMsrViaShanghaiDummy(paMsrs[cRegs].uMsr, paMsrs[cRegs].uValue, paMsrs[cRegs].fFlags) )
         cRegs++;
     if (cRegs & 1)
@@ -4200,6 +4200,7 @@
          * want to handle there to avoid making the code below unreadable.
          */
-        else if (isMsrViaDummy(uMsr, uValue, fFlags))
-            rc = reportMsr_ViaDummyRange(&paMsrs[i], cMsrs - i, &i);
+        /** @todo r=klaus check if Shanghai CPUs really are behaving the same */
+        else if (isMsrViaShanghaiDummy(uMsr, uValue, fFlags))
+            rc = reportMsr_ViaShanghaiDummyRange(&paMsrs[i], cMsrs - i, &i);
         /*
          * This shall be sorted by uMsr as much as possible.
@@ -4567,4 +4568,5 @@
         case CPUMCPUVENDOR_VIA:         return "VIA";
         case CPUMCPUVENDOR_CYRIX:       return "Cyrix";
+        case CPUMCPUVENDOR_SHANGHAI:    return "Shanghai";
         case CPUMCPUVENDOR_INVALID:
         case CPUMCPUVENDOR_UNKNOWN:
@@ -4672,5 +4674,5 @@
             char       *pszHit;
             while ((pszHit = strstr(pszName, pszWord)) != NULL)
-                memmove(pszHit, pszHit + cchWord, strlen(pszHit + cchWord) + 1);
+                memset(pszHit, ' ', cchWord);
         }
 
@@ -4749,6 +4751,6 @@
                        " */\n"
                        "\n"
-                       "#ifndef VBOX_CPUDB_%s\n"
-                       "#define VBOX_CPUDB_%s\n"
+                       "#ifndef VBOX_CPUDB_%s_h\n"
+                       "#define VBOX_CPUDB_%s_h\n"
                        "\n",
                        pszName,
@@ -4807,5 +4809,5 @@
                    "};\n"
                    "\n"
-                   "#endif /* !VBOX_DB_%s */\n"
+                   "#endif /* !VBOX_CPUDB_%s_h */\n"
                    "\n",
                    pszCpuDesc,
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c	(revision 76885)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c	(revision 76886)
@@ -4747,4 +4747,5 @@
             CASE_PRED(BS3CG1PRED_VENDOR_INTEL, pThis->bCpuVendor == BS3CPUVENDOR_INTEL);
             CASE_PRED(BS3CG1PRED_VENDOR_VIA,   pThis->bCpuVendor == BS3CPUVENDOR_VIA);
+            CASE_PRED(BS3CG1PRED_VENDOR_SHANGHAI, pThis->bCpuVendor == BS3CPUVENDOR_SHANGHAI);
 
 #undef CASE_PRED
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h	(revision 76885)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1.h	(revision 76886)
@@ -775,4 +775,5 @@
     BS3CG1PRED_VENDOR_INTEL,
     BS3CG1PRED_VENDOR_VIA,
+    BS3CG1PRED_VENDOR_SHANGHAI,
 
     BS3CG1PRED_END
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-GetCpuVendor.c
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-GetCpuVendor.c	(revision 76885)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-GetCpuVendor.c	(revision 76886)
@@ -43,4 +43,6 @@
         if (ASMIsViaCentaurCpuEx(uEbx, uEcx, uEdx))
             return BS3CPUVENDOR_VIA;
+        if (ASMIsShanghaiCpuEx(uEbx, uEcx, uEdx))
+            return BS3CPUVENDOR_SHANGHAI;
         return BS3CPUVENDOR_UNKNOWN;
     }
Index: /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
===================================================================
--- /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h	(revision 76885)
+++ /trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h	(revision 76886)
@@ -1537,4 +1537,5 @@
     BS3CPUVENDOR_VIA,
     BS3CPUVENDOR_CYRIX,
+    BS3CPUVENDOR_SHANGHAI,
     BS3CPUVENDOR_UNKNOWN,
     BS3CPUVENDOR_END
Index: /trunk/src/VBox/ValidationKit/testdriver/vbox.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/vbox.py	(revision 76885)
+++ /trunk/src/VBox/ValidationKit/testdriver/vbox.py	(revision 76886)
@@ -3097,4 +3097,13 @@
         return sCpuDesc.startswith("VIA") or sCpuDesc == 'CentaurHauls';
 
+    def isHostCpuShanghai(self, fQuiet = False):
+        """
+        Checks if the host CPU vendor is Shanghai (or Zhaoxin).
+
+        Returns True / False.
+        """
+        sCpuDesc = self._getHostCpuDesc(fQuiet);
+        return sCpuDesc.startswith("ZHAOXIN") or sCpuDesc.strip(' ') == 'Shanghai';
+
     def isHostCpuP4(self, fQuiet = False):
         """
Index: /trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py	(revision 76885)
+++ /trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py	(revision 76886)
@@ -443,4 +443,6 @@
                 elif self.isViaIncompatible() and oTestDrv.isHostCpuVia():
                     fRc = None; # Skip the test.
+                elif self.isShanghaiIncompatible() and oTestDrv.isHostCpuShanghai():
+                    fRc = None; # Skip the test.
                 elif self.isP4Incompatible() and oTestDrv.isHostCpuP4():
                     fRc = None; # Skip the test.
@@ -561,4 +563,13 @@
             return True;
         return False;
+
+    def isShanghaiIncompatible(self):
+        """
+        Identifies VMs that doesn't work on Shanghai.
+
+        Returns True if NOT supported on Shanghai, False if it IS supported.
+        """
+        # For now treat it just like VIA, to be adjusted later
+        return self.isViaIncompatible()
 
     def isP4Incompatible(self):
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testbox.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testbox.py	(revision 76885)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testbox.py	(revision 76886)
@@ -504,4 +504,7 @@
                 if uMod == 0x0a: return 'VIA_C7_C5J';
                 if uMod == 0x0f: return 'VIA_Isaiah';
+        elif sCpuVendor == '  Shanghai  ':
+            if uFam == 0x07:
+                if uMod == 0x0b: return 'Shanghai_KX-5000';
         return None;
 
@@ -544,4 +547,5 @@
         if self.sCpuVendor == 'AuthenticAMD':     return 'AMD';
         if self.sCpuVendor == 'CentaurHauls':     return 'VIA';
+        if self.sCpuVendor == '  Shanghai  ':     return 'Shanghai';
         return self.sCpuVendor;
 
