vbox的更動 50550 路徑 trunk/src/VBox/Devices/Graphics/HGSMI
- 時間撮記:
- 2014-2-24 上午09:01:18 (11 年 以前)
- 位置:
- trunk/src/VBox/Devices/Graphics/HGSMI
- 檔案:
-
- 刪除 2 筆資料
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
r50542 r50550 61 61 #include <iprt/critsect.h> 62 62 #include <iprt/heap.h> 63 #include <iprt/list.h> 63 64 #include <iprt/semaphore.h> 64 65 #include <iprt/string.h> 65 #include <iprt/asm.h>66 66 67 67 #include <VBox/err.h> … … 74 74 #include <VBox/HGSMI/HGSMIChSetup.h> 75 75 76 #include "HGSMIHostHlp.h"77 76 #include "../DevVGASavedState.h" 78 77 … … 133 132 134 133 135 typedef struct _HGSMIINSTANCE134 typedef struct HGSMIINSTANCE 136 135 { 137 136 PVM pVM; /* The VM. */ … … 145 144 RTCRITSECT hostHeapCritSect; /* Heap serialization lock. */ 146 145 147 HGSMILIST hostFIFO;/* Pending host buffers. */148 HGSMILIST hostFIFORead;/* Host buffers read by the guest. */149 HGSMILIST hostFIFOProcessed;/* Processed by the guest. */150 HGSMILIST hostFIFOFree;/* Buffers for reuse. */146 RTLISTANCHOR hostFIFO; /* Pending host buffers. */ 147 RTLISTANCHOR hostFIFORead; /* Host buffers read by the guest. */ 148 RTLISTANCHOR hostFIFOProcessed; /* Processed by the guest. */ 149 RTLISTANCHOR hostFIFOFree; /* Buffers for reuse. */ 151 150 #ifdef VBOX_WITH_WDDM 152 HGSMILIST guestCmdCompleted;/* list of completed guest commands to be returned to the guest*/153 #endif 154 RTCRITSECT hostFIFOCritSect;/* FIFO serialization lock. */151 RTLISTANCHOR guestCmdCompleted; /* list of completed guest commands to be returned to the guest*/ 152 #endif 153 RTCRITSECT hostFIFOCritSect; /* FIFO serialization lock. */ 155 154 156 155 PFNHGSMINOTIFYGUEST pfnNotifyGuest; /* Guest notification callback. */ 157 void *pvNotifyGuest; /* Guest notification callback context. */158 159 volatile HGSMIHOSTFLAGS * 156 void *pvNotifyGuest; /* Guest notification callback context. */ 157 158 volatile HGSMIHOSTFLAGS *pHGFlags; 160 159 161 160 HGSMICHANNELINFO channelInfo; /* Channel handlers indexed by the channel id. 162 163 164 }HGSMIINSTANCE;161 * The array is accessed under the instance lock. 162 */ 163 } HGSMIINSTANCE; 165 164 166 165 … … 168 167 typedef FNHGSMIHOSTFIFOCALLBACK *PFNHGSMIHOSTFIFOCALLBACK; 169 168 170 typedef struct _HGSMIHOSTFIFOENTRY 171 { 172 /* The list field. Must be the first field. */ 173 HGSMILISTENTRY entry; 174 175 /* Backlink to the HGSMI instance. */ 176 HGSMIINSTANCE *pIns; 169 typedef struct HGSMIHOSTFIFOENTRY 170 { 171 RTLISTNODE nodeEntry; 172 173 HGSMIINSTANCE *pIns; /* Backlink to the HGSMI instance. */ 177 174 178 175 #if 0 … … 181 178 RTSEMEVENTMULTI hEvent; 182 179 #endif 183 /* Status flags of the entry. */ 184 volatile uint32_t fl; 185 186 /* Offset in the memory region of the entry data. */ 187 HGSMIOFFSET offBuffer; 180 181 volatile uint32_t fl; /* Status flags of the entry. */ 182 183 HGSMIOFFSET offBuffer; /* Offset in the memory region of the entry data. */ 188 184 189 185 #if 0 … … 195 191 196 192 } HGSMIHOSTFIFOENTRY; 197 198 #define HGSMILISTENTRY_2_FIFOENTRY(_pe) \199 ( (HGSMIHOSTFIFOENTRY*)((uint8_t *)(_pe) - RT_OFFSETOF(HGSMIHOSTFIFOENTRY, entry)) )200 201 //AssertCompile(RT_OFFSETOF(HGSMIHOSTFIFOENTRY, entry) == 0);202 193 203 194 … … 213 204 #ifdef VBOX_WITH_WDDM 214 205 215 typedef struct _HGSMIGUESTCOMPLENTRY 216 { 217 /* The list field. Must be the first field. */ 218 HGSMILISTENTRY entry; 219 /* guest command buffer */ 220 HGSMIOFFSET offBuffer; 206 typedef struct HGSMIGUESTCOMPLENTRY 207 { 208 RTLISTNODE nodeEntry; 209 HGSMIOFFSET offBuffer; /* Offset of the guest command buffer. */ 221 210 } HGSMIGUESTCOMPLENTRY; 222 211 223 #define HGSMILISTENTRY_2_HGSMIGUESTCOMPLENTRY(_pe) \224 ( (HGSMIGUESTCOMPLENTRY*)((uint8_t *)(_pe) - RT_OFFSETOF(HGSMIGUESTCOMPLENTRY, entry)) )225 212 226 213 static void hgsmiGuestCompletionFIFOFree (HGSMIINSTANCE *pIns, HGSMIGUESTCOMPLENTRY *pEntry) … … 376 363 int rc = hgsmiFIFOLock(pIns); 377 364 AssertRC(rc); 378 if(RT_SUCCESS(rc)) 379 { 380 /* Get the host FIFO head entry. */ 381 HGSMILISTENTRY *pHead = pIns->guestCmdCompleted.pHead; 382 if(pHead) 383 hgsmiListRemove (&pIns->guestCmdCompleted, pHead, NULL); 384 385 if(!pIns->guestCmdCompleted.pHead) 365 if (RT_SUCCESS(rc)) 366 { 367 HGSMIGUESTCOMPLENTRY *pEntry = RTListGetFirst(&pIns->guestCmdCompleted, HGSMIGUESTCOMPLENTRY, nodeEntry); 368 if (pEntry) 369 { 370 RTListNodeRemove(&pEntry->nodeEntry); 371 } 372 373 if (RTListIsEmpty(&pIns->guestCmdCompleted)) 386 374 { 387 375 if(pIns->pHGFlags) 388 ASMAtomicAndU32(&pIns->pHGFlags->u32HostFlags, (~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED)); 376 { 377 ASMAtomicAndU32(&pIns->pHGFlags->u32HostFlags, ~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED); 378 } 389 379 } 390 380 391 381 hgsmiFIFOUnlock(pIns); 392 382 393 if (pHead) 394 { 395 HGSMIGUESTCOMPLENTRY *pEntry = HGSMILISTENTRY_2_HGSMIGUESTCOMPLENTRY(pHead); 383 if (pEntry) 384 { 396 385 offCmd = pEntry->offBuffer; 397 386 398 387 LogFlowFunc(("host FIFO head %p.\n", pEntry)); 399 388 400 hgsmiGuestCompletionFIFOFree 389 hgsmiGuestCompletionFIFOFree(pIns, pEntry); 401 390 } 402 391 } … … 428 417 } 429 418 430 static bool hgsmiProcessHostCmdCompletion 431 HGSMIOFFSET offBuffer,432 bool bCompleteFirst)419 static bool hgsmiProcessHostCmdCompletion(HGSMIINSTANCE *pIns, 420 HGSMIOFFSET offBuffer, 421 bool bCompleteFirst) 433 422 { 434 423 VM_ASSERT_EMT(pIns->pVM); … … 437 426 if(RT_SUCCESS(rc)) 438 427 { 439 /* Search the Read list for the given buffer offset. Also find the previous entry.*/440 HGSMIHOSTFIFOENTRY *pEntry = HGSMILISTENTRY_2_FIFOENTRY(pIns->hostFIFORead.pHead);441 HGSMIHOSTFIFOENTRY *pPrev = NULL; 442 443 while (pEntry)444 { 445 Assert(p Entry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_READ));446 447 if (bCompleteFirst || pEntry->offBuffer == offBuffer)448 {428 /* Search the Read list for the given buffer offset. */ 429 HGSMIHOSTFIFOENTRY *pEntry = NULL; 430 431 HGSMIHOSTFIFOENTRY *pIter; 432 RTListForEach(&pIns->hostFIFORead, pIter, HGSMIHOSTFIFOENTRY, nodeEntry) 433 { 434 Assert(pIter->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_READ)); 435 if (bCompleteFirst || pIter->offBuffer == offBuffer) 436 { 437 pEntry = pIter; 449 438 break; 450 439 } 451 452 #ifdef DEBUGVHWASTRICT453 /* guest usually completes commands in the order it receives it454 * if we're here this would typically means there is some cmd loss */455 AssertFailed();456 #endif457 458 pPrev = pEntry;459 pEntry = HGSMILISTENTRY_2_FIFOENTRY(pEntry->entry.pNext);460 440 } 461 441 … … 466 446 if (pEntry) 467 447 { 468 /* Exclude from the Read list. */ 469 hgsmiListRemove (&pIns->hostFIFORead, &pEntry->entry, pPrev? &pPrev->entry: NULL); 448 RTListNodeRemove(&pEntry->nodeEntry); 470 449 471 450 pEntry->fl &= ~HGSMI_F_HOST_FIFO_READ; 472 451 pEntry->fl |= HGSMI_F_HOST_FIFO_PROCESSED; 473 452 474 /* Save in the Processed list. */ 475 hgsmiListAppend (&pIns->hostFIFOProcessed, &pEntry->entry); 453 RTListAppend(&pIns->hostFIFOProcessed, &pEntry->nodeEntry); 476 454 477 455 hgsmiFIFOUnlock(pIns); … … 522 500 { 523 501 /* Get the host FIFO head entry. */ 524 HGSMIHOSTFIFOENTRY *pEntry = HGSMILISTENTRY_2_FIFOENTRY(pIns->hostFIFO.pHead);502 HGSMIHOSTFIFOENTRY *pEntry = RTListGetFirst(&pIns->hostFIFO, HGSMIHOSTFIFOENTRY, nodeEntry); 525 503 526 504 LogFlowFunc(("host FIFO head %p.\n", pEntry)); … … 530 508 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_QUEUED)); 531 509 532 /* Exclude from the FIFO. */ 533 hgsmiListRemove (&pIns->hostFIFO, &pEntry->entry, NULL); 534 535 if(!pIns->hostFIFO.pHead) 510 /* 511 * Move the entry to the Read list. 512 */ 513 RTListNodeRemove(&pEntry->nodeEntry); 514 515 if (RTListIsEmpty(&pIns->hostFIFO)) 536 516 { 537 517 ASMAtomicAndU32(&pIns->pHGFlags->u32HostFlags, (~HGSMIHOSTFLAGS_COMMANDS_PENDING)); … … 541 521 pEntry->fl |= HGSMI_F_HOST_FIFO_READ; 542 522 543 /* Save in the Read list. */ 544 hgsmiListAppend (&pIns->hostFIFORead, &pEntry->entry); 523 RTListAppend(&pIns->hostFIFORead, &pEntry->nodeEntry); 545 524 546 525 hgsmiFIFOUnlock(pIns); 547 Assert(pEntry->offBuffer != HGSMIOFFSET_VOID); 526 548 527 /* Return the buffer offset of the host FIFO head. */ 549 528 return pEntry->offBuffer; … … 759 738 if(RT_SUCCESS(rc)) 760 739 { 761 hgsmiListRemove (&pIns->hostFIFOProcessed, &pEntry->entry, NULL);740 RTListNodeRemove(&pEntry->nodeEntry); 762 741 hgsmiFIFOUnlock (pIns); 763 742 … … 788 767 if(RT_SUCCESS(rc)) 789 768 { 790 /* Search the Processed list for the given offMem. Also find the previous entry.*/791 HGSMIHOSTFIFOENTRY *pEntry = HGSMILISTENTRY_2_FIFOENTRY(pIns->hostFIFOProcessed.pHead);792 HGSMIHOSTFIFOENTRY *pPrev = NULL; 793 794 while (pEntry)795 { 796 Assert(p Entry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_PROCESSED));797 798 if (p Entry->offBuffer == offMem)769 /* Search the Processed list for the given offMem. */ 770 HGSMIHOSTFIFOENTRY *pEntry = NULL; 771 772 HGSMIHOSTFIFOENTRY *pIter; 773 RTListForEach(&pIns->hostFIFOProcessed, pIter, HGSMIHOSTFIFOENTRY, nodeEntry) 774 { 775 Assert(pIter->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_PROCESSED)); 776 777 if (pIter->offBuffer == offMem) 799 778 { 779 pEntry = pIter; 800 780 break; 801 781 } 802 803 pPrev = pEntry;804 pEntry = HGSMILISTENTRY_2_FIFOENTRY(pEntry->entry.pNext);805 782 } 806 783 807 784 if (pEntry) 808 785 { 809 /* Exclude from the Processed list. */ 810 hgsmiListRemove (&pIns->hostFIFOProcessed, &pEntry->entry, &pPrev->entry); 786 RTListNodeRemove(&pEntry->nodeEntry); 811 787 } 812 788 else … … 815 791 AssertFailed (); 816 792 } 817 818 793 819 794 hgsmiFIFOUnlock (pIns); … … 845 820 } 846 821 847 #define HGSMI_SET_COMMAND_PROCESSED_STATE(_pe) \848 { \849 Assert((_pe)->entry.pNext == NULL); \850 Assert((_pe)->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_PROCESSED)); \851 }852 853 822 #if 0 854 823 static DECLCALLBACK(void) hgsmiHostCommandRaiseEventCallback (void *pvCallback) … … 857 826 HGSMIHOSTFIFOENTRY *pEntry = (HGSMIHOSTFIFOENTRY *)pvCallback; 858 827 859 HGSMI_SET_COMMAND_PROCESSED_STATE(pEntry);828 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_PROCESSED)); 860 829 861 830 /* This is a simple callback, just signal the event. */ … … 869 838 HGSMIHOSTFIFOENTRY *pEntry = (HGSMIHOSTFIFOENTRY *)pvCallback; 870 839 871 HGSMI_SET_COMMAND_PROCESSED_STATE(pEntry);840 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_PROCESSED)); 872 841 873 842 /* This is a simple callback, just signal the event. */ … … 900 869 if (RT_SUCCESS (rc)) 901 870 { 902 hgsmiListAppend (&pIns->hostFIFO, &pEntry->entry);871 RTListAppend(&pIns->hostFIFO, &pEntry->nodeEntry); 903 872 ASMAtomicOrU32(&pIns->pHGFlags->u32HostFlags, HGSMIHOSTFLAGS_COMMANDS_PENDING); 904 873 … … 1179 1148 } 1180 1149 1181 static int hgsmiHostSaveFifoEntryLocked (HGSMIHOSTFIFOENTRY *pEntry, PSSMHANDLE pSSM) 1182 { 1183 SSMR3PutU32 (pSSM, pEntry->fl); 1184 return SSMR3PutU32 (pSSM, pEntry->offBuffer); 1185 } 1186 1187 static int hgsmiHostSaveFifoLocked (HGSMILIST * pFifo, PSSMHANDLE pSSM) 1150 static int hgsmiHostSaveFifoLocked(RTLISTANCHOR *pList, PSSMHANDLE pSSM) 1188 1151 { 1189 1152 VBOXHGSMI_SAVE_FIFOSTART(pSSM); 1190 uint32_t size = 0; 1191 for(HGSMILISTENTRY * pEntry = pFifo->pHead; pEntry; pEntry = pEntry->pNext) 1192 { 1193 ++size; 1194 } 1195 int rc = SSMR3PutU32 (pSSM, size); 1196 1197 for(HGSMILISTENTRY * pEntry = pFifo->pHead; pEntry && RT_SUCCESS(rc); pEntry = pEntry->pNext) 1198 { 1199 HGSMIHOSTFIFOENTRY *pFifoEntry = HGSMILISTENTRY_2_FIFOENTRY(pEntry); 1200 rc = hgsmiHostSaveFifoEntryLocked (pFifoEntry, pSSM); 1153 1154 HGSMIHOSTFIFOENTRY *pIter; 1155 1156 uint32_t cEntries = 0; 1157 RTListForEach(pList, pIter, HGSMIHOSTFIFOENTRY, nodeEntry) 1158 { 1159 ++cEntries; 1160 } 1161 1162 int rc = SSMR3PutU32(pSSM, cEntries); 1163 if (RT_SUCCESS(rc)) 1164 { 1165 RTListForEach(pList, pIter, HGSMIHOSTFIFOENTRY, nodeEntry) 1166 { 1167 SSMR3PutU32(pSSM, pIter->fl); 1168 rc = SSMR3PutU32(pSSM, pIter->offBuffer); 1169 if (RT_FAILURE(rc)) 1170 { 1171 break; 1172 } 1173 } 1201 1174 } 1202 1175 … … 1206 1179 } 1207 1180 1208 static int hgsmiHostSaveGuestCmdCompletedFifoEntryLocked (HGSMIGUESTCOMPLENTRY *pEntry, PSSMHANDLE pSSM) 1209 { 1210 return SSMR3PutU32 (pSSM, pEntry->offBuffer); 1211 } 1212 1213 static int hgsmiHostSaveGuestCmdCompletedFifoLocked (HGSMILIST * pFifo, PSSMHANDLE pSSM) 1181 static int hgsmiHostSaveGuestCmdCompletedFifoLocked(RTLISTANCHOR *pList, PSSMHANDLE pSSM) 1214 1182 { 1215 1183 VBOXHGSMI_SAVE_FIFOSTART(pSSM); 1216 uint32_t size = 0; 1217 for(HGSMILISTENTRY * pEntry = pFifo->pHead; pEntry; pEntry = pEntry->pNext) 1218 { 1219 ++size; 1220 } 1221 int rc = SSMR3PutU32 (pSSM, size); 1222 1223 for(HGSMILISTENTRY * pEntry = pFifo->pHead; pEntry && RT_SUCCESS(rc); pEntry = pEntry->pNext) 1224 { 1225 HGSMIGUESTCOMPLENTRY *pFifoEntry = HGSMILISTENTRY_2_HGSMIGUESTCOMPLENTRY(pEntry); 1226 rc = hgsmiHostSaveGuestCmdCompletedFifoEntryLocked (pFifoEntry, pSSM); 1184 1185 HGSMIGUESTCOMPLENTRY *pIter; 1186 1187 uint32_t cEntries = 0; 1188 RTListForEach(pList, pIter, HGSMIGUESTCOMPLENTRY, nodeEntry) 1189 { 1190 ++cEntries; 1191 } 1192 int rc = SSMR3PutU32(pSSM, cEntries); 1193 if (RT_SUCCESS(rc)) 1194 { 1195 RTListForEach(pList, pIter, HGSMIGUESTCOMPLENTRY, nodeEntry) 1196 { 1197 rc = SSMR3PutU32(pSSM, pIter->offBuffer); 1198 if (RT_FAILURE(rc)) 1199 { 1200 break; 1201 } 1202 } 1227 1203 } 1228 1204 … … 1252 1228 } 1253 1229 1254 static int hgsmiHostLoadFifoLocked (PHGSMIINSTANCE pIns, HGSMILIST * pFifo, PSSMHANDLE pSSM)1230 static int hgsmiHostLoadFifoLocked(PHGSMIINSTANCE pIns, RTLISTANCHOR *pList, PSSMHANDLE pSSM) 1255 1231 { 1256 1232 VBOXHGSMI_LOAD_FIFOSTART(pSSM); 1257 1233 1258 uint32_t size; 1259 int rc = SSMR3GetU32 (pSSM, &size); AssertRC(rc); 1260 if(RT_SUCCESS(rc) && size) 1261 { 1262 for(uint32_t i = 0; i < size; ++i) 1263 { 1264 HGSMIHOSTFIFOENTRY *pFifoEntry = NULL; /* initialized to shut up gcc */ 1265 rc = hgsmiHostLoadFifoEntryLocked (pIns, &pFifoEntry, pSSM); 1234 uint32_t cEntries = 0; 1235 int rc = SSMR3GetU32(pSSM, &cEntries); 1236 if (RT_SUCCESS(rc) && cEntries) 1237 { 1238 uint32_t i; 1239 for (i = 0; i < cEntries; ++i) 1240 { 1241 HGSMIHOSTFIFOENTRY *pEntry = NULL; 1242 rc = hgsmiHostLoadFifoEntryLocked(pIns, &pEntry, pSSM); 1266 1243 AssertRCBreak(rc); 1267 hgsmiListAppend (pFifo, &pFifoEntry->entry); 1244 1245 RTListAppend(pList, &pEntry->nodeEntry); 1268 1246 } 1269 1247 } … … 1289 1267 } 1290 1268 1291 static int hgsmiHostLoadGuestCmdCompletedFifoLocked (PHGSMIINSTANCE pIns, HGSMILIST * pFifo, PSSMHANDLE pSSM, uint32_t u32Version)1269 static int hgsmiHostLoadGuestCmdCompletedFifoLocked(PHGSMIINSTANCE pIns, RTLISTANCHOR *pList, PSSMHANDLE pSSM, uint32_t u32Version) 1292 1270 { 1293 1271 VBOXHGSMI_LOAD_FIFOSTART(pSSM); 1294 1272 1295 uint32_t size; 1296 int rc = SSMR3GetU32 (pSSM, &size); AssertRC(rc); 1297 if(RT_SUCCESS(rc) && size) 1273 uint32_t i; 1274 1275 uint32_t cEntries = 0; 1276 int rc = SSMR3GetU32(pSSM, &cEntries); 1277 if (RT_SUCCESS(rc) && cEntries) 1298 1278 { 1299 1279 if (u32Version > VGA_SAVEDSTATE_VERSION_INV_GCMDFIFO) 1300 1280 { 1301 for (uint32_t i = 0; i < size; ++i)1302 { 1303 HGSMIGUESTCOMPLENTRY *p FifoEntry = NULL; /* initialized to shut up gcc */1304 rc = hgsmiHostLoadGuestCmdCompletedFifoEntryLocked (pIns, &pFifoEntry, pSSM);1281 for (i = 0; i < cEntries; ++i) 1282 { 1283 HGSMIGUESTCOMPLENTRY *pEntry = NULL; 1284 rc = hgsmiHostLoadGuestCmdCompletedFifoEntryLocked(pIns, &pEntry, pSSM); 1305 1285 AssertRCBreak(rc); 1306 hgsmiListAppend (pFifo, &pFifoEntry->entry); 1286 1287 RTListAppend(pList, &pEntry->nodeEntry); 1307 1288 } 1308 1289 } … … 1311 1292 LogRel(("WARNING: the current saved state version has some 3D support data missing, " 1312 1293 "which may lead to some guest applications function improperly")); 1313 /* just read out all invalid data and discard it */ 1314 for(uint32_t i = 0; i < size; ++i) 1315 { 1316 HGSMIHOSTFIFOENTRY *pFifoEntry = NULL; /* initialized to shut up gcc */ 1317 rc = hgsmiHostLoadFifoEntryLocked (pIns, &pFifoEntry, pSSM); 1294 1295 /* Just read out all invalid data and discard it. */ 1296 for (i = 0; i < cEntries; ++i) 1297 { 1298 HGSMIHOSTFIFOENTRY *pEntry = NULL; 1299 rc = hgsmiHostLoadFifoEntryLocked(pIns, &pEntry, pSSM); 1318 1300 AssertRCBreak(rc); 1319 hgsmiHostFIFOFree (pIns, pFifoEntry); 1301 1302 hgsmiHostFIFOFree(pIns, pEntry); 1320 1303 } 1321 1304 } … … 1818 1801 pIns->pfnNotifyGuest = pfnNotifyGuest; 1819 1802 pIns->pvNotifyGuest = pvNotifyGuest; 1803 1804 RTListInit(&pIns->hostFIFO); 1805 RTListInit(&pIns->hostFIFORead); 1806 RTListInit(&pIns->hostFIFOProcessed); 1807 RTListInit(&pIns->hostFIFOFree); 1808 RTListInit(&pIns->guestCmdCompleted); 1820 1809 } 1821 1810 … … 1912 1901 if (RT_SUCCESS (rc)) 1913 1902 { 1914 hgsmiListAppend (&pIns->guestCmdCompleted, &pEntry->entry);1903 RTListAppend(&pIns->guestCmdCompleted, &pEntry->nodeEntry); 1915 1904 ASMAtomicOrU32(&pIns->pHGFlags->u32HostFlags, HGSMIHOSTFLAGS_GCOMMAND_COMPLETED); 1916 1905 -
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
r44528 r50550 26 26 #include <VBox/HGSMI/HGSMIChSetup.h> 27 27 28 struct _HGSMIINSTANCE;29 typedef struct _HGSMIINSTANCE *PHGSMIINSTANCE;28 struct HGSMIINSTANCE; 29 typedef struct HGSMIINSTANCE *PHGSMIINSTANCE; 30 30 31 31 /* Callback for the guest notification about a new host buffer. */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器