Changeset 41729 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 14, 2012 11:24:17 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 78537
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r41728 r41729 805 805 static int emInterpretXchg(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 806 806 { 807 OP_PARAMVAL param1, param2;807 DISQPVPARAMVAL param1, param2; 808 808 NOREF(pvFault); 809 809 810 810 /* Source to make DISQueryParamVal read the register value - ugly hack */ 811 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);811 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 812 812 if(RT_FAILURE(rc)) 813 813 return VERR_EM_INTERPRETER; 814 814 815 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);815 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 816 816 if(RT_FAILURE(rc)) 817 817 return VERR_EM_INTERPRETER; … … 829 829 switch(param1.type) 830 830 { 831 case PARMTYPE_IMMEDIATE: /* register type is translated to this one too */831 case DISQPV_TYPE_IMMEDIATE: /* register type is translated to this one too */ 832 832 valpar1 = param1.val.val64; 833 833 break; 834 834 835 case PARMTYPE_ADDRESS:835 case DISQPV_TYPE_ADDRESS: 836 836 pParam1 = (RTGCPTR)param1.val.val64; 837 837 pParam1 = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param1, pParam1); … … 852 852 switch(param2.type) 853 853 { 854 case PARMTYPE_ADDRESS:854 case DISQPV_TYPE_ADDRESS: 855 855 pParam2 = (RTGCPTR)param2.val.val64; 856 856 pParam2 = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param2, pParam2); … … 863 863 break; 864 864 865 case PARMTYPE_IMMEDIATE:865 case DISQPV_TYPE_IMMEDIATE: 866 866 valpar2 = param2.val.val64; 867 867 break; … … 875 875 if (pParam1 == 0) 876 876 { 877 Assert(param1.type == PARMTYPE_IMMEDIATE); /* register actually */877 Assert(param1.type == DISQPV_TYPE_IMMEDIATE); /* register actually */ 878 878 switch(param1.size) 879 879 { … … 901 901 if (pParam2 == 0) 902 902 { 903 Assert(param2.type == PARMTYPE_IMMEDIATE); /* register actually */903 Assert(param2.type == DISQPV_TYPE_IMMEDIATE); /* register actually */ 904 904 switch(param2.size) 905 905 { … … 940 940 PFNEMULATEPARAM2 pfnEmulate) 941 941 { 942 OP_PARAMVAL param1;942 DISQPVPARAMVAL param1; 943 943 NOREF(pvFault); 944 944 945 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);945 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 946 946 if(RT_FAILURE(rc)) 947 947 return VERR_EM_INTERPRETER; … … 956 956 uint64_t valpar1; 957 957 958 if (param1.type == PARMTYPE_ADDRESS)958 if (param1.type == DISQPV_TYPE_ADDRESS) 959 959 { 960 960 pParam1 = (RTGCPTR)param1.val.val64; … … 1010 1010 { 1011 1011 Assert(pDis->mode != DISCPUMODE_64BIT); /** @todo check */ 1012 OP_PARAMVAL param1;1012 DISQPVPARAMVAL param1; 1013 1013 NOREF(pvFault); 1014 1014 1015 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);1015 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 1016 1016 if(RT_FAILURE(rc)) 1017 1017 return VERR_EM_INTERPRETER; … … 1043 1043 } 1044 1044 1045 if (param1.type == PARMTYPE_ADDRESS)1045 if (param1.type == DISQPV_TYPE_ADDRESS) 1046 1046 { 1047 1047 pParam1 = (RTGCPTR)param1.val.val64; … … 1092 1092 PFNEMULATEPARAM3 pfnEmulate) 1093 1093 { 1094 OP_PARAMVAL param1, param2;1094 DISQPVPARAMVAL param1, param2; 1095 1095 NOREF(pvFault); 1096 1096 1097 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);1097 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 1098 1098 if(RT_FAILURE(rc)) 1099 1099 return VERR_EM_INTERPRETER; 1100 1100 1101 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);1101 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 1102 1102 if(RT_FAILURE(rc)) 1103 1103 return VERR_EM_INTERPRETER; … … 1125 1125 1126 1126 /* The destination is always a virtual address */ 1127 if (param1.type == PARMTYPE_ADDRESS)1127 if (param1.type == DISQPV_TYPE_ADDRESS) 1128 1128 { 1129 1129 pParam1 = (RTGCPTR)param1.val.val64; … … 1146 1146 switch(param2.type) 1147 1147 { 1148 case PARMTYPE_IMMEDIATE: /* both immediate data and register (ugly) */1148 case DISQPV_TYPE_IMMEDIATE: /* both immediate data and register (ugly) */ 1149 1149 valpar2 = param2.val.val64; 1150 1150 break; … … 1189 1189 { 1190 1190 void *pvParam1; 1191 OP_PARAMVAL param1, param2;1191 DISQPVPARAMVAL param1, param2; 1192 1192 NOREF(pvFault); 1193 1193 … … 1196 1196 #endif 1197 1197 1198 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);1198 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 1199 1199 if(RT_FAILURE(rc)) 1200 1200 return VERR_EM_INTERPRETER; 1201 1201 1202 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);1202 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 1203 1203 if(RT_FAILURE(rc)) 1204 1204 return VERR_EM_INTERPRETER; … … 1222 1222 #endif 1223 1223 1224 /* Register and immediate data == PARMTYPE_IMMEDIATE */1225 AssertReturn(param2.type == PARMTYPE_IMMEDIATE, VERR_EM_INTERPRETER);1224 /* Register and immediate data == DISQPV_TYPE_IMMEDIATE */ 1225 AssertReturn(param2.type == DISQPV_TYPE_IMMEDIATE, VERR_EM_INTERPRETER); 1226 1226 RTGCUINTREG ValPar2 = param2.val.val64; 1227 1227 1228 1228 /* The destination is always a virtual address */ 1229 AssertReturn(param1.type == PARMTYPE_ADDRESS, VERR_EM_INTERPRETER);1229 AssertReturn(param1.type == DISQPV_TYPE_ADDRESS, VERR_EM_INTERPRETER); 1230 1230 1231 1231 RTGCPTR GCPtrPar1 = param1.val.val64; … … 1263 1263 { 1264 1264 NOREF(pvFault); 1265 OP_PARAMVAL param1, param2;1266 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);1265 DISQPVPARAMVAL param1, param2; 1266 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 1267 1267 if(RT_FAILURE(rc)) 1268 1268 return VERR_EM_INTERPRETER; 1269 1269 1270 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);1270 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 1271 1271 if(RT_FAILURE(rc)) 1272 1272 return VERR_EM_INTERPRETER; … … 1294 1294 1295 1295 /* The destination is always a virtual address */ 1296 if (param1.type == PARMTYPE_ADDRESS)1296 if (param1.type == DISQPV_TYPE_ADDRESS) 1297 1297 { 1298 1298 pParam1 = (RTGCPTR)param1.val.val64; … … 1317 1317 switch(param2.type) 1318 1318 { 1319 case PARMTYPE_IMMEDIATE: /* both immediate data and register (ugly) */1319 case DISQPV_TYPE_IMMEDIATE: /* both immediate data and register (ugly) */ 1320 1320 valpar2 = param2.val.val64; 1321 1321 break; … … 1367 1367 PFNEMULATEPARAM2UINT32 pfnEmulate) 1368 1368 { 1369 OP_PARAMVAL param1, param2;1370 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);1369 DISQPVPARAMVAL param1, param2; 1370 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 1371 1371 if(RT_FAILURE(rc)) 1372 1372 return VERR_EM_INTERPRETER; 1373 1373 1374 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);1374 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 1375 1375 if(RT_FAILURE(rc)) 1376 1376 return VERR_EM_INTERPRETER; … … 1387 1387 1388 1388 /* The destination is always a virtual address */ 1389 if (param1.type != PARMTYPE_ADDRESS)1389 if (param1.type != DISQPV_TYPE_ADDRESS) 1390 1390 return VERR_EM_INTERPRETER; 1391 1391 … … 1396 1396 switch(param2.type) 1397 1397 { 1398 case PARMTYPE_IMMEDIATE: /* both immediate data and register (ugly) */1398 case DISQPV_TYPE_IMMEDIATE: /* both immediate data and register (ugly) */ 1399 1399 valpar2 = param2.val.val64; 1400 1400 break; … … 1449 1449 void *pvParam1; 1450 1450 1451 OP_PARAMVAL param1, param2;1452 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);1451 DISQPVPARAMVAL param1, param2; 1452 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 1453 1453 if(RT_FAILURE(rc)) 1454 1454 return VERR_EM_INTERPRETER; 1455 1455 1456 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);1456 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 1457 1457 if(RT_FAILURE(rc)) 1458 1458 return VERR_EM_INTERPRETER; 1459 1459 1460 1460 /* The destination is always a virtual address */ 1461 if (param1.type != PARMTYPE_ADDRESS)1462 return VERR_EM_INTERPRETER; 1463 1464 /* Register and immediate data == PARMTYPE_IMMEDIATE */1465 AssertReturn(param2.type == PARMTYPE_IMMEDIATE, VERR_EM_INTERPRETER);1461 if (param1.type != DISQPV_TYPE_ADDRESS) 1462 return VERR_EM_INTERPRETER; 1463 1464 /* Register and immediate data == DISQPV_TYPE_IMMEDIATE */ 1465 AssertReturn(param2.type == DISQPV_TYPE_IMMEDIATE, VERR_EM_INTERPRETER); 1466 1466 uint64_t ValPar2 = param2.val.val64; 1467 1467 … … 1511 1511 { 1512 1512 NOREF(pvFault); 1513 OP_PARAMVAL param1, param2;1514 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST);1513 DISQPVPARAMVAL param1, param2; 1514 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_DST); 1515 1515 if(RT_FAILURE(rc)) 1516 1516 return VERR_EM_INTERPRETER; 1517 1517 1518 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);1518 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 1519 1519 if(RT_FAILURE(rc)) 1520 1520 return VERR_EM_INTERPRETER; … … 1527 1527 #else 1528 1528 /** @todo Make this the default and don't rely on TRPM information. */ 1529 if (param1.type == PARMTYPE_ADDRESS)1529 if (param1.type == DISQPV_TYPE_ADDRESS) 1530 1530 { 1531 1531 #endif … … 1535 1535 switch(param1.type) 1536 1536 { 1537 case PARMTYPE_IMMEDIATE:1538 if(!(param1.flags & ( PARAM_VAL32|PARAM_VAL64)))1537 case DISQPV_TYPE_IMMEDIATE: 1538 if(!(param1.flags & (DISQPV_FLAG_32|DISQPV_FLAG_64))) 1539 1539 return VERR_EM_INTERPRETER; 1540 1540 /* fallthru */ 1541 1541 1542 case PARMTYPE_ADDRESS:1542 case DISQPV_TYPE_ADDRESS: 1543 1543 pDest = (RTGCPTR)param1.val.val64; 1544 1544 pDest = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param1, pDest); … … 1552 1552 switch(param2.type) 1553 1553 { 1554 case PARMTYPE_IMMEDIATE: /* register type is translated to this one too */1554 case DISQPV_TYPE_IMMEDIATE: /* register type is translated to this one too */ 1555 1555 val64 = param2.val.val64; 1556 1556 break; … … 1583 1583 switch(param2.type) 1584 1584 { 1585 case PARMTYPE_IMMEDIATE:1586 if(!(param2.flags & ( PARAM_VAL32|PARAM_VAL64)))1585 case DISQPV_TYPE_IMMEDIATE: 1586 if(!(param2.flags & (DISQPV_FLAG_32|DISQPV_FLAG_64))) 1587 1587 return VERR_EM_INTERPRETER; 1588 1588 /* fallthru */ 1589 1589 1590 case PARMTYPE_ADDRESS:1590 case DISQPV_TYPE_ADDRESS: 1591 1591 pSrc = (RTGCPTR)param2.val.val64; 1592 1592 pSrc = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param2, pSrc); … … 1606 1606 switch(param1.type) 1607 1607 { 1608 case PARMTYPE_REGISTER:1608 case DISQPV_TYPE_REGISTER: 1609 1609 switch(param1.size) 1610 1610 { … … 1799 1799 static int emInterpretCmpXchg(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 1800 1800 { 1801 OP_PARAMVAL param1, param2;1801 DISQPVPARAMVAL param1, param2; 1802 1802 NOREF(pvFault); 1803 1803 … … 1807 1807 1808 1808 /* Source to make DISQueryParamVal read the register value - ugly hack */ 1809 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);1809 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 1810 1810 if(RT_FAILURE(rc)) 1811 1811 return VERR_EM_INTERPRETER; 1812 1812 1813 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, PARAM_SOURCE);1813 rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param2, ¶m2, DISQPVWHICH_SRC); 1814 1814 if(RT_FAILURE(rc)) 1815 1815 return VERR_EM_INTERPRETER; … … 1818 1818 switch(param2.type) 1819 1819 { 1820 case PARMTYPE_IMMEDIATE: /* register actually */1820 case DISQPV_TYPE_IMMEDIATE: /* register actually */ 1821 1821 valpar = param2.val.val64; 1822 1822 break; … … 1834 1834 switch(param1.type) 1835 1835 { 1836 case PARMTYPE_ADDRESS:1836 case DISQPV_TYPE_ADDRESS: 1837 1837 GCPtrPar1 = param1.val.val64; 1838 1838 GCPtrPar1 = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param1, GCPtrPar1); … … 1871 1871 { 1872 1872 Assert(pDis->mode != DISCPUMODE_64BIT); /** @todo check */ 1873 OP_PARAMVAL param1;1873 DISQPVPARAMVAL param1; 1874 1874 NOREF(pvFault); 1875 1875 1876 1876 /* Source to make DISQueryParamVal read the register value - ugly hack */ 1877 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);1877 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 1878 1878 if(RT_FAILURE(rc)) 1879 1879 return VERR_EM_INTERPRETER; … … 1887 1887 switch(param1.type) 1888 1888 { 1889 case PARMTYPE_ADDRESS:1889 case DISQPV_TYPE_ADDRESS: 1890 1890 GCPtrPar1 = param1.val.val64; 1891 1891 GCPtrPar1 = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param1, GCPtrPar1); … … 1925 1925 { 1926 1926 Assert(pDis->mode != DISCPUMODE_64BIT); /** @todo check */ 1927 OP_PARAMVAL param1;1927 DISQPVPARAMVAL param1; 1928 1928 void *pvParamReg2; 1929 1929 size_t cbParamReg2; … … 1931 1931 1932 1932 /* Source to make DISQueryParamVal read the register value - ugly hack */ 1933 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);1933 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 1934 1934 if(RT_FAILURE(rc)) 1935 1935 return VERR_EM_INTERPRETER; … … 1954 1954 switch(param1.type) 1955 1955 { 1956 case PARMTYPE_ADDRESS:1956 case DISQPV_TYPE_ADDRESS: 1957 1957 GCPtrPar1 = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param1, (RTRCUINTPTR)param1.val.val64); 1958 1958 #ifdef IN_RC … … 2050 2050 static VBOXSTRICTRC emInterpretInvlPg(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2051 2051 { 2052 OP_PARAMVAL param1;2052 DISQPVPARAMVAL param1; 2053 2053 RTGCPTR addr; 2054 2054 NOREF(pvFault); NOREF(pVM); NOREF(pcbSize); 2055 2055 2056 VBOXSTRICTRC rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);2056 VBOXSTRICTRC rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 2057 2057 if(RT_FAILURE(rc)) 2058 2058 return VERR_EM_INTERPRETER; … … 2060 2060 switch(param1.type) 2061 2061 { 2062 case PARMTYPE_IMMEDIATE:2063 case PARMTYPE_ADDRESS:2064 if(!(param1.flags & ( PARAM_VAL32|PARAM_VAL64)))2062 case DISQPV_TYPE_IMMEDIATE: 2063 case DISQPV_TYPE_ADDRESS: 2064 if(!(param1.flags & (DISQPV_FLAG_32|DISQPV_FLAG_64))) 2065 2065 return VERR_EM_INTERPRETER; 2066 2066 addr = (RTGCPTR)param1.val.val64; … … 2385 2385 static int emInterpretLmsw(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2386 2386 { 2387 OP_PARAMVAL param1;2387 DISQPVPARAMVAL param1; 2388 2388 uint32_t val; 2389 2389 NOREF(pvFault); NOREF(pcbSize); 2390 2390 2391 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);2391 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 2392 2392 if(RT_FAILURE(rc)) 2393 2393 return VERR_EM_INTERPRETER; … … 2395 2395 switch(param1.type) 2396 2396 { 2397 case PARMTYPE_IMMEDIATE:2398 case PARMTYPE_ADDRESS:2399 if(!(param1.flags & PARAM_VAL16))2397 case DISQPV_TYPE_IMMEDIATE: 2398 case DISQPV_TYPE_ADDRESS: 2399 if(!(param1.flags & DISQPV_FLAG_16)) 2400 2400 return VERR_EM_INTERPRETER; 2401 2401 val = param1.val.val32; … … 2416 2416 static int emInterpretSmsw(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2417 2417 { 2418 OP_PARAMVAL param1;2418 DISQPVPARAMVAL param1; 2419 2419 uint64_t cr0 = CPUMGetGuestCR0(pVCpu); 2420 2420 2421 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);2421 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 2422 2422 if(RT_FAILURE(rc)) 2423 2423 return VERR_EM_INTERPRETER; … … 2425 2425 switch(param1.type) 2426 2426 { 2427 case PARMTYPE_IMMEDIATE:2427 case DISQPV_TYPE_IMMEDIATE: 2428 2428 if(param1.size != sizeof(uint16_t)) 2429 2429 return VERR_EM_INTERPRETER; … … 2432 2432 break; 2433 2433 2434 case PARMTYPE_ADDRESS:2434 case DISQPV_TYPE_ADDRESS: 2435 2435 { 2436 2436 RTGCPTR pParam1; … … 2579 2579 static int emInterpretLLdt(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2580 2580 { 2581 OP_PARAMVAL param1;2581 DISQPVPARAMVAL param1; 2582 2582 RTSEL sel; 2583 2583 NOREF(pVM); NOREF(pvFault); NOREF(pcbSize); 2584 2584 2585 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);2585 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 2586 2586 if(RT_FAILURE(rc)) 2587 2587 return VERR_EM_INTERPRETER; … … 2589 2589 switch(param1.type) 2590 2590 { 2591 case PARMTYPE_ADDRESS:2591 case DISQPV_TYPE_ADDRESS: 2592 2592 return VERR_EM_INTERPRETER; //feeling lazy right now 2593 2593 2594 case PARMTYPE_IMMEDIATE:2595 if(!(param1.flags & PARAM_VAL16))2594 case DISQPV_TYPE_IMMEDIATE: 2595 if(!(param1.flags & DISQPV_FLAG_16)) 2596 2596 return VERR_EM_INTERPRETER; 2597 2597 sel = (RTSEL)param1.val.val16; … … 2627 2627 static int emInterpretLIGdt(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2628 2628 { 2629 OP_PARAMVAL param1;2629 DISQPVPARAMVAL param1; 2630 2630 RTGCPTR pParam1; 2631 2631 X86XDTR32 dtr32; … … 2637 2637 AssertReturn(CPUMIsGuestInRealMode(pVCpu), VERR_EM_INTERPRETER); 2638 2638 2639 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE);2639 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, DISQPVWHICH_SRC); 2640 2640 if(RT_FAILURE(rc)) 2641 2641 return VERR_EM_INTERPRETER; … … 2643 2643 switch(param1.type) 2644 2644 { 2645 case PARMTYPE_ADDRESS:2645 case DISQPV_TYPE_ADDRESS: 2646 2646 pParam1 = emConvertToFlatAddr(pVM, pRegFrame, pDis, &pDis->param1, param1.val.val16); 2647 2647 break; -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r41692 r41729 2919 2919 static int hmR0svmInterpretInvlPg(PVMCPU pVCpu, PDISCPUSTATE pCpu, PCPUMCTXCORE pRegFrame, uint32_t uASID) 2920 2920 { 2921 OP_PARAMVAL param1;2921 DISQPVPARAMVAL param1; 2922 2922 RTGCPTR addr; 2923 2923 NOREF(uASID); 2924 2924 2925 int rc = DISQueryParamVal(pRegFrame, pCpu, &pCpu->param1, ¶m1, PARAM_SOURCE);2926 if (RT_FAILURE(rc))2925 int rc = DISQueryParamVal(pRegFrame, pCpu, &pCpu->param1, ¶m1, DISQPVWHICH_SRC); 2926 if (RT_FAILURE(rc)) 2927 2927 return VERR_EM_INTERPRETER; 2928 2928 2929 switch (param1.type)2930 { 2931 case PARMTYPE_IMMEDIATE:2932 case PARMTYPE_ADDRESS:2933 if (!(param1.flags & (PARAM_VAL32|PARAM_VAL64)))2929 switch (param1.type) 2930 { 2931 case DISQPV_TYPE_IMMEDIATE: 2932 case DISQPV_TYPE_ADDRESS: 2933 if (!(param1.flags & (DISQPV_FLAG_32 | DISQPV_FLAG_64))) 2934 2934 return VERR_EM_INTERPRETER; 2935 2935 addr = param1.val.val64;
Note:
See TracChangeset
for help on using the changeset viewer.