Index: /trunk/include/VBox/dis.h
===================================================================
--- /trunk/include/VBox/dis.h	(revision 41730)
+++ /trunk/include/VBox/dis.h	(revision 41731)
@@ -382,53 +382,4 @@
 /** @}  */
 
-/** @name Flags returned by DISQueryParamVal (DISQPVPARAMVAL::flags).
- * @{
- */
-#define DISQPV_FLAG_8                   UINT8_C(0x01)
-#define DISQPV_FLAG_16                  UINT8_C(0x02)
-#define DISQPV_FLAG_32                  UINT8_C(0x04)
-#define DISQPV_FLAG_64                  UINT8_C(0x08)
-#define DISQPV_FLAG_FARPTR16            UINT8_C(0x10)
-#define DISQPV_FLAG_FARPTR32            UINT8_C(0x20)
-/** @}  */
-
-/** @name Types returned by DISQueryParamVal (DISQPVPARAMVAL::flags).
- * @{ */
-#define DISQPV_TYPE_REGISTER            UINT8_C(1)
-#define DISQPV_TYPE_ADDRESS             UINT8_C(2)
-#define DISQPV_TYPE_IMMEDIATE           UINT8_C(3)
-/** @}  */
-
-typedef struct
-{
-    union
-    {
-        uint8_t     val8;
-        uint16_t    val16;
-        uint32_t    val32;
-        uint64_t    val64;
-
-        struct
-        {
-            uint16_t sel;
-            uint32_t offset;
-        } farptr;
-    } val;
-
-    uint8_t         type;
-    uint8_t         size;
-    uint8_t         flags;
-} DISQPVPARAMVAL;
-/** Pointer to opcode parameter value. */
-typedef DISQPVPARAMVAL *PDISQPVPARAMVAL;
-
-/** Indicates which parameter DISQueryParamVal should operate on. */
-typedef enum DISQPVWHICH
-{
-    DISQPVWHICH_DST = 1,
-    DISQPVWHICH_SRC,
-    DISQPVWHAT_32_BIT_HACK = 0x7fffffff
-} DISQPVWHICH;
-
 
 /**
@@ -516,5 +467,5 @@
  *
  * @param   pDisState       Pointer to the CPU state.  The primary user argument
- *                          can be retrived from DISCPUSTATE::apvUserData[0]. If
+ *                          can be retrived from DISCPUSTATE::pvUser. If
  *                          more is required these can be passed in the
  *                          subsequent slots.
@@ -540,6 +491,6 @@
 typedef struct DISCPUSTATE
 {
-    /* Because of apvUserData[1] and apvUserData[2], put the less frequently
-       used bits at the top for now.  (Might be better off in the middle?) */
+    /* Because of pvUser2, put the less frequently used bits at the top for
+       now. (Might be better off in the middle?) */
     DISOPPARAM      param3;
     DISOPPARAM      param2;
@@ -628,10 +579,14 @@
     uint8_t         abInstr[16];
     /* off: 0x0b0 (176) */
-    /** User data slots for the read callback.  The first entry is used for the
-     *  pvUser argument, the rest are up for grabs.
-     * @remarks This must come last so that we can memset everything before this. */
-    void           *apvUserData[3];
+    /** User data supplied as an argument to the APIs. */
+    void           *pvUser;
 #if ARCH_BITS == 32
-    uint32_t        auPadding4[3];
+    uint32_t        uPadding4;
+#endif
+    /** User data that can be set prior to calling the API.
+     * @deprecated Please don't use this any more. */
+    void           *pvUser2;
+#if ARCH_BITS == 32
+    uint32_t        uPadding5;
 #endif
 } DISCPUSTATE;
@@ -655,10 +610,60 @@
 
 DISDECL(int)        DISGetParamSize(PDISCPUSTATE pCpu, PDISOPPARAM pParam);
-DISDECL(DISSELREG) DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam);
+DISDECL(DISSELREG)  DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam);
 DISDECL(uint8_t)    DISQuerySegPrefixByte(PDISCPUSTATE pCpu);
 
+
+
+/** @name Flags returned by DISQueryParamVal (DISQPVPARAMVAL::flags).
+ * @{
+ */
+#define DISQPV_FLAG_8                   UINT8_C(0x01)
+#define DISQPV_FLAG_16                  UINT8_C(0x02)
+#define DISQPV_FLAG_32                  UINT8_C(0x04)
+#define DISQPV_FLAG_64                  UINT8_C(0x08)
+#define DISQPV_FLAG_FARPTR16            UINT8_C(0x10)
+#define DISQPV_FLAG_FARPTR32            UINT8_C(0x20)
+/** @}  */
+
+/** @name Types returned by DISQueryParamVal (DISQPVPARAMVAL::flags).
+ * @{ */
+#define DISQPV_TYPE_REGISTER            UINT8_C(1)
+#define DISQPV_TYPE_ADDRESS             UINT8_C(2)
+#define DISQPV_TYPE_IMMEDIATE           UINT8_C(3)
+/** @}  */
+
+typedef struct
+{
+    union
+    {
+        uint8_t     val8;
+        uint16_t    val16;
+        uint32_t    val32;
+        uint64_t    val64;
+
+        struct
+        {
+            uint16_t sel;
+            uint32_t offset;
+        } farptr;
+    } val;
+
+    uint8_t         type;
+    uint8_t         size;
+    uint8_t         flags;
+} DISQPVPARAMVAL;
+/** Pointer to opcode parameter value. */
+typedef DISQPVPARAMVAL *PDISQPVPARAMVAL;
+
+/** Indicates which parameter DISQueryParamVal should operate on. */
+typedef enum DISQPVWHICH
+{
+    DISQPVWHICH_DST = 1,
+    DISQPVWHICH_SRC,
+    DISQPVWHAT_32_BIT_HACK = 0x7fffffff
+} DISQPVWHICH;
 DISDECL(int) DISQueryParamVal(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, PDISOPPARAM pParam, PDISQPVPARAMVAL pParamVal, DISQPVWHICH parmtype);
+
 DISDECL(int) DISQueryParamRegPtr(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, PDISOPPARAM pParam, void **ppReg, size_t *pcbSize);
-
 DISDECL(int) DISFetchReg8(PCCPUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal);
 DISDECL(int) DISFetchReg16(PCCPUMCTXCORE pCtx, unsigned reg16, uint16_t *pVal);
Index: /trunk/src/VBox/Disassembler/Disasm.cpp
===================================================================
--- /trunk/src/VBox/Disassembler/Disasm.cpp	(revision 41730)
+++ /trunk/src/VBox/Disassembler/Disasm.cpp	(revision 41731)
@@ -58,5 +58,5 @@
  * @param   pfnCallback     The byte fetcher callback.
  * @param   pvUser          The user argument (found in
- *                          DISCPUSTATE::apvUserData[0]).
+ *                          DISCPUSTATE::pvUser).
  * @param   pCpu            Where to return the disassembled instruction.
  * @param   pcbInstr        Where to store the size of the instruction. NULL is
Index: /trunk/src/VBox/Disassembler/DisasmCore.cpp
===================================================================
--- /trunk/src/VBox/Disassembler/DisasmCore.cpp	(revision 41730)
+++ /trunk/src/VBox/Disassembler/DisasmCore.cpp	(revision 41731)
@@ -227,5 +227,5 @@
  * @param   enmCpuMode      The CPU mode. DISCPUMODE_32BIT, DISCPUMODE_16BIT, or DISCPUMODE_64BIT.
  * @param   pfnReadBytes    Callback for reading instruction bytes.
- * @param   pvUser          User argument for the instruction reader. (Ends up in apvUserData[0].)
+ * @param   pvUser          User argument for the instruction reader. (Ends up in pvUser.)
  * @param   pCpu            Pointer to cpu structure. Will be initialized.
  * @param   pcbInstr        Where to store the size of the instruction.
@@ -249,5 +249,5 @@
  * @param   enmCpuMode      The CPU mode. DISCPUMODE_32BIT, DISCPUMODE_16BIT, or DISCPUMODE_64BIT.
  * @param   pfnReadBytes    Callback for reading instruction bytes.
- * @param   pvUser          User argument for the instruction reader. (Ends up in apvUserData[0].)
+ * @param   pvUser          User argument for the instruction reader. (Ends up in pvUser.)
  * @param   pCpu            Pointer to cpu structure. Will be initialized.
  * @param   pcbInstr        Where to store the size of the instruction.
@@ -271,8 +271,7 @@
  * @param   pfnReadBytes    Callback for reading instruction bytes.
  * @param   fFilter         Instruction type filter.
- * @param   pvUser          User argument for the instruction reader. (Ends up in apvUserData[0].)
+ * @param   pvUser          User argument for the instruction reader. (Ends up in pvUser.)
  * @param   pCpu            Pointer to CPU structure. With the exception of
- *                          DISCPUSTATE::apvUserData[1] and
- *                          DISCPUSTATE::apvUserData[2], the structure will be
+ *                          DISCPUSTATE::pvUser2, the structure will be
  *                          completely initialized by this API, i.e. no input is
  *                          taken from it.
@@ -288,7 +287,7 @@
     /*
      * Initialize the CPU state.
-     * Note! The RT_BZERO make ASSUMPTIONS about the placement of apvUserData.
+     * Note! The RT_BZERO make ASSUMPTIONS about the placement of pvUser2.
      */
-    RT_BZERO(pCpu, RT_OFFSETOF(DISCPUSTATE, apvUserData));
+    RT_BZERO(pCpu, RT_OFFSETOF(DISCPUSTATE, pvUser2));
 
     pCpu->mode              = enmCpuMode;
@@ -312,5 +311,5 @@
     pCpu->rc                = VINF_SUCCESS;
     pCpu->pfnReadBytes      = pfnReadBytes ? pfnReadBytes : disReadBytesDefault;
-    pCpu->apvUserData[0]    = pvUser;
+    pCpu->pvUser    = pvUser;
 
     return disInstrWorker(pCpu, uInstrAddr, paOneByteMap, pcbInstr);
Index: /trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp	(revision 41730)
+++ /trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp	(revision 41731)
@@ -149,5 +149,5 @@
 static DECLCALLBACK(int) MyReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead)
 {
-    memcpy(pbDst, (uint8_t const *)((uintptr_t)uSrcAddr + (uintptr_t)pDisState->apvUserData[0]), cbToRead);
+    memcpy(pbDst, (uint8_t const *)((uintptr_t)uSrcAddr + (uintptr_t)pDisState->pvUser), cbToRead);
     return VINF_SUCCESS;
 }
Index: /trunk/src/VBox/VMM/VMMAll/EMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/EMAll.cpp	(revision 41730)
+++ /trunk/src/VBox/VMM/VMMAll/EMAll.cpp	(revision 41731)
@@ -286,5 +286,5 @@
 static DECLCALLBACK(int) emReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead)
 {
-    PEMDISSTATE   pState = (PEMDISSTATE)pDisState->apvUserData[0];
+    PEMDISSTATE   pState = (PEMDISSTATE)pDisState->pvUser;
 # ifndef IN_RING0
     PVM           pVM    = pState->pVM;
Index: /trunk/src/VBox/VMM/VMMR3/CPUM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/CPUM.cpp	(revision 41730)
+++ /trunk/src/VBox/VMM/VMMR3/CPUM.cpp	(revision 41731)
@@ -3529,5 +3529,5 @@
 static DECLCALLBACK(int) cpumR3DisasInstrRead(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead)
 {
-    PCPUMDISASSTATE pState = (PCPUMDISASSTATE)pDisState->apvUserData[0];
+    PCPUMDISASSTATE pState = (PCPUMDISASSTATE)pDisState->pvUser;
     Assert(cbToRead > 0);
     for (;;)
Index: /trunk/src/VBox/VMM/VMMR3/CSAM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/CSAM.cpp	(revision 41730)
+++ /trunk/src/VBox/VMM/VMMR3/CSAM.cpp	(revision 41731)
@@ -728,6 +728,6 @@
 static DECLCALLBACK(int) CSAMR3ReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead)
 {
-    PVM           pVM      = (PVM)pDisState->apvUserData[0];
-    RTHCUINTPTR   pInstrHC = (RTHCUINTPTR)pDisState->apvUserData[1];
+    PVM           pVM      = (PVM)pDisState->pvUser;
+    RTHCUINTPTR   pInstrHC = (RTHCUINTPTR)pDisState->pvUser2;
     RTGCUINTPTR32 pInstrGC = pDisState->uInstrAddr;
     int           orgsize  = cbToRead;
@@ -764,5 +764,5 @@
                                PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput)
 {
-    (pCpu)->apvUserData[1] = InstrHC;
+    pCpu->pvUser2 = InstrHC;
 #ifdef DEBUG
     return DISInstrToStrEx(InstrGC, enmCpuMode, CSAMR3ReadBytes, pVM, DISOPTYPE_ALL,
Index: /trunk/src/VBox/VMM/VMMR3/PATM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PATM.cpp	(revision 41730)
+++ /trunk/src/VBox/VMM/VMMR3/PATM.cpp	(revision 41731)
@@ -536,5 +536,5 @@
 DECLCALLBACK(int) patmReadBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead)
 {
-    PATMDISASM   *pDisInfo = (PATMDISASM *)pDisState->apvUserData[0];
+    PATMDISASM   *pDisInfo = (PATMDISASM *)pDisState->pvUser;
     int           orgsize  = cbToRead;
 
