Changeset 36053 in vbox for trunk/src/VBox
- Timestamp:
- Feb 22, 2011 2:52:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r36041 r36053 471 471 return hrc; 472 472 473 PCFGMNODE pBridges = CFGMR3GetChild(pDevices, "ich9pcibridge"); 474 Assert(pBridges); 475 476 /* Find required bridges, and add missing ones */ 477 for (size_t iDev = 0; iDev < assignments.size(); iDev++) 478 { 479 ComPtr<IPciDeviceAttachment> assignment = assignments[iDev]; 480 LONG guest = 0; 481 PciBusAddress GuestPciAddress; 482 483 assignment->COMGETTER(GuestAddress)(&guest); 484 GuestPciAddress.fromLong(guest); 485 Assert(GuestPciAddress.valid()); 486 487 if (GuestPciAddress.iBus > 0) 488 { 489 int iBridgesMissed = 0; 490 int iBase = GuestPciAddress.iBus - 1; 491 492 while (!BusMgr->hasPciDevice("ich9pcibridge", iBase) && iBase > 0) 493 { 494 iBridgesMissed++; iBase--; 495 } 496 iBase++; 497 498 for (int iBridge = 0; iBridge < iBridgesMissed; iBridge++) 499 { 500 InsertConfigNode(pBridges, Utf8StrFmt("%d", iBase + iBridge).c_str(), &pInst); 501 InsertConfigInteger(pInst, "Trusted", 1); 502 hrc = BusMgr->assignPciDevice("ich9pcibridge", pInst); 503 } 504 } 505 } 506 507 /* Now actually add devices */ 473 508 for (size_t iDev = 0; iDev < assignments.size(); iDev++) 474 509 { … … 500 535 if (hrc != S_OK) 501 536 return hrc; 537 502 538 InsertConfigInteger(pCfg, "GuestPCIBusNo", GuestPciAddress.iBus); 503 539 InsertConfigInteger(pCfg, "GuestPCIDeviceNo", GuestPciAddress.iDevice);
Note:
See TracChangeset
for help on using the changeset viewer.