Changeset 44419 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 28, 2013 12:06:54 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83393
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ConsoleImpl.h
r44402 r44419 5 5 6 6 /* 7 * Copyright (C) 2005-201 2Oracle Corporation7 * Copyright (C) 2005-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 521 521 static DECLCALLBACK(int) configConstructor(PUVM pUVM, PVM pVM, void *pvConsole); 522 522 int configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock); 523 int configCfgmOverlay(P VM pVM, IVirtualBox *pVirtualBox, IMachine *pMachine);523 int configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine); 524 524 int configDumpAPISettingsTweaks(IVirtualBox *pVirtualBox, IMachine *pMachine); 525 525 … … 576 576 bool fForce); 577 577 578 HRESULT attachRawPCIDevices(P VM pVM, BusAssignmentManager *BusMgr, PCFGMNODE pDevices);578 HRESULT attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *BusMgr, PCFGMNODE pDevices); 579 579 void attachStatusDriver(PCFGMNODE pCtlInst, PPDMLED *papLeds, 580 580 uint64_t uFirst, uint64_t uLast, -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r44402 r44419 5 5 6 6 /* 7 * Copyright (C) 2005-201 2Oracle Corporation7 * Copyright (C) 2005-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 7549 7549 * deadlock). 7550 7550 */ 7551 std::auto_ptr<VMPowerDownTask> task(new VMPowerDownTask(that, 7552 pProgress)); 7551 std::auto_ptr<VMPowerDownTask> task(new VMPowerDownTask(that, pProgress)); 7553 7552 7554 7553 /* If creating a task failed, this can currently mean one of … … 7565 7564 7566 7565 int vrc = RTThreadCreate(NULL, Console::powerDownThread, 7567 (void *) 7566 (void *)task.get(), 0, 7568 7567 RTTHREADTYPE_MAIN_WORKER, 0, 7569 7568 "VMPwrDwn"); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r44399 r44419 479 479 480 480 #ifdef VBOX_WITH_PCI_PASSTHROUGH 481 HRESULT Console::attachRawPCIDevices(PVM pVM, 482 BusAssignmentManager *BusMgr, 483 PCFGMNODE pDevices) 481 HRESULT Console::attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *pBusMgr, PCFGMNODE pDevices) 484 482 { 485 483 HRESULT hrc = S_OK; … … 505 503 static const char *s_pszPCIRawExtPackName = "Oracle VM VirtualBox Extension Pack"; 506 504 if (!mptrExtPackManager->isExtPackUsable(s_pszPCIRawExtPackName)) 507 {508 505 /* Always fatal! */ 509 return VM SetError(pVM, VERR_NOT_FOUND, RT_SRC_POS,506 return VMR3SetError(pUVM, VERR_NOT_FOUND, RT_SRC_POS, 510 507 N_("Implementation of the PCI passthrough framework not found!\n" 511 508 "The VM cannot be started. To fix this problem, either " 512 509 "install the '%s' or disable PCI passthrough via VBoxManage"), 513 510 s_pszPCIRawExtPackName); 514 }515 511 # endif 516 512 … … 534 530 int iBase = GuestPCIAddress.miBus - 1; 535 531 536 while (! BusMgr->hasPCIDevice("ich9pcibridge", iBase) && iBase > 0)532 while (!pBusMgr->hasPCIDevice("ich9pcibridge", iBase) && iBase > 0) 537 533 { 538 534 iBridgesMissed++; iBase--; … … 544 540 InsertConfigNode(pBridges, Utf8StrFmt("%d", iBase + iBridge).c_str(), &pInst); 545 541 InsertConfigInteger(pInst, "Trusted", 1); 546 hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst);542 hrc = pBusMgr->assignPCIDevice("ich9pcibridge", pInst); 547 543 } 548 544 } … … 597 593 GuestPCIAddress.fromLong(guest); 598 594 Assert(GuestPCIAddress.valid()); 599 hrc = BusMgr->assignHostPCIDevice("pciraw", pInst, HostPCIAddress, GuestPCIAddress, true);595 hrc = pBusMgr->assignHostPCIDevice("pciraw", pInst, HostPCIAddress, GuestPCIAddress, true); 600 596 if (hrc != S_OK) 601 597 return hrc; … … 759 755 } 760 756 761 BusAssignmentManager *BusMgr = mBusMgr = BusAssignmentManager::createInstance(chipsetType);757 BusAssignmentManager *pBusMgr = mBusMgr = BusAssignmentManager::createInstance(chipsetType); 762 758 763 759 ULONG cCpus = 1; … … 1147 1143 InsertConfigNode(pDev, "0", &pInst); 1148 1144 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1149 hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst);H();1145 hrc = pBusMgr->assignPCIDevice("ich9pcibridge", pInst); H(); 1150 1146 1151 1147 InsertConfigNode(pDev, "1", &pInst); 1152 1148 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1153 hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst);H();1149 hrc = pBusMgr->assignPCIDevice("ich9pcibridge", pInst); H(); 1154 1150 1155 1151 #ifdef VBOX_WITH_PCI_PASSTHROUGH 1156 1152 /* Add PCI passthrough devices */ 1157 hrc = attachRawPCIDevices(p VM, BusMgr, pDevices);H();1153 hrc = attachRawPCIDevices(pUVM, pBusMgr, pDevices); H(); 1158 1154 #endif 1159 1155 } … … 1213 1209 InsertConfigNode(pDevices, "lpc", &pDev); 1214 1210 InsertConfigNode(pDev, "0", &pInst); 1215 hrc = BusMgr->assignPCIDevice("lpc", pInst);H();1211 hrc = pBusMgr->assignPCIDevice("lpc", pInst); H(); 1216 1212 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1217 1213 } … … 1309 1305 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1310 1306 1311 hrc = BusMgr->assignPCIDevice("vga", pInst);H();1307 hrc = pBusMgr->assignPCIDevice("vga", pInst); H(); 1312 1308 InsertConfigNode(pInst, "Config", &pCfg); 1313 1309 ULONG cVRamMBs; … … 1588 1584 case StorageControllerType_LsiLogic: 1589 1585 { 1590 hrc = BusMgr->assignPCIDevice("lsilogic", pCtlInst);H();1586 hrc = pBusMgr->assignPCIDevice("lsilogic", pCtlInst); H(); 1591 1587 1592 1588 InsertConfigInteger(pCfg, "Bootable", fBootable); … … 1602 1598 case StorageControllerType_BusLogic: 1603 1599 { 1604 hrc = BusMgr->assignPCIDevice("buslogic", pCtlInst);H();1600 hrc = pBusMgr->assignPCIDevice("buslogic", pCtlInst); H(); 1605 1601 1606 1602 InsertConfigInteger(pCfg, "Bootable", fBootable); … … 1616 1612 case StorageControllerType_IntelAhci: 1617 1613 { 1618 hrc = BusMgr->assignPCIDevice("ahci", pCtlInst);H();1614 hrc = pBusMgr->assignPCIDevice("ahci", pCtlInst); H(); 1619 1615 1620 1616 ULONG cPorts = 0; … … 1624 1620 1625 1621 /* Needed configuration values for the bios, only first controller. */ 1626 if (! BusMgr->hasPCIDevice("ahci", 1))1622 if (!pBusMgr->hasPCIDevice("ahci", 1)) 1627 1623 { 1628 1624 #define MAX_SATA_LUN_COUNT 4 … … 1713 1709 * IDE (update this when the main interface changes) 1714 1710 */ 1715 hrc = BusMgr->assignPCIDevice("piix3ide", pCtlInst);H();1711 hrc = pBusMgr->assignPCIDevice("piix3ide", pCtlInst); H(); 1716 1712 InsertConfigString(pCfg, "Type", controllerString(enmCtrlType)); 1717 1713 /* Attach the status driver */ … … 1749 1745 case StorageControllerType_LsiLogicSas: 1750 1746 { 1751 hrc = BusMgr->assignPCIDevice("lsilogicsas", pCtlInst);H();1747 hrc = pBusMgr->assignPCIDevice("lsilogicsas", pCtlInst); H(); 1752 1748 1753 1749 InsertConfigString(pCfg, "ControllerType", "SAS1068"); … … 1898 1894 #endif 1899 1895 PCIBusAddress PCIAddr = PCIBusAddress(0, iPCIDeviceNo, 0); 1900 hrc = BusMgr->assignPCIDevice(pszAdapterName, pInst, PCIAddr);H();1896 hrc = pBusMgr->assignPCIDevice(pszAdapterName, pInst, PCIAddr); H(); 1901 1897 1902 1898 InsertConfigNode(pInst, "Config", &pCfg); … … 2131 2127 InsertConfigNode(pInst, "Config", &pCfg); 2132 2128 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2133 hrc = BusMgr->assignPCIDevice("VMMDev", pInst);H();2129 hrc = pBusMgr->assignPCIDevice("VMMDev", pInst); H(); 2134 2130 2135 2131 Bstr hwVersion; … … 2188 2184 InsertConfigNode(pDev, "0", &pInst); 2189 2185 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2190 hrc = BusMgr->assignPCIDevice("ichac97", pInst);H();2186 hrc = pBusMgr->assignPCIDevice("ichac97", pInst); H(); 2191 2187 InsertConfigNode(pInst, "Config", &pCfg); 2192 2188 break; … … 2212 2208 InsertConfigNode(pDev, "0", &pInst); 2213 2209 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2214 hrc = BusMgr->assignPCIDevice("hda", pInst);H();2210 hrc = pBusMgr->assignPCIDevice("hda", pInst); H(); 2215 2211 InsertConfigNode(pInst, "Config", &pCfg); 2216 2212 } … … 2311 2307 InsertConfigNode(pInst, "Config", &pCfg); 2312 2308 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2313 hrc = BusMgr->assignPCIDevice("usb-ohci", pInst);H();2309 hrc = pBusMgr->assignPCIDevice("usb-ohci", pInst); H(); 2314 2310 InsertConfigNode(pInst, "LUN#0", &pLunL0); 2315 2311 InsertConfigString(pLunL0, "Driver", "VUSBRootHub"); … … 2343 2339 InsertConfigNode(pInst, "Config", &pCfg); 2344 2340 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2345 hrc = BusMgr->assignPCIDevice("usb-ehci", pInst);H();2341 hrc = pBusMgr->assignPCIDevice("usb-ehci", pInst); H(); 2346 2342 2347 2343 InsertConfigNode(pInst, "LUN#0", &pLunL0); … … 2691 2687 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2692 2688 InsertConfigNode(pInst, "Config", &pCfg); 2693 hrc = BusMgr->assignPCIDevice("acpi", pInst);H();2689 hrc = pBusMgr->assignPCIDevice("acpi", pInst); H(); 2694 2690 2695 2691 InsertConfigInteger(pCfg, "RamSize", cbRam); … … 2711 2707 { 2712 2708 PCIBusAddress Address; 2713 if ( BusMgr->findPCIAddress("hda", 0, Address))2709 if (pBusMgr->findPCIAddress("hda", 0, Address)) 2714 2710 { 2715 2711 uint32_t u32AudioPCIAddr = (Address.miDevice << 16) | Address.miFn; … … 2819 2815 */ 2820 2816 if (RT_SUCCESS(rc)) 2821 rc = configCfgmOverlay(p VM, virtualBox, pMachine);2817 rc = configCfgmOverlay(pRoot, virtualBox, pMachine); 2822 2818 2823 2819 /* … … 2865 2861 */ 2866 2862 /* static */ 2867 int Console::configCfgmOverlay(P VM pVM, IVirtualBox *pVirtualBox, IMachine *pMachine)2863 int Console::configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine) 2868 2864 { 2869 2865 /* … … 2880 2876 * extra data to support global settings with local overrides. 2881 2877 */ 2882 PCFGMNODE pRoot = CFGMR3GetRoot(pVM); 2883 int rc = VINF_SUCCESS; 2878 int rc = VINF_SUCCESS; 2884 2879 try 2885 2880 {
Note:
See TracChangeset
for help on using the changeset viewer.