Changeset 42551 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Aug 2, 2012 4:44:39 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 79727
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/BusAssignmentManager.cpp
r37423 r42551 7 7 8 8 /* 9 * Copyright (C) 2010 Oracle Corporation9 * Copyright (C) 2010-2012 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 27 27 28 #include "P ciDeviceAttachmentImpl.h"28 #include "PCIDeviceAttachmentImpl.h" 29 29 30 30 #include <map> … … 217 217 struct BusAssignmentManager::State 218 218 { 219 struct P ciDeviceRecord219 struct PCIDeviceRecord 220 220 { 221 221 char szDevName[32]; 222 P ciBusAddress HostAddress;223 224 P ciDeviceRecord(const char* pszName, PciBusAddress aHostAddress)222 PCIBusAddress HostAddress; 223 224 PCIDeviceRecord(const char* pszName, PCIBusAddress aHostAddress) 225 225 { 226 226 RTStrCopy(this->szDevName, sizeof(szDevName), pszName); … … 228 228 } 229 229 230 P ciDeviceRecord(const char* pszName)230 PCIDeviceRecord(const char* pszName) 231 231 { 232 232 RTStrCopy(this->szDevName, sizeof(szDevName), pszName); 233 233 } 234 234 235 bool operator<(const P ciDeviceRecord &a) const235 bool operator<(const PCIDeviceRecord &a) const 236 236 { 237 237 return RTStrNCmp(szDevName, a.szDevName, sizeof(szDevName)) < 0; 238 238 } 239 239 240 bool operator==(const P ciDeviceRecord &a) const240 bool operator==(const PCIDeviceRecord &a) const 241 241 { 242 242 return RTStrNCmp(szDevName, a.szDevName, sizeof(szDevName)) == 0; … … 244 244 }; 245 245 246 typedef std::map <P ciBusAddress,PciDeviceRecord > PciMap;247 typedef std::vector<P ciBusAddress> PciAddrList;248 typedef std::vector<const DeviceAssignmentRule*> P ciRulesList;249 typedef std::map <P ciDeviceRecord,PciAddrList > ReversePciMap;246 typedef std::map <PCIBusAddress,PCIDeviceRecord > PCIMap; 247 typedef std::vector<PCIBusAddress> PCIAddrList; 248 typedef std::vector<const DeviceAssignmentRule*> PCIRulesList; 249 typedef std::map <PCIDeviceRecord,PCIAddrList > ReversePCIMap; 250 250 251 251 volatile int32_t cRefCnt; 252 252 ChipsetType_T mChipsetType; 253 P ciMap mPciMap;254 ReverseP ciMap mReversePciMap;253 PCIMap mPCIMap; 254 ReversePCIMap mReversePCIMap; 255 255 256 256 State() … … 262 262 HRESULT init(ChipsetType_T chipsetType); 263 263 264 HRESULT record(const char* pszName, P ciBusAddress& GuestAddress, PciBusAddress HostAddress);265 HRESULT autoAssign(const char* pszName, P ciBusAddress& Address);266 bool checkAvailable(P ciBusAddress& Address);267 bool findP ciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address);264 HRESULT record(const char* pszName, PCIBusAddress& GuestAddress, PCIBusAddress HostAddress); 265 HRESULT autoAssign(const char* pszName, PCIBusAddress& Address); 266 bool checkAvailable(PCIBusAddress& Address); 267 bool findPCIAddress(const char* pszDevName, int iInstance, PCIBusAddress& Address); 268 268 269 269 const char* findAlias(const char* pszName); 270 void addMatchingRules(const char* pszName, P ciRulesList& aList);271 void listAttachedP ciDevices(ComSafeArrayOut(IPciDeviceAttachment*, aAttached));270 void addMatchingRules(const char* pszName, PCIRulesList& aList); 271 void listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached)); 272 272 }; 273 273 … … 278 278 } 279 279 280 HRESULT BusAssignmentManager::State::record(const char* pszName, P ciBusAddress& Address, PciBusAddress HostAddress)281 { 282 P ciDeviceRecord devRec(pszName, HostAddress);280 HRESULT BusAssignmentManager::State::record(const char* pszName, PCIBusAddress& Address, PCIBusAddress HostAddress) 281 { 282 PCIDeviceRecord devRec(pszName, HostAddress); 283 283 284 284 /* Remember address -> device mapping */ 285 mP ciMap.insert(PciMap::value_type(Address, devRec));286 287 ReverseP ciMap::iterator it = mReversePciMap.find(devRec);288 if (it == mReverseP ciMap.end())289 { 290 mReverseP ciMap.insert(ReversePciMap::value_type(devRec, PciAddrList()));291 it = mReverseP ciMap.find(devRec);285 mPCIMap.insert(PCIMap::value_type(Address, devRec)); 286 287 ReversePCIMap::iterator it = mReversePCIMap.find(devRec); 288 if (it == mReversePCIMap.end()) 289 { 290 mReversePCIMap.insert(ReversePCIMap::value_type(devRec, PCIAddrList())); 291 it = mReversePCIMap.find(devRec); 292 292 } 293 293 … … 298 298 } 299 299 300 bool BusAssignmentManager::State::findP ciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address)301 { 302 P ciDeviceRecord devRec(pszDevName);303 304 ReverseP ciMap::iterator it = mReversePciMap.find(devRec);305 if (it == mReverseP ciMap.end())300 bool BusAssignmentManager::State::findPCIAddress(const char* pszDevName, int iInstance, PCIBusAddress& Address) 301 { 302 PCIDeviceRecord devRec(pszDevName); 303 304 ReversePCIMap::iterator it = mReversePCIMap.find(devRec); 305 if (it == mReversePCIMap.end()) 306 306 return false; 307 307 … … 313 313 } 314 314 315 void BusAssignmentManager::State::addMatchingRules(const char* pszName, P ciRulesList& aList)315 void BusAssignmentManager::State::addMatchingRules(const char* pszName, PCIRulesList& aList) 316 316 { 317 317 size_t iRuleset, iRule; … … 359 359 } 360 360 361 HRESULT BusAssignmentManager::State::autoAssign(const char* pszName, P ciBusAddress& Address)362 { 363 P ciRulesList matchingRules;361 HRESULT BusAssignmentManager::State::autoAssign(const char* pszName, PCIBusAddress& Address) 362 { 363 PCIRulesList matchingRules; 364 364 365 365 addMatchingRules(pszName, matchingRules); … … 388 388 } 389 389 390 bool BusAssignmentManager::State::checkAvailable(P ciBusAddress& Address)391 { 392 P ciMap::const_iterator it = mPciMap.find(Address);393 394 return (it == mP ciMap.end());395 } 396 397 398 void BusAssignmentManager::State::listAttachedP ciDevices(ComSafeArrayOut(IPciDeviceAttachment*, aAttached))399 { 400 com::SafeIfaceArray<IP ciDeviceAttachment> result(mPciMap.size());390 bool BusAssignmentManager::State::checkAvailable(PCIBusAddress& Address) 391 { 392 PCIMap::const_iterator it = mPCIMap.find(Address); 393 394 return (it == mPCIMap.end()); 395 } 396 397 398 void BusAssignmentManager::State::listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached)) 399 { 400 com::SafeIfaceArray<IPCIDeviceAttachment> result(mPCIMap.size()); 401 401 402 402 size_t iIndex = 0; 403 ComObjPtr<P ciDeviceAttachment> dev;404 for (P ciMap::const_iterator it = mPciMap.begin(); it != mPciMap.end(); ++it)403 ComObjPtr<PCIDeviceAttachment> dev; 404 for (PCIMap::const_iterator it = mPCIMap.begin(); it != mPCIMap.end(); ++it) 405 405 { 406 406 dev.createObject(); … … 458 458 } 459 459 460 HRESULT BusAssignmentManager::assignP ciDeviceImpl(const char* pszDevName,460 HRESULT BusAssignmentManager::assignPCIDeviceImpl(const char* pszDevName, 461 461 PCFGMNODE pCfg, 462 P ciBusAddress& GuestAddress,463 P ciBusAddress HostAddress,462 PCIBusAddress& GuestAddress, 463 PCIBusAddress HostAddress, 464 464 bool fGuestAddressRequired) 465 465 { … … 504 504 505 505 506 bool BusAssignmentManager::findP ciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address)507 { 508 return pState->findP ciAddress(pszDevName, iInstance, Address);509 } 510 511 void BusAssignmentManager::listAttachedP ciDevices(ComSafeArrayOut(IPciDeviceAttachment*, aAttached))512 { 513 pState->listAttachedP ciDevices(ComSafeArrayOutArg(aAttached));514 } 506 bool BusAssignmentManager::findPCIAddress(const char* pszDevName, int iInstance, PCIBusAddress& Address) 507 { 508 return pState->findPCIAddress(pszDevName, iInstance, Address); 509 } 510 511 void BusAssignmentManager::listAttachedPCIDevices(ComSafeArrayOut(IPCIDeviceAttachment*, aAttached)) 512 { 513 pState->listAttachedPCIDevices(ComSafeArrayOutArg(aAttached)); 514 } -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r42382 r42551 325 325 Bstr hostIp, guestIp; 326 326 LONG hostPort, guestPort; 327 pNREv->COMGETTER(HostI p)(hostIp.asOutParam());327 pNREv->COMGETTER(HostIP)(hostIp.asOutParam()); 328 328 pNREv->COMGETTER(HostPort)(&hostPort); 329 pNREv->COMGETTER(GuestI p)(guestIp.asOutParam());329 pNREv->COMGETTER(GuestIP)(guestIp.asOutParam()); 330 330 pNREv->COMGETTER(GuestPort)(&guestPort); 331 331 ULONG ulSlot; … … 338 338 break; 339 339 340 case VBoxEventType_OnHostP ciDevicePlug:340 case VBoxEventType_OnHostPCIDevicePlug: 341 341 { 342 342 // handle if needed … … 555 555 com::SafeArray<VBoxEventType_T> eventTypes; 556 556 eventTypes.push_back(VBoxEventType_OnNATRedirect); 557 eventTypes.push_back(VBoxEventType_OnHostP ciDevicePlug);557 eventTypes.push_back(VBoxEventType_OnHostPCIDevicePlug); 558 558 rc = pES->RegisterListener(aVmListener, ComSafeArrayAsInParam(eventTypes), true); 559 559 AssertComRC(rc); … … 1923 1923 } 1924 1924 1925 STDMETHODIMP Console::COMGETTER(AttachedP ciDevices)(ComSafeArrayOut(IPciDeviceAttachment *, aAttachments))1925 STDMETHODIMP Console::COMGETTER(AttachedPCIDevices)(ComSafeArrayOut(IPCIDeviceAttachment *, aAttachments)) 1926 1926 { 1927 1927 CheckComArgOutSafeArrayPointerValid(aAttachments); … … 1933 1933 1934 1934 if (mBusMgr) 1935 mBusMgr->listAttachedP ciDevices(ComSafeArrayOutArg(aAttachments));1935 mBusMgr->listAttachedPCIDevices(ComSafeArrayOutArg(aAttachments)); 1936 1936 else 1937 1937 { 1938 com::SafeIfaceArray<IP ciDeviceAttachment> result((size_t)0);1938 com::SafeIfaceArray<IPCIDeviceAttachment> result((size_t)0); 1939 1939 result.detachTo(ComSafeArrayOutArg(aAttachments)); 1940 1940 } … … 3775 3775 fUseHostIOCache, 3776 3776 false /* fSetupMerge */, 3777 false /* fBuiltinI oCache */,3777 false /* fBuiltinIOCache */, 3778 3778 0 /* uMergeSource */, 3779 3779 0 /* uMergeTarget */, … … 4020 4020 fUseHostIOCache, 4021 4021 false /* fSetupMerge */, 4022 false /* fBuiltinI oCache */,4022 false /* fBuiltinIOCache */, 4023 4023 0 /* uMergeSource */, 4024 4024 0 /* uMergeTarget */, … … 4436 4436 */ 4437 4437 HRESULT Console::onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove, 4438 NATProtocol_T aProto, IN_BSTR aHostI p, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort)4438 NATProtocol_T aProto, IN_BSTR aHostIP, LONG aHostPort, IN_BSTR aGuestIP, LONG aGuestPort) 4439 4439 { 4440 4440 LogFlowThisFunc(("\n")); … … 4507 4507 bool fUdp = aProto == NATProtocol_UDP; 4508 4508 vrc = pNetNatCfg->pfnRedirectRuleCommand(pNetNatCfg, !!aNatRuleRemove, fUdp, 4509 Utf8Str(aHostI p).c_str(), aHostPort, Utf8Str(aGuestIp).c_str(),4509 Utf8Str(aHostIP).c_str(), aHostPort, Utf8Str(aGuestIP).c_str(), 4510 4510 aGuestPort); 4511 4511 if (RT_FAILURE(vrc)) … … 5558 5558 /** @todo AssertComRC -> AssertComRCReturn! Could potentially end up 5559 5559 * using uninitialized variables here. */ 5560 BOOL fBuiltinI oCache;5561 rc = mMachine->COMGETTER(I oCacheEnabled)(&fBuiltinIoCache);5560 BOOL fBuiltinIOCache; 5561 rc = mMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache); 5562 5562 AssertComRC(rc); 5563 5563 SafeIfaceArray<IStorageController> ctrls; … … 5643 5643 enmBus, 5644 5644 fUseHostIOCache, 5645 fBuiltinI oCache,5645 fBuiltinIOCache, 5646 5646 true /* fSetupMerge */, 5647 5647 aSourceIdx, … … 5719 5719 enmBus, 5720 5720 fUseHostIOCache, 5721 fBuiltinI oCache,5721 fBuiltinIOCache, 5722 5722 false /* fSetupMerge */, 5723 5723 0 /* uMergeSource */, … … 9096 9096 StorageBus_T enmBus, 9097 9097 bool fUseHostIOCache, 9098 bool fBuiltinI oCache,9098 bool fBuiltinIOCache, 9099 9099 bool fSetupMerge, 9100 9100 unsigned uMergeSource, … … 9131 9131 enmBus, 9132 9132 fUseHostIOCache, 9133 fBuiltinI oCache,9133 fBuiltinIOCache, 9134 9134 fSetupMerge, 9135 9135 uMergeSource, … … 9314 9314 const char *pcszDevice = Console::convertControllerTypeToDev(enmController); 9315 9315 9316 BOOL fBuiltinI oCache;9317 rc = that->mMachine->COMGETTER(I oCacheEnabled)(&fBuiltinIoCache);9316 BOOL fBuiltinIOCache; 9317 rc = that->mMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache); 9318 9318 if (FAILED(rc)) 9319 9319 throw rc; … … 9333 9333 enmBus, 9334 9334 fUseHostIOCache, 9335 fBuiltinI oCache,9335 fBuiltinIOCache, 9336 9336 false /* fSetupMerge */, 9337 9337 0 /* uMergeSource */, -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r42437 r42551 38 38 #include "Global.h" 39 39 #ifdef VBOX_WITH_PCI_PASSTHROUGH 40 # include "P ciRawDevImpl.h"40 # include "PCIRawDevImpl.h" 41 41 #endif 42 42 … … 217 217 { 218 218 ULONG mInstance; 219 P ciBusAddress mPciAddress;219 PCIBusAddress mPCIAddress; 220 220 221 221 ULONG mBootPrio; … … 466 466 467 467 #ifdef VBOX_WITH_PCI_PASSTHROUGH 468 HRESULT Console::attachRawP ciDevices(PVM pVM,468 HRESULT Console::attachRawPCIDevices(PVM pVM, 469 469 BusAssignmentManager *BusMgr, 470 470 PCFGMNODE pDevices) … … 473 473 PCFGMNODE pInst, pCfg, pLunL0, pLunL1; 474 474 475 SafeIfaceArray<IP ciDeviceAttachment> assignments;475 SafeIfaceArray<IPCIDeviceAttachment> assignments; 476 476 ComPtr<IMachine> aMachine = machine(); 477 477 478 hrc = aMachine->COMGETTER(P ciDeviceAssignments)(ComSafeArrayAsOutParam(assignments));478 hrc = aMachine->COMGETTER(PCIDeviceAssignments)(ComSafeArrayAsOutParam(assignments)); 479 479 if ( hrc != S_OK 480 480 || assignments.size() < 1) … … 490 490 */ 491 491 # ifdef VBOX_WITH_EXTPACK 492 static const char *s_pszP ciRawExtPackName = "Oracle VM VirtualBox Extension Pack";493 if (!mptrExtPackManager->isExtPackUsable(s_pszP ciRawExtPackName))492 static const char *s_pszPCIRawExtPackName = "Oracle VM VirtualBox Extension Pack"; 493 if (!mptrExtPackManager->isExtPackUsable(s_pszPCIRawExtPackName)) 494 494 { 495 495 /* Always fatal! */ … … 498 498 "The VM cannot be started. To fix this problem, either " 499 499 "install the '%s' or disable PCI passthrough via VBoxManage"), 500 s_pszP ciRawExtPackName);500 s_pszPCIRawExtPackName); 501 501 } 502 502 # endif … … 508 508 for (size_t iDev = 0; iDev < assignments.size(); iDev++) 509 509 { 510 ComPtr<IP ciDeviceAttachment> assignment = assignments[iDev];510 ComPtr<IPCIDeviceAttachment> assignment = assignments[iDev]; 511 511 LONG guest = 0; 512 P ciBusAddress GuestPciAddress;512 PCIBusAddress GuestPCIAddress; 513 513 514 514 assignment->COMGETTER(GuestAddress)(&guest); 515 GuestP ciAddress.fromLong(guest);516 Assert(GuestP ciAddress.valid());517 518 if (GuestP ciAddress.miBus > 0)515 GuestPCIAddress.fromLong(guest); 516 Assert(GuestPCIAddress.valid()); 517 518 if (GuestPCIAddress.miBus > 0) 519 519 { 520 520 int iBridgesMissed = 0; 521 int iBase = GuestP ciAddress.miBus - 1;522 523 while (!BusMgr->hasP ciDevice("ich9pcibridge", iBase) && iBase > 0)521 int iBase = GuestPCIAddress.miBus - 1; 522 523 while (!BusMgr->hasPCIDevice("ich9pcibridge", iBase) && iBase > 0) 524 524 { 525 525 iBridgesMissed++; iBase--; … … 531 531 InsertConfigNode(pBridges, Utf8StrFmt("%d", iBase + iBridge).c_str(), &pInst); 532 532 InsertConfigInteger(pInst, "Trusted", 1); 533 hrc = BusMgr->assignP ciDevice("ich9pcibridge", pInst);533 hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst); 534 534 } 535 535 } … … 537 537 538 538 /* Now actually add devices */ 539 PCFGMNODE pP ciDevs = NULL;539 PCFGMNODE pPCIDevs = NULL; 540 540 541 541 if (assignments.size() > 0) 542 542 { 543 InsertConfigNode(pDevices, "pciraw", &pP ciDevs);543 InsertConfigNode(pDevices, "pciraw", &pPCIDevs); 544 544 545 545 PCFGMNODE pRoot = CFGMR3GetParent(pDevices); Assert(pRoot); 546 546 547 /* Tell PGM to tell GP ciRaw about guest mappings. */547 /* Tell PGM to tell GPCIRaw about guest mappings. */ 548 548 CFGMR3InsertNode(pRoot, "PGM", NULL); 549 549 InsertConfigInteger(CFGMR3GetChild(pRoot, "PGM"), "PciPassThrough", 1); … … 560 560 for (size_t iDev = 0; iDev < assignments.size(); iDev++) 561 561 { 562 P ciBusAddress HostPciAddress, GuestPciAddress;563 ComPtr<IP ciDeviceAttachment> assignment = assignments[iDev];562 PCIBusAddress HostPCIAddress, GuestPCIAddress; 563 ComPtr<IPCIDeviceAttachment> assignment = assignments[iDev]; 564 564 LONG host, guest; 565 565 Bstr aDevName; … … 569 569 assignment->COMGETTER(Name)(aDevName.asOutParam()); 570 570 571 InsertConfigNode(pP ciDevs, Utf8StrFmt("%d", iDev).c_str(), &pInst);571 InsertConfigNode(pPCIDevs, Utf8StrFmt("%d", iDev).c_str(), &pInst); 572 572 InsertConfigInteger(pInst, "Trusted", 1); 573 573 574 HostP ciAddress.fromLong(host);575 Assert(HostP ciAddress.valid());574 HostPCIAddress.fromLong(host); 575 Assert(HostPCIAddress.valid()); 576 576 InsertConfigNode(pInst, "Config", &pCfg); 577 577 InsertConfigString(pCfg, "DeviceName", aDevName); 578 578 579 579 InsertConfigInteger(pCfg, "DetachHostDriver", 1); 580 InsertConfigInteger(pCfg, "HostPCIBusNo", HostP ciAddress.miBus);581 InsertConfigInteger(pCfg, "HostPCIDeviceNo", HostP ciAddress.miDevice);582 InsertConfigInteger(pCfg, "HostPCIFunctionNo", HostP ciAddress.miFn);583 584 GuestP ciAddress.fromLong(guest);585 Assert(GuestP ciAddress.valid());586 hrc = BusMgr->assignHostP ciDevice("pciraw", pInst, HostPciAddress, GuestPciAddress, true);580 InsertConfigInteger(pCfg, "HostPCIBusNo", HostPCIAddress.miBus); 581 InsertConfigInteger(pCfg, "HostPCIDeviceNo", HostPCIAddress.miDevice); 582 InsertConfigInteger(pCfg, "HostPCIFunctionNo", HostPCIAddress.miFn); 583 584 GuestPCIAddress.fromLong(guest); 585 Assert(GuestPCIAddress.valid()); 586 hrc = BusMgr->assignHostPCIDevice("pciraw", pInst, HostPCIAddress, GuestPCIAddress, true); 587 587 if (hrc != S_OK) 588 588 return hrc; 589 589 590 InsertConfigInteger(pCfg, "GuestPCIBusNo", GuestP ciAddress.miBus);591 InsertConfigInteger(pCfg, "GuestPCIDeviceNo", GuestP ciAddress.miDevice);592 InsertConfigInteger(pCfg, "GuestPCIFunctionNo", GuestP ciAddress.miFn);590 InsertConfigInteger(pCfg, "GuestPCIBusNo", GuestPCIAddress.miBus); 591 InsertConfigInteger(pCfg, "GuestPCIDeviceNo", GuestPCIAddress.miDevice); 592 InsertConfigInteger(pCfg, "GuestPCIFunctionNo", GuestPCIAddress.miFn); 593 593 594 594 /* the driver */ … … 600 600 InsertConfigString(pLunL1, "Driver", "MainPciRaw"); 601 601 InsertConfigNode(pLunL1, "Config", &pCfg); 602 P ciRawDev* pMainDev = new PciRawDev(this);602 PCIRawDev* pMainDev = new PCIRawDev(this); 603 603 InsertConfigInteger(pCfg, "Object", (uintptr_t)pMainDev); 604 604 } … … 1002 1002 /* I/O cache size */ 1003 1003 ULONG ioCacheSize = 5; 1004 hrc = pMachine->COMGETTER(I oCacheSize)(&ioCacheSize); H();1004 hrc = pMachine->COMGETTER(IOCacheSize)(&ioCacheSize); H(); 1005 1005 InsertConfigInteger(pPDMBlkCache, "CacheSize", ioCacheSize * _1M); 1006 1006 … … 1100 1100 * PCI buses. 1101 1101 */ 1102 uint32_t uIocP ciAddress, uHbcPciAddress;1102 uint32_t uIocPCIAddress, uHbcPCIAddress; 1103 1103 switch (chipsetType) 1104 1104 { … … 1107 1107 case ChipsetType_PIIX3: 1108 1108 InsertConfigNode(pDevices, "pci", &pDev); 1109 uHbcP ciAddress = (0x0 << 16) | 0;1110 uIocP ciAddress = (0x1 << 16) | 0; // ISA controller1109 uHbcPCIAddress = (0x0 << 16) | 0; 1110 uIocPCIAddress = (0x1 << 16) | 0; // ISA controller 1111 1111 break; 1112 1112 case ChipsetType_ICH9: 1113 1113 InsertConfigNode(pDevices, "ich9pci", &pDev); 1114 uHbcP ciAddress = (0x1e << 16) | 0;1115 uIocP ciAddress = (0x1f << 16) | 0; // LPC controller1114 uHbcPCIAddress = (0x1e << 16) | 0; 1115 uIocPCIAddress = (0x1f << 16) | 0; // LPC controller 1116 1116 break; 1117 1117 } … … 1131 1131 InsertConfigNode(pDev, "0", &pInst); 1132 1132 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1133 hrc = BusMgr->assignP ciDevice("ich9pcibridge", pInst); H();1133 hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst); H(); 1134 1134 1135 1135 InsertConfigNode(pDev, "1", &pInst); 1136 1136 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1137 hrc = BusMgr->assignP ciDevice("ich9pcibridge", pInst); H();1137 hrc = BusMgr->assignPCIDevice("ich9pcibridge", pInst); H(); 1138 1138 1139 1139 #ifdef VBOX_WITH_PCI_PASSTHROUGH 1140 1140 /* Add PCI passthrough devices */ 1141 hrc = attachRawP ciDevices(pVM, BusMgr, pDevices); H();1141 hrc = attachRawPCIDevices(pVM, BusMgr, pDevices); H(); 1142 1142 #endif 1143 1143 } … … 1150 1150 * High Precision Event Timer (HPET) 1151 1151 */ 1152 BOOL fH petEnabled;1152 BOOL fHPETEnabled; 1153 1153 /* Other guests may wish to use HPET too, but MacOS X not functional without it */ 1154 hrc = pMachine->COMGETTER(H petEnabled)(&fHpetEnabled); H();1154 hrc = pMachine->COMGETTER(HPETEnabled)(&fHPETEnabled); H(); 1155 1155 /* so always enable HPET in extended profile */ 1156 fH petEnabled |= fOsXGuest;1156 fHPETEnabled |= fOsXGuest; 1157 1157 /* HPET is always present on ICH9 */ 1158 fH petEnabled |= (chipsetType == ChipsetType_ICH9);1159 if (fH petEnabled)1158 fHPETEnabled |= (chipsetType == ChipsetType_ICH9); 1159 if (fHPETEnabled) 1160 1160 { 1161 1161 InsertConfigNode(pDevices, "hpet", &pDev); … … 1197 1197 InsertConfigNode(pDevices, "lpc", &pDev); 1198 1198 InsertConfigNode(pDev, "0", &pInst); 1199 hrc = BusMgr->assignP ciDevice("lpc", pInst); H();1199 hrc = BusMgr->assignPCIDevice("lpc", pInst); H(); 1200 1200 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1201 1201 } … … 1293 1293 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1294 1294 1295 hrc = BusMgr->assignP ciDevice("vga", pInst); H();1295 hrc = BusMgr->assignPCIDevice("vga", pInst); H(); 1296 1296 InsertConfigNode(pInst, "Config", &pCfg); 1297 1297 ULONG cVRamMBs; … … 1564 1564 case StorageControllerType_LsiLogic: 1565 1565 { 1566 hrc = BusMgr->assignP ciDevice("lsilogic", pCtlInst); H();1566 hrc = BusMgr->assignPCIDevice("lsilogic", pCtlInst); H(); 1567 1567 1568 1568 InsertConfigInteger(pCfg, "Bootable", fBootable); … … 1578 1578 case StorageControllerType_BusLogic: 1579 1579 { 1580 hrc = BusMgr->assignP ciDevice("buslogic", pCtlInst); H();1580 hrc = BusMgr->assignPCIDevice("buslogic", pCtlInst); H(); 1581 1581 1582 1582 InsertConfigInteger(pCfg, "Bootable", fBootable); … … 1592 1592 case StorageControllerType_IntelAhci: 1593 1593 { 1594 hrc = BusMgr->assignP ciDevice("ahci", pCtlInst); H();1594 hrc = BusMgr->assignPCIDevice("ahci", pCtlInst); H(); 1595 1595 1596 1596 ULONG cPorts = 0; … … 1600 1600 1601 1601 /* Needed configuration values for the bios, only first controller. */ 1602 if (!BusMgr->hasP ciDevice("ahci", 1))1602 if (!BusMgr->hasPCIDevice("ahci", 1)) 1603 1603 { 1604 1604 if (pBiosCfg) … … 1635 1635 * IDE (update this when the main interface changes) 1636 1636 */ 1637 hrc = BusMgr->assignP ciDevice("piix3ide", pCtlInst); H();1637 hrc = BusMgr->assignPCIDevice("piix3ide", pCtlInst); H(); 1638 1638 InsertConfigString(pCfg, "Type", controllerString(enmCtrlType)); 1639 1639 /* Attach the status driver */ … … 1671 1671 case StorageControllerType_LsiLogicSas: 1672 1672 { 1673 hrc = BusMgr->assignP ciDevice("lsilogicsas", pCtlInst); H();1673 hrc = BusMgr->assignPCIDevice("lsilogicsas", pCtlInst); H(); 1674 1674 1675 1675 InsertConfigString(pCfg, "ControllerType", "SAS1068"); … … 1694 1694 1695 1695 /* Builtin I/O cache - per device setting. */ 1696 BOOL fBuiltinI oCache = true;1697 hrc = pMachine->COMGETTER(I oCacheEnabled)(&fBuiltinIoCache); H();1696 BOOL fBuiltinIOCache = true; 1697 hrc = pMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache); H(); 1698 1698 1699 1699 … … 1706 1706 enmBus, 1707 1707 !!fUseHostIOCache, 1708 !!fBuiltinI oCache,1708 !!fBuiltinIOCache, 1709 1709 false /* fSetupMerge */, 1710 1710 0 /* uMergeSource */, … … 1789 1789 /* the first network card gets the PCI ID 3, the next 3 gets 8..10, 1790 1790 * next 4 get 16..19. */ 1791 int iP ciDeviceNo;1791 int iPCIDeviceNo; 1792 1792 switch (ulInstance) 1793 1793 { 1794 1794 case 0: 1795 iP ciDeviceNo = 3;1795 iPCIDeviceNo = 3; 1796 1796 break; 1797 1797 case 1: case 2: case 3: 1798 iP ciDeviceNo = ulInstance - 1 + 8;1798 iPCIDeviceNo = ulInstance - 1 + 8; 1799 1799 break; 1800 1800 case 4: case 5: case 6: case 7: 1801 iP ciDeviceNo = ulInstance - 4 + 16;1801 iPCIDeviceNo = ulInstance - 4 + 16; 1802 1802 break; 1803 1803 default: 1804 1804 /* auto assignment */ 1805 iP ciDeviceNo = -1;1805 iPCIDeviceNo = -1; 1806 1806 break; 1807 1807 } … … 1811 1811 * it assigns slot 11 to the first network controller. 1812 1812 */ 1813 if (iP ciDeviceNo == 3 && adapterType == NetworkAdapterType_I82545EM)1814 { 1815 iP ciDeviceNo = 0x11;1813 if (iPCIDeviceNo == 3 && adapterType == NetworkAdapterType_I82545EM) 1814 { 1815 iPCIDeviceNo = 0x11; 1816 1816 fSwapSlots3and11 = true; 1817 1817 } 1818 else if (iP ciDeviceNo == 0x11 && fSwapSlots3and11)1819 iP ciDeviceNo = 3;1818 else if (iPCIDeviceNo == 0x11 && fSwapSlots3and11) 1819 iPCIDeviceNo = 3; 1820 1820 #endif 1821 P ciBusAddress PciAddr = PciBusAddress(0, iPciDeviceNo, 0);1822 hrc = BusMgr->assignP ciDevice(pszAdapterName, pInst, PciAddr); H();1821 PCIBusAddress PCIAddr = PCIBusAddress(0, iPCIDeviceNo, 0); 1822 hrc = BusMgr->assignPCIDevice(pszAdapterName, pInst, PCIAddr); H(); 1823 1823 1824 1824 InsertConfigNode(pInst, "Config", &pCfg); … … 1836 1836 nic.mInstance = ulInstance; 1837 1837 /* Could be updated by reference, if auto assigned */ 1838 nic.mP ciAddress = PciAddr;1838 nic.mPCIAddress = PCIAddr; 1839 1839 1840 1840 hrc = networkAdapter->COMGETTER(BootPriority)(&nic.mBootPrio); H(); … … 1944 1944 InsertConfigNode(pNetBootCfg, achBootIdx, &pNetBtDevCfg); 1945 1945 InsertConfigInteger(pNetBtDevCfg, "NIC", it->mInstance); 1946 InsertConfigInteger(pNetBtDevCfg, "PCIBusNo", it->mP ciAddress.miBus);1947 InsertConfigInteger(pNetBtDevCfg, "PCIDeviceNo", it->mP ciAddress.miDevice);1948 InsertConfigInteger(pNetBtDevCfg, "PCIFunctionNo", it->mP ciAddress.miFn);1946 InsertConfigInteger(pNetBtDevCfg, "PCIBusNo", it->mPCIAddress.miBus); 1947 InsertConfigInteger(pNetBtDevCfg, "PCIDeviceNo", it->mPCIAddress.miDevice); 1948 InsertConfigInteger(pNetBtDevCfg, "PCIFunctionNo", it->mPCIAddress.miFn); 1949 1949 } 1950 1950 } … … 2053 2053 InsertConfigNode(pInst, "Config", &pCfg); 2054 2054 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2055 hrc = BusMgr->assignP ciDevice("VMMDev", pInst); H();2055 hrc = BusMgr->assignPCIDevice("VMMDev", pInst); H(); 2056 2056 2057 2057 Bstr hwVersion; … … 2110 2110 InsertConfigNode(pDev, "0", &pInst); 2111 2111 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2112 hrc = BusMgr->assignP ciDevice("ichac97", pInst); H();2112 hrc = BusMgr->assignPCIDevice("ichac97", pInst); H(); 2113 2113 InsertConfigNode(pInst, "Config", &pCfg); 2114 2114 break; … … 2134 2134 InsertConfigNode(pDev, "0", &pInst); 2135 2135 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2136 hrc = BusMgr->assignP ciDevice("hda", pInst); H();2136 hrc = BusMgr->assignPCIDevice("hda", pInst); H(); 2137 2137 InsertConfigNode(pInst, "Config", &pCfg); 2138 2138 } … … 2233 2233 InsertConfigNode(pInst, "Config", &pCfg); 2234 2234 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2235 hrc = BusMgr->assignP ciDevice("usb-ohci", pInst); H();2235 hrc = BusMgr->assignPCIDevice("usb-ohci", pInst); H(); 2236 2236 InsertConfigNode(pInst, "LUN#0", &pLunL0); 2237 2237 InsertConfigString(pLunL0, "Driver", "VUSBRootHub"); … … 2244 2244 2245 2245 #ifdef VBOX_WITH_EHCI 2246 BOOL fE hciEnabled;2247 hrc = USBCtlPtr->COMGETTER(EnabledE hci)(&fEhciEnabled); H();2248 if (fE hciEnabled)2246 BOOL fEHCIEnabled; 2247 hrc = USBCtlPtr->COMGETTER(EnabledEHCI)(&fEHCIEnabled); H(); 2248 if (fEHCIEnabled) 2249 2249 { 2250 2250 /* … … 2265 2265 InsertConfigNode(pInst, "Config", &pCfg); 2266 2266 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2267 hrc = BusMgr->assignP ciDevice("usb-ehci", pInst); H();2267 hrc = BusMgr->assignPCIDevice("usb-ehci", pInst); H(); 2268 2268 2269 2269 InsertConfigNode(pInst, "LUN#0", &pLunL0); … … 2380 2380 2381 2381 /* Virtual USB Mouse/Tablet */ 2382 PointingH idType_T aPointingHid;2383 hrc = pMachine->COMGETTER(PointingH idType)(&aPointingHid); H();2384 if (aPointingH id == PointingHidType_USBMouse || aPointingHid == PointingHidType_USBTablet)2382 PointingHIDType_T aPointingHID; 2383 hrc = pMachine->COMGETTER(PointingHIDType)(&aPointingHID); H(); 2384 if (aPointingHID == PointingHIDType_USBMouse || aPointingHID == PointingHIDType_USBTablet) 2385 2385 { 2386 2386 InsertConfigNode(pUsbDevices, "HidMouse", &pDev); … … 2388 2388 InsertConfigNode(pInst, "Config", &pCfg); 2389 2389 2390 if (aPointingH id == PointingHidType_USBTablet)2390 if (aPointingHID == PointingHIDType_USBTablet) 2391 2391 { 2392 2392 InsertConfigInteger(pCfg, "Absolute", 1); … … 2409 2409 2410 2410 /* Virtual USB Keyboard */ 2411 KeyboardH idType_T aKbdHid;2412 hrc = pMachine->COMGETTER(KeyboardH idType)(&aKbdHid); H();2413 if (aKbdH id == KeyboardHidType_USBKeyboard)2411 KeyboardHIDType_T aKbdHID; 2412 hrc = pMachine->COMGETTER(KeyboardHIDType)(&aKbdHID); H(); 2413 if (aKbdHID == KeyboardHIDType_USBKeyboard) 2414 2414 { 2415 2415 InsertConfigNode(pUsbDevices, "HidKeyboard", &pDev); … … 2589 2589 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2590 2590 InsertConfigNode(pInst, "Config", &pCfg); 2591 hrc = BusMgr->assignP ciDevice("acpi", pInst); H();2591 hrc = BusMgr->assignPCIDevice("acpi", pInst); H(); 2592 2592 2593 2593 InsertConfigInteger(pCfg, "RamSize", cbRam); … … 2597 2597 InsertConfigInteger(pCfg, "IOAPIC", fIOAPIC); 2598 2598 InsertConfigInteger(pCfg, "FdcEnabled", fFdcEnabled); 2599 InsertConfigInteger(pCfg, "HpetEnabled", fH petEnabled);2599 InsertConfigInteger(pCfg, "HpetEnabled", fHPETEnabled); 2600 2600 InsertConfigInteger(pCfg, "SmcEnabled", fSmcEnabled); 2601 2601 InsertConfigInteger(pCfg, "ShowRtc", fShowRtc); … … 2603 2603 { 2604 2604 BootNic aNic = llBootNics.front(); 2605 uint32_t u32NicP ciAddr = (aNic.mPciAddress.miDevice << 16) | aNic.mPciAddress.miFn;2606 InsertConfigInteger(pCfg, "NicPciAddress", u32NicP ciAddr);2605 uint32_t u32NicPCIAddr = (aNic.mPCIAddress.miDevice << 16) | aNic.mPCIAddress.miFn; 2606 InsertConfigInteger(pCfg, "NicPciAddress", u32NicPCIAddr); 2607 2607 } 2608 2608 if (fOsXGuest && fAudioEnabled) 2609 2609 { 2610 P ciBusAddress Address;2611 if (BusMgr->findP ciAddress("hda", 0, Address))2612 { 2613 uint32_t u32AudioP ciAddr = (Address.miDevice << 16) | Address.miFn;2614 InsertConfigInteger(pCfg, "AudioPciAddress", u32AudioP ciAddr);2615 } 2616 } 2617 InsertConfigInteger(pCfg, "IocPciAddress", uIocP ciAddress);2610 PCIBusAddress Address; 2611 if (BusMgr->findPCIAddress("hda", 0, Address)) 2612 { 2613 uint32_t u32AudioPCIAddr = (Address.miDevice << 16) | Address.miFn; 2614 InsertConfigInteger(pCfg, "AudioPciAddress", u32AudioPCIAddr); 2615 } 2616 } 2617 InsertConfigInteger(pCfg, "IocPciAddress", uIocPCIAddress); 2618 2618 if (chipsetType == ChipsetType_ICH9) 2619 2619 { … … 2621 2621 InsertConfigInteger(pCfg, "McfgLength", cbMcfgLength); 2622 2622 } 2623 InsertConfigInteger(pCfg, "HostBusPciAddress", uHbcP ciAddress);2623 InsertConfigInteger(pCfg, "HostBusPciAddress", uHbcPCIAddress); 2624 2624 InsertConfigInteger(pCfg, "ShowCpu", fShowCpu); 2625 2625 InsertConfigInteger(pCfg, "CpuHotPlug", fCpuHotPlug); … … 2941 2941 StorageBus_T enmBus, 2942 2942 bool fUseHostIOCache, 2943 bool fBuiltinI oCache,2943 bool fBuiltinIOCache, 2944 2944 bool fSetupMerge, 2945 2945 unsigned uMergeSource, … … 3266 3266 lType, 3267 3267 fUseHostIOCache, 3268 fBuiltinI oCache,3268 fBuiltinIOCache, 3269 3269 fSetupMerge, 3270 3270 uMergeSource, … … 3308 3308 DeviceType_T enmType, 3309 3309 bool fUseHostIOCache, 3310 bool fBuiltinI oCache,3310 bool fBuiltinIOCache, 3311 3311 bool fSetupMerge, 3312 3312 unsigned uMergeSource, … … 3473 3473 * and just increases the overhead. 3474 3474 */ 3475 if ( fBuiltinI oCache3475 if ( fBuiltinIOCache 3476 3476 && (enmType == DeviceType_HardDisk)) 3477 3477 InsertConfigInteger(pCfg, "BlockCache", 1); … … 3737 3737 case NetworkAttachmentType_NAT: 3738 3738 { 3739 ComPtr<INATEngine> nat Driver;3740 hrc = aNetworkAdapter->COMGETTER(N atDriver)(natDriver.asOutParam()); H();3739 ComPtr<INATEngine> natEngine; 3740 hrc = aNetworkAdapter->COMGETTER(NATEngine)(natEngine.asOutParam()); H(); 3741 3741 InsertConfigString(pLunL0, "Driver", "NAT"); 3742 3742 InsertConfigNode(pLunL0, "Config", &pCfg); … … 3749 3749 InsertConfigString(pCfg, "BootFile", Utf8StrFmt("%ls.pxe", bstr.raw())); 3750 3750 3751 hrc = nat Driver->COMGETTER(Network)(bstr.asOutParam()); H();3751 hrc = natEngine->COMGETTER(Network)(bstr.asOutParam()); H(); 3752 3752 if (!bstr.isEmpty()) 3753 3753 InsertConfigString(pCfg, "Network", bstr); … … 3758 3758 InsertConfigString(pCfg, "Network", Utf8StrFmt("10.0.%d.0/24", uSlot+2)); 3759 3759 } 3760 hrc = nat Driver->COMGETTER(HostIP)(bstr.asOutParam()); H();3760 hrc = natEngine->COMGETTER(HostIP)(bstr.asOutParam()); H(); 3761 3761 if (!bstr.isEmpty()) 3762 3762 InsertConfigString(pCfg, "BindIP", bstr); … … 3766 3766 ULONG tcpSnd = 0; 3767 3767 ULONG tcpRcv = 0; 3768 hrc = nat Driver->GetNetworkSettings(&mtu, &sockSnd, &sockRcv, &tcpSnd, &tcpRcv); H();3768 hrc = natEngine->GetNetworkSettings(&mtu, &sockSnd, &sockRcv, &tcpSnd, &tcpRcv); H(); 3769 3769 if (mtu) 3770 3770 InsertConfigInteger(pCfg, "SlirpMTU", mtu); … … 3777 3777 if (tcpSnd) 3778 3778 InsertConfigInteger(pCfg, "TcpSnd", tcpSnd); 3779 hrc = nat Driver->COMGETTER(TftpPrefix)(bstr.asOutParam()); H();3779 hrc = natEngine->COMGETTER(TFTPPrefix)(bstr.asOutParam()); H(); 3780 3780 if (!bstr.isEmpty()) 3781 3781 { … … 3783 3783 InsertConfigString(pCfg, "TFTPPrefix", bstr); 3784 3784 } 3785 hrc = nat Driver->COMGETTER(TftpBootFile)(bstr.asOutParam()); H();3785 hrc = natEngine->COMGETTER(TFTPBootFile)(bstr.asOutParam()); H(); 3786 3786 if (!bstr.isEmpty()) 3787 3787 { … … 3789 3789 InsertConfigString(pCfg, "BootFile", bstr); 3790 3790 } 3791 hrc = nat Driver->COMGETTER(TftpNextServer)(bstr.asOutParam()); H();3791 hrc = natEngine->COMGETTER(TFTPNextServer)(bstr.asOutParam()); H(); 3792 3792 if (!bstr.isEmpty()) 3793 3793 InsertConfigString(pCfg, "NextServer", bstr); 3794 BOOL fD nsFlag;3795 hrc = nat Driver->COMGETTER(DnsPassDomain)(&fDnsFlag); H();3796 InsertConfigInteger(pCfg, "PassDomain", fD nsFlag);3797 hrc = nat Driver->COMGETTER(DnsProxy)(&fDnsFlag); H();3798 InsertConfigInteger(pCfg, "DNSProxy", fD nsFlag);3799 hrc = nat Driver->COMGETTER(DnsUseHostResolver)(&fDnsFlag); H();3800 InsertConfigInteger(pCfg, "UseHostResolver", fD nsFlag);3794 BOOL fDNSFlag; 3795 hrc = natEngine->COMGETTER(DNSPassDomain)(&fDNSFlag); H(); 3796 InsertConfigInteger(pCfg, "PassDomain", fDNSFlag); 3797 hrc = natEngine->COMGETTER(DNSProxy)(&fDNSFlag); H(); 3798 InsertConfigInteger(pCfg, "DNSProxy", fDNSFlag); 3799 hrc = natEngine->COMGETTER(DNSUseHostResolver)(&fDNSFlag); H(); 3800 InsertConfigInteger(pCfg, "UseHostResolver", fDNSFlag); 3801 3801 3802 3802 ULONG aliasMode; 3803 hrc = nat Driver->COMGETTER(AliasMode)(&aliasMode); H();3803 hrc = natEngine->COMGETTER(AliasMode)(&aliasMode); H(); 3804 3804 InsertConfigInteger(pCfg, "AliasMode", aliasMode); 3805 3805 3806 3806 /* port-forwarding */ 3807 3807 SafeArray<BSTR> pfs; 3808 hrc = nat Driver->COMGETTER(Redirects)(ComSafeArrayAsOutParam(pfs)); H();3808 hrc = natEngine->COMGETTER(Redirects)(ComSafeArrayAsOutParam(pfs)); H(); 3809 3809 PCFGMNODE pPF = NULL; /* /Devices/Dev/.../Config/PF#0/ */ 3810 3810 for (unsigned int i = 0; i < pfs.size(); ++i) … … 4492 4492 tmpMask.asOutParam()); 4493 4493 if (SUCCEEDED(hrc) && !tmpMask.isEmpty()) 4494 hrc = hostInterface->EnableStaticI pConfig(tmpAddr.raw(),4494 hrc = hostInterface->EnableStaticIPConfig(tmpAddr.raw(), 4495 4495 tmpMask.raw()); 4496 4496 else 4497 hrc = hostInterface->EnableStaticI pConfig(tmpAddr.raw(),4497 hrc = hostInterface->EnableStaticIPConfig(tmpAddr.raw(), 4498 4498 Bstr(VBOXNET_IPV4MASK_DEFAULT).raw()); 4499 4499 } … … 4501 4501 { 4502 4502 /* Grab the IP number from the 'vboxnetX' instance number (see netif.h) */ 4503 hrc = hostInterface->EnableStaticI pConfig(getDefaultIPv4Address(Bstr(pszHostOnlyName)).raw(),4503 hrc = hostInterface->EnableStaticIPConfig(getDefaultIPv4Address(Bstr(pszHostOnlyName)).raw(), 4504 4504 Bstr(VBOXNET_IPV4MASK_DEFAULT).raw()); 4505 4505 } … … 4515 4515 if (SUCCEEDED(hrc) && !tmpAddr.isEmpty() && !tmpMask.isEmpty()) 4516 4516 { 4517 hrc = hostInterface->EnableStaticI pConfigV6(tmpAddr.raw(),4517 hrc = hostInterface->EnableStaticIPConfigV6(tmpAddr.raw(), 4518 4518 Utf8Str(tmpMask).toUInt32()); 4519 4519 ComAssertComRC(hrc); /** @todo r=bird: Why this isn't fatal? (H()) */ -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r42525 r42551 273 273 } 274 274 275 STDMETHODIMP GuestProcess::COMGETTER(P id)(ULONG *aPID)275 STDMETHODIMP GuestProcess::COMGETTER(PID)(ULONG *aPID) 276 276 { 277 277 #ifndef VBOX_WITH_GUEST_CONTROL -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r42546 r42551 289 289 LogFlowFuncLeaveRC(S_OK); 290 290 return S_OK; 291 #endif /* VBOX_WITH_GUEST_CONTROL */ 292 } 293 294 STDMETHODIMP GuestSession::COMSETTER(Environment)(ComSafeArrayIn(IN_BSTR, aValues)) 295 { 296 #ifndef VBOX_WITH_GUEST_CONTROL 297 ReturnComNotImplemented(); 298 #else 299 LogFlowThisFuncEnter(); 300 301 AutoCaller autoCaller(this); 302 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 303 304 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 305 306 com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aValues)); 307 308 int rc = VINF_SUCCESS; 309 for (size_t i = 0; i < environment.size() && RT_SUCCESS(rc); i++) 310 { 311 Utf8Str strEnv(environment[i]); 312 if (!strEnv.isEmpty()) /* Silently skip empty entries. */ 313 rc = mData.mEnvironment.Set(strEnv); 314 } 315 316 HRESULT hr = RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR; 317 LogFlowFuncLeaveRC(hr); 318 return hr; 291 319 #endif /* VBOX_WITH_GUEST_CONTROL */ 292 320 } … … 1083 1111 } 1084 1112 1085 STDMETHODIMP GuestSession::EnvironmentSetArray(ComSafeArrayIn(IN_BSTR, aValues))1086 {1087 #ifndef VBOX_WITH_GUEST_CONTROL1088 ReturnComNotImplemented();1089 #else1090 LogFlowThisFuncEnter();1091 1092 AutoCaller autoCaller(this);1093 if (FAILED(autoCaller.rc())) return autoCaller.rc();1094 1095 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);1096 1097 com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aValues));1098 1099 int rc = VINF_SUCCESS;1100 for (size_t i = 0; i < environment.size() && RT_SUCCESS(rc); i++)1101 {1102 Utf8Str strEnv(environment[i]);1103 if (!strEnv.isEmpty()) /* Silently skip empty entries. */1104 rc = mData.mEnvironment.Set(strEnv);1105 }1106 1107 HRESULT hr = RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR;1108 LogFlowFuncLeaveRC(hr);1109 return hr;1110 #endif /* VBOX_WITH_GUEST_CONTROL */1111 }1112 1113 1113 STDMETHODIMP GuestSession::EnvironmentUnset(IN_BSTR aName) 1114 1114 { -
trunk/src/VBox/Main/src-client/PCIRawDevImpl.cpp
r42497 r42551 5 5 6 6 /* 7 * Copyright (C) 2010-201 1Oracle Corporation7 * Copyright (C) 2010-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 #include "Logging.h" 18 #include "P ciRawDevImpl.h"19 #include "P ciDeviceAttachmentImpl.h"18 #include "PCIRawDevImpl.h" 19 #include "PCIDeviceAttachmentImpl.h" 20 20 #include "ConsoleImpl.h" 21 21 #include "MachineImpl.h" … … 30 30 { 31 31 /** Pointer to the real PCI raw object. */ 32 P ciRawDev *pPciRawDev;32 PCIRawDev *pPCIRawDev; 33 33 /** Pointer to the driver instance structure. */ 34 34 PPDMDRVINS pDrvIns; … … 41 41 // constructor / destructor 42 42 // 43 P ciRawDev::PciRawDev(Console *console)43 PCIRawDev::PCIRawDev(Console *console) 44 44 : mpDrv(NULL), 45 45 mParent(console) … … 47 47 } 48 48 49 P ciRawDev::~PciRawDev()49 PCIRawDev::~PCIRawDev() 50 50 { 51 51 } … … 54 54 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 55 55 */ 56 DECLCALLBACK(void *) P ciRawDev::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID)56 DECLCALLBACK(void *) PCIRawDev::drvQueryInterface(PPDMIBASE pInterface, const char *pszIID) 57 57 { 58 58 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); … … 69 69 * @interface_method_impl{PDMIPCIRAWUP,pfnPciDeviceConstructComplete} 70 70 */ 71 DECLCALLBACK(int) P ciRawDev::drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName,72 uint32_t uHostP ciAddress, uint32_t uGuestPciAddress,71 DECLCALLBACK(int) PCIRawDev::drvDeviceConstructComplete(PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName, 72 uint32_t uHostPCIAddress, uint32_t uGuestPCIAddress, 73 73 int rc) 74 74 { 75 75 PDRVMAINPCIRAWDEV pThis = RT_FROM_CPP_MEMBER(pInterface, DRVMAINPCIRAWDEV, IConnector); 76 Console *pConsole = pThis->pP ciRawDev->getParent();76 Console *pConsole = pThis->pPCIRawDev->getParent(); 77 77 const ComPtr<IMachine>& machine = pConsole->machine(); 78 78 ComPtr<IVirtualBox> vbox; … … 89 89 Assert(SUCCEEDED(hrc)); 90 90 91 ComObjPtr<P ciDeviceAttachment> pda;91 ComObjPtr<PCIDeviceAttachment> pda; 92 92 BstrFmt bstrName(pcszName); 93 93 pda.createObject(); 94 pda->init(machine, bstrName, uHostP ciAddress, uGuestPciAddress, TRUE);94 pda->init(machine, bstrName, uHostPCIAddress, uGuestPCIAddress, TRUE); 95 95 96 96 Bstr msg(""); … … 98 98 msg = BstrFmt("runtime error %Rrc", rc); 99 99 100 fireHostP ciDevicePlugEvent(es, bstrId.raw(), true /* plugged */, RT_SUCCESS(rc) /* success */, pda, msg.raw());100 fireHostPCIDevicePlugEvent(es, bstrId.raw(), true /* plugged */, RT_SUCCESS(rc) /* success */, pda, msg.raw()); 101 101 102 102 return VINF_SUCCESS; … … 110 110 * @param pDrvIns The driver instance data. 111 111 */ 112 DECLCALLBACK(void) P ciRawDev::drvDestruct(PPDMDRVINS pDrvIns)112 DECLCALLBACK(void) PCIRawDev::drvDestruct(PPDMDRVINS pDrvIns) 113 113 { 114 114 PDRVMAINPCIRAWDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINPCIRAWDEV); 115 115 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 116 116 117 if (pData->pP ciRawDev)118 pData->pP ciRawDev->mpDrv = NULL;117 if (pData->pPCIRawDev) 118 pData->pPCIRawDev->mpDrv = NULL; 119 119 } 120 120 … … 126 126 * @param pDrvIns The driver instance data. 127 127 */ 128 DECLCALLBACK(void) P ciRawDev::drvReset(PPDMDRVINS pDrvIns)128 DECLCALLBACK(void) PCIRawDev::drvReset(PPDMDRVINS pDrvIns) 129 129 { 130 130 } … … 136 136 * @copydoc FNPDMDRVCONSTRUCT 137 137 */ 138 DECLCALLBACK(int) P ciRawDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)138 DECLCALLBACK(int) PCIRawDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 139 139 { 140 140 PDRVMAINPCIRAWDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINPCIRAWDEV); … … 154 154 * IBase. 155 155 */ 156 pDrvIns->IBase.pfnQueryInterface = P ciRawDev::drvQueryInterface;156 pDrvIns->IBase.pfnQueryInterface = PCIRawDev::drvQueryInterface; 157 157 158 158 /* 159 159 * IConnector. 160 160 */ 161 pData->IConnector.pfnDeviceConstructComplete = P ciRawDev::drvDeviceConstructComplete;161 pData->IConnector.pfnDeviceConstructComplete = PCIRawDev::drvDeviceConstructComplete; 162 162 163 163 /* … … 172 172 } 173 173 174 pData->pP ciRawDev = (PciRawDev*)pv;175 pData->pP ciRawDev->mpDrv = pData;174 pData->pPCIRawDev = (PCIRawDev *)pv; 175 pData->pPCIRawDev->mpDrv = pData; 176 176 177 177 return VINF_SUCCESS; … … 181 181 * Main raw PCI driver registration record. 182 182 */ 183 const PDMDRVREG P ciRawDev::DrvReg =183 const PDMDRVREG PCIRawDev::DrvReg = 184 184 { 185 185 /* u32Version */ … … 202 202 sizeof(DRVMAINPCIRAWDEV), 203 203 /* pfnConstruct */ 204 P ciRawDev::drvConstruct,204 PCIRawDev::drvConstruct, 205 205 /* pfnDestruct */ 206 P ciRawDev::drvDestruct,206 PCIRawDev::drvDestruct, 207 207 /* pfnRelocate */ 208 208 NULL, … … 212 212 NULL, 213 213 /* pfnReset */ 214 P ciRawDev::drvReset,214 PCIRawDev::drvReset, 215 215 /* pfnSuspend */ 216 216 NULL, -
trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp
r41352 r42551 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 #include "ConsoleImpl.h" 34 34 #ifdef VBOX_WITH_PCI_PASSTHROUGH 35 # include "P ciRawDevImpl.h"35 # include "PCIRawDevImpl.h" 36 36 #endif 37 37 … … 90 90 91 91 #ifdef VBOX_WITH_PCI_PASSTHROUGH 92 rc = pCallbacks->pfnRegister(pCallbacks, &P ciRawDev::DrvReg);92 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg); 93 93 if (RT_FAILURE(rc)) 94 94 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.