summaryrefslogtreecommitdiff
path: root/src/VBox
diff options
context:
space:
mode:
authorFelix Geyer <debfx-pkg@fobos.de>2010-05-19 18:20:38 +0200
committerFelix Geyer <debfx-pkg@fobos.de>2010-05-19 18:20:38 +0200
commitabd0051802e55207e88435a185ff8d6e6b8d17d5 (patch)
treec827a6fc0893ec4f74067aac529b5a52875a036b /src/VBox
parent1ea6626f22e9895b90f8795f794aa229a233a545 (diff)
downloadvirtualbox-abd0051802e55207e88435a185ff8d6e6b8d17d5.tar.gz
Imported Upstream version 3.2.0-dfsgupstream/3.2.0-dfsg
Diffstat (limited to 'src/VBox')
-rw-r--r--src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp32
-rw-r--r--src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk12
-rw-r--r--src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp40
-rw-r--r--src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp4
-rw-r--r--src/VBox/Additions/common/VBoxService/Makefile.kmk10
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxService.cpp96
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp11
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp56
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp27
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp321
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h6
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp88
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp39
-rw-r--r--src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp8
-rw-r--r--src/VBox/Additions/common/crOpenGL/context.c2
-rw-r--r--src/VBox/Additions/linux/installer/vboxadd-x11.sh5
-rw-r--r--[-rwxr-xr-x]src/VBox/Additions/linux/sharedfolders/files_vboxsf5
-rw-r--r--src/VBox/Additions/x11/Installer/x11config-new.pl2
-rw-r--r--src/VBox/Devices/Builtins.cpp12
-rw-r--r--src/VBox/Devices/Builtins.h8
-rw-r--r--src/VBox/Devices/Builtins2.cpp16
-rw-r--r--src/VBox/Devices/Builtins2.h14
-rw-r--r--src/VBox/Devices/Makefile.kmk37
-rw-r--r--src/VBox/Devices/Network/DevE1000.cpp94
-rw-r--r--src/VBox/Devices/Network/DevPCNet.cpp148
-rw-r--r--src/VBox/Devices/Network/DrvIntNet.cpp6
-rw-r--r--src/VBox/Devices/Network/DrvVDE.cpp4
-rw-r--r--src/VBox/Devices/Network/SrvIntNetR0.cpp91
-rw-r--r--src/VBox/Devices/Network/slirp/bootp.c2
-rw-r--r--src/VBox/Devices/Network/slirp/slirp.c2
-rw-r--r--src/VBox/Devices/Network/slirp/slirp.h2
-rw-r--r--src/VBox/Devices/PC/DevLPC.cpp11
-rw-r--r--src/VBox/Devices/PC/DevSMC.cpp312
-rw-r--r--src/VBox/Devices/Storage/DevAHCI.cpp34
-rw-r--r--src/VBox/Devices/Storage/DevBusLogic.cpp137
-rw-r--r--src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp252
-rw-r--r--src/VBox/Devices/Storage/DevLsiLogicSCSI.h6
-rw-r--r--src/VBox/Devices/Storage/DrvDiskIntegrity.cpp104
-rw-r--r--src/VBox/Devices/Storage/DrvSCSI.cpp9
-rw-r--r--src/VBox/Devices/Storage/ISCSIHDDCore.cpp5
-rw-r--r--src/VBox/Devices/Storage/ParallelsHDDCore.cpp5
-rw-r--r--src/VBox/Devices/Storage/RawHDDCore.cpp5
-rw-r--r--src/VBox/Devices/Storage/VBoxHDD.cpp67
-rw-r--r--src/VBox/Devices/Storage/VDIHDDCore.cpp4
-rw-r--r--src/VBox/Devices/Storage/VmdkHDDCore.cpp119
-rw-r--r--src/VBox/Devices/VMMDev/VMMDev.cpp17
-rw-r--r--src/VBox/Devices/VMMDev/VMMDevState.h5
-rw-r--r--src/VBox/Devices/testcase/tstDeviceStructSize.cpp6
-rw-r--r--src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp10
-rw-r--r--src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp5
-rw-r--r--src/VBox/Frontends/VBoxManage/Makefile.kmk5
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp330
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp192
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp46
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp9
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp10
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp40
-rw-r--r--src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp34
-rw-r--r--src/VBox/Frontends/VBoxShell/vboxshell.py122
-rw-r--r--src/VBox/Frontends/VirtualBox/nls/VirtualBox_da.ts336
-rw-r--r--src/VBox/Frontends/VirtualBox/nls/VirtualBox_fr.ts90
-rw-r--r--src/VBox/Frontends/VirtualBox/nls/VirtualBox_hu.ts40
-rw-r--r--src/VBox/Frontends/VirtualBox/nls/VirtualBox_ro.ts577
-rw-r--r--src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts344
-rw-r--r--src/VBox/Frontends/VirtualBox/nls/VirtualBox_sk.ts234
-rw-r--r--src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_CN.ts4
-rw-r--r--src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp29
-rw-r--r--src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp4
-rw-r--r--src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp4
-rw-r--r--src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp7
-rw-r--r--src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp4
-rw-r--r--src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp40
-rw-r--r--src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp7
-rw-r--r--src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp9
-rw-r--r--src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp35
-rw-r--r--src/VBox/Frontends/VirtualBox/src/runtime/UISession.h4
-rw-r--r--src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp17
-rw-r--r--src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsHD.cpp8
-rw-r--r--src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp4
-rw-r--r--src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage2.ui11
-rw-r--r--src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage3.ui13
-rw-r--r--src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp8
-rw-r--r--src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp10
-rw-r--r--src/VBox/Frontends/VirtualBox/src/wizards/registration/UIRegistrationWzd.cpp7
-rw-r--r--src/VBox/GuestHost/OpenGL/spu_loader/glloader.py2
-rw-r--r--src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c3
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c94
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h30
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp24
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c22
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c24
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c25
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c400
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c94
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h21
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h4
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c20
-rw-r--r--src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c9
-rw-r--r--src/VBox/HostServices/GuestControl/service.cpp33
-rw-r--r--src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m41
-rw-r--r--src/VBox/Installer/linux/vboxdrv.sh.in9
-rw-r--r--src/VBox/Main/ConsoleImpl.cpp97
-rw-r--r--src/VBox/Main/ConsoleImpl2.cpp120
-rw-r--r--src/VBox/Main/ConsoleVRDPServer.cpp10
-rw-r--r--src/VBox/Main/DisplayImpl.cpp18
-rw-r--r--src/VBox/Main/Global.cpp54
-rw-r--r--src/VBox/Main/GuestImpl.cpp105
-rw-r--r--src/VBox/Main/HostImpl.cpp30
-rw-r--r--src/VBox/Main/MachineImpl.cpp55
-rw-r--r--src/VBox/Main/MediumImpl.cpp34
-rw-r--r--src/VBox/Main/Performance.cpp21
-rw-r--r--src/VBox/Main/PerformanceImpl.cpp10
-rw-r--r--src/VBox/Main/SnapshotImpl.cpp18
-rw-r--r--src/VBox/Main/StorageControllerImpl.cpp22
-rw-r--r--src/VBox/Main/VMMDevInterface.cpp42
-rw-r--r--src/VBox/Main/VirtualBoxCallbackImpl.cpp4
-rw-r--r--src/VBox/Main/idl/VirtualBox.xidl79
-rw-r--r--src/VBox/Main/include/ConsoleImpl.h26
-rw-r--r--src/VBox/Main/include/DisplayImpl.h4
-rw-r--r--src/VBox/Main/include/GuestImpl.h6
-rw-r--r--src/VBox/Main/include/HostImpl.h3
-rw-r--r--src/VBox/Main/include/MachineImpl.h3
-rw-r--r--src/VBox/Main/include/Performance.h32
-rw-r--r--src/VBox/Main/include/StorageControllerImpl.h6
-rw-r--r--src/VBox/Main/include/VirtualBoxCallbackImpl.h2
-rw-r--r--src/VBox/Main/xml/Settings.cpp52
-rw-r--r--src/VBox/Main/xpcom/server_module.cpp2
-rw-r--r--src/VBox/Runtime/Makefile.kmk5
-rw-r--r--src/VBox/Runtime/generic/RTMpCpuId-generic.cpp3
-rw-r--r--src/VBox/Runtime/include/internal/fileaio.h10
-rw-r--r--src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c10
-rw-r--r--src/VBox/Runtime/r0drv/freebsd/spinlock-r0drv-freebsd.c3
-rw-r--r--src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c3
-rw-r--r--src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c6
-rw-r--r--src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c6
-rw-r--r--src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c8
-rw-r--r--src/VBox/Runtime/r0drv/linux/the-linux-kernel.h6
-rw-r--r--src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c6
-rw-r--r--src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp8
-rw-r--r--src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp3
-rw-r--r--src/VBox/Runtime/r3/posix/fileaio-posix.cpp97
-rw-r--r--src/VBox/Runtime/r3/posix/pipe-posix.cpp6
-rw-r--r--src/VBox/Runtime/r3/posix/process-posix.cpp80
-rw-r--r--src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp3
-rw-r--r--src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp6
-rw-r--r--src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp5
-rw-r--r--src/VBox/VMM/GMM.cpp12
-rw-r--r--src/VBox/VMM/IOM.cpp22
-rw-r--r--src/VBox/VMM/IOMInternal.h30
-rw-r--r--src/VBox/VMM/Makefile.kmk9
-rw-r--r--src/VBox/VMM/PDMAsyncCompletion.cpp11
-rw-r--r--src/VBox/VMM/PDMAsyncCompletionFile.cpp30
-rw-r--r--src/VBox/VMM/PDMAsyncCompletionFileCache.cpp15
-rw-r--r--src/VBox/VMM/PDMAsyncCompletionFileInternal.h26
-rw-r--r--src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp96
-rw-r--r--src/VBox/VMM/PDMAsyncCompletionInternal.h4
-rw-r--r--src/VBox/VMM/PDMDevHlp.cpp54
-rw-r--r--src/VBox/VMM/PDMDriver.cpp11
-rw-r--r--src/VBox/VMM/PDMInternal.h4
-rw-r--r--src/VBox/VMM/PGM.cpp8
-rw-r--r--src/VBox/VMM/PGMInternal.h6
-rw-r--r--src/VBox/VMM/PGMPhys.cpp120
-rw-r--r--src/VBox/VMM/PGMSharedPage.cpp10
-rw-r--r--src/VBox/VMM/VMMAll/IOMAllMMIO.cpp64
-rw-r--r--src/VBox/VMM/VMMAll/PGMAllBth.h14
-rw-r--r--src/VBox/VMM/VMMR0/GMMR0.cpp149
-rw-r--r--src/VBox/VMM/VMMR0/PDMR0Device.cpp32
-rw-r--r--src/VBox/VMM/VMMR0/PGMR0.cpp218
-rw-r--r--src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp181
-rw-r--r--src/VBox/VMM/VMMR0/VMMR0.cpp27
-rw-r--r--src/VBox/VMM/VMMR0/VMMR0.def4
-rw-r--r--src/VBox/VMM/testcase/tstCompiler.cpp8
-rw-r--r--src/VBox/VMM/testcase/tstVMStructRC.cpp5
173 files changed, 5002 insertions, 3099 deletions
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp b/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
index d84cbdd85..4540dc16a 100644
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxGuest.cpp 29250 2010-05-09 17:53:58Z vboxsync $ */
+/* $Id: VBoxGuest.cpp 29625 2010-05-18 12:40:24Z vboxsync $ */
/** @file
* VBoxGuest - Guest Additions Driver, Common Code.
*/
@@ -245,10 +245,8 @@ static int vboxGuestSetFilterMask(PVBOXGUESTDEVEXT pDevExt, uint32_t fMask)
pReq->u32OrMask = fMask;
pReq->u32NotMask = ~fMask;
rc = VbglGRPerform(&pReq->header);
- if ( RT_FAILURE(rc)
- || RT_FAILURE(pReq->header.rc))
- LogRel(("vboxGuestSetFilterMask: failed with rc=%Rrc and VMMDev rc=%Rrc\n",
- rc, pReq->header.rc));
+ if (RT_FAILURE(rc))
+ LogRel(("vboxGuestSetFilterMask: failed with rc=%Rrc\n", rc));
VbglGRFree(&pReq->header);
}
return rc;
@@ -271,10 +269,8 @@ static int vboxGuestInitReportGuestInfo(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enm
pReq->guestInfo.additionsVersion = VMMDEV_VERSION;
pReq->guestInfo.osType = enmOSType;
rc = VbglGRPerform(&pReq->header);
- if ( RT_FAILURE(rc)
- || RT_FAILURE(pReq->header.rc))
- LogRel(("vboxGuestInitReportGuestInfo: failed with rc=%Rrc and VMMDev rc=%Rrc\n",
- rc, pReq->header.rc));
+ if (RT_FAILURE(rc))
+ LogRel(("vboxGuestInitReportGuestInfo: 1st part failed with rc=%Rrc\n", rc));
VbglGRFree(&pReq->header);
}
VMMDevReportGuestInfo2 *pReq2;
@@ -291,10 +287,8 @@ static int vboxGuestInitReportGuestInfo(PVBOXGUESTDEVEXT pDevExt, VBOXOSTYPE enm
rc = VbglGRPerform(&pReq2->header);
if (rc == VERR_NOT_IMPLEMENTED) /* compatibility with older hosts */
rc = VINF_SUCCESS;
- if ( RT_FAILURE(rc)
- || RT_FAILURE(pReq2->header.rc))
- LogRel(("vboxGuestInitReportGuestInfo2: failed with rc=%Rrc and VMMDev rc=%Rrc\n",
- rc, pReq2->header.rc));
+ if (RT_FAILURE(rc))
+ LogRel(("vboxGuestInitReportGuestInfo: 2nd part failed with rc=%Rrc\n", rc));
VbglGRFree(&pReq2->header);
}
return rc;
@@ -1146,12 +1140,7 @@ int VBoxGuestSetGuestCapabilities(uint32_t fOr, uint32_t fNot)
rc = VbglGRPerform(&pReq->header);
if (RT_FAILURE(rc))
- Log(("VBoxGuestSetGuestCapabilities:VbglGRPerform failed, rc=%Rrc!\n", rc));
- else if (RT_FAILURE(pReq->header.rc))
- {
- Log(("VBoxGuestSetGuestCapabilities: The request failed; VMMDev rc=%Rrc!\n", pReq->header.rc));
- rc = pReq->header.rc;
- }
+ Log(("VBoxGuestSetGuestCapabilities: VbglGRPerform failed, rc=%Rrc!\n", rc));
VbglGRFree(&pReq->header);
return rc;
@@ -1495,11 +1484,6 @@ static int VBoxGuestCommonIOCtl_CtlFilterMask(PVBOXGUESTDEVEXT pDevExt, VBoxGues
rc = VbglGRPerform(&pReq->header);
if (RT_FAILURE(rc))
Log(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: VbglGRPerform failed, rc=%Rrc!\n", rc));
- else if (RT_FAILURE(pReq->header.rc))
- {
- Log(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: The request failed; VMMDev rc=%Rrc!\n", pReq->header.rc));
- rc = pReq->header.rc;
- }
VbglGRFree(&pReq->header);
return rc;
diff --git a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
index 60b68f9d3..593e106f9 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
@@ -1,4 +1,4 @@
-# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $
+# $Id: Makefile.kmk 29535 2010-05-17 11:57:06Z vboxsync $
## @file
# Sub-Makefile for the common guest addition code library.
#
@@ -88,9 +88,6 @@ VBoxGuestR3Lib_DEFS = \
VBOX_WITH_HGCM \
$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
$(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,)
-ifdef VBOX_WITH_PAGE_SHARING
- VBoxGuestR3Lib_DEFS += VBOX_WITH_PAGE_SHARING
-endif
VBoxGuestR3Lib_SOURCES = \
VBoxGuestR3Lib.cpp \
VBoxGuestR3LibAdditions.cpp \
@@ -103,7 +100,8 @@ VBoxGuestR3Lib_SOURCES = \
VBoxGuestR3LibLog.cpp \
VBoxGuestR3LibMisc.cpp \
VBoxGuestR3LibStat.cpp \
- VBoxGuestR3LibTime.cpp
+ VBoxGuestR3LibTime.cpp \
+ VBoxGuestR3LibModule.cpp
ifneq ($(KBUILD_TARGET),win) ## @todo get rid of this hack (as soon as it's all implemented / #defined).
VBoxGuestR3Lib_SOURCES += \
VBoxGuestR3LibDaemonize.cpp \
@@ -120,10 +118,6 @@ ifdef VBOX_WITH_GUEST_CONTROL
VBoxGuestR3Lib_SOURCES += \
VBoxGuestR3LibGuestCtrl.cpp
endif
-ifdef VBOX_WITH_PAGE_SHARING
- VBoxGuestR3Lib_SOURCES += \
- VBoxGuestR3LibModule.cpp
-endif
VBoxGuestR3LibAdditions.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
index f196ffb90..b81791d2d 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxGuestR3LibGuestCtrl.cpp 28887 2010-04-29 11:19:17Z vboxsync $ */
+/* $Id: VBoxGuestR3LibGuestCtrl.cpp 29516 2010-05-17 09:55:17Z vboxsync $ */
/** @file
* VBoxGuestR3Lib - Ring-3 Support Library for VirtualBox guest additions, guest control.
*/
@@ -102,7 +102,7 @@ VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t u32ClientId)
* @param puNumParms Where to store the number of parameters which will be received
* in a second call to the host.
*/
-VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms, uint32_t u32Timeout)
+VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms)
{
AssertPtr(puMsg);
AssertPtr(puNumParms);
@@ -132,6 +132,32 @@ VBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg,
/**
+ * Asks the host to cancel (release) all pending waits which were deferred.
+ *
+ * @returns VBox status code.
+ * @param u32ClientId The client id returned by VbglR3GuestCtrlConnect().
+ */
+VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(uint32_t u32ClientId)
+{
+ VBoxGuestCtrlHGCMMsgCancelPendingWaits Msg;
+
+ Msg.hdr.result = VERR_WRONG_ORDER;
+ Msg.hdr.u32ClientID = u32ClientId;
+ Msg.hdr.u32Function = GUEST_CANCEL_PENDING_WAITS;
+ Msg.hdr.cParms = 0;
+
+ int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
+ if (RT_SUCCESS(rc))
+ {
+ int rc2 = Msg.hdr.result;
+ if (RT_FAILURE(rc2))
+ rc = rc2;
+ }
+ return rc;
+}
+
+
+/**
* Allocates and gets host data, based on the message id.
*
* This will block until data becomes available.
@@ -147,9 +173,6 @@ VBGLR3DECL(int) VbglR3GuestCtrlExecGetHostCmd(uint32_t u32ClientId, uint32_t
uint32_t *puFlags,
char *pszArgs, uint32_t cbArgs, uint32_t *puNumArgs,
char *pszEnv, uint32_t *pcbEnv, uint32_t *puNumEnvVars,
- char *pszStdIn, uint32_t cbStdIn,
- char *pszStdOut, uint32_t cbStdOut,
- char *pszStdErr, uint32_t cbStdErr,
char *pszUser, uint32_t cbUser,
char *pszPassword, uint32_t cbPassword,
uint32_t *puTimeLimit)
@@ -162,10 +185,6 @@ VBGLR3DECL(int) VbglR3GuestCtrlExecGetHostCmd(uint32_t u32ClientId, uint32_t
AssertPtr(pszEnv);
AssertPtr(pcbEnv);
AssertPtr(puNumEnvVars);
- AssertPtr(pszStdIn);
- AssertPtr(pszStdOut);
- AssertPtr(pszStdOut);
- AssertPtr(pszStdErr);
AssertPtr(pszUser);
AssertPtr(pszPassword);
AssertPtr(puTimeLimit);
@@ -185,9 +204,6 @@ VBGLR3DECL(int) VbglR3GuestCtrlExecGetHostCmd(uint32_t u32ClientId, uint32_t
VbglHGCMParmUInt32Set(&Msg.num_env, 0);
VbglHGCMParmUInt32Set(&Msg.cb_env, 0);
VbglHGCMParmPtrSet(&Msg.env, pszEnv, *pcbEnv);
- VbglHGCMParmPtrSet(&Msg.std_in, pszStdIn, cbStdIn);
- VbglHGCMParmPtrSet(&Msg.std_out, pszStdOut, cbStdOut);
- VbglHGCMParmPtrSet(&Msg.std_err, pszStdErr, cbStdErr);
VbglHGCMParmPtrSet(&Msg.username, pszUser, cbUser);
VbglHGCMParmPtrSet(&Msg.password, pszPassword, cbPassword);
VbglHGCMParmUInt32Set(&Msg.timeout, 0);
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp
index de324ed11..9482c4081 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibModule.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxGuestR3LibModule.cpp 29395 2010-05-12 07:33:28Z vboxsync $ */
+/* $Id: VBoxGuestR3LibModule.cpp 29538 2010-05-17 12:07:00Z vboxsync $ */
/** @file
* VBoxGuestR3Lib - Ring-3 Support Library for VirtualBox guest additions, Shared modules.
*/
@@ -69,7 +69,7 @@ VBGLR3DECL(int) VbglR3RegisterSharedModule(char *pszModuleName, char *pszVersion
# endif
#else
/** todo */
- pReq->enmGuestOS = VBOXOSFAMILY_unknown;
+ pReq->enmGuestOS = VBOXOSFAMILY_Unknown;
#endif
for (unsigned i = 0; i < cRegions; i++)
pReq->aRegions[i] = pRegions[i];
diff --git a/src/VBox/Additions/common/VBoxService/Makefile.kmk b/src/VBox/Additions/common/VBoxService/Makefile.kmk
index 197c194bb..e2dfee32a 100644
--- a/src/VBox/Additions/common/VBoxService/Makefile.kmk
+++ b/src/VBox/Additions/common/VBoxService/Makefile.kmk
@@ -1,4 +1,4 @@
-# $Id: Makefile.kmk 29313 2010-05-11 07:08:01Z vboxsync $
+# $Id: Makefile.kmk 29583 2010-05-17 19:41:27Z vboxsync $
## @file
# Sub-Makefile for the Cross Platform Guest Addition Services.
#
@@ -43,7 +43,7 @@ endif
ifdef VBOX_WITH_MEMBALLOON
VBoxService_DEFS += VBOX_WITH_MEMBALLOON
endif
-ifdef VBOX_WITH_PAGE_SHARING
+if1of ($(KBUILD_TARGET), win)
VBoxService_DEFS += VBOX_WITH_PAGE_SHARING
endif
if1of ($(KBUILD_TARGET), linux)
@@ -64,7 +64,7 @@ ifdef VBOX_WITH_MEMBALLOON
VBoxService_SOURCES += \
VBoxServiceBalloon.cpp
endif
-ifdef VBOX_WITH_PAGE_SHARING
+if1of ($(KBUILD_TARGET), win)
VBoxService_SOURCES += \
VBoxServicePageSharing.cpp
endif
@@ -91,6 +91,10 @@ VBoxService_LIBS = \
$(VBOX_LIB_IPRT_GUEST_R3) \
$(VBOX_LIB_VBGL_R3) \
$(VBOX_LIB_IPRT_GUEST_R3)
+if1of ($(KBUILD_TARGET), linux)
+ VBoxService_LIBS += \
+ crypt
+endif
ifdef VBOX_WITH_GUEST_PROPS
VBoxService_LIBS.win += \
Secur32.lib \
diff --git a/src/VBox/Additions/common/VBoxService/VBoxService.cpp b/src/VBox/Additions/common/VBoxService/VBoxService.cpp
index 894c75944..cf696b2c8 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxService.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxService.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxService.cpp 29345 2010-05-11 12:22:48Z vboxsync $ */
+/* $Id: VBoxService.cpp 29647 2010-05-18 15:59:51Z vboxsync $ */
/** @file
* VBoxService - Guest Additions Service Skeleton.
*/
@@ -109,31 +109,33 @@ static struct
*/
static int VBoxServiceUsage(void)
{
- RTPrintf("usage: %s [-f|--foreground] [-v|--verbose] [-i|--interval <seconds>]\n"
- " [--disable-<service>] [--enable-<service>] [-h|-?|--help]\n", g_pszProgName);
+ RTPrintf("Usage:\n"
+ " %-12s [-f|--foreground] [-v|--verbose] [-i|--interval <seconds>]\n"
+ " [--disable-<service>] [--enable-<service>] [-h|-?|--help]\n", g_pszProgName);
#ifdef RT_OS_WINDOWS
- RTPrintf(" [-r|--register] [-u|--unregister]\n");
+ RTPrintf(" [-r|--register] [-u|--unregister]\n");
#endif
for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++)
- RTPrintf(" %s\n", g_aServices[j].pDesc->pszUsage);
+ if (g_aServices[j].pDesc->pszUsage)
+ RTPrintf("%s\n", g_aServices[j].pDesc->pszUsage);
RTPrintf("\n"
"Options:\n"
- " -i | --interval The default interval.\n"
- " -f | --foreground Don't daemonzie the program. For debugging.\n"
- " -v | --verbose Increment the verbosity level. For debugging.\n"
- " -h | -? | --help Show this message and exit with status 1.\n"
+ " -i | --interval The default interval.\n"
+ " -f | --foreground Don't daemonzie the program. For debugging.\n"
+ " -v | --verbose Increment the verbosity level. For debugging.\n"
+ " -h | -? | --help Show this message and exit with status 1.\n"
);
#ifdef RT_OS_WINDOWS
- RTPrintf(" -r | --register Installs the service.\n"
- " -u | --unregister Uninstall service.\n");
+ RTPrintf(" -r | --register Installs the service.\n"
+ " -u | --unregister Uninstall service.\n");
#endif
RTPrintf("\n"
- "Service specific options:\n");
+ "Service-specific options:\n");
for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++)
{
- RTPrintf(" --enable-%-10s Enables the %s service. (default)\n", g_aServices[j].pDesc->pszName, g_aServices[j].pDesc->pszName);
- RTPrintf(" --disable-%-9s Disables the %s service.\n", g_aServices[j].pDesc->pszName, g_aServices[j].pDesc->pszName);
+ RTPrintf(" --enable-%-14s Enables the %s service. (default)\n", g_aServices[j].pDesc->pszName, g_aServices[j].pDesc->pszName);
+ RTPrintf(" --disable-%-13s Disables the %s service.\n", g_aServices[j].pDesc->pszName, g_aServices[j].pDesc->pszName);
if (g_aServices[j].pDesc->pszOptions)
RTPrintf("%s", g_aServices[j].pDesc->pszOptions);
}
@@ -357,10 +359,11 @@ int VBoxServiceStartServices(unsigned iMain)
/* The final service runs in the main thread. */
VBoxServiceVerbose(1, "Starting '%s' in the main thread\n", g_aServices[iMain].pDesc->pszName);
rc = g_aServices[iMain].pDesc->pfnWorker(&g_fShutdown);
- if (rc != VINF_SUCCESS) /* Only complain if service returned an error. Otherwise the service is a one-timer. */
- {
+ if (RT_SUCCESS(rc))
+ VBoxServiceVerbose(1, "Main service '%s' successfully stopped.\n", g_aServices[iMain].pDesc->pszName);
+ else /* Only complain if service returned an error. Otherwise the service is a one-timer. */
VBoxServiceError("Service '%s' stopped unexpected; rc=%Rrc\n", g_aServices[iMain].pDesc->pszName, rc);
- }
+ g_aServices[iMain].pDesc->pfnTerm();
}
return rc;
}
@@ -375,14 +378,24 @@ int VBoxServiceStartServices(unsigned iMain)
int VBoxServiceStopServices(void)
{
int rc = VINF_SUCCESS;
+ unsigned iMain = VBoxServiceGetStartedServices();
for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++)
ASMAtomicXchgBool(&g_aServices[j].fShutdown, true);
for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++)
if (g_aServices[j].fStarted)
+ {
+ VBoxServiceVerbose(3, "Calling stop function for service '%s' ...\n", g_aServices[j].pDesc->pszName);
g_aServices[j].pDesc->pfnStop();
+ }
for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++)
- if (g_aServices[j].fEnabled)
+
+ if ( !g_aServices[j].fEnabled /* Only stop services which were started before. */
+ || j == iMain) /* Don't call the termination function for main service yet. */
+ {
+ continue;
+ }
+ else
{
if (g_aServices[j].Thread != NIL_RTTHREAD)
{
@@ -404,10 +417,27 @@ int VBoxServiceStopServices(void)
g_aServices[j].pDesc->pfnTerm();
}
+#ifdef RT_OS_WINDOWS
+ /*
+ * As we're now done terminating all service threads,
+ * we have to stop the main thread as well (if defined). Note that the termination
+ * function will be called in a later context (when the main thread returns from the worker
+ * function).
+ */
+ if (iMain != ~0U)
+ {
+ VBoxServiceVerbose(3, "Stopping main service '%s' (%d) ...\n", g_aServices[iMain].pDesc->pszName, iMain);
+
+ ASMAtomicXchgBool(&g_fShutdown, true);
+ g_aServices[iMain].pDesc->pfnStop();
+ }
+#endif
+
VBoxServiceVerbose(2, "Stopping services returned: rc=%Rrc\n", rc);
return rc;
}
+
#ifndef RT_OS_WINDOWS
/*
* Block all important signals, then explicitly wait until one of these signal arrives.
@@ -423,29 +453,17 @@ static void VBoxServiceWaitSignal(void)
sigaddset(&signalMask, SIGABRT);
sigaddset(&signalMask, SIGTERM);
pthread_sigmask(SIG_BLOCK, &signalMask, NULL);
- sigwait(&signalMask, &iSignal);
- VBoxServiceVerbose(3, "VBoxServiceWaitSignal: Received signal %d\n", iSignal);
-}
-#endif
+ int rc;
+ do
+ {
+ iSignal = -1;
+ rc = sigwait(&signalMask, &iSignal);
+ }
+ while ( rc == EINTR
+ || rc == ERESTART);
-#ifndef RT_OS_WINDOWS
-/*
- * Block all important signals, then explicitly wait until one of these signal arrives.
- */
-static void VBoxServiceWaitSignal(void)
-{
- sigset_t signalMask;
- int iSignal;
- sigemptyset(&signalMask);
- sigaddset(&signalMask, SIGHUP);
- sigaddset(&signalMask, SIGINT);
- sigaddset(&signalMask, SIGQUIT);
- sigaddset(&signalMask, SIGABRT);
- sigaddset(&signalMask, SIGTERM);
- pthread_sigmask(SIG_BLOCK, &signalMask, NULL);
- sigwait(&signalMask, &iSignal);
- VBoxServiceVerbose(3, "VBoxServiceWaitSignal: Received signal %d\n", iSignal);
+ VBoxServiceVerbose(3, "VBoxServiceWaitSignal: Received signal %d (rc=%d)\n", iSignal, rc);
}
#endif /* !RT_OS_WINDOWS */
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
index 6d5e9ad2d..e28434dd3 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxServiceBalloon.cpp 29345 2010-05-11 12:22:48Z vboxsync $ */
+/* $Id: VBoxServiceBalloon.cpp 29543 2010-05-17 14:01:31Z vboxsync $ */
/** @file
* VBoxService - Memory Ballooning.
*/
@@ -62,9 +62,12 @@ static bool g_fSysMadviseWorks;
static void VBoxServiceBalloonInitMadvise(void)
{
#ifdef RT_OS_LINUX
- void *pv = RTMemPageAlloc(PAGE_SIZE);
- g_fSysMadviseWorks = madvise(pv, PAGE_SIZE, MADV_DONTFORK) == 0;
- RTMemPageFree(pv, PAGE_SIZE);
+ void *pv = (void*)mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (pv != MAP_FAILED)
+ {
+ g_fSysMadviseWorks = madvise(pv, PAGE_SIZE, MADV_DONTFORK) == 0;
+ munmap(pv, PAGE_SIZE);
+ }
#endif
}
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
index 3fb181266..bcb447101 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxServiceControl.cpp 29345 2010-05-11 12:22:48Z vboxsync $ */
+/* $Id: VBoxServiceControl.cpp 29594 2010-05-18 07:45:58Z vboxsync $ */
/** @file
* VBoxServiceControl - Host-driven Guest Control.
*/
@@ -114,14 +114,11 @@ static int VBoxServiceControlHandleCmdStartProcess(uint32_t u32ClientId, uint32_
char szEnv[_64K];
uint32_t cbEnv = sizeof(szEnv);
uint32_t uNumEnvVars;
- char szStdIn[_1K];
- char szStdOut[_1K];
- char szStdErr[_1K];
char szUser[128];
char szPassword[128];
uint32_t uTimeLimitMS;
- if (uNumParms != 14)
+ if (uNumParms != 11)
return VERR_INVALID_PARAMETER;
int rc = VbglR3GuestCtrlExecGetHostCmd(u32ClientId,
@@ -135,10 +132,6 @@ static int VBoxServiceControlHandleCmdStartProcess(uint32_t u32ClientId, uint32_
szArgs, sizeof(szArgs), &uNumArgs,
/* Environment */
szEnv, &cbEnv, &uNumEnvVars,
- /* Pipes */
- szStdIn, sizeof(szStdIn),
- szStdOut, sizeof(szStdOut),
- szStdErr, sizeof(szStdErr),
/* Credentials */
szUser, sizeof(szUser),
szPassword, sizeof(szPassword),
@@ -152,7 +145,6 @@ static int VBoxServiceControlHandleCmdStartProcess(uint32_t u32ClientId, uint32_
{
rc = VBoxServiceControlExecProcess(uContextID, szCmd, uFlags, szArgs, uNumArgs,
szEnv, cbEnv, uNumEnvVars,
- szStdIn, szStdOut, szStdErr,
szUser, szPassword, uTimeLimitMS);
}
@@ -178,7 +170,7 @@ static int VBoxServiceControlHandleCmdGetOutput(uint32_t u32ClientId, uint32_t u
{
/* Let's have a look if we have a running process with PID = uPID ... */
PVBOXSERVICECTRLTHREAD pNode;
- bool bFound = false;
+ bool fFound = false;
RTListForEach(&g_GuestControlExecThreads, pNode, VBOXSERVICECTRLTHREAD, Node)
{
if ( pNode->fStarted
@@ -187,18 +179,18 @@ static int VBoxServiceControlHandleCmdGetOutput(uint32_t u32ClientId, uint32_t u
PVBOXSERVICECTRLTHREADDATAEXEC pData = (PVBOXSERVICECTRLTHREADDATAEXEC)pNode->pvData;
if (pData && pData->uPID == uPID)
{
- bFound = true;
+ fFound = true;
break;
}
}
}
- if (bFound)
+ if (fFound)
{
PVBOXSERVICECTRLTHREADDATAEXEC pData = (PVBOXSERVICECTRLTHREADDATAEXEC)pNode->pvData;
AssertPtr(pData);
- uint32_t cbSize = _4K;
+ const uint32_t cbSize = _4K;
uint32_t cbRead = cbSize;
uint8_t *pBuf = (uint8_t*)RTMemAlloc(cbSize);
if (pBuf)
@@ -206,7 +198,6 @@ static int VBoxServiceControlHandleCmdGetOutput(uint32_t u32ClientId, uint32_t u
rc = VBoxServiceControlExecReadPipeBufferContent(&pData->stdOut, pBuf, cbSize, &cbRead);
if (RT_SUCCESS(rc))
{
- AssertPtr(pBuf);
/* cbRead now contains actual size. */
rc = VbglR3GuestCtrlExecSendOut(u32ClientId, uContextID, uPID, 0 /* handle ID */, 0 /* flags */,
pBuf, cbRead);
@@ -246,12 +237,12 @@ DECLCALLBACK(int) VBoxServiceControlWorker(bool volatile *pfShutdown)
uint32_t uMsg;
uint32_t uNumParms;
VBoxServiceVerbose(3, "Control: Waiting for host msg ...\n");
- rc = VbglR3GuestCtrlGetHostMsg(g_GuestControlSvcClientID, &uMsg, &uNumParms, 1000 /* 1s timeout */);
+ rc = VbglR3GuestCtrlGetHostMsg(g_GuestControlSvcClientID, &uMsg, &uNumParms);
if (RT_FAILURE(rc))
{
if (rc == VERR_TOO_MUCH_DATA)
{
- VBoxServiceVerbose(3, "Control: Message requires %ld parameters, but only 2 supplied -- retrying request ...\n", uNumParms);
+ VBoxServiceVerbose(4, "Control: Message requires %ld parameters, but only 2 supplied -- retrying request (no error!)...\n", uNumParms);
rc = VINF_SUCCESS; /* Try to get "real" message in next block below. */
}
else
@@ -263,6 +254,10 @@ DECLCALLBACK(int) VBoxServiceControlWorker(bool volatile *pfShutdown)
VBoxServiceVerbose(3, "Control: Msg=%u (%u parms) retrieved\n", uMsg, uNumParms);
switch(uMsg)
{
+ case GETHOSTMSG_EXEC_HOST_CANCEL_WAIT:
+ VBoxServiceVerbose(3, "Control: Host asked us to quit ...\n");
+ break;
+
case GETHOSTMSG_EXEC_START_PROCESS:
rc = VBoxServiceControlHandleCmdStartProcess(g_GuestControlSvcClientID, uNumParms);
break;
@@ -282,9 +277,10 @@ DECLCALLBACK(int) VBoxServiceControlWorker(bool volatile *pfShutdown)
}
/* Do we need to shutdown? */
- if (*pfShutdown)
+ if ( *pfShutdown
+ || uMsg == GETHOSTMSG_EXEC_HOST_CANCEL_WAIT)
{
- rc = 0;
+ rc = VINF_SUCCESS;
break;
}
@@ -301,15 +297,30 @@ DECLCALLBACK(int) VBoxServiceControlWorker(bool volatile *pfShutdown)
/** @copydoc VBOXSERVICE::pfnStop */
static DECLCALLBACK(void) VBoxServiceControlStop(void)
{
+ VBoxServiceVerbose(3, "Control: Stopping ...\n");
+
/** @todo Later, figure what to do if we're in RTProcWait(). it's a very
* annoying call since doesn't support timeouts in the posix world. */
RTSemEventMultiSignal(g_hControlEvent);
+
+ /*
+ * Ask the host service to cancel all pending requests so that we can
+ * shutdown properly here.
+ */
+ if (g_GuestControlSvcClientID)
+ {
+ int rc = VbglR3GuestCtrlCancelPendingWaits(g_GuestControlSvcClientID);
+ if (RT_FAILURE(rc))
+ VBoxServiceError("Control: Cancelling pending waits failed; rc=%Rrc\n", rc);
+ }
}
/** @copydoc VBOXSERVICE::pfnTerm */
static DECLCALLBACK(void) VBoxServiceControlTerm(void)
{
+ VBoxServiceVerbose(3, "Control: Terminating ...\n");
+
/* Signal all threads that we want to shutdown. */
PVBOXSERVICECTRLTHREAD pNode;
RTListForEach(&g_GuestControlExecThreads, pNode, VBOXSERVICECTRLTHREAD, Node)
@@ -320,6 +331,7 @@ static DECLCALLBACK(void) VBoxServiceControlTerm(void)
{
if (pNode->Thread != NIL_RTTHREAD)
{
+ /* Wait a bit ... */
int rc2 = RTThreadWait(pNode->Thread, 30 * 1000 /* Wait 30 seconds max. */, NULL);
if (RT_FAILURE(rc2))
VBoxServiceError("Control: Thread failed to stop; rc2=%Rrc\n", rc2);
@@ -373,11 +385,11 @@ VBOXSERVICE g_Control =
/* pszDescription. */
"Host-driven Guest Control",
/* pszUsage. */
- "[--control-interval <ms>]"
+ " [--control-interval <ms>]"
,
/* pszOptions. */
- " --control-interval Specifies the interval at which to check for\n"
- " new control commands. The default is 1000 ms.\n"
+ " --control-interval Specifies the interval at which to check for\n"
+ " new control commands. The default is 1000 ms.\n"
,
/* methods */
VBoxServiceControlPreInit,
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
index a17974090..9e62421d1 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
@@ -1,5 +1,5 @@
-/* $Id: VBoxServiceControlExec.cpp 29315 2010-05-11 07:53:29Z vboxsync $ */
+/* $Id: VBoxServiceControlExec.cpp 29627 2010-05-18 12:47:35Z vboxsync $ */
/** @file
* VBoxServiceControlExec - Utility functions for process execution.
*/
@@ -578,14 +578,14 @@ int VBoxServiceControlExecReadPipeBufferContent(PVBOXSERVICECTRLEXECPIPEBUF pBuf
int rc = RTCritSectEnter(&pBuf->CritSect);
if (RT_SUCCESS(rc))
- {
+ {
Assert(pBuf->cbOffset >= pBuf->cbRead);
if (*pcbToRead > pBuf->cbOffset - pBuf->cbRead)
*pcbToRead = pBuf->cbOffset - pBuf->cbRead;
-
+
if (*pcbToRead > cbBuffer)
*pcbToRead = cbBuffer;
-
+
if (*pcbToRead > 0)
{
memcpy(pbBuffer, pBuf->pbData + pBuf->cbRead, *pcbToRead);
@@ -608,7 +608,7 @@ int VBoxServiceControlExecWritePipeBuffer(PVBOXSERVICECTRLEXECPIPEBUF pBuf,
int rc = RTCritSectEnter(&pBuf->CritSect);
if (RT_SUCCESS(rc))
- {
+ {
/** @todo Use RTMemCache or RTMemObj here? */
uint8_t *pNewBuf;
while (pBuf->cbSize - pBuf->cbOffset < cbData)
@@ -619,7 +619,7 @@ int VBoxServiceControlExecWritePipeBuffer(PVBOXSERVICECTRLEXECPIPEBUF pBuf,
pBuf->cbSize += _4K;
pBuf->pbData = pNewBuf;
}
-
+
rc = VINF_SUCCESS;
if (pBuf->pbData)
{
@@ -642,12 +642,11 @@ int VBoxServiceControlExecAllocateThreadData(PVBOXSERVICECTRLTHREAD pThread,
const char *pszCmd, uint32_t uFlags,
const char *pszArgs, uint32_t uNumArgs,
const char *pszEnv, uint32_t cbEnv, uint32_t uNumEnvVars,
- const char *pszStdIn, const char *pszStdOut, const char *pszStdErr,
const char *pszUser, const char *pszPassword, uint32_t uTimeLimitMS)
{
AssertPtr(pThread);
- /* General stuff. */
+ /* General stuff. */
pThread->Node.pPrev = NULL;
pThread->Node.pNext = NULL;
@@ -699,9 +698,6 @@ int VBoxServiceControlExecAllocateThreadData(PVBOXSERVICECTRLTHREAD pThread,
}
}
- pData->pszStdIn = RTStrDup(pszStdIn);
- pData->pszStdOut = RTStrDup(pszStdOut);
- pData->pszStdErr = RTStrDup(pszStdErr);
pData->pszUser = RTStrDup(pszUser);
pData->pszPassword = RTStrDup(pszPassword);
pData->uTimeLimitMS = uTimeLimitMS;
@@ -733,7 +729,7 @@ int VBoxServiceControlExecAllocateThreadData(PVBOXSERVICECTRLTHREAD pThread,
void VBoxServiceControlExecDestroyThreadData(PVBOXSERVICECTRLTHREADDATAEXEC pData)
{
if (pData)
- {
+ {
RTStrFree(pData->pszCmd);
if (pData->uNumEnvVars)
{
@@ -742,12 +738,9 @@ void VBoxServiceControlExecDestroyThreadData(PVBOXSERVICECTRLTHREADDATAEXEC pDat
RTMemFree(pData->papszEnv);
}
RTGetOptArgvFree(pData->papszArgs);
- RTStrFree(pData->pszStdIn);
- RTStrFree(pData->pszStdOut);
- RTStrFree(pData->pszStdErr);
RTStrFree(pData->pszUser);
RTStrFree(pData->pszPassword);
-
+
VBoxServiceControlExecDestroyPipeBuffer(&pData->stdOut);
VBoxServiceControlExecDestroyPipeBuffer(&pData->stdErr);
@@ -908,7 +901,6 @@ static DECLCALLBACK(int) VBoxServiceControlExecThread(RTTHREAD ThreadSelf, void
int VBoxServiceControlExecProcess(uint32_t uContextID, const char *pszCmd, uint32_t uFlags,
const char *pszArgs, uint32_t uNumArgs,
const char *pszEnv, uint32_t cbEnv, uint32_t uNumEnvVars,
- const char *pszStdIn, const char *pszStdOut, const char *pszStdErr,
const char *pszUser, const char *pszPassword, uint32_t uTimeLimitMS)
{
PVBOXSERVICECTRLTHREAD pThread = (PVBOXSERVICECTRLTHREAD)RTMemAlloc(sizeof(VBOXSERVICECTRLTHREAD));
@@ -921,7 +913,6 @@ int VBoxServiceControlExecProcess(uint32_t uContextID, const char *pszCmd, uint3
pszCmd, uFlags,
pszArgs, uNumArgs,
pszEnv, cbEnv, uNumEnvVars,
- pszStdIn, pszStdOut, pszStdErr,
pszUser, pszPassword,
uTimeLimitMS);
if (RT_SUCCESS(rc))
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
index 24cdf78f1..2dfd11efe 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceCpuHotPlug.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxServiceCpuHotPlug.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: VBoxServiceCpuHotPlug.cpp 29503 2010-05-16 13:20:10Z vboxsync $ */
/** @file
* VBoxService - Guest Additions CPU Hot Plugging Service.
*/
@@ -40,14 +40,175 @@
/** @name Paths to access the CPU device
* @{
*/
-# define SYSFS_ACPI_CPU_PATH "/sys/devices/LNXSYSTM:00/device:00"
+# define SYSFS_ACPI_CPU_PATH "/sys/devices"
# define SYSFS_CPU_PATH "/sys/devices/system/cpu"
/** @} */
-#endif
+/** Path component for the ACPI CPU path. */
+typedef struct SYSFSCPUPATHCOMP
+{
+ /** Flag whether the name is suffixed with a number */
+ bool fNumberedSuffix;
+ /** Name of the component */
+ const char *pcszName;
+} SYSFSCPUPATHCOMP, *PSYSFSCPUPATHCOMP;
+/** Pointer to a const component. */
+typedef const SYSFSCPUPATHCOMP *PCSYSFSCPUPATHCOMP;
+
+/**
+ * Structure which defines how the entries are assembled.
+ */
+typedef struct SYSFSCPUPATH
+{
+ /** Id when probing for the correct path. */
+ uint32_t uId;
+ /** Array holding the possible components. */
+ PCSYSFSCPUPATHCOMP aComponentsPossible;
+ /** Number of entries in the array, excluding the terminator. */
+ unsigned cComponents;
+ /** Directory handle */
+ PRTDIR pDir;
+ /** Current directory to try. */
+ char *pszPath;
+} SYSFSCPUPATH, *PSYSFSCPUPATH;
+
+/** Content of uId if the path wasn't probed yet. */
+#define ACPI_CPU_PATH_NOT_PROBED UINT32_MAX
+
+/** Possible combinations of all path components for level 1. */
+const SYSFSCPUPATHCOMP g_aAcpiCpuPathLvl1[] =
+{
+ /** LNXSYSTEM:<id> */
+ {true, "LNXSYSTM:"}
+};
+
+/** Possible combinations of all path components for level 2. */
+const SYSFSCPUPATHCOMP g_aAcpiCpuPathLvl2[] =
+{
+ /** device:<id> */
+ {true, "device:"},
+ /** LNXSYBUS:<id> */
+ {true, "LNXSYBUS:"}
+};
+
+/** Possible combinations of all path components for level 3 */
+const SYSFSCPUPATHCOMP g_aAcpiCpuPathLvl3[] =
+{
+ /** ACPI0004:<id> */
+ {true, "ACPI0004:"}
+};
+
+/** Possible combinations of all path components for level 4 */
+const SYSFSCPUPATHCOMP g_aAcpiCpuPathLvl4[] =
+{
+ /** LNXCPU:<id> */
+ {true, "LNXCPU:"},
+ /** ACPI_CPU:<id> */
+ {true, "ACPI_CPU:"}
+};
+
+/** All possible combinations. */
+SYSFSCPUPATH g_aAcpiCpuPath[] =
+{
+ /** Level 1 */
+ {ACPI_CPU_PATH_NOT_PROBED, g_aAcpiCpuPathLvl1, RT_ELEMENTS(g_aAcpiCpuPathLvl1), NULL, NULL},
+ /** Level 2 */
+ {ACPI_CPU_PATH_NOT_PROBED, g_aAcpiCpuPathLvl2, RT_ELEMENTS(g_aAcpiCpuPathLvl2), NULL, NULL},
+ /** Level 3 */
+ {ACPI_CPU_PATH_NOT_PROBED, g_aAcpiCpuPathLvl3, RT_ELEMENTS(g_aAcpiCpuPathLvl3), NULL, NULL},
+ /** Level 4 */
+ {ACPI_CPU_PATH_NOT_PROBED, g_aAcpiCpuPathLvl4, RT_ELEMENTS(g_aAcpiCpuPathLvl4), NULL, NULL},
+};
+#endif
#ifdef RT_OS_LINUX
/**
+ * Probes for the correct path to the ACPI CPU object in sysfs for the
+ * various different kernel versions and distro's.
+ *
+ * @returns VBox status code.
+ */
+static int VBoxServiceCpuHotPlugProbePath(void)
+{
+ int rc = VINF_SUCCESS;
+
+ /* Probe for the correct path if we didn't already. */
+ if (RT_UNLIKELY(g_aAcpiCpuPath[0].uId == ACPI_CPU_PATH_NOT_PROBED))
+ {
+ char *pszPath = NULL; /** < Current path, increasing while we dig deeper. */
+
+ pszPath = RTStrDup(SYSFS_ACPI_CPU_PATH);
+ if (!pszPath)
+ return VERR_NO_MEMORY;
+
+ /*
+ * Simple algorithm to find the path.
+ * Performance is not a real problem because it is
+ * only executed once.
+ */
+ for (unsigned iLvlCurr = 0; iLvlCurr < RT_ELEMENTS(g_aAcpiCpuPath); iLvlCurr++)
+ {
+ PSYSFSCPUPATH pAcpiCpuPathLvl = &g_aAcpiCpuPath[iLvlCurr];
+
+ for (unsigned iCompCurr = 0; iCompCurr < pAcpiCpuPathLvl->cComponents; iCompCurr++)
+ {
+ PCSYSFSCPUPATHCOMP pPathComponent = &pAcpiCpuPathLvl->aComponentsPossible[iCompCurr];
+ PRTDIR pDirCurr = NULL;
+ char *pszPathTmp = NULL;
+ bool fFound = false;
+
+ rc = RTStrAPrintf(&pszPathTmp, "%s/%s*", pszPath, pPathComponent->pcszName);
+ if (RT_FAILURE(rc))
+ break;
+
+ /* Open the directory */
+ rc = RTDirOpenFiltered(&pDirCurr, pszPathTmp, RTDIRFILTER_WINNT);
+ if (RT_FAILURE(rc))
+ {
+ RTStrFree(pszPathTmp);
+ break;
+ }
+
+ /* Search if the current directory contains one of the possible parts. */
+ RTDIRENTRY DirFolderContent;
+ while (RT_SUCCESS(RTDirRead(pDirCurr, &DirFolderContent, NULL))) /* Assumption that szName has always enough space */
+ {
+ if (!strncmp(DirFolderContent.szName, pPathComponent->pcszName, strlen(pPathComponent->pcszName)))
+ {
+ char *pszPathLvl = NULL;
+
+ /* Found, use the complete name to dig deeper. */
+ fFound = true;
+ pAcpiCpuPathLvl->uId = iCompCurr;
+ rc = RTStrAPrintf(&pszPathLvl, "%s/%s", pszPath, DirFolderContent.szName);
+
+ if (RT_SUCCESS(rc))
+ {
+ RTStrFree(pszPath);
+ pszPath = pszPathLvl;
+ }
+ break;
+ }
+ }
+ RTDirClose(pDirCurr);
+
+ if (fFound)
+ break;
+ } /* For every possible component. */
+
+ /* No matching component for this part, no need to continue */
+ if (RT_FAILURE(rc))
+ break;
+ } /* For every level */
+
+ VBoxServiceVerbose(1, "Final path after probing %s rc=%Rrc\n", pszPath, rc);
+ RTStrFree(pszPath);
+ }
+
+ return rc;
+}
+
+/**
* Returns the path of the ACPI CPU device with the given core and package ID.
*
* @returns VBox status code.
@@ -57,61 +218,139 @@
*/
static int VBoxServiceCpuHotPlugGetACPIDevicePath(char **ppszPath, uint32_t idCpuCore, uint32_t idCpuPackage)
{
- AssertPtr(ppszPath);
+ int rc = VINF_SUCCESS;
+
+ AssertPtrReturn(ppszPath, VERR_INVALID_PARAMETER);
- PRTDIR pDirDevices = NULL;
- int rc = RTDirOpen(&pDirDevices, SYSFS_ACPI_CPU_PATH); /* could use RTDirOpenFiltered */
+ rc = VBoxServiceCpuHotPlugProbePath();
if (RT_SUCCESS(rc))
{
- /* Search every ACPI0004 container device for LNXCPU devices. */
- RTDIRENTRY DirFolderAcpiContainer;
+ /* Build the path from all components. */
bool fFound = false;
-
- while ( RT_SUCCESS(RTDirRead(pDirDevices, &DirFolderAcpiContainer, NULL))
- && !fFound) /* Assumption that szName has always enough space */
+ unsigned iLvlCurr = 0;
+ char *pszPath = NULL;
+ char *pszPathDir = NULL;
+ PSYSFSCPUPATH pAcpiCpuPathLvl = &g_aAcpiCpuPath[iLvlCurr];
+
+ /* Init everything. */
+ Assert(pAcpiCpuPathLvl->uId != ACPI_CPU_PATH_NOT_PROBED);
+ rc = RTStrAPrintf(&pszPath,
+ "%s/%s*", SYSFS_ACPI_CPU_PATH,
+ pAcpiCpuPathLvl->aComponentsPossible[pAcpiCpuPathLvl->uId].pcszName);
+ if (RT_FAILURE(rc))
+ return rc;
+
+ pAcpiCpuPathLvl->pszPath = RTStrDup(SYSFS_ACPI_CPU_PATH);
+ if (!pAcpiCpuPathLvl->pszPath)
+ return VERR_NO_MEMORY;
+
+ /* Open the directory */
+ rc = RTDirOpenFiltered(&pAcpiCpuPathLvl->pDir, pszPath, RTDIRFILTER_WINNT);
+ if (RT_SUCCESS(rc))
{
- if (!strncmp(DirFolderAcpiContainer.szName, "ACPI0004", 8))
- {
- char *pszAcpiContainerPath = NULL;
- PRTDIR pDirAcpiContainer = NULL;
+ RTStrFree(pszPath);
- rc = RTStrAPrintf(&pszAcpiContainerPath, "%s/%s", SYSFS_ACPI_CPU_PATH, DirFolderAcpiContainer.szName);
- if (RT_FAILURE(rc))
- break;
-
- rc = RTDirOpen(&pDirAcpiContainer, pszAcpiContainerPath);
+ /* Search for CPU */
+ while (!fFound)
+ {
+ /* Get the next directory. */
+ RTDIRENTRY DirFolderContent;
+ rc = RTDirRead(pAcpiCpuPathLvl->pDir, &DirFolderContent, NULL);
if (RT_SUCCESS(rc))
{
- RTDIRENTRY DirFolderContent;
- while (RT_SUCCESS(RTDirRead(pDirAcpiContainer, &DirFolderContent, NULL))) /* Assumption that szName has always enough space */
+ char *pszPathCurr;
+
+ /* Create the new path. */
+ rc = RTStrAPrintf(&pszPathCurr, "%s/%s", pAcpiCpuPathLvl->pszPath, DirFolderContent.szName);
+ if (RT_FAILURE(rc))
+ break;
+
+ /* If this is the last level check for the given core and package id. */
+ if (iLvlCurr == RT_ELEMENTS(g_aAcpiCpuPath) - 1)
{
- if ( !strncmp(DirFolderContent.szName, "LNXCPU", 6)
- || !strncmp(DirFolderContent.szName, "ACPI_CPU", 8))
+ /* Get the sysdev */
+ uint32_t idCore = RTLinuxSysFsReadIntFile(10, "%s/sysdev/topology/core_id",
+ pszPathCurr);
+ uint32_t idPackage = RTLinuxSysFsReadIntFile(10, "%s/sysdev/topology/physical_package_id",
+ pszPathCurr);
+ if ( idCore == idCpuCore
+ && idPackage == idCpuPackage)
+ {
+ /* Return the path */
+ pszPath = pszPathCurr;
+ fFound = true;
+ VBoxServiceVerbose(3, "CPU found\n");
+ break;
+ }
+ else
{
- /* Get the sysdev */
- uint32_t idCore = RTLinuxSysFsReadIntFile(10, "%s/%s/sysdev/topology/core_id",
- pszAcpiContainerPath, DirFolderContent.szName);
- uint32_t idPackage = RTLinuxSysFsReadIntFile(10, "%s/%s/sysdev/topology/physical_package_id",
- pszAcpiContainerPath, DirFolderContent.szName);
- if ( idCore == idCpuCore
- && idPackage == idCpuPackage)
- {
- /* Return the path */
- rc = RTStrAPrintf(ppszPath, "%s/%s", pszAcpiContainerPath, DirFolderContent.szName);
- fFound = true;
- break;
- }
+ /* Get the next directory. */
+ RTStrFree(pszPathCurr);
+ VBoxServiceVerbose(3, "CPU doesn't match, next directory\n");
}
}
+ else
+ {
+ /* Go deeper */
+ iLvlCurr++;
+
+ VBoxServiceVerbose(3, "Going deeper (iLvlCurr=%u)\n", iLvlCurr);
+
+ pAcpiCpuPathLvl = &g_aAcpiCpuPath[iLvlCurr];
+
+ Assert(!pAcpiCpuPathLvl->pDir);
+ Assert(!pAcpiCpuPathLvl->pszPath);
+ pAcpiCpuPathLvl->pszPath = pszPathCurr;
+ PCSYSFSCPUPATHCOMP pPathComponent = &pAcpiCpuPathLvl->aComponentsPossible[pAcpiCpuPathLvl->uId];
+
+ Assert(pAcpiCpuPathLvl->uId != ACPI_CPU_PATH_NOT_PROBED);
+
+ rc = RTStrAPrintf(&pszPathDir, "%s/%s*", pszPathCurr, pPathComponent->pcszName);
+ if (RT_FAILURE(rc))
+ break;
+
+ VBoxServiceVerbose(3, "New path %s\n", pszPathDir);
+
+ /* Open the directory */
+ rc = RTDirOpenFiltered(&pAcpiCpuPathLvl->pDir, pszPathDir, RTDIRFILTER_WINNT);
+ if (RT_FAILURE(rc))
+ break;
+ }
+ }
+ else
+ {
+ /* Go back one level and try to get the next entry. */
+ Assert(iLvlCurr > 0);
+
+ RTDirClose(pAcpiCpuPathLvl->pDir);
+ RTStrFree(pAcpiCpuPathLvl->pszPath);
+ pAcpiCpuPathLvl->pDir = NULL;
+ pAcpiCpuPathLvl->pszPath = NULL;
- RTDirClose(pDirAcpiContainer);
+ iLvlCurr--;
+ pAcpiCpuPathLvl = &g_aAcpiCpuPath[iLvlCurr];
+ VBoxServiceVerbose(3, "Directory not found, going back (iLvlCurr=%u)\n", iLvlCurr);
}
+ } /* while not found */
+ } /* Successful init */
- RTStrFree(pszAcpiContainerPath);
- }
+ /* Cleanup */
+ for (unsigned i = 0; i < RT_ELEMENTS(g_aAcpiCpuPath); i++)
+ {
+ if (g_aAcpiCpuPath[i].pDir)
+ RTDirClose(g_aAcpiCpuPath[i].pDir);
+ if (g_aAcpiCpuPath[i].pszPath)
+ RTStrFree(g_aAcpiCpuPath[i].pszPath);
+ g_aAcpiCpuPath[i].pDir = NULL;
+ g_aAcpiCpuPath[i].pszPath = NULL;
}
+ if (pszPathDir)
+ RTStrFree(pszPathDir);
+ if (RT_FAILURE(rc) && pszPath)
+ RTStrFree(pszPath);
- RTDirClose(pDirDevices);
+ if (RT_SUCCESS(rc))
+ *ppszPath = pszPath;
}
return rc;
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h b/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
index 6c56ab873..4a4e686f2 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
@@ -1,4 +1,4 @@
-/* $Id: VBoxServiceInternal.h 29313 2010-05-11 07:08:01Z vboxsync $ */
+/* $Id: VBoxServiceInternal.h 29516 2010-05-17 09:55:17Z vboxsync $ */
/** @file
* VBoxService - Guest Additions Services.
*/
@@ -153,9 +153,6 @@ typedef struct
uint32_t uNumArgs;
char **papszEnv;
uint32_t uNumEnvVars;
- char *pszStdIn;
- char *pszStdOut;
- char *pszStdErr;
char *pszUser;
char *pszPassword;
uint32_t uTimeLimitMS;
@@ -301,7 +298,6 @@ extern int VBoxServiceWinGetComponentVersions(uint32_t uiClientID);
extern int VBoxServiceControlExecProcess(uint32_t uContext, const char *pszCmd, uint32_t uFlags,
const char *pszArgs, uint32_t uNumArgs,
const char *pszEnv, uint32_t cbEnv, uint32_t uNumEnvVars,
- const char *pszStdIn, const char *pszStdOut, const char *pszStdErr,
const char *pszUser, const char *pszPassword, uint32_t uTimeLimitMS);
extern void VBoxServiceControlExecDestroyThreadData(PVBOXSERVICECTRLTHREADDATAEXEC pThread);
extern int VBoxServiceControlExecReadPipeBufferContent(PVBOXSERVICECTRLEXECPIPEBUF pBuf,
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp b/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
index 33f631091..d34b92320 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxServicePageSharing.cpp 29424 2010-05-12 15:11:09Z vboxsync $ */
+/* $Id: VBoxServicePageSharing.cpp 29640 2010-05-18 14:30:50Z vboxsync $ */
/** @file
* VBoxService - Guest page sharing.
*/
@@ -21,6 +21,7 @@
*******************************************************************************/
#include <iprt/assert.h>
#include <iprt/avl.h>
+#include <iprt/asm.h>
#include <iprt/mem.h>
#include <iprt/stream.h>
#include <iprt/string.h>
@@ -58,9 +59,9 @@ static PAVLPVNODECORE pKnownModuleTree = NULL;
/**
* Registers a new module with the VMM
- * @param dwProcessId Process id
+ * @param pModule Module ptr
*/
-void VBoxServicePageSharingRegisterModule(HANDLE hProcess, PKNOWN_MODULE pModule)
+void VBoxServicePageSharingRegisterModule(PKNOWN_MODULE pModule)
{
VMMDEVSHAREDREGIONDESC aRegions[VMMDEVSHAREDREGIONDESC_MAX];
DWORD dwModuleSize = pModule->Info.modBaseSize;
@@ -128,9 +129,9 @@ void VBoxServicePageSharingRegisterModule(HANDLE hProcess, PKNOWN_MODULE pModule
unsigned idxRegion = 0;
do
{
- MEMORY_BASIC_INFORMATION MemInfo[16];
+ MEMORY_BASIC_INFORMATION MemInfo;
- SIZE_T ret = VirtualQueryEx(hProcess, pBaseAddress, &MemInfo[0], sizeof(MemInfo));
+ SIZE_T ret = VirtualQuery(pBaseAddress, &MemInfo, sizeof(MemInfo));
Assert(ret);
if (!ret)
{
@@ -138,42 +139,51 @@ void VBoxServicePageSharingRegisterModule(HANDLE hProcess, PKNOWN_MODULE pModule
break;
}
- unsigned cMemInfoBlocks = ret / sizeof(MemInfo[0]);
-
- for (unsigned i = 0; i < cMemInfoBlocks; i++)
+ if ( MemInfo.State == MEM_COMMIT
+ && MemInfo.Type == MEM_IMAGE)
{
- if ( MemInfo[i].State == MEM_COMMIT
- && MemInfo[i].Type == MEM_IMAGE)
+ switch (MemInfo.Protect)
{
- switch (MemInfo[i].Protect)
- {
- case PAGE_EXECUTE:
- case PAGE_EXECUTE_READ:
- case PAGE_READONLY:
- aRegions[idxRegion].GCRegionAddr = (RTGCPTR64)MemInfo[i].BaseAddress;
- aRegions[idxRegion].cbRegion = MemInfo[i].RegionSize;
- idxRegion++;
- break;
+ case PAGE_EXECUTE:
+ case PAGE_EXECUTE_READ:
+ case PAGE_READONLY:
+ {
+ char *pRegion = (char *)MemInfo.BaseAddress;
- default:
- break; /* ignore */
+ /* Skip the first region as it only contains the image file header. */
+ if (pRegion != (char *)pModule->Info.modBaseAddr)
+ {
+ /* Touch all pages. */
+ while (pRegion < (char *)MemInfo.BaseAddress + MemInfo.RegionSize)
+ {
+ /* Try to trick the optimizer to leave the page touching code in place. */
+ ASMProbeReadByte(pRegion);
+ pRegion += PAGE_SIZE;
+ }
}
- }
+ aRegions[idxRegion].GCRegionAddr = (RTGCPTR64)MemInfo.BaseAddress;
+ aRegions[idxRegion].cbRegion = MemInfo.RegionSize;
+ idxRegion++;
- pBaseAddress = (BYTE *)MemInfo[i].BaseAddress + MemInfo[i].RegionSize;
- if (dwModuleSize > MemInfo[i].RegionSize)
- {
- dwModuleSize -= MemInfo[i].RegionSize;
- }
- else
- {
- dwModuleSize = 0;
break;
}
- if (idxRegion >= RT_ELEMENTS(aRegions))
- break; /* out of room */
+ default:
+ break; /* ignore */
+ }
+ }
+
+ pBaseAddress = (BYTE *)MemInfo.BaseAddress + MemInfo.RegionSize;
+ if (dwModuleSize > MemInfo.RegionSize)
+ {
+ dwModuleSize -= MemInfo.RegionSize;
+ }
+ else
+ {
+ dwModuleSize = 0;
+ break;
}
+
if (idxRegion >= RT_ELEMENTS(aRegions))
break; /* out of room */
}
@@ -186,7 +196,6 @@ void VBoxServicePageSharingRegisterModule(HANDLE hProcess, PKNOWN_MODULE pModule
if (RT_FAILURE(rc))
VBoxServiceVerbose(3, "VbglR3RegisterSharedModule failed with %d\n", rc);
-
end:
RTMemFree(pVersionInfo);
return;
@@ -226,6 +235,12 @@ void VBoxServicePageSharingInspectModules(DWORD dwProcessId, PAVLPVNODECORE *ppN
bRet = Module32First(hSnapshot, &ModuleInfo);
do
{
+ /** todo when changing this make sure VBoxService.exe is excluded! */
+ char *pszDot = strrchr(ModuleInfo.szModule, '.');
+ if ( pszDot
+ && (pszDot[1] == 'e' || pszDot[1] == 'E'))
+ continue; /* ignore executables for now. */
+
/* Found it before? */
PAVLPVNODECORE pRec = RTAvlPVGet(ppNewTree, ModuleInfo.modBaseAddr);
if (!pRec)
@@ -243,7 +258,7 @@ void VBoxServicePageSharingInspectModules(DWORD dwProcessId, PAVLPVNODECORE *ppN
pModule->Core.Key = ModuleInfo.modBaseAddr;
pModule->hModule = LoadLibraryEx(ModuleInfo.szExePath, 0, DONT_RESOLVE_DLL_REFERENCES);
if (pModule->hModule)
- VBoxServicePageSharingRegisterModule(hProcess, pModule);
+ VBoxServicePageSharingRegisterModule(pModule);
pRec = &pModule->Core;
}
@@ -272,6 +287,7 @@ void VBoxServicePageSharingInspectGuest()
{
HANDLE hSnapshot;
PAVLPVNODECORE pNewTree = NULL;
+ DWORD dwProcessId = GetCurrentProcessId();
VBoxServiceVerbose(3, "VBoxServicePageSharingInspectGuest\n");
@@ -290,7 +306,9 @@ void VBoxServicePageSharingInspectGuest()
do
{
- VBoxServicePageSharingInspectModules(ProcessInfo.th32ProcessID, &pNewTree);
+ /* Skip our own process. */
+ if (ProcessInfo.th32ProcessID != dwProcessId)
+ VBoxServicePageSharingInspectModules(ProcessInfo.th32ProcessID, &pNewTree);
}
while (Process32Next(hSnapshot, &ProcessInfo));
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
index 23288cda3..f9fa4d78e 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxServiceTimeSync.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: VBoxServiceTimeSync.cpp 29594 2010-05-18 07:45:58Z vboxsync $ */
/** @file
* VBoxService - Guest Additions TimeSync Service.
*/
@@ -623,30 +623,27 @@ VBOXSERVICE g_TimeSync =
/* pszDescription. */
"Time synchronization",
/* pszUsage. */
- "[--timesync-interval <ms>] [--timesync-min-adjust <ms>] "
- "[--timesync-latency-factor <x>] [--timesync-max-latency <ms>]"
- "[--timesync-set-threshold <ms>] [--timesync-set-start]"
+ " [--timesync-interval <ms>] [--timesync-min-adjust <ms>]\n"
+ " [--timesync-latency-factor <x>] [--timesync-max-latency <ms>]\n"
+ " [--timesync-set-threshold <ms>] [--timesync-set-start]"
,
/* pszOptions. */
- " --timesync-interval Specifies the interval at which to synchronize the\n"
- " time with the host. The default is 10000 ms.\n"
- " --timesync-min-adjust\n"
- " The minimum absolute drift value measured in\n"
- " milliseconds to make adjustments for.\n"
- " The default is 1000 ms on OS/2 and 100 ms elsewhere.\n"
+ " --timesync-interval Specifies the interval at which to synchronize the\n"
+ " time with the host. The default is 10000 ms.\n"
+ " --timesync-min-adjust The minimum absolute drift value measured in\n"
+ " milliseconds to make adjustments for.\n"
+ " The default is 1000 ms on OS/2 and 100 ms elsewhere.\n"
" --timesync-latency-factor\n"
- " The factor to multiply the time query latency with to\n"
- " calculate the dynamic minimum adjust time.\n"
- " The default is 8 times.\n"
- " --timesync-max-latency\n"
- " The max host timer query latency to accept.\n"
- " The default is 250 ms.\n"
+ " The factor to multiply the time query latency with\n"
+ " to calculate the dynamic minimum adjust time.\n"
+ " The default is 8 times.\n"
+ " --timesync-max-latency The max host timer query latency to accept.\n"
+ " The default is 250 ms.\n"
" --timesync-set-threshold\n"
- " The absolute drift threshold, given as milliseconds,\n"
- " where to start setting the time instead of trying to\n"
- " adjust it. The default is 20 min.\n"
- " --timesync-set-start\n"
- " Set the time when starting the time sync service.\n"
+ " The absolute drift threshold, given as milliseconds,\n"
+ " where to start setting the time instead of trying to\n"
+ " adjust it. The default is 20 min.\n"
+ " --timesync-set-start Set the time when starting the time sync service.\n"
,
/* methods */
VBoxServiceTimeSyncPreInit,
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
index 5a26038a0..3c90bc916 100644
--- a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
+++ b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxServiceVMInfo.cpp 29398 2010-05-12 09:45:06Z vboxsync $ */
+/* $Id: VBoxServiceVMInfo.cpp 29594 2010-05-18 07:45:58Z vboxsync $ */
/** @file
* VBoxService - Virtual Machine Information for the Host.
*/
@@ -620,11 +620,11 @@ VBOXSERVICE g_VMInfo =
/* pszDescription. */
"Virtual Machine Information",
/* pszUsage. */
- "[--vminfo-interval <ms>]"
+ " [--vminfo-interval <ms>]"
,
/* pszOptions. */
- " --vminfo-interval Specifies the interval at which to retrieve the\n"
- " VM information. The default is 10000 ms.\n"
+ " --vminfo-interval Specifies the interval at which to retrieve the\n"
+ " VM information. The default is 10000 ms.\n"
,
/* methods */
VBoxServiceVMInfoPreInit,
diff --git a/src/VBox/Additions/common/crOpenGL/context.c b/src/VBox/Additions/common/crOpenGL/context.c
index 98b427325..c4bf2af6f 100644
--- a/src/VBox/Additions/common/crOpenGL/context.c
+++ b/src/VBox/Additions/common/crOpenGL/context.c
@@ -190,7 +190,7 @@ stubGetWindowInfo( Display *dpy, GLXDrawable drawable )
if (!hwnd)
{
- crError("Can't get HWND for given HDC(%x)", drawable);
+ return NULL;
}
winInfo = (WindowInfo *) crHashtableSearch(stub.windowTable, (unsigned int) hwnd);
diff --git a/src/VBox/Additions/linux/installer/vboxadd-x11.sh b/src/VBox/Additions/linux/installer/vboxadd-x11.sh
index fca4713bd..2916f1cb9 100644
--- a/src/VBox/Additions/linux/installer/vboxadd-x11.sh
+++ b/src/VBox/Additions/linux/installer/vboxadd-x11.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Sun VirtualBox
-# Linux Additions X11 setup init script ($Revision: 29406 $)
+# Linux Additions X11 setup init script ($Revision: 29612 $)
#
#
@@ -322,7 +322,8 @@ setup()
vboxvideo_src=vboxvideo_drv_18.so
vboxmouse_src=vboxmouse_drv_18.so
doxorgconfd="true"
- setupxorgconf=""
+ # Fedora 13 looks likely to ship without vboxvideo detection
+ test "$system" = "redhat" || setupxorgconf=""
;;
1.6.99.* | 1.7.* )
begin "Installing X.Org Server 1.7 modules"
diff --git a/src/VBox/Additions/linux/sharedfolders/files_vboxsf b/src/VBox/Additions/linux/sharedfolders/files_vboxsf
index 9c9b83dde..a33307992 100755..100644
--- a/src/VBox/Additions/linux/sharedfolders/files_vboxsf
+++ b/src/VBox/Additions/linux/sharedfolders/files_vboxsf
@@ -1,10 +1,11 @@
#!/bin/sh
+# $Id: $
## @file
# Shared file between Makefile.kmk and export_modules
#
#
-# Copyright (C) 2007 Oracle Corporation
+# Copyright (C) 2007-2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
@@ -19,6 +20,8 @@ FILES_VBOXSF_NOBIN=" \
${PATH_ROOT}/include/iprt/nocrt/limits.h=>include/iprt/nocrt/limits.h \
${PATH_ROOT}/include/iprt/alloc.h=>include/iprt/alloc.h \
${PATH_ROOT}/include/iprt/asm.h=>include/iprt/asm.h \
+ ${PATH_ROOT}/include/iprt/asm-amd64-x86.h=>include/iprt/asm-amd64-x86.h \
+ ${PATH_ROOT}/include/iprt/asm-math.h=>include/iprt/asm-math.h \
${PATH_ROOT}/include/iprt/assert.h=>include/iprt/assert.h \
${PATH_ROOT}/include/iprt/cdefs.h=>include/iprt/cdefs.h \
${PATH_ROOT}/include/iprt/err.h=>include/iprt/err.h \
diff --git a/src/VBox/Additions/x11/Installer/x11config-new.pl b/src/VBox/Additions/x11/Installer/x11config-new.pl
index d9989a22c..92fbee7dc 100644
--- a/src/VBox/Additions/x11/Installer/x11config-new.pl
+++ b/src/VBox/Additions/x11/Installer/x11config-new.pl
@@ -22,7 +22,7 @@ my $old_mouse_dev = "/dev/psaux";
foreach $arg (@ARGV)
{
- if (lc($arg) eq "--autoMouse")
+ if (lc($arg) eq "--automouse")
{
$auto_mouse = 1;
}
diff --git a/src/VBox/Devices/Builtins.cpp b/src/VBox/Devices/Builtins.cpp
index 9a3d4bbb5..24a433d15 100644
--- a/src/VBox/Devices/Builtins.cpp
+++ b/src/VBox/Devices/Builtins.cpp
@@ -1,4 +1,4 @@
-/* $Id: Builtins.cpp 29326 2010-05-11 10:08:13Z vboxsync $ */
+/* $Id: Builtins.cpp 29522 2010-05-17 10:15:48Z vboxsync $ */
/** @file
* Built-in drivers & devices (part 1)
*/
@@ -82,16 +82,6 @@ extern "C" DECLEXPORT(int) VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t
if (RT_FAILURE(rc))
return rc;
#endif
-#ifdef VBOX_WITH_SMC
- rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSMC);
- if (RT_FAILURE(rc))
- return rc;
-#endif
-#ifdef VBOX_WITH_LPC
- rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLPC);
- if (RT_FAILURE(rc))
- return rc;
-#endif
#ifdef VBOX_WITH_EFI
rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEFI);
if (RT_FAILURE(rc))
diff --git a/src/VBox/Devices/Builtins.h b/src/VBox/Devices/Builtins.h
index 2b89a860b..0b9a23cbe 100644
--- a/src/VBox/Devices/Builtins.h
+++ b/src/VBox/Devices/Builtins.h
@@ -1,4 +1,4 @@
-/* $Id: Builtins.h 29326 2010-05-11 10:08:13Z vboxsync $ */
+/* $Id: Builtins.h 29522 2010-05-17 10:15:48Z vboxsync $ */
/** @file
* Built-in drivers & devices (part 1) header.
*/
@@ -79,12 +79,6 @@ extern const PDMDEVREG g_DevicePCIBridge;
extern const PDMDEVREG g_DeviceLsiLogicSCSI;
extern const PDMDEVREG g_DeviceLsiLogicSAS;
#endif
-#ifdef VBOX_WITH_SMC
-extern const PDMDEVREG g_DeviceSMC;
-#endif
-#ifdef VBOX_WITH_LPC
-extern const PDMDEVREG g_DeviceLPC;
-#endif
#ifdef VBOX_WITH_EFI
extern const PDMDEVREG g_DeviceEFI;
#endif
diff --git a/src/VBox/Devices/Builtins2.cpp b/src/VBox/Devices/Builtins2.cpp
index ad013f43a..b27190974 100644
--- a/src/VBox/Devices/Builtins2.cpp
+++ b/src/VBox/Devices/Builtins2.cpp
@@ -1,10 +1,12 @@
/* $Id $ */
/** @file
- * Built-in drivers & devices (part 2).
+ * Built-in drivers & devices part 2.
+ *
+ * These drivers and devices are in separate modules because of LGPL.
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -60,6 +62,16 @@ extern "C" DECLEXPORT(int) VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t
rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceIOAPIC);
if (RT_FAILURE(rc))
return rc;
+#ifdef VBOX_WITH_SMC
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSMC);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
+#ifdef VBOX_WITH_LPC
+ rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLPC);
+ if (RT_FAILURE(rc))
+ return rc;
+#endif
return VINF_SUCCESS;
}
diff --git a/src/VBox/Devices/Builtins2.h b/src/VBox/Devices/Builtins2.h
index 7681cec59..584816f11 100644
--- a/src/VBox/Devices/Builtins2.h
+++ b/src/VBox/Devices/Builtins2.h
@@ -1,10 +1,12 @@
-/* $Id: Builtins2.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: Builtins2.h 29563 2010-05-17 15:15:02Z vboxsync $ */
/** @file
- * Built-in drivers & devices (part 2) header.
+ * Built-in drivers & devices part 2 header.
+ *
+ * These drivers and devices are in separate modules because of LGPL.
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +45,12 @@ extern DECLIMPORT(const unsigned) g_cbVmiBiosBinary;
#endif /* !IN_VBOXDD2 */
extern const PDMDEVREG g_DeviceAPIC;
extern const PDMDEVREG g_DeviceIOAPIC;
+#ifdef VBOX_WITH_SMC
+extern const PDMDEVREG g_DeviceSMC;
+#endif
+#ifdef VBOX_WITH_LPC
+extern const PDMDEVREG g_DeviceLPC;
+#endif
RT_C_DECLS_END
diff --git a/src/VBox/Devices/Makefile.kmk b/src/VBox/Devices/Makefile.kmk
index 7fd14771a..edca28921 100644
--- a/src/VBox/Devices/Makefile.kmk
+++ b/src/VBox/Devices/Makefile.kmk
@@ -1,4 +1,4 @@
-# $Id: Makefile.kmk 29332 2010-05-11 10:22:27Z vboxsync $
+# $Id: Makefile.kmk 29590 2010-05-18 07:02:17Z vboxsync $
## @file
# Top-level sub-makefile for the devices, drivers and services.
#
@@ -179,9 +179,6 @@ endif
ifdef VBOX_WITH_SMC
VBoxDD_DEFS += VBOX_WITH_SMC
endif
-ifdef VBOX_WITH_LPC
- VBoxDD_DEFS += VBOX_WITH_LPC
-endif
ifdef VBOX_WITH_EFI
VBoxDD_DEFS += VBOX_WITH_EFI
endif
@@ -249,6 +246,7 @@ VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dyli
VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
+
#
# VBoxDD2 (shared object)
#
@@ -259,6 +257,14 @@ VBoxDD2_INCS := \
VBoxDD2_SOURCES = \
Builtins2.cpp \
PC/DevAPIC.cpp
+ifdef VBOX_WITH_SMC
+ VBoxDD2_DEFS += VBOX_WITH_SMC
+ VBoxDD2_SOURCES += PC/DevSMC.cpp
+endif
+ifdef VBOX_WITH_LPC
+ VBoxDD2_DEFS += VBOX_WITH_LPC
+ VBoxDD2_SOURCES += PC/DevLPC.cpp
+endif
VBoxDD2_LIBS = \
$(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
$(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
@@ -282,8 +288,7 @@ DevicesR3_TEMPLATE = VBOXR3
DevicesR3_SDKS.win = WINPSDK W2K3DDK
DevicesR3_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE
DevicesR3_DEFS += VBOX_HGCM_HOST_CODE \
- VBOX_WITH_HGCM \
- $(if $(VBOX_WITH_PAGE_SHARING),VBOX_WITH_PAGE_SHARING,)
+ VBOX_WITH_HGCM
DevicesR3_DEFS.linux += _GNU_SOURCE
DevicesR3_DEFS.l4 += _GNU_SOURCE
@@ -424,16 +429,6 @@ ifdef VBOX_WITH_HPET
DevicesR3_SOURCES += PC/DevHPET.cpp
endif
-ifdef VBOX_WITH_SMC
- DevicesR3_DEFS += VBOX_WITH_SMC
- DevicesR3_SOURCES += PC/DevSMC.cpp
-endif
-
-ifdef VBOX_WITH_LPC
- DevicesR3_DEFS += VBOX_WITH_LPC
- DevicesR3_SOURCES += PC/DevLPC.cpp
-endif
-
ifdef VBOX_WITH_EFI
DevicesR3_DEFS += VBOX_WITH_EFI
ifdef VBOX_WITH_ALT_EFITHUNK
@@ -795,8 +790,16 @@ VBoxDD2R0_INCS := \
$(PATH_SUB_CURRENT)
VBoxDD2R0_SOURCES = \
PC/DevAPIC.cpp
+
+ifdef VBOX_WITH_SMC
+ VBoxDD2R0_DEFS += VBOX_WITH_SMC
+ VBoxDD2R0_SOURCES += PC/DevSMC.cpp
+endif
+
if1of ($(VBOX_LDR_FMT), pe lx)
-VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
+VBoxDD2R0_LIBS = \
+ $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
+ $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
endif
diff --git a/src/VBox/Devices/Network/DevE1000.cpp b/src/VBox/Devices/Network/DevE1000.cpp
index 5d1cc0532..b71bc605a 100644
--- a/src/VBox/Devices/Network/DevE1000.cpp
+++ b/src/VBox/Devices/Network/DevE1000.cpp
@@ -1,4 +1,4 @@
-/* $Id: DevE1000.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: DevE1000.cpp 29439 2010-05-13 00:32:18Z vboxsync $ */
/** @file
* DevE1000 - Intel 82540EM Ethernet Controller Emulation.
*
@@ -1043,16 +1043,16 @@ struct E1kState_st
STAMCOUNTER StatReceiveBytes;
STAMCOUNTER StatTransmitBytes;
#if defined(VBOX_WITH_STATISTICS) || defined(E1K_REL_STATS)
- STAMPROFILEADV StatMMIOReadGC;
- STAMPROFILEADV StatMMIOReadHC;
- STAMPROFILEADV StatMMIOWriteGC;
- STAMPROFILEADV StatMMIOWriteHC;
+ STAMPROFILEADV StatMMIOReadRZ;
+ STAMPROFILEADV StatMMIOReadR3;
+ STAMPROFILEADV StatMMIOWriteRZ;
+ STAMPROFILEADV StatMMIOWriteR3;
STAMPROFILEADV StatEEPROMRead;
STAMPROFILEADV StatEEPROMWrite;
- STAMPROFILEADV StatIOReadGC;
- STAMPROFILEADV StatIOReadHC;
- STAMPROFILEADV StatIOWriteGC;
- STAMPROFILEADV StatIOWriteHC;
+ STAMPROFILEADV StatIOReadRZ;
+ STAMPROFILEADV StatIOReadR3;
+ STAMPROFILEADV StatIOWriteRZ;
+ STAMPROFILEADV StatIOWriteR3;
STAMPROFILEADV StatLateIntTimer;
STAMCOUNTER StatLateInts;
STAMCOUNTER StatIntsRaised;
@@ -1060,8 +1060,10 @@ struct E1kState_st
STAMPROFILEADV StatReceive;
STAMPROFILEADV StatReceiveFilter;
STAMPROFILEADV StatReceiveStore;
- STAMPROFILEADV StatTransmit;
- STAMPROFILE StatTransmitSend;
+ STAMPROFILEADV StatTransmitRZ;
+ STAMPROFILEADV StatTransmitR3;
+ STAMPROFILE StatTransmitSendRZ;
+ STAMPROFILE StatTransmitSendR3;
STAMPROFILE StatRxOverflow;
STAMCOUNTER StatRxOverflowWakeup;
STAMCOUNTER StatTxDescCtxNormal;
@@ -2576,15 +2578,17 @@ static int e1kRegWriteRCTL(E1KSTATE* pState, uint32_t offset, uint32_t index, ui
pState->pDrvR3->pfnSetPromiscuousMode(pState->pDrvR3, fBecomePromiscous);
#endif
}
+
/* Adjust receive buffer size */
- if (GET_BITS(RCTL, BSIZE) != GET_BITS_V(value, RCTL, BSIZE))
- {
- pState->u16RxBSize = 2048 >> GET_BITS(RCTL, BSIZE);
- if (RCTL & RCTL_BSEX)
- pState->u16RxBSize *= 16;
- E1kLog2(("%s e1kRegWriteRCTL: Setting receive buffer size to %d\n",
- INSTANCE(pState), pState->u16RxBSize));
- }
+ unsigned cbRxBuf = 2048 >> GET_BITS_V(value, RCTL, BSIZE);
+ if (value & RCTL_BSEX)
+ cbRxBuf *= 16;
+ if (cbRxBuf != pState->u16RxBSize)
+ E1kLog2(("%s e1kRegWriteRCTL: Setting receive buffer size to %d (old %d)\n",
+ INSTANCE(pState), cbRxBuf, pState->u16RxBSize));
+ pState->u16RxBSize = cbRxBuf;
+
+ /* Update the register */
e1kRegWriteDefault(pState, offset, index, value);
return VINF_SUCCESS;
@@ -3200,9 +3204,9 @@ static void e1kTransmitFrame(E1KSTATE* pState, bool fOnWorkerThread)
/* Release critical section to avoid deadlock in CanReceive */
//e1kCsLeave(pState);
e1kMutexRelease(pState);
- STAM_PROFILE_START(&pState->StatTransmitSend, a);
+ STAM_PROFILE_START(&pState->CTX_SUFF_Z(StatTransmitSend), a);
rc = pDrv->pfnSendBuf(pDrv, pSg, fOnWorkerThread);
- STAM_PROFILE_STOP(&pState->StatTransmitSend, a);
+ STAM_PROFILE_STOP(&pState->CTX_SUFF_Z(StatTransmitSend), a);
e1kMutexAcquire(pState, VERR_SEM_BUSY, RT_SRC_POS);
//e1kCsEnter(pState, RT_SRC_POS);
}
@@ -3621,7 +3625,7 @@ static void e1kXmitDesc(E1KSTATE* pState, E1KTXDESC* pDesc, RTGCPHYS addr, bool
STAM_COUNTER_INC(pDesc->data.cmd.fTSE?
&pState->StatTxDescTSEData:
&pState->StatTxDescData);
- STAM_PROFILE_ADV_START(&pState->StatTransmit, a);
+ STAM_PROFILE_ADV_START(&pState->CTX_SUFF_Z(StatTransmit), a);
E1K_INC_ISTAT_CNT(pState->uStatDescDat);
/*
@@ -3707,7 +3711,7 @@ static void e1kXmitDesc(E1KSTATE* pState, E1KTXDESC* pDesc, RTGCPHYS addr, bool
}
e1kDescReport(pState, pDesc, addr);
- STAM_PROFILE_ADV_STOP(&pState->StatTransmit, a);
+ STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF_Z(StatTransmit), a);
break;
}
@@ -3719,7 +3723,7 @@ static void e1kXmitDesc(E1KSTATE* pState, E1KTXDESC* pDesc, RTGCPHYS addr, bool
break;
}
STAM_COUNTER_INC(&pState->StatTxDescLegacy);
- STAM_PROFILE_ADV_START(&pState->StatTransmit, a);
+ STAM_PROFILE_ADV_START(&pState->CTX_SUFF_Z(StatTransmit), a);
/* First fragment: allocate new buffer. */
if (pState->u16TxPktLen == 0)
@@ -3749,7 +3753,7 @@ static void e1kXmitDesc(E1KSTATE* pState, E1KTXDESC* pDesc, RTGCPHYS addr, bool
}
e1kDescReport(pState, pDesc, addr);
- STAM_PROFILE_ADV_STOP(&pState->StatTransmit, a);
+ STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF_Z(StatTransmit), a);
break;
default:
@@ -3807,7 +3811,7 @@ static int e1kXmitPending(E1KSTATE *pState, bool fOnWorkerThread)
e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_TXD_LOW);
}
- STAM_PROFILE_ADV_STOP(&pState->StatTransmit, a);
+ STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF_Z(StatTransmit), a);
}
/// @todo: uncomment: pState->uStatIntTXQE++;
@@ -4357,12 +4361,12 @@ PDMBOTHCBDECL(int) e1kMMIORead(PPDMDEVINS pDevIns, void *pvUser,
NOREF(pvUser);
E1KSTATE *pState = PDMINS_2_DATA(pDevIns, E1KSTATE *);
uint32_t uOffset = GCPhysAddr - pState->addrMMReg;
- STAM_PROFILE_ADV_START(&pState->CTXSUFF(StatMMIORead), a);
+ STAM_PROFILE_ADV_START(&pState->CTX_SUFF_Z(StatMMIORead), a);
Assert(uOffset < E1K_MM_SIZE);
int rc = e1kRegRead(pState, uOffset, pv, cb);
- STAM_PROFILE_ADV_STOP(&pState->CTXSUFF(StatMMIORead), a);
+ STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF_Z(StatMMIORead), a);
return rc;
}
@@ -4385,7 +4389,7 @@ PDMBOTHCBDECL(int) e1kMMIOWrite(PPDMDEVINS pDevIns, void *pvUser,
E1KSTATE *pState = PDMINS_2_DATA(pDevIns, E1KSTATE *);
uint32_t uOffset = GCPhysAddr - pState->addrMMReg;
int rc;
- STAM_PROFILE_ADV_START(&pState->CTXSUFF(StatMMIOWrite), a);
+ STAM_PROFILE_ADV_START(&pState->CTX_SUFF_Z(StatMMIOWrite), a);
Assert(uOffset < E1K_MM_SIZE);
if (cb != 4)
@@ -4396,7 +4400,7 @@ PDMBOTHCBDECL(int) e1kMMIOWrite(PPDMDEVINS pDevIns, void *pvUser,
else
rc = e1kRegWrite(pState, uOffset, pv, cb);
- STAM_PROFILE_ADV_STOP(&pState->CTXSUFF(StatMMIOWrite), a);
+ STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF_Z(StatMMIOWrite), a);
return rc;
}
@@ -4418,7 +4422,7 @@ PDMBOTHCBDECL(int) e1kIOPortIn(PPDMDEVINS pDevIns, void *pvUser,
E1KSTATE *pState = PDMINS_2_DATA(pDevIns, E1KSTATE *);
int rc = VINF_SUCCESS;
const char *szInst = INSTANCE(pState);
- STAM_PROFILE_ADV_START(&pState->CTXSUFF(StatIORead), a);
+ STAM_PROFILE_ADV_START(&pState->CTX_SUFF_Z(StatIORead), a);
port -= pState->addrIOPort;
if (cb != 4)
@@ -4446,7 +4450,7 @@ PDMBOTHCBDECL(int) e1kIOPortIn(PPDMDEVINS pDevIns, void *pvUser,
//*pRC = VERR_IOM_IOPORT_UNUSED;
}
- STAM_PROFILE_ADV_STOP(&pState->CTXSUFF(StatIORead), a);
+ STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF_Z(StatIORead), a);
return rc;
}
@@ -4469,7 +4473,7 @@ PDMBOTHCBDECL(int) e1kIOPortOut(PPDMDEVINS pDevIns, void *pvUser,
E1KSTATE *pState = PDMINS_2_DATA(pDevIns, E1KSTATE *);
int rc = VINF_SUCCESS;
const char *szInst = INSTANCE(pState);
- STAM_PROFILE_ADV_START(&pState->CTXSUFF(StatIOWrite), a);
+ STAM_PROFILE_ADV_START(&pState->CTX_SUFF_Z(StatIOWrite), a);
E1kLog2(("%s e1kIOPortOut: port=%RTiop value=%08x\n", szInst, port, u32));
if (cb != 4)
@@ -4502,7 +4506,7 @@ PDMBOTHCBDECL(int) e1kIOPortOut(PPDMDEVINS pDevIns, void *pvUser,
}
}
- STAM_PROFILE_ADV_STOP(&pState->CTXSUFF(StatIOWrite), a);
+ STAM_PROFILE_ADV_STOP(&pState->CTX_SUFF_Z(StatIOWrite), a);
return rc;
}
@@ -5845,16 +5849,16 @@ static DECLCALLBACK(int) e1kConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
e1kHardReset(pState);
#if defined(VBOX_WITH_STATISTICS) || defined(E1K_REL_STATS)
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOReadGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in GC", "/Devices/E1k%d/MMIO/ReadGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOReadHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in HC", "/Devices/E1k%d/MMIO/ReadHC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOWriteGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in GC", "/Devices/E1k%d/MMIO/WriteGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOWriteHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in HC", "/Devices/E1k%d/MMIO/WriteHC", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOReadRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in RZ", "/Devices/E1k%d/MMIO/ReadRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in R3", "/Devices/E1k%d/MMIO/ReadR3", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in RZ", "/Devices/E1k%d/MMIO/WriteRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatMMIOWriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in R3", "/Devices/E1k%d/MMIO/WriteR3", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatEEPROMRead, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling EEPROM reads", "/Devices/E1k%d/EEPROM/Read", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatEEPROMWrite, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling EEPROM writes", "/Devices/E1k%d/EEPROM/Write", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in GC", "/Devices/E1k%d/IO/ReadGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in HC", "/Devices/E1k%d/IO/ReadHC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in GC", "/Devices/E1k%d/IO/WriteGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in HC", "/Devices/E1k%d/IO/WriteHC", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in RZ", "/Devices/E1k%d/IO/ReadRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in R3", "/Devices/E1k%d/IO/ReadR3", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in RZ", "/Devices/E1k%d/IO/WriteRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIOWriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in R3", "/Devices/E1k%d/IO/WriteR3", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatLateIntTimer, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling late int timer", "/Devices/E1k%d/LateInt/Timer", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatLateInts, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of late interrupts", "/Devices/E1k%d/LateInt/Occured", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatIntsRaised, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of raised interrupts", "/Devices/E1k%d/Interrupts/Raised", iInstance);
@@ -5867,11 +5871,13 @@ static DECLCALLBACK(int) e1kConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
#endif /* VBOX_WITH_STATISTICS || E1K_REL_STATS */
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatReceiveBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data received", "/Devices/E1k%d/ReceiveBytes", iInstance);
#if defined(VBOX_WITH_STATISTICS) || defined(E1K_REL_STATS)
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTransmit, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling transmits in HC", "/Devices/E1k%d/Transmit/Total", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTransmitRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling transmits in RZ", "/Devices/E1k%d/Transmit/TotalRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTransmitR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling transmits in R3", "/Devices/E1k%d/Transmit/TotalR3", iInstance);
#endif /* VBOX_WITH_STATISTICS || E1K_REL_STATS */
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data transmitted", "/Devices/E1k%d/TransmitBytes", iInstance);
#if defined(VBOX_WITH_STATISTICS) || defined(E1K_REL_STATS)
- PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTransmitSend, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling send transmit in HC", "/Devices/E1k%d/Transmit/Send", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTransmitSendRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling send transmit in RZ", "/Devices/E1k%d/Transmit/SendRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTransmitSendR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling send transmit in R3", "/Devices/E1k%d/Transmit/SendR3", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTxDescCtxNormal, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of normal context descriptors","/Devices/E1k%d/TxDesc/ContexNormal", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pState->StatTxDescCtxTSE, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of TSE context descriptors", "/Devices/E1k%d/TxDesc/ContextTSE", iInstance);
diff --git a/src/VBox/Devices/Network/DevPCNet.cpp b/src/VBox/Devices/Network/DevPCNet.cpp
index 2a29441bb..6deff1f48 100644
--- a/src/VBox/Devices/Network/DevPCNet.cpp
+++ b/src/VBox/Devices/Network/DevPCNet.cpp
@@ -1,4 +1,4 @@
-/* $Id: DevPCNet.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: DevPCNet.cpp 29435 2010-05-12 20:55:39Z vboxsync $ */
/** @file
* DevPCNet - AMD PCnet-PCI II / PCnet-FAST III (Am79C970A / Am79C973) Ethernet Controller Emulation.
*
@@ -271,28 +271,30 @@ struct PCNetState_st
STAMCOUNTER StatReceiveBytes;
STAMCOUNTER StatTransmitBytes;
#ifdef VBOX_WITH_STATISTICS
- STAMPROFILEADV StatMMIOReadGC;
- STAMPROFILEADV StatMMIOReadHC;
- STAMPROFILEADV StatMMIOWriteGC;
- STAMPROFILEADV StatMMIOWriteHC;
+ STAMPROFILEADV StatMMIOReadRZ;
+ STAMPROFILEADV StatMMIOReadR3;
+ STAMPROFILEADV StatMMIOWriteRZ;
+ STAMPROFILEADV StatMMIOWriteR3;
STAMPROFILEADV StatAPROMRead;
STAMPROFILEADV StatAPROMWrite;
- STAMPROFILEADV StatIOReadGC;
- STAMPROFILEADV StatIOReadHC;
- STAMPROFILEADV StatIOWriteGC;
- STAMPROFILEADV StatIOWriteHC;
+ STAMPROFILEADV StatIOReadRZ;
+ STAMPROFILEADV StatIOReadR3;
+ STAMPROFILEADV StatIOWriteRZ;
+ STAMPROFILEADV StatIOWriteR3;
STAMPROFILEADV StatTimer;
STAMPROFILEADV StatReceive;
- STAMPROFILEADV StatTransmit;
+ STAMPROFILEADV StatTransmitR3;
+ STAMPROFILEADV StatTransmitRZ;
STAMCOUNTER StatTransmitCase1;
STAMCOUNTER StatTransmitCase2;
- STAMPROFILE StatTransmitSend;
- STAMPROFILEADV StatTdtePollGC;
- STAMPROFILEADV StatTdtePollHC;
- STAMPROFILEADV StatTmdStoreGC;
- STAMPROFILEADV StatTmdStoreHC;
- STAMPROFILEADV StatRdtePollGC;
- STAMPROFILEADV StatRdtePollHC;
+ STAMPROFILE StatTransmitSendR3;
+ STAMPROFILE StatTransmitSendRZ;
+ STAMPROFILEADV StatTdtePollRZ;
+ STAMPROFILEADV StatTdtePollR3;
+ STAMPROFILEADV StatTmdStoreRZ;
+ STAMPROFILEADV StatTmdStoreR3;
+ STAMPROFILEADV StatRdtePollR3;
+ STAMPROFILEADV StatRdtePollRZ;
STAMPROFILE StatRxOverflow;
STAMCOUNTER StatRxOverflowWakeup;
STAMCOUNTER aStatXmitFlush[16];
@@ -304,17 +306,17 @@ struct PCNetState_st
# ifdef PCNET_NO_POLLING
STAMCOUNTER StatRCVRingWrite;
STAMCOUNTER StatTXRingWrite;
- STAMCOUNTER StatRingWriteHC;
+ STAMCOUNTER StatRingWriteR3;
STAMCOUNTER StatRingWriteR0;
- STAMCOUNTER StatRingWriteGC;
+ STAMCOUNTER StatRingWriteRC;
- STAMCOUNTER StatRingWriteFailedHC;
+ STAMCOUNTER StatRingWriteFailedR3;
STAMCOUNTER StatRingWriteFailedR0;
- STAMCOUNTER StatRingWriteFailedGC;
+ STAMCOUNTER StatRingWriteFailedRC;
- STAMCOUNTER StatRingWriteOutsideHC;
+ STAMCOUNTER StatRingWriteOutsideR3;
STAMCOUNTER StatRingWriteOutsideR0;
- STAMCOUNTER StatRingWriteOutsideGC;
+ STAMCOUNTER StatRingWriteOutsideRC;
# endif
#endif /* VBOX_WITH_STATISTICS */
};
@@ -691,7 +693,7 @@ DECLINLINE(bool) pcnetTmdLoad(PCNetState *pThis, TMD *tmd, RTGCPHYS32 addr, bool
*/
DECLINLINE(void) pcnetTmdStorePassHost(PCNetState *pThis, TMD *tmd, RTGCPHYS32 addr)
{
- STAM_PROFILE_ADV_START(&pThis->CTXSUFF(StatTmdStore), a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatTmdStore), a);
PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pThis);
if (pThis->fPrivIfEnabled)
{
@@ -733,7 +735,7 @@ DECLINLINE(void) pcnetTmdStorePassHost(PCNetState *pThis, TMD *tmd, RTGCPHYS32 a
xda[1] &= ~0x80000000;
PDMDevHlpPhysWrite(pDevIns, addr+7, (uint8_t*)xda + 7, 1);
}
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatTmdStore), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTmdStore), a);
}
/**
@@ -1673,7 +1675,7 @@ static DECLCALLBACK(bool) pcnetCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEI
*/
static void pcnetRdtePoll(PCNetState *pThis, bool fSkipCurrent=false)
{
- STAM_PROFILE_ADV_START(&pThis->CTXSUFF(StatRdtePoll), a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatRdtePoll), a);
/* assume lack of a next receive descriptor */
CSR_NRST(pThis) = 0;
@@ -1696,7 +1698,7 @@ static void pcnetRdtePoll(PCNetState *pThis, bool fSkipCurrent=false)
CSR_CRBC(pThis) = CSR_CRST(pThis) = 0;
if (!pcnetRmdLoad(pThis, &rmd, PHYSADDR(pThis, addr), true))
{
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatRdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatRdtePoll), a);
return;
}
if (RT_LIKELY(!IS_RMD_BAD(rmd)))
@@ -1718,7 +1720,7 @@ static void pcnetRdtePoll(PCNetState *pThis, bool fSkipCurrent=false)
}
else
{
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatRdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatRdtePoll), a);
/* This is not problematic since we don't own the descriptor
* We actually do own it, otherwise pcnetRmdLoad would have returned false.
* Don't flood the release log with errors.
@@ -1740,7 +1742,7 @@ static void pcnetRdtePoll(PCNetState *pThis, bool fSkipCurrent=false)
CSR_NRBC(pThis) = 0;
if (!pcnetRmdLoad(pThis, &rmd, PHYSADDR(pThis, addr), true))
{
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatRdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatRdtePoll), a);
return;
}
if (RT_LIKELY(!IS_RMD_BAD(rmd)))
@@ -1752,7 +1754,7 @@ static void pcnetRdtePoll(PCNetState *pThis, bool fSkipCurrent=false)
}
else
{
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatRdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatRdtePoll), a);
/* This is not problematic since we don't own the descriptor
* We actually do own it, otherwise pcnetRmdLoad would have returned false.
* Don't flood the release log with errors.
@@ -1772,7 +1774,7 @@ static void pcnetRdtePoll(PCNetState *pThis, bool fSkipCurrent=false)
CSR_CRDA(pThis) = CSR_CRBA(pThis) = CSR_NRDA(pThis) = CSR_NRBA(pThis) = 0;
CSR_CRBC(pThis) = CSR_NRBC(pThis) = CSR_CRST(pThis) = 0;
}
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatRdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatRdtePoll), a);
}
/**
@@ -1781,20 +1783,20 @@ static void pcnetRdtePoll(PCNetState *pThis, bool fSkipCurrent=false)
*/
static int pcnetTdtePoll(PCNetState *pThis, TMD *tmd)
{
- STAM_PROFILE_ADV_START(&pThis->CTXSUFF(StatTdtePoll), a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatTdtePoll), a);
if (RT_LIKELY(pThis->GCTDRA))
{
RTGCPHYS32 cxda = pcnetTdraAddr(pThis, CSR_XMTRC(pThis));
if (!pcnetTmdLoad(pThis, tmd, PHYSADDR(pThis, cxda), true))
{
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatTdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTdtePoll), a);
return 0;
}
if (RT_UNLIKELY(tmd->tmd1.ones != 15))
{
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatTdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTdtePoll), a);
LogRel(("PCNet#%d: BAD TMD XDA=%#010x\n",
PCNET_INST_NR, PHYSADDR(pThis, cxda)));
return 0;
@@ -1809,7 +1811,7 @@ static int pcnetTdtePoll(PCNetState *pThis, TMD *tmd)
CSR_CXDA(pThis) = cxda;
CSR_CXBC(pThis) = tmd->tmd1.bcnt;
CSR_CXST(pThis) = ((uint32_t *)tmd)[1] >> 16;
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatTdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTdtePoll), a);
return CARD_IS_OWNER(CSR_CXST(pThis));
}
else
@@ -1817,7 +1819,7 @@ static int pcnetTdtePoll(PCNetState *pThis, TMD *tmd)
/** @todo consistency with previous receive descriptor */
CSR_CXDA(pThis) = 0;
CSR_CXBC(pThis) = CSR_CXST(pThis) = 0;
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatTdtePoll), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTdtePoll), a);
return 0;
}
}
@@ -2169,7 +2171,7 @@ DECLINLINE(int) pcnetXmitSendBuf(PCNetState *pThis, bool fLoopback, PPDMSCATTERG
* longer. If we could avoid that we could cache a bit more info in
* the loop and make it part of the driver<->device contract, saving
* critsect mess down in DrvIntNet. */
- STAM_PROFILE_START(&pThis->StatTransmitSend, a);
+ STAM_PROFILE_START(&pThis->CTX_SUFF_Z(StatTransmitSend), a);
if (pSgBuf->cbUsed > 70) /* unqualified guess */
pThis->Led.Asserted.s.fWriting = pThis->Led.Actual.s.fWriting = 1;
@@ -2183,7 +2185,7 @@ DECLINLINE(int) pcnetXmitSendBuf(PCNetState *pThis, bool fLoopback, PPDMSCATTERG
rc = VERR_NET_DOWN;
pThis->Led.Actual.s.fWriting = 0;
- STAM_PROFILE_STOP(&pThis->StatTransmitSend, a);
+ STAM_PROFILE_STOP(&pThis->CTX_SUFF_Z(StatTransmitSend), a);
}
return rc;
}
@@ -2398,7 +2400,7 @@ static int pcnetAsyncTransmit(PCNetState *pThis, bool fOnWorkerThread)
*/
int rc;
unsigned cFlushIrq = 0;
- STAM_PROFILE_ADV_START(&pThis->StatTransmit, a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatTransmit), a);
do
{
#ifdef VBOX_WITH_STATISTICS
@@ -2447,7 +2449,7 @@ static int pcnetAsyncTransmit(PCNetState *pThis, bool fOnWorkerThread)
}
else if (rc == VERR_TRY_AGAIN)
{
- STAM_PROFILE_ADV_STOP(&pThis->StatTransmit, a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTransmit), a);
return VINF_SUCCESS;
}
if (RT_FAILURE(rc))
@@ -2506,7 +2508,7 @@ static int pcnetAsyncTransmit(PCNetState *pThis, bool fOnWorkerThread)
rc = pcnetXmitAllocBuf(pThis, RT_MAX(MAX_FRAME, cb), fLoopback, &SgLoop, &pSgBuf);
if (rc == VERR_TRY_AGAIN)
{
- STAM_PROFILE_ADV_STOP(&pThis->StatTransmit, a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTransmit), a);
return VINF_SUCCESS;
}
@@ -2627,7 +2629,7 @@ static int pcnetAsyncTransmit(PCNetState *pThis, bool fOnWorkerThread)
pcnetUpdateIrq(pThis);
}
- STAM_PROFILE_ADV_STOP(&pThis->StatTransmit, a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTransmit), a);
return VINF_SUCCESS;
}
@@ -3715,7 +3717,7 @@ PDMBOTHCBDECL(int) pcnetIOPortRead(PPDMDEVINS pDevIns, void *pvUser,
PCNetState *pThis = PDMINS_2_DATA(pDevIns, PCNetState *);
int rc = VINF_SUCCESS;
- STAM_PROFILE_ADV_START(&pThis->CTXSUFF(StatIORead), a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIORead), a);
rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_IOPORT_READ);
if (RT_LIKELY(rc == VINF_SUCCESS))
{
@@ -3731,7 +3733,7 @@ PDMBOTHCBDECL(int) pcnetIOPortRead(PPDMDEVINS pDevIns, void *pvUser,
}
PDMCritSectLeave(&pThis->CritSect);
}
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatIORead), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatIORead), a);
Log2(("#%d pcnetIOPortRead: Port=%RTiop *pu32=%#RX32 cb=%d rc=%Rrc\n", PCNET_INST_NR, Port, *pu32, cb, rc));
#ifdef LOG_ENABLED
if (rc == VINF_IOM_HC_IOPORT_READ)
@@ -3758,7 +3760,7 @@ PDMBOTHCBDECL(int) pcnetIOPortWrite(PPDMDEVINS pDevIns, void *pvUser,
PCNetState *pThis = PDMINS_2_DATA(pDevIns, PCNetState *);
int rc = VINF_SUCCESS;
- STAM_PROFILE_ADV_START(&pThis->CTXSUFF(StatIOWrite), a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIOWrite), a);
rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_IOPORT_WRITE);
if (RT_LIKELY(rc == VINF_SUCCESS))
{
@@ -3774,7 +3776,7 @@ PDMBOTHCBDECL(int) pcnetIOPortWrite(PPDMDEVINS pDevIns, void *pvUser,
}
PDMCritSectLeave(&pThis->CritSect);
}
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatIOWrite), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatIOWrite), a);
Log2(("#%d pcnetIOPortWrite: Port=%RTiop u32=%#RX32 cb=%d rc=%Rrc\n", PCNET_INST_NR, Port, u32, cb, rc));
#ifdef LOG_ENABLED
if (rc == VINF_IOM_HC_IOPORT_WRITE)
@@ -3806,7 +3808,7 @@ PDMBOTHCBDECL(int) pcnetMMIORead(PPDMDEVINS pDevIns, void *pvUser,
*/
if (GCPhysAddr - pThis->MMIOBase < PCNET_PNPMMIO_SIZE)
{
- STAM_PROFILE_ADV_START(&pThis->CTXSUFF(StatMMIORead), a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatMMIORead), a);
rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_MMIO_READ);
if (RT_LIKELY(rc == VINF_SUCCESS))
{
@@ -3822,7 +3824,7 @@ PDMBOTHCBDECL(int) pcnetMMIORead(PPDMDEVINS pDevIns, void *pvUser,
}
PDMCritSectLeave(&pThis->CritSect);
}
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatMMIORead), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatMMIORead), a);
}
else
memset(pv, 0, cb);
@@ -3859,7 +3861,7 @@ PDMBOTHCBDECL(int) pcnetMMIOWrite(PPDMDEVINS pDevIns, void *pvUser,
*/
if (GCPhysAddr - pThis->MMIOBase < PCNET_PNPMMIO_SIZE)
{
- STAM_PROFILE_ADV_START(&pThis->CTXSUFF(StatMMIOWrite), a);
+ STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatMMIOWrite), a);
rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_MMIO_WRITE);
if (RT_LIKELY(rc == VINF_SUCCESS))
{
@@ -3877,7 +3879,7 @@ PDMBOTHCBDECL(int) pcnetMMIOWrite(PPDMDEVINS pDevIns, void *pvUser,
}
// else rc == VINF_IOM_HC_MMIO_WRITE => handle in ring3
- STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatMMIOWrite), a);
+ STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatMMIOWrite), a);
}
LogFlow(("#%d pcnetMMIOWrite: pvUser=%p:{%.*Rhxs} cb=%d GCPhysAddr=%RGp rc=%Rrc\n",
PCNET_INST_NR, pv, cb, pv, cb, GCPhysAddr, rc));
@@ -5281,16 +5283,16 @@ static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGM
pcnetHardReset(pThis);
#ifdef VBOX_WITH_STATISTICS
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOReadGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in GC", "/Devices/PCNet%d/MMIO/ReadGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOReadHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in HC", "/Devices/PCNet%d/MMIO/ReadHC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOWriteGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in GC", "/Devices/PCNet%d/MMIO/WriteGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOWriteHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in HC", "/Devices/PCNet%d/MMIO/WriteHC", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOReadRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in RZ", "/Devices/PCNet%d/MMIO/ReadRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO reads in R3", "/Devices/PCNet%d/MMIO/ReadR3", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in RZ", "/Devices/PCNet%d/MMIO/WriteRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatMMIOWriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling MMIO writes in R3", "/Devices/PCNet%d/MMIO/WriteR3", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatAPROMRead, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling APROM reads", "/Devices/PCNet%d/IO/APROMRead", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatAPROMWrite, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling APROM writes", "/Devices/PCNet%d/IO/APROMWrite", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOReadGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in GC", "/Devices/PCNet%d/IO/ReadGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOReadHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in HC", "/Devices/PCNet%d/IO/ReadHC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOWriteGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in GC", "/Devices/PCNet%d/IO/WriteGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOWriteHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in HC", "/Devices/PCNet%d/IO/WriteHC", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOReadRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in RZ", "/Devices/PCNet%d/IO/ReadRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO reads in R3", "/Devices/PCNet%d/IO/ReadR3", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in RZ", "/Devices/PCNet%d/IO/WriteRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatIOWriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling IO writes in R3", "/Devices/PCNet%d/IO/WriteR3", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTimer, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling Timer", "/Devices/PCNet%d/Timer", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatReceive, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling receive", "/Devices/PCNet%d/Receive", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRxOverflow, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_OCCURENCE, "Profiling RX overflows", "/Devices/PCNet%d/RxOverflow", iInstance);
@@ -5300,18 +5302,20 @@ static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGM
#ifdef VBOX_WITH_STATISTICS
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitCase1, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Single descriptor transmit", "/Devices/PCNet%d/Transmit/Case1", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitCase2, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Multi descriptor transmit", "/Devices/PCNet%d/Transmit/Case2", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmit, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling transmits in HC", "/Devices/PCNet%d/Transmit/Total", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling transmits in RZ", "/Devices/PCNet%d/Transmit/TotalRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling transmits in R3", "/Devices/PCNet%d/Transmit/TotalR3", iInstance);
#endif
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data transmitted", "/Devices/PCNet%d/TransmitBytes", iInstance);
#ifdef VBOX_WITH_STATISTICS
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitSend, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet send transmit in HC","/Devices/PCNet%d/Transmit/Send", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTdtePollGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TdtePoll in GC", "/Devices/PCNet%d/TdtePollGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTdtePollHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TdtePoll in HC", "/Devices/PCNet%d/TdtePollHC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRdtePollGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet RdtePoll in GC", "/Devices/PCNet%d/RdtePollGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRdtePollHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet RdtePoll in HC", "/Devices/PCNet%d/RdtePollHC", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitSendRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet send transmit in RZ","/Devices/PCNet%d/Transmit/SendRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitSendR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet send transmit in R3","/Devices/PCNet%d/Transmit/SendR3", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTdtePollRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TdtePoll in RZ", "/Devices/PCNet%d/TdtePollRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTdtePollR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TdtePoll in R3", "/Devices/PCNet%d/TdtePollR3", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRdtePollRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet RdtePoll in RZ", "/Devices/PCNet%d/RdtePollRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRdtePollR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet RdtePoll in R3", "/Devices/PCNet%d/RdtePollR3", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTmdStoreGC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TmdStore in GC", "/Devices/PCNet%d/TmdStoreGC", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTmdStoreHC, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TmdStore in HC", "/Devices/PCNet%d/TmdStoreHC", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTmdStoreRZ, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TmdStore in RZ", "/Devices/PCNet%d/TmdStoreRZ", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTmdStoreR3, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TmdStore in R3", "/Devices/PCNet%d/TmdStoreR3", iInstance);
unsigned i;
for (i = 0; i < RT_ELEMENTS(pThis->aStatXmitFlush) - 1; i++)
@@ -5330,15 +5334,15 @@ static DECLCALLBACK(int) pcnetConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGM
# ifdef PCNET_NO_POLLING
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRCVRingWrite, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of receive ring writes", "/Devices/PCNet%d/Ring/RCVWrites", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTXRingWrite, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of transmit ring writes", "/Devices/PCNet%d/Ring/TXWrites", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteHC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored ring page writes", "/Devices/PCNet%d/Ring/HC/Writes", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteR3, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored ring page writes", "/Devices/PCNet%d/Ring/R3/Writes", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteR0, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored ring page writes", "/Devices/PCNet%d/Ring/R0/Writes", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteGC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored ring page writes", "/Devices/PCNet%d/Ring/GC/Writes", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteFailedHC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of failed ring page writes", "/Devices/PCNet%d/Ring/HC/Failed", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteRC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored ring page writes", "/Devices/PCNet%d/Ring/RC/Writes", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteFailedR3, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of failed ring page writes", "/Devices/PCNet%d/Ring/R3/Failed", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteFailedR0, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of failed ring page writes", "/Devices/PCNet%d/Ring/R0/Failed", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteFailedGC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of failed ring page writes", "/Devices/PCNet%d/Ring/GC/Failed", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteOutsideHC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored writes outside ring","/Devices/PCNet%d/Ring/HC/Outside", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteFailedRC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of failed ring page writes", "/Devices/PCNet%d/Ring/RC/Failed", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteOutsideR3, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored writes outside ring","/Devices/PCNet%d/Ring/R3/Outside", iInstance);
PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteOutsideR0, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored writes outside ring","/Devices/PCNet%d/Ring/R0/Outside", iInstance);
- PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteOutsideGC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored writes outside ring","/Devices/PCNet%d/Ring/GC/Outside", iInstance);
+ PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatRingWriteOutsideRC, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Nr of monitored writes outside ring","/Devices/PCNet%d/Ring/RC/Outside", iInstance);
# endif /* PCNET_NO_POLLING */
#endif
diff --git a/src/VBox/Devices/Network/DrvIntNet.cpp b/src/VBox/Devices/Network/DrvIntNet.cpp
index 1615af7cc..ae3afe4ba 100644
--- a/src/VBox/Devices/Network/DrvIntNet.cpp
+++ b/src/VBox/Devices/Network/DrvIntNet.cpp
@@ -1,4 +1,4 @@
-/* $Id: DrvIntNet.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: DrvIntNet.cpp 29598 2010-05-18 08:32:49Z vboxsync $ */
/** @file
* DrvIntNet - Internal network transport driver.
*/
@@ -1445,7 +1445,7 @@ static DECLCALLBACK(int) drvR3IntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg
if (OpenReq.cbSend < 128)
return PDMDRV_SET_ERROR(pDrvIns, rc,
N_("Configuration error: The \"SendBufferSize\" value is too small"));
- if (OpenReq.cbSend < VBOX_MAX_GSO_SIZE * 4)
+ if (OpenReq.cbSend < VBOX_MAX_GSO_SIZE * 3)
LogRel(("DrvIntNet: Warning! SendBufferSize=%u, Recommended minimum size %u butes.\n", OpenReq.cbSend, VBOX_MAX_GSO_SIZE * 4));
/** @cfgm{IsService, boolean, true}
@@ -1521,7 +1521,7 @@ static DECLCALLBACK(int) drvR3IntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg
GetBufferPtrsReq.pSession = NIL_RTR0PTR;
GetBufferPtrsReq.hIf = pThis->hIf;
GetBufferPtrsReq.pRing3Buf = NULL;
- GetBufferPtrsReq.pRing0Buf = NULL;
+ GetBufferPtrsReq.pRing0Buf = NIL_RTR0PTR;
rc = PDMDrvHlpSUPCallVMMR0Ex(pDrvIns, VMMR0_DO_INTNET_IF_GET_BUFFER_PTRS, &GetBufferPtrsReq, sizeof(GetBufferPtrsReq));
if (RT_FAILURE(rc))
return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
diff --git a/src/VBox/Devices/Network/DrvVDE.cpp b/src/VBox/Devices/Network/DrvVDE.cpp
index 76ed320d9..e79cf7702 100644
--- a/src/VBox/Devices/Network/DrvVDE.cpp
+++ b/src/VBox/Devices/Network/DrvVDE.cpp
@@ -1,4 +1,4 @@
-/* $Id: DrvVDE.cpp 29122 2010-05-06 09:13:22Z vboxsync $ */
+/* $Id: DrvVDE.cpp 29461 2010-05-14 11:10:33Z vboxsync $ */
/** @file
* VDE network transport driver.
*/
@@ -230,6 +230,7 @@ static DECLCALLBACK(int) drvVDENetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDM
uint8_t const *pbFrame = (uint8_t const *)pSgBuf->aSegs[0].pvSeg;
PCPDMNETWORKGSO pGso = (PCPDMNETWORKGSO)pSgBuf->pvUser;
uint32_t const cSegs = PDMNetGsoCalcSegmentCount(pGso, pSgBuf->cbUsed); Assert(cSegs > 1);
+ rc = 0;
for (size_t iSeg = 0; iSeg < cSegs; iSeg++)
{
uint32_t cbSegFrame;
@@ -497,6 +498,7 @@ static DECLCALLBACK(void) drvVDEDestruct(PPDMDRVINS pDrvIns)
if (RTCritSectIsInitialized(&pThis->XmitLock))
RTCritSectDelete(&pThis->XmitLock);
+ vde_close(pThis->vdeconn);
#ifdef VBOX_WITH_STATISTICS
/*
* Deregister statistics.
diff --git a/src/VBox/Devices/Network/SrvIntNetR0.cpp b/src/VBox/Devices/Network/SrvIntNetR0.cpp
index b8f4971af..8338e71ad 100644
--- a/src/VBox/Devices/Network/SrvIntNetR0.cpp
+++ b/src/VBox/Devices/Network/SrvIntNetR0.cpp
@@ -1,4 +1,4 @@
-/* $Id: SrvIntNetR0.cpp 29362 2010-05-11 14:40:17Z vboxsync $ */
+/* $Id: SrvIntNetR0.cpp 29635 2010-05-18 13:42:54Z vboxsync $ */
/** @file
* Internal networking - The ring 0 service.
*/
@@ -3188,6 +3188,9 @@ static INTNETSWDECISION intnetR0NetworkSend(PINTNETNETWORK pNetwork, PINTNETIF p
/*
* Learn the MAC address of the sender. No re-learning as the interface
* user will normally tell us the right MAC address.
+ *
+ * Note! We don't notify the trunk about these mainly because of the
+ * problematic contexts we might be called in.
*/
if (RT_UNLIKELY( pIfSender
&& !pIfSender->fMacSet
@@ -3606,7 +3609,9 @@ INTNETR0DECL(int) IntNetR0IfSetMacAddress(INTNETIFHANDLE hIf, PSUPDRVSESSION pSe
PINTNETNETWORK pNetwork = pIf->pNetwork;
if (pNetwork)
{
- RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
+ RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
+ PINTNETTRUNKIF pTrunk = NULL;
+
RTSpinlockAcquireNoInts(pNetwork->hAddrSpinlock, &Tmp);
if (memcmp(&pIf->MacAddr, pMac, sizeof(pIf->MacAddr)))
@@ -3614,14 +3619,29 @@ INTNETR0DECL(int) IntNetR0IfSetMacAddress(INTNETIFHANDLE hIf, PSUPDRVSESSION pSe
Log(("IntNetR0IfSetMacAddress: hIf=%RX32: Changed from %.6Rhxs -> %.6Rhxs\n",
hIf, &pIf->MacAddr, pMac));
+ /* Update the two copies. */
PINTNETMACTABENTRY pEntry = intnetR0NetworkFindMacAddrEntry(pNetwork, pIf); Assert(pEntry);
if (RT_LIKELY(pEntry))
pEntry->MacAddr = *pMac;
pIf->MacAddr = *pMac;
pIf->fMacSet = true;
+
+ /* Grab a busy reference to the trunk so we release the lock before notifying it. */
+ pTrunk = pNetwork->MacTab.pTrunk;
+ if (pTrunk)
+ intnetR0BusyIncTrunk(pTrunk);
}
RTSpinlockReleaseNoInts(pNetwork->hAddrSpinlock, &Tmp);
+
+ if (pTrunk)
+ {
+ Log(("IntNetR0IfSetMacAddress: pfnNotifyMacAddress hIf=%RX32\n", hIf));
+ PINTNETTRUNKIFPORT pIfPort = pTrunk->pIfPort;
+ if (pIfPort)
+ pIfPort->pfnNotifyMacAddress(pIfPort, hIf, pMac);
+ intnetR0BusyDecTrunk(pTrunk);
+ }
}
else
rc = VERR_WRONG_ORDER;
@@ -3891,22 +3911,37 @@ INTNETR0DECL(int) IntNetR0IfClose(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession)
/*
* Validate and free the handle.
+ *
+ * We grab the big mutex before we free the handle to avoid any handle
+ * confusion on the trunk.
*/
PINTNET pIntNet = g_pIntNet;
AssertPtrReturn(pIntNet, VERR_INVALID_PARAMETER);
AssertReturn(pIntNet->u32Magic, VERR_INVALID_MAGIC);
+ RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
+
PINTNETIF pIf = (PINTNETIF)RTHandleTableFreeWithCtx(pIntNet->hHtIfs, hIf, pSession);
if (!pIf)
+ {
+ RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
return VERR_INVALID_HANDLE;
+ }
- /* mark the handle as freed so intnetR0IfDestruct won't free it again. */
+ /* Mark the handle as freed so intnetR0IfDestruct won't free it again. */
ASMAtomicWriteU32(&pIf->hIf, INTNET_HANDLE_INVALID);
+ /* Notify the trunk that the interface has been disconnected. */
+ PINTNETNETWORK pNetwork = pIf->pNetwork;
+ PINTNETTRUNKIF pTrunk = pNetwork ? pNetwork->MacTab.pTrunk : NULL;
+ if (pTrunk && pTrunk->pIfPort)
+ pTrunk->pIfPort->pfnDisconnectInterface(pTrunk->pIfPort, hIf);
+
+ RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
+
/*
- * Release the references to the interface object (handle + free lookup).
- * But signal the event semaphore first so any waiter holding a reference
- * will wake up too (he'll see hIf == invalid and return correctly).
+ * Signal the event semaphore to wake up any threads in IntNetR0IfWait
+ * and give them a moment to get out and release the interface.
*/
uint32_t i = pIf->cSleepers;
while (i-- > 0)
@@ -3916,6 +3951,9 @@ INTNETR0DECL(int) IntNetR0IfClose(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession)
}
RTSemEventSignal(pIf->hRecvEvent);
+ /*
+ * Release the references to the interface object (handle + free lookup).
+ */
void *pvObj = pIf->pvObj;
intnetR0IfRelease(pIf, pSession); /* (RTHandleTableFreeWithCtx) */
@@ -4000,8 +4038,15 @@ static DECLCALLBACK(void) intnetR0IfDestruct(void *pvObj, void *pvUser1, void *p
break;
}
+ PINTNETTRUNKIF pTrunk = pNetwork->MacTab.pTrunk;
+
RTSpinlockReleaseNoInts(pNetwork->hAddrSpinlock, &Tmp);
+ /* If we freed the handle just now, notify the trunk about the
+ interface being destroyed. */
+ if (hIf != INTNET_HANDLE_INVALID && pTrunk && pTrunk->pIfPort)
+ pTrunk->pIfPort->pfnDisconnectInterface(pTrunk->pIfPort, hIf);
+
/* Wait for the interface to quiesce while we still can. */
intnetR0BusyWait(pNetwork, &pIf->cBusy);
@@ -4078,7 +4123,7 @@ static DECLCALLBACK(void) intnetR0IfDestruct(void *pvObj, void *pvUser1, void *p
for (int i = kIntNetAddrType_Invalid + 1; i < kIntNetAddrType_End; i++)
intnetR0IfAddrCacheDestroy(&pIf->aAddrCache[i]);
- pIf->pvObj = NULL;
+ pIf->pvObj = NULL;
RTMemFree(pIf);
}
@@ -4200,12 +4245,33 @@ static int intnetR0NetworkCreateIf(PINTNETNETWORK pNetwork, PSUPDRVSESSION pSess
pNetwork->MacTab.cEntries = iIf + 1;
pIf->pNetwork = pNetwork;
+ /*
+ * Grab a busy reference (paranoia) to the trunk before releaseing
+ * the spinlock and then notify it about the new interface.
+ */
+ PINTNETTRUNKIF pTrunk = pNetwork->MacTab.pTrunk;
+ if (pTrunk)
+ intnetR0BusyIncTrunk(pTrunk);
+
RTSpinlockReleaseNoInts(pNetwork->hAddrSpinlock, &Tmp);
- *phIf = pIf->hIf;
- Log(("intnetR0NetworkCreateIf: returns VINF_SUCCESS *phIf=%RX32 cbSend=%u cbRecv=%u cbBuf=%u\n",
- *phIf, pIf->pIntBufDefault->cbSend, pIf->pIntBufDefault->cbRecv, pIf->pIntBufDefault->cbBuf));
- return VINF_SUCCESS;
+ if (pTrunk)
+ {
+ Log(("intnetR0NetworkCreateIf: pfnConnectInterface hIf=%RX32\n", pIf->hIf));
+ if (pTrunk->pIfPort)
+ rc = pTrunk->pIfPort->pfnConnectInterface(pTrunk->pIfPort, pIf->hIf);
+ intnetR0BusyDecTrunk(pTrunk);
+ }
+ if (RT_SUCCESS(rc))
+ {
+ /*
+ * We're good!
+ */
+ *phIf = pIf->hIf;
+ Log(("intnetR0NetworkCreateIf: returns VINF_SUCCESS *phIf=%RX32 cbSend=%u cbRecv=%u cbBuf=%u\n",
+ *phIf, pIf->pIntBufDefault->cbSend, pIf->pIntBufDefault->cbRecv, pIf->pIntBufDefault->cbBuf));
+ return VINF_SUCCESS;
+ }
}
SUPR0ObjRelease(pIf->pvObj, pSession);
@@ -4830,7 +4896,8 @@ static DECLCALLBACK(void) intnetR0NetworkDestruct(void *pvObj, void *pvUser1, vo
while (iIf-- > 0)
intnetR0BusyWait(pNetwork, &pNetwork->MacTab.paEntries[iIf].pIf->cBusy);
- /* Orphan the interfaces (not trunk). */
+ /* Orphan the interfaces (not trunk). Don't bother with calling
+ pfnDisconnectInterface here since the networking is going away. */
RTSpinlockAcquireNoInts(pNetwork->hAddrSpinlock, &Tmp);
while ((iIf = pNetwork->MacTab.cEntries) > 0)
{
diff --git a/src/VBox/Devices/Network/slirp/bootp.c b/src/VBox/Devices/Network/slirp/bootp.c
index dc388f0e8..833298eb8 100644
--- a/src/VBox/Devices/Network/slirp/bootp.c
+++ b/src/VBox/Devices/Network/slirp/bootp.c
@@ -1,4 +1,4 @@
-/* $Id: bootp.c 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: bootp.c 29506 2010-05-17 07:14:47Z vboxsync $ */
/** @file
* NAT - BOOTP/DHCP server emulation.
*/
diff --git a/src/VBox/Devices/Network/slirp/slirp.c b/src/VBox/Devices/Network/slirp/slirp.c
index 3bc3420b5..fa7a03f12 100644
--- a/src/VBox/Devices/Network/slirp/slirp.c
+++ b/src/VBox/Devices/Network/slirp/slirp.c
@@ -1,4 +1,4 @@
-/* $Id: slirp.c 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: slirp.c 29506 2010-05-17 07:14:47Z vboxsync $ */
/** @file
* NAT - slirp glue.
*/
diff --git a/src/VBox/Devices/Network/slirp/slirp.h b/src/VBox/Devices/Network/slirp/slirp.h
index 24f0a9faa..3e0597b7e 100644
--- a/src/VBox/Devices/Network/slirp/slirp.h
+++ b/src/VBox/Devices/Network/slirp/slirp.h
@@ -1,4 +1,4 @@
-/* $Id: slirp.h 28807 2010-04-27 10:43:09Z vboxsync $ */
+/* $Id: slirp.h 29506 2010-05-17 07:14:47Z vboxsync $ */
/** @file
* NAT - slirp (declarations/defines).
*/
diff --git a/src/VBox/Devices/PC/DevLPC.cpp b/src/VBox/Devices/PC/DevLPC.cpp
index 8128c92e4..1c2675c36 100644
--- a/src/VBox/Devices/PC/DevLPC.cpp
+++ b/src/VBox/Devices/PC/DevLPC.cpp
@@ -1,7 +1,8 @@
-/* $Id: DevLPC.cpp 29085 2010-05-05 14:03:59Z vboxsync $ */
+/* $Id: DevLPC.cpp 29522 2010-05-17 10:15:48Z vboxsync $ */
/** @file
* DevLPC - LPC device emulation
*/
+
/*
* Copyright (C) 2006-2010 Oracle Corporation
*
@@ -52,7 +53,7 @@
#include <iprt/assert.h>
#include <iprt/string.h>
-#include "../Builtins.h"
+#include "../Builtins2.h"
#define RCBA_BASE 0xFED1C000
@@ -313,11 +314,11 @@ const PDMDEVREG g_DeviceLPC =
/* szName */
"lpc",
/* szRCMod */
- "VBoxDDGC.gc",
+ "VBoxDD2GC.gc",
/* szR0Mod */
- "VBoxDDR0.r0",
+ "VBoxDD2R0.r0",
/* pszDescription */
- " Low Pin Count (LPC) Bus",
+ "Low Pin Count (LPC) Bus",
/* fFlags */
PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT | PDM_DEVREG_FLAGS_GUEST_BITS_32_64 | PDM_DEVREG_FLAGS_PAE36,
/* fClass */
diff --git a/src/VBox/Devices/PC/DevSMC.cpp b/src/VBox/Devices/PC/DevSMC.cpp
index f5825230e..99ca2d70e 100644
--- a/src/VBox/Devices/PC/DevSMC.cpp
+++ b/src/VBox/Devices/PC/DevSMC.cpp
@@ -1,8 +1,8 @@
-/* $Id: DevSMC.cpp 29085 2010-05-05 14:03:59Z vboxsync $ */
-/**
- * @file
+/* $Id: DevSMC.cpp 29569 2010-05-17 15:37:01Z vboxsync $ */
+/** @file
* DevSMC - SMC device emulation.
*/
+
/*
* Copyright (C) 2006-2010 Oracle Corporation
*
@@ -55,9 +55,18 @@
#include <VBox/stam.h>
#include <iprt/assert.h>
#include <iprt/string.h>
+#ifdef IN_RING0
+# include <iprt/asm-amd64-x86.h>
+# include <iprt/once.h>
+# include <iprt/thread.h>
+#endif
+
+#include "../Builtins2.h"
-#include "../Builtins.h"
+/*******************************************************************************
+* Defined Constants And Macros *
+*******************************************************************************/
/* data port used by Apple SMC */
#define APPLESMC_DATA_PORT 0x300
/* command/status port used by Apple SMC */
@@ -70,11 +79,16 @@
#define APPLESMC_GET_KEY_BY_INDEX_CMD 0x12
#define APPLESMC_GET_KEY_TYPE_CMD 0x13
-static char osk[64];
-
/** The version of the saved state. */
#define SMC_SAVED_STATE_VERSION 1
+/** The ring-0 operation number that attempts to get OSK0 and OSK1 from the real
+ * SMC. */
+#define SMC_CALLR0_READ_OSK 1
+
+/*******************************************************************************
+* Structures and Typedefs *
+*******************************************************************************/
typedef struct AppleSMCData
{
uint8_t len;
@@ -82,6 +96,31 @@ typedef struct AppleSMCData
const char *data;
} AppleSMCData;
+
+typedef struct
+{
+ PPDMDEVINSR3 pDevIns;
+
+ uint8_t cmd;
+ uint8_t status;
+ uint8_t key[4];
+ uint8_t read_pos;
+ uint8_t data_len;
+ uint8_t data_pos;
+ uint8_t data[255];
+
+ /** The OSK0 value. This is currently only used in the constructor. */
+ uint8_t abOsk0[32];
+ /** The OSK1 value. This is currently only used in the constructor */
+ uint8_t abOsk1[32];
+} SMCState;
+
+/*******************************************************************************
+* Global Variables *
+*******************************************************************************/
+#ifdef IN_RING3
+static char osk[64];
+
/* See http://www.mactel-linux.org/wiki/AppleSMC */
static struct AppleSMCData data[] =
{
@@ -94,25 +133,147 @@ static struct AppleSMCData data[] =
{1, "NTOK", "\0"},
{0, NULL, NULL }
};
+#endif /* IN_RING3 */
+#ifdef IN_RING0
+/** Do once for the SMC ring-0 static data (g_abOsk0, g_abOsk1, g_fHaveOsk). */
+static RTONCE g_SmcR0Once = RTONCE_INITIALIZER;
+/** Indicates whether we've successfully queried the OSK* keys. */
+static bool g_fHaveOsk = false;
+/** The OSK0 value. */
+static uint8_t g_abOsk0[32];
+/** The OSK1 value. */
+static uint8_t g_abOsk1[32];
+#endif /* IN_RING0 */
-typedef struct
+#ifndef VBOX_DEVICE_STRUCT_TESTCASE
+
+#ifdef IN_RING0
+
+/**
+ * Waits for the specified status on the host SMC.
+ *
+ * @returns success indicator.
+ * @param bStatus The desired status.
+ * @param pszWhat What we're currently doing. For the log.
+ */
+static bool devR0SmcWaitHostStatus(uint8_t bStatus, const char *pszWhat)
{
- PPDMDEVINSR3 pDevIns;
+ uint8_t bCurStatus;
+ for (uint32_t cMsSleep = 1; cMsSleep <= 64; cMsSleep <<= 1)
+ {
+ RTThreadSleep(cMsSleep);
+ bCurStatus = ASMInU8(APPLESMC_CMD_PORT);
+ if ((bCurStatus & 0xf) == bStatus)
+ return true;
+ }
- uint8_t cmd;
- uint8_t status;
- uint8_t key[4];
- uint8_t read_pos;
- uint8_t data_len;
- uint8_t data_pos;
- uint8_t data[255];
+ LogRel(("devR0Smc: %s: bCurStatus=%#x, wanted %#x.\n", pszWhat, bCurStatus, bStatus));
+ return false;
+}
- char* pszDeviceKey;
-} SMCState;
+/**
+ * Reads a key by name from the host SMC.
+ *
+ * @returns success indicator.
+ * @param pszName The key name, must be exactly 4 chars long.
+ * @param pbBuf The output buffer.
+ * @param cbBuf The buffer size. Max 32 bytes.
+ */
+static bool devR0SmcQueryHostKey(const char *pszName, uint8_t *pbBuf, size_t cbBuf)
+{
+ Assert(strlen(pszName) == 4);
+ Assert(cbBuf <= 32);
+ Assert(cbBuf > 0);
-#ifndef VBOX_DEVICE_STRUCT_TESTCASE
+ /*
+ * Issue the READ command.
+ */
+ uint32_t cMsSleep = 1;
+ for (;;)
+ {
+ ASMOutU8(APPLESMC_CMD_PORT, APPLESMC_READ_CMD);
+ RTThreadSleep(cMsSleep);
+ uint8_t bCurStatus = ASMInU8(APPLESMC_CMD_PORT);
+ if ((bCurStatus & 0xf) == 0xc)
+ break;
+ cMsSleep <<= 1;
+ if (cMsSleep > 64)
+ {
+ LogRel(("devR0Smc: %s: bCurStatus=%#x, wanted %#x.\n", "cmd", bCurStatus, 0xc));
+ return false;
+ }
+ }
+
+ /*
+ * Send it the key.
+ */
+ for (unsigned off = 0; off < 4; off++)
+ {
+ ASMOutU8(APPLESMC_DATA_PORT, pszName[off]);
+ if (!devR0SmcWaitHostStatus(4, "key"))
+ return false;
+ }
+
+ /*
+ * The desired amount of output.
+ */
+ ASMOutU8(APPLESMC_DATA_PORT, (uint8_t)cbBuf);
+ /*
+ * Read the output.
+ */
+ for (size_t off = 0; off < cbBuf; off++)
+ {
+ if (!devR0SmcWaitHostStatus(5, off ? "data" : "len"))
+ return false;
+ pbBuf[off] = ASMInU8(APPLESMC_DATA_PORT);
+ }
+
+ return true;
+}
+
+/**
+ * RTOnce callback that initializes g_fHaveOsk, g_abOsk0 and g_abOsk1.
+ *
+ * @returns VINF_SUCCESS.
+ * @param pvUser1Ignored Ignored.
+ * @param pvUser2Ignored Ignored.
+ */
+static DECLCALLBACK(int) devR0SmcInitOnce(void *pvUser1Ignored, void *pvUser2Ignored)
+{
+ g_fHaveOsk = devR0SmcQueryHostKey("OSK0", &g_abOsk0[0], sizeof(g_abOsk0))
+ && devR0SmcQueryHostKey("OSK1", &g_abOsk1[0], sizeof(g_abOsk1));
+
+ NOREF(pvUser1Ignored); NOREF(pvUser2Ignored);
+ return VINF_SUCCESS;
+}
+
+/**
+ * @interface_method_impl{FNPDMDEVREQHANDLERR0}
+ */
+PDMBOTHCBDECL(int) devR0SmcReqHandler(PPDMDEVINS pDevIns, uint32_t uOperation, uint64_t u64Arg)
+{
+ SMCState *pThis = PDMINS_2_DATA(pDevIns, SMCState *);
+ int rc = VERR_INVALID_FUNCTION;
+
+ if (uOperation == SMC_CALLR0_READ_OSK)
+ {
+ rc = RTOnce(&g_SmcR0Once, devR0SmcInitOnce, NULL, NULL);
+ if ( RT_SUCCESS(rc)
+ && g_fHaveOsk)
+ {
+ AssertCompile(sizeof(g_abOsk0) == sizeof(pThis->abOsk0));
+ AssertCompile(sizeof(g_abOsk1) == sizeof(pThis->abOsk1));
+ memcpy(pThis->abOsk0, g_abOsk0, sizeof(pThis->abOsk0));
+ memcpy(pThis->abOsk1, g_abOsk1, sizeof(pThis->abOsk1));
+ }
+ }
+ return rc;
+}
+
+#endif /* IN_RING0 */
#ifdef IN_RING3
+
/**
* Saves a state of the SMC device.
*
@@ -151,19 +312,6 @@ static DECLCALLBACK(int) smcLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle,
}
/**
- * Relocation notification.
- *
- * @returns VBox status.
- * @param pDevIns The device instance data.
- * @param offDelta The delta relative to the old address.
- */
-static DECLCALLBACK(void) smcRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
-{
- SMCState *pThis = PDMINS_2_DATA(pDevIns, SMCState *);
- /* SMC device lives only in R3 now, thus nothing to relocate yet */
-}
-
-/**
* Reset notification.
*
* @returns VBox status.
@@ -334,7 +482,6 @@ PDMBOTHCBDECL(int) smcIOPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Por
static DECLCALLBACK(int) smcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
{
SMCState *pThis = PDMINS_2_DATA(pDevIns, SMCState *);
- int rc;
Assert(iInstance == 0);
/*
@@ -345,42 +492,62 @@ static DECLCALLBACK(int) smcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
/*
* Validate and read the configuration.
*/
- if (!CFGMR3AreValuesValid(pCfg,
- "DeviceKey\0"
- ))
- return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
- N_("Configuration error: Invalid config value(s) for the SMC device"));
+ PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "DeviceKey|GetKeyFromRealSMC", "");
/*
- * Query device key
+ * Read the DeviceKey config value.
*/
- rc = CFGMR3QueryStringAlloc(pCfg, "DeviceKey", &pThis->pszDeviceKey);
- if (rc == VERR_CFGM_VALUE_NOT_FOUND)
- {
- pThis->pszDeviceKey = RTStrDup("Invalid");
- LogRel(("Invalid SMC device key\n"));
- if (!pThis->pszDeviceKey)
- return VERR_NO_MEMORY;
-
- rc = VINF_SUCCESS;
- }
- else if (RT_FAILURE(rc))
+ char *pszDeviceKey;
+ int rc = CFGMR3QueryStringAllocDef(pCfg, "DeviceKey", &pszDeviceKey, "");
+ if (RT_FAILURE(rc))
return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS,
N_("Configuration error: Querying \"DeviceKey\" as a string failed"));
- memcpy(osk, pThis->pszDeviceKey, RTStrNLen(pThis->pszDeviceKey, 64));
+ size_t cchDeviceKey = strlen(pszDeviceKey);
+ if (cchDeviceKey > 0)
+ memcpy(&pThis->abOsk0[0], pszDeviceKey, RT_MIN(cchDeviceKey, sizeof(pThis->abOsk0)));
+ if (cchDeviceKey > sizeof(pThis->abOsk0))
+ memcpy(&pThis->abOsk1[0], &pszDeviceKey[sizeof(pThis->abOsk0)],
+ RT_MIN(cchDeviceKey - sizeof(pThis->abOsk0), sizeof(pThis->abOsk1)));
+
+ MMR3HeapFree(pszDeviceKey);
+
+ /*
+ * Query the key from the real hardware if asked to do so.
+ */
+ bool fGetKeyFromRealSMC;
+ rc = CFGMR3QueryBoolDef(pCfg, "GetKeyFromRealSMC", &fGetKeyFromRealSMC, false);
+ if (RT_FAILURE(rc))
+ return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS,
+ N_("Configuration error: Querying \"GetKeyFromRealSMC\" as a boolean failed"));
+ if (fGetKeyFromRealSMC)
+ {
+ rc = PDMDevHlpCallR0(pDevIns, SMC_CALLR0_READ_OSK, 0 /*u64Arg*/);
+ if (RT_FAILURE(rc))
+ return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS,
+ N_("Failed to query SMC value from the host"));
+ }
+
+ /*
+ * For practical/historical reasons, the OSK[0|1] data is stored in a
+ * global buffer in ring-3.
+ */
+ AssertCompile(sizeof(osk) == sizeof(pThis->abOsk0) + sizeof(pThis->abOsk1));
+ AssertCompile(sizeof(char) == sizeof(uint8_t));
+ memcpy(osk, pThis->abOsk0, sizeof(pThis->abOsk0));
+ memcpy(&osk[sizeof(pThis->abOsk0)], pThis->abOsk1, sizeof(pThis->abOsk1));
/*
* Register the IO ports.
*/
rc = PDMDevHlpIOPortRegister(pDevIns, APPLESMC_DATA_PORT, 1, NULL,
- smcIOPortWrite, smcIOPortRead,
- NULL, NULL, "SMC Data");
+ smcIOPortWrite, smcIOPortRead,
+ NULL, NULL, "SMC Data");
if (RT_FAILURE(rc))
return rc;
rc = PDMDevHlpIOPortRegister(pDevIns, APPLESMC_CMD_PORT, 1, NULL,
- smcIOPortWrite, smcIOPortRead,
- NULL, NULL, "SMC Commands");
+ smcIOPortWrite, smcIOPortRead,
+ NULL, NULL, "SMC Commands");
if (RT_FAILURE(rc))
return rc;
@@ -402,31 +569,6 @@ static DECLCALLBACK(int) smcConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNO
return VINF_SUCCESS;
}
-
-/**
- * Destruct a device instance.
- *
- * Most VM resources are freed by the VM. This callback is provided so that any non-VM
- * resources can be freed correctly.
- *
- * @param pDevIns The device instance data.
- */
-static DECLCALLBACK(int) smcDestruct(PPDMDEVINS pDevIns)
-{
- SMCState* pThis = PDMINS_2_DATA(pDevIns, SMCState*);
-
- /*
- * Free MM heap pointers.
- */
- if (pThis->pszDeviceKey)
- {
- MMR3HeapFree(pThis->pszDeviceKey);
- pThis->pszDeviceKey = NULL;
- }
-
- return VINF_SUCCESS;
-}
-
/**
* The device registration structure.
*/
@@ -437,13 +579,13 @@ const PDMDEVREG g_DeviceSMC =
/* szName */
"smc",
/* szRCMod */
- "VBoxDDGC.gc",
+ "VBoxDD2GC.gc",
/* szR0Mod */
- "VBoxDDR0.r0",
+ "VBoxDD2R0.r0",
/* pszDescription */
- " System Management Controller (SMC) Device",
+ "System Management Controller (SMC) Device",
/* fFlags */
- PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT | PDM_DEVREG_FLAGS_GUEST_BITS_32_64 | PDM_DEVREG_FLAGS_PAE36,
+ PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT | PDM_DEVREG_FLAGS_GUEST_BITS_32_64 | PDM_DEVREG_FLAGS_PAE36| PDM_DEVREG_FLAGS_R0,
/* fClass */
PDM_DEVREG_CLASS_MISC,
/* cMaxInstances */
@@ -453,9 +595,9 @@ const PDMDEVREG g_DeviceSMC =
/* pfnConstruct */
smcConstruct,
/* pfnDestruct */
- smcDestruct,
+ NULL,
/* pfnRelocate */
- smcRelocate,
+ NULL,
/* pfnIOCtl */
NULL,
/* pfnPowerOn */
diff --git a/src/VBox/Devices/Storage/DevAHCI.cpp b/src/VBox/Devices/Storage/DevAHCI.cpp
index a1f615c8c..a4635e869 100644
--- a/src/VBox/Devices/Storage/DevAHCI.cpp
+++ b/src/VBox/Devices/Storage/DevAHCI.cpp
@@ -1,4 +1,4 @@
-/* $Id: DevAHCI.cpp 29239 2010-05-08 16:14:56Z vboxsync $ */
+/* $Id: DevAHCI.cpp 29504 2010-05-16 13:43:18Z vboxsync $ */
/** @file
* VBox storage devices: AHCI controller device (disk and cdrom).
* Implements the AHCI standard 1.1
@@ -4285,9 +4285,17 @@ static int ahciScatterGatherListCreate(PAHCIPort pAhciPort, PAHCIPORTTASKSTATE p
/*
* Create a safe mapping when doing post processing because the size of the
- * data to transfer and the amount of guest memory reserved can differ
+ * data to transfer and the amount of guest memory reserved can differ.
+ *
+ * @fixme: Read performance is really bad on OS X hosts because there is no
+ * S/G support and the I/O manager has to create a newrequest
+ * for every segment. The default limit of active requests is 16 on OS X
+ * which causes a the bad read performance (writes are not affected
+ * because of the writeback cache).
+ * For now we will always use an intermediate buffer until
+ * there is support for host S/G operations.
*/
- if (pAhciPortTaskState->pfnPostProcess)
+ if (pAhciPortTaskState->pfnPostProcess || true)
{
ahciLog(("%s: Request with post processing.\n", __FUNCTION__));
@@ -5405,12 +5413,20 @@ static DECLCALLBACK(bool) ahciNotifyQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEI
pAhciPort->fResetDevice = true;
ahciSendD2HFis(pAhciPort, pAhciPortTaskState, pAhciPortTaskState->cmdFis, true);
pAhciPort->aCachedTasks[pNotifierItem->iTask] = pAhciPortTaskState;
+#ifdef RT_STRICT
+ fXchg = ASMAtomicCmpXchgBool(&pAhciPortTaskState->fActive, false, true);
+ AssertMsg(fXchg, ("Task is not active\n"));
+#endif
return true;
}
else if (pAhciPort->fResetDevice) /* The bit is not set and we are in a reset state. */
{
ahciFinishStorageDeviceReset(pAhciPort, pAhciPortTaskState);
pAhciPort->aCachedTasks[pNotifierItem->iTask] = pAhciPortTaskState;
+#ifdef RT_STRICT
+ fXchg = ASMAtomicCmpXchgBool(&pAhciPortTaskState->fActive, false, true);
+ AssertMsg(fXchg, ("Task is not active\n"));
+#endif
return true;
}
else /* We are not in a reset state update the control registers. */
@@ -5755,18 +5771,6 @@ static DECLCALLBACK(int) ahciAsyncIOLoop(PPDMDEVINS pDevIns, PPDMTHREAD pThread)
uOffset, cbTransfer, rc));
}
- /* Log the error. */
- if ( RT_FAILURE(rc)
- && pAhciPort->cErrors++ < MAX_LOG_REL_ERRORS)
- {
- LogRel(("AHCI#%u: %s at offset %llu (%u bytes left) returned rc=%Rrc\n",
- pAhciPort->iLUN,
- enmTxDir == AHCITXDIR_READ
- ? "Read"
- : "Write",
- uOffset, cbTransfer, rc));
- }
-
/* Cleanup. */
int rc2 = ahciScatterGatherListDestroy(pAhciPort, pAhciPortTaskState);
if (RT_FAILURE(rc2))
diff --git a/src/VBox/Devices/Storage/DevBusLogic.cpp b/src/VBox/Devices/Storage/DevBusLogic.cpp
index 5f1148d23..1d7ec97bd 100644
--- a/src/VBox/Devices/Storage/DevBusLogic.cpp
+++ b/src/VBox/Devices/Storage/DevBusLogic.cpp
@@ -1,4 +1,4 @@
-/* $Id: DevBusLogic.cpp 29250 2010-05-09 17:53:58Z vboxsync $ */
+/* $Id: DevBusLogic.cpp 29614 2010-05-18 11:48:31Z vboxsync $ */
/** @file
* VBox storage devices: BusLogic SCSI host adapter BT-958.
*/
@@ -380,6 +380,15 @@ typedef struct BUSLOGIC
PDMILEDPORTS ILeds;
/** Partner of ILeds. */
R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;
+
+#if HC_ARCH_BITS == 64
+ uint32_t Alignment3;
+#endif
+
+ /** Indicates that PDMDevHlpAsyncNotificationCompleted should be called when
+ * a port is entering the idle state. */
+ bool volatile fSignalIdle;
+
} BUSLOGIC, *PBUSLOGIC;
/** Register offsets in the I/O port space. */
@@ -1986,6 +1995,10 @@ static DECLCALLBACK(int) buslogicDeviceSCSIRequestCompleted(PPDMISCSIPORT pInter
/* Add task to the cache. */
RTMemCacheFree(pBusLogic->hTaskCache, pTaskState);
+
+ if (pBusLogicDevice->cOutstandingRequests == 0 && pBusLogic->fSignalIdle)
+ PDMDevHlpAsyncNotificationCompleted(pBusLogic->pDevInsR3);
+
return VINF_SUCCESS;
}
@@ -2385,6 +2398,74 @@ static DECLCALLBACK(void *) buslogicStatusQueryInterface(PPDMIBASE pInterface, c
return NULL;
}
+/* -=-=-=-=- Helper -=-=-=-=- */
+
+ /**
+ * Checks if all asynchronous I/O is finished.
+ *
+ * Used by lsilogicReset, lsilogicSuspend and lsilogicPowerOff.
+ *
+ * @returns true if quiesced, false if busy.
+ * @param pDevIns The device instance.
+ */
+static bool buslogicR3AllAsyncIOIsFinished(PPDMDEVINS pDevIns)
+{
+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
+
+ for (uint32_t i = 0; i < RT_ELEMENTS(pThis->aDeviceStates); i++)
+ {
+ PBUSLOGICDEVICE pThisDevice = &pThis->aDeviceStates[i];
+ if (pThisDevice->pDrvBase)
+ {
+ if (pThisDevice->cOutstandingRequests != 0)
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Callback employed by lsilogicR3Suspend and lsilogicR3PowerOff..
+ *
+ * @returns true if we've quiesced, false if we're still working.
+ * @param pDevIns The device instance.
+ */
+static DECLCALLBACK(bool) buslogicR3IsAsyncSuspendOrPowerOffDone(PPDMDEVINS pDevIns)
+{
+ if (!buslogicR3AllAsyncIOIsFinished(pDevIns))
+ return false;
+
+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+ return true;
+}
+
+/**
+ * Common worker for ahciR3Suspend and ahciR3PowerOff.
+ */
+static void buslogicR3SuspendOrPowerOff(PPDMDEVINS pDevIns)
+{
+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
+
+ ASMAtomicWriteBool(&pThis->fSignalIdle, true);
+ if (!buslogicR3AllAsyncIOIsFinished(pDevIns))
+ PDMDevHlpSetAsyncNotification(pDevIns, buslogicR3IsAsyncSuspendOrPowerOffDone);
+ else
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+}
+
+/**
+ * Suspend notification.
+ *
+ * @param pDevIns The device instance data.
+ */
+static DECLCALLBACK(void) buslogicSuspend(PPDMDEVINS pDevIns)
+{
+ Log(("buslogicSuspend\n"));
+ buslogicR3SuspendOrPowerOff(pDevIns);
+}
+
/**
* Detach notification.
*
@@ -2461,6 +2542,41 @@ static DECLCALLBACK(int) buslogicAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint
return rc;
}
+/**
+ * Callback employed by buslogicR3Reset.
+ *
+ * @returns true if we've quiesced, false if we're still working.
+ * @param pDevIns The device instance.
+ */
+static DECLCALLBACK(bool) buslogicR3IsAsyncResetDone(PPDMDEVINS pDevIns)
+{
+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
+
+ if (!buslogicR3AllAsyncIOIsFinished(pDevIns))
+ return false;
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+
+ buslogicHwReset(pThis);
+ return true;
+}
+
+/**
+ * @copydoc FNPDMDEVRESET
+ */
+static DECLCALLBACK(void) buslogicReset(PPDMDEVINS pDevIns)
+{
+ PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
+
+ ASMAtomicWriteBool(&pThis->fSignalIdle, true);
+ if (!buslogicR3AllAsyncIOIsFinished(pDevIns))
+ PDMDevHlpSetAsyncNotification(pDevIns, buslogicR3IsAsyncResetDone);
+ else
+ {
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+ buslogicHwReset(pThis);
+ }
+}
+
static DECLCALLBACK(void) buslogicRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
{
uint32_t i;
@@ -2479,16 +2595,14 @@ static DECLCALLBACK(void) buslogicRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDel
}
/**
- * Reset notification.
+ * Poweroff notification.
*
- * @returns VBox status.
- * @param pDevIns The device instance data.
+ * @param pDevIns Pointer to the device instance
*/
-static DECLCALLBACK(void) buslogicReset(PPDMDEVINS pDevIns)
+static DECLCALLBACK(void) buslogicPowerOff(PPDMDEVINS pDevIns)
{
- PBUSLOGIC pThis = PDMINS_2_DATA(pDevIns, PBUSLOGIC);
-
- buslogicHwReset(pThis);
+ Log(("buslogicPowerOff\n"));
+ buslogicR3SuspendOrPowerOff(pDevIns);
}
/**
@@ -2681,7 +2795,8 @@ const PDMDEVREG g_DeviceBusLogic =
/* pszDescription */
"BusLogic BT-958 SCSI host adapter.\n",
/* fFlags */
- PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
+ PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0 |
+ PDM_DEVREG_FLAGS_FIRST_SUSPEND_NOTIFICATION | PDM_DEVREG_FLAGS_FIRST_POWEROFF_NOTIFICATION,
/* fClass */
PDM_DEVREG_CLASS_STORAGE,
/* cMaxInstances */
@@ -2701,7 +2816,7 @@ const PDMDEVREG g_DeviceBusLogic =
/* pfnReset */
buslogicReset,
/* pfnSuspend */
- NULL,
+ buslogicSuspend,
/* pfnResume */
NULL,
/* pfnAttach */
@@ -2713,7 +2828,7 @@ const PDMDEVREG g_DeviceBusLogic =
/* pfnInitComplete */
NULL,
/* pfnPowerOff */
- NULL,
+ buslogicPowerOff,
/* pfnSoftReset */
NULL,
/* u32VersionEnd */
diff --git a/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp b/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
index 9494bf17a..e1c9c5317 100644
--- a/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
+++ b/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
@@ -1,4 +1,4 @@
-/* $Id: DevLsiLogicSCSI.cpp 29326 2010-05-11 10:08:13Z vboxsync $ */
+/* $Id: DevLsiLogicSCSI.cpp 29610 2010-05-18 10:16:38Z vboxsync $ */
/** @file
* VBox storage devices: LsiLogic LSI53c1030 SCSI controller.
*/
@@ -272,8 +272,17 @@ typedef struct LSILOGICSCSI
PDMILEDPORTS ILeds;
/** Status LUN: Partner of ILeds. */
R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;
-
+ /** Pointer to the configuration page area. */
R3PTRTYPE(PMptConfigurationPagesSupported) pConfigurationPages;
+
+#if HC_ARCH_BITS == 64
+ uint32_t Alignment7;
+#endif
+
+ /** Indicates that PDMDevHlpAsyncNotificationCompleted should be called when
+ * a port is entering the idle state. */
+ bool volatile fSignalIdle;
+
} LSILOGISCSI, *PLSILOGICSCSI;
/**
@@ -549,6 +558,9 @@ static void lsilogicConfigurationPagesFree(PLSILOGICSCSI pThis)
static void lsilogicFinishContextReply(PLSILOGICSCSI pLsiLogic, uint32_t u32MessageContext)
{
int rc;
+
+ LogFlowFunc(("pLsiLogic=%#p u32MessageContext=%#x\n", pLsiLogic, u32MessageContext));
+
AssertMsg(!pLsiLogic->fDoorbellInProgress, ("We are in a doorbell function\n"));
/* Write message context ID into reply post queue. */
@@ -734,6 +746,9 @@ static int lsilogicProcessMessageRequest(PLSILOGICSCSI pLsiLogic, PMptMessageHdr
{
PMptSCSITaskManagementRequest pTaskMgmtReq = (PMptSCSITaskManagementRequest)pMessageHdr;
+ LogFlow(("u8TaskType=%u\n", pTaskMgmtReq->u8TaskType));
+ LogFlow(("u32TaskMessageContext=%#x\n", pTaskMgmtReq->u32TaskMessageContext));
+
pReply->SCSITaskManagement.u8MessageLength = 6; /* 6 32bit dwords. */
pReply->SCSITaskManagement.u8TaskType = pTaskMgmtReq->u8TaskType;
pReply->SCSITaskManagement.u32TerminationCount = 0;
@@ -2025,6 +2040,9 @@ static DECLCALLBACK(int) lsilogicDeviceSCSIRequestCompleted(PPDMISCSIPORT pInter
RTMemCacheFree(pLsiLogic->hTaskCache, pTaskState);
+ if (pLsiLogicDevice->cOutstandingRequests == 0 && pLsiLogic->fSignalIdle)
+ PDMDevHlpAsyncNotificationCompleted(pLsiLogic->pDevInsR3);
+
return VINF_SUCCESS;
}
@@ -3756,6 +3774,62 @@ static DECLCALLBACK(int) lsilogicMap(PPCIDEVICE pPciDev, /*unsigned*/ int iRegio
return rc;
}
+/**
+ * Allocate the queues.
+ *
+ * @returns VBox status code.
+ *
+ * @param pThis The LsiLogic device instance.
+ */
+static int lsilogicQueuesAlloc(PLSILOGICSCSI pThis)
+{
+ PVM pVM = PDMDevHlpGetVM(pThis->pDevInsR3);
+ uint32_t cbQueues;
+
+ Assert(!pThis->pReplyFreeQueueBaseR3);
+
+ cbQueues = 2*pThis->cReplyQueueEntries * sizeof(uint32_t);
+ cbQueues += pThis->cRequestQueueEntries * sizeof(uint32_t);
+ int rc = MMHyperAlloc(pVM, cbQueues, 1, MM_TAG_PDM_DEVICE_USER,
+ (void **)&pThis->pReplyFreeQueueBaseR3);
+ if (RT_FAILURE(rc))
+ return VERR_NO_MEMORY;
+ pThis->pReplyFreeQueueBaseR0 = MMHyperR3ToR0(pVM, (void *)pThis->pReplyFreeQueueBaseR3);
+ pThis->pReplyFreeQueueBaseRC = MMHyperR3ToRC(pVM, (void *)pThis->pReplyFreeQueueBaseR3);
+
+ pThis->pReplyPostQueueBaseR3 = pThis->pReplyFreeQueueBaseR3 + pThis->cReplyQueueEntries;
+ pThis->pReplyPostQueueBaseR0 = MMHyperR3ToR0(pVM, (void *)pThis->pReplyPostQueueBaseR3);
+ pThis->pReplyPostQueueBaseRC = MMHyperR3ToRC(pVM, (void *)pThis->pReplyPostQueueBaseR3);
+
+ pThis->pRequestQueueBaseR3 = pThis->pReplyPostQueueBaseR3 + pThis->cReplyQueueEntries;
+ pThis->pRequestQueueBaseR0 = MMHyperR3ToR0(pVM, (void *)pThis->pRequestQueueBaseR3);
+ pThis->pRequestQueueBaseRC = MMHyperR3ToRC(pVM, (void *)pThis->pRequestQueueBaseR3);
+
+ return VINF_SUCCESS;
+}
+
+/**
+ * Free the hyper memory used or the queues.
+ *
+ * @returns nothing.
+ *
+ * @param pThis The LsiLogic device instance.
+ */
+static void lsilogicQueuesFree(PLSILOGICSCSI pThis)
+{
+ PVM pVM = PDMDevHlpGetVM(pThis->pDevInsR3);
+ int rc = VINF_SUCCESS;
+
+ AssertPtr(pThis->pReplyFreeQueueBaseR3);
+
+ rc = MMHyperFree(pVM, (void *)pThis->pReplyFreeQueueBaseR3);
+ AssertRC(rc);
+
+ pThis->pReplyFreeQueueBaseR3 = NULL;
+ pThis->pReplyPostQueueBaseR3 = NULL;
+ pThis->pRequestQueueBaseR3 = NULL;
+}
+
static DECLCALLBACK(int) lsilogicLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
{
PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
@@ -4006,8 +4080,24 @@ static DECLCALLBACK(int) lsilogicLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, u
SSMR3GetU8 (pSSM, &pLsiLogic->cMaxBuses);
SSMR3GetU16 (pSSM, &pLsiLogic->cbReplyFrame);
SSMR3GetU32 (pSSM, &pLsiLogic->iDiagnosticAccess);
- SSMR3GetU32 (pSSM, &pLsiLogic->cReplyQueueEntries);
- SSMR3GetU32 (pSSM, &pLsiLogic->cRequestQueueEntries);
+
+ uint32_t cReplyQueueEntries, cRequestQueueEntries;
+ SSMR3GetU32 (pSSM, &cReplyQueueEntries);
+ SSMR3GetU32 (pSSM, &cRequestQueueEntries);
+
+ if ( cReplyQueueEntries != pLsiLogic->cReplyQueueEntries
+ || cRequestQueueEntries != pLsiLogic->cRequestQueueEntries)
+ {
+ LogFlow(("Reallocating queues cReplyQueueEntries=%u cRequestQueuEntries=%u\n",
+ cReplyQueueEntries, cRequestQueueEntries));
+ lsilogicQueuesFree(pLsiLogic);
+ pLsiLogic->cReplyQueueEntries = cReplyQueueEntries;
+ pLsiLogic->cRequestQueueEntries = cRequestQueueEntries;
+ rc = lsilogicQueuesAlloc(pLsiLogic);
+ if (RT_FAILURE(rc))
+ return rc;
+ }
+
SSMR3GetU32 (pSSM, (uint32_t *)&pLsiLogic->uReplyFreeQueueNextEntryFreeWrite);
SSMR3GetU32 (pSSM, (uint32_t *)&pLsiLogic->uReplyFreeQueueNextAddressRead);
SSMR3GetU32 (pSSM, (uint32_t *)&pLsiLogic->uReplyPostQueueNextEntryFreeWrite);
@@ -4265,6 +4355,74 @@ static DECLCALLBACK(void *) lsilogicStatusQueryInterface(PPDMIBASE pInterface, c
return NULL;
}
+/* -=-=-=-=- Helper -=-=-=-=- */
+
+/**
+ * Checks if all asynchronous I/O is finished.
+ *
+ * Used by lsilogicReset, lsilogicSuspend and lsilogicPowerOff.
+ *
+ * @returns true if quiesced, false if busy.
+ * @param pDevIns The device instance.
+ */
+static bool lsilogicR3AllAsyncIOIsFinished(PPDMDEVINS pDevIns)
+{
+ PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
+
+ for (uint32_t i = 0; i < pThis->cDeviceStates; i++)
+ {
+ PLSILOGICDEVICE pThisDevice = &pThis->paDeviceStates[i];
+ if (pThisDevice->pDrvBase)
+ {
+ if (pThisDevice->cOutstandingRequests != 0)
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Callback employed by lsilogicR3Suspend and lsilogicR3PowerOff..
+ *
+ * @returns true if we've quiesced, false if we're still working.
+ * @param pDevIns The device instance.
+ */
+static DECLCALLBACK(bool) lsilogicR3IsAsyncSuspendOrPowerOffDone(PPDMDEVINS pDevIns)
+{
+ if (!lsilogicR3AllAsyncIOIsFinished(pDevIns))
+ return false;
+
+ PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+ return true;
+}
+
+/**
+ * Common worker for ahciR3Suspend and ahciR3PowerOff.
+ */
+static void lsilogicR3SuspendOrPowerOff(PPDMDEVINS pDevIns)
+{
+ PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
+
+ ASMAtomicWriteBool(&pThis->fSignalIdle, true);
+ if (!lsilogicR3AllAsyncIOIsFinished(pDevIns))
+ PDMDevHlpSetAsyncNotification(pDevIns, lsilogicR3IsAsyncSuspendOrPowerOffDone);
+ else
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+}
+
+/**
+ * Suspend notification.
+ *
+ * @param pDevIns The device instance data.
+ */
+static DECLCALLBACK(void) lsilogicSuspend(PPDMDEVINS pDevIns)
+{
+ Log(("lsilogicSuspend\n"));
+ lsilogicR3SuspendOrPowerOff(pDevIns);
+}
+
/**
* Detach notification.
*
@@ -4346,9 +4504,11 @@ static DECLCALLBACK(int) lsilogicAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint
}
/**
- * @copydoc FNPDMDEVRESET
+ * Common reset worker.
+ *
+ * @param pDevIns The device instance data.
*/
-static DECLCALLBACK(void) lsilogicReset(PPDMDEVINS pDevIns)
+static void lsilogicR3ResetCommon(PPDMDEVINS pDevIns)
{
PLSILOGICSCSI pLsiLogic = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
int rc;
@@ -4360,6 +4520,41 @@ static DECLCALLBACK(void) lsilogicReset(PPDMDEVINS pDevIns)
}
/**
+ * Callback employed by lsilogicR3Reset.
+ *
+ * @returns true if we've quiesced, false if we're still working.
+ * @param pDevIns The device instance.
+ */
+static DECLCALLBACK(bool) lsilogicR3IsAsyncResetDone(PPDMDEVINS pDevIns)
+{
+ PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
+
+ if (!lsilogicR3AllAsyncIOIsFinished(pDevIns))
+ return false;
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+
+ lsilogicR3ResetCommon(pDevIns);
+ return true;
+}
+
+/**
+ * @copydoc FNPDMDEVRESET
+ */
+static DECLCALLBACK(void) lsilogicReset(PPDMDEVINS pDevIns)
+{
+ PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
+
+ ASMAtomicWriteBool(&pThis->fSignalIdle, true);
+ if (!lsilogicR3AllAsyncIOIsFinished(pDevIns))
+ PDMDevHlpSetAsyncNotification(pDevIns, lsilogicR3IsAsyncResetDone);
+ else
+ {
+ ASMAtomicWriteBool(&pThis->fSignalIdle, false);
+ lsilogicR3ResetCommon(pDevIns);
+ }
+}
+
+/**
* @copydoc FNPDMDEVRELOCATE
*/
static DECLCALLBACK(void) lsilogicRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
@@ -4400,6 +4595,17 @@ static DECLCALLBACK(int) lsilogicDestruct(PPDMDEVINS pDevIns)
}
/**
+ * Poweroff notification.
+ *
+ * @param pDevIns Pointer to the device instance
+ */
+static DECLCALLBACK(void) lsilogicPowerOff(PPDMDEVINS pDevIns)
+{
+ Log(("lsilogicPowerOff\n"));
+ lsilogicR3SuspendOrPowerOff(pDevIns);
+}
+
+/**
* @copydoc FNPDMDEVCONSTRUCT
*/
static DECLCALLBACK(int) lsilogicConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
@@ -4407,7 +4613,6 @@ static DECLCALLBACK(int) lsilogicConstruct(PPDMDEVINS pDevIns, int iInstance, PC
PLSILOGICSCSI pThis = PDMINS_2_DATA(pDevIns, PLSILOGICSCSI);
int rc = VINF_SUCCESS;
char *pszCtrlType = NULL;
- PVM pVM = PDMDevHlpGetVM(pDevIns);
PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
/*
@@ -4548,24 +4753,9 @@ static DECLCALLBACK(int) lsilogicConstruct(PPDMDEVINS pDevIns, int iInstance, PC
/*
* Allocate memory for the queues.
*/
- uint32_t cbQueues;
-
- cbQueues = 2*pThis->cReplyQueueEntries * sizeof(uint32_t);
- cbQueues += pThis->cRequestQueueEntries * sizeof(uint32_t);
- rc = MMHyperAlloc(pVM, cbQueues, 1, MM_TAG_PDM_DEVICE_USER,
- (void **)&pThis->pReplyFreeQueueBaseR3);
+ rc = lsilogicQueuesAlloc(pThis);
if (RT_FAILURE(rc))
- return VERR_NO_MEMORY;
- pThis->pReplyFreeQueueBaseR0 = MMHyperR3ToR0(pVM, (void *)pThis->pReplyFreeQueueBaseR3);
- pThis->pReplyFreeQueueBaseRC = MMHyperR3ToRC(pVM, (void *)pThis->pReplyFreeQueueBaseR3);
-
- pThis->pReplyPostQueueBaseR3 = pThis->pReplyFreeQueueBaseR3 + pThis->cReplyQueueEntries;
- pThis->pReplyPostQueueBaseR0 = MMHyperR3ToR0(pVM, (void *)pThis->pReplyPostQueueBaseR3);
- pThis->pReplyPostQueueBaseRC = MMHyperR3ToRC(pVM, (void *)pThis->pReplyPostQueueBaseR3);
-
- pThis->pRequestQueueBaseR3 = pThis->pReplyPostQueueBaseR3 + pThis->cReplyQueueEntries;
- pThis->pRequestQueueBaseR0 = MMHyperR3ToR0(pVM, (void *)pThis->pRequestQueueBaseR3);
- pThis->pRequestQueueBaseRC = MMHyperR3ToRC(pVM, (void *)pThis->pRequestQueueBaseR3);
+ return rc;
/*
* Create critical sections protecting the reply post and free queues.
@@ -4711,7 +4901,8 @@ const PDMDEVREG g_DeviceLsiLogicSCSI =
/* pszDescription */
"LSI Logic 53c1030 SCSI controller.\n",
/* fFlags */
- PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
+ PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0 |
+ PDM_DEVREG_FLAGS_FIRST_SUSPEND_NOTIFICATION | PDM_DEVREG_FLAGS_FIRST_POWEROFF_NOTIFICATION,
/* fClass */
PDM_DEVREG_CLASS_STORAGE,
/* cMaxInstances */
@@ -4731,7 +4922,7 @@ const PDMDEVREG g_DeviceLsiLogicSCSI =
/* pfnReset */
lsilogicReset,
/* pfnSuspend */
- NULL,
+ lsilogicSuspend,
/* pfnResume */
NULL,
/* pfnAttach */
@@ -4743,7 +4934,7 @@ const PDMDEVREG g_DeviceLsiLogicSCSI =
/* pfnInitComplete */
NULL,
/* pfnPowerOff */
- NULL,
+ lsilogicPowerOff,
/* pfnSoftReset */
NULL,
/* u32VersionEnd */
@@ -4766,7 +4957,8 @@ const PDMDEVREG g_DeviceLsiLogicSAS =
/* pszDescription */
"LSI Logic SAS1068 controller.\n",
/* fFlags */
- PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
+ PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0 |
+ PDM_DEVREG_FLAGS_FIRST_SUSPEND_NOTIFICATION | PDM_DEVREG_FLAGS_FIRST_POWEROFF_NOTIFICATION,
/* fClass */
PDM_DEVREG_CLASS_STORAGE,
/* cMaxInstances */
@@ -4786,7 +4978,7 @@ const PDMDEVREG g_DeviceLsiLogicSAS =
/* pfnReset */
lsilogicReset,
/* pfnSuspend */
- NULL,
+ lsilogicSuspend,
/* pfnResume */
NULL,
/* pfnAttach */
@@ -4798,7 +4990,7 @@ const PDMDEVREG g_DeviceLsiLogicSAS =
/* pfnInitComplete */
NULL,
/* pfnPowerOff */
- NULL,
+ lsilogicPowerOff,
/* pfnSoftReset */
NULL,
/* u32VersionEnd */
diff --git a/src/VBox/Devices/Storage/DevLsiLogicSCSI.h b/src/VBox/Devices/Storage/DevLsiLogicSCSI.h
index 8bafbb7f3..55b1f0299 100644
--- a/src/VBox/Devices/Storage/DevLsiLogicSCSI.h
+++ b/src/VBox/Devices/Storage/DevLsiLogicSCSI.h
@@ -1,4 +1,4 @@
-/* $Id: DevLsiLogicSCSI.h 29326 2010-05-11 10:08:13Z vboxsync $ */
+/* $Id: DevLsiLogicSCSI.h 29588 2010-05-17 22:32:29Z vboxsync $ */
/** @file
* VBox storage devices: LsiLogic LSI53c1030 SCSI controller - Defines and structures.
*/
@@ -26,8 +26,8 @@
#define LSILOGIC_ISA_IO_PORT 0x340
#define LSILOGIC_SAS_ISA_IO_PORT 0x350
-#define LSILOGICSCSI_REQUEST_QUEUE_DEPTH_DEFAULT 1024
-#define LSILOGICSCSI_REPLY_QUEUE_DEPTH_DEFAULT 128
+#define LSILOGICSCSI_REQUEST_QUEUE_DEPTH_DEFAULT 256
+#define LSILOGICSCSI_REPLY_QUEUE_DEPTH_DEFAULT 256
#define LSILOGICSCSI_MAXIMUM_CHAIN_DEPTH 3
diff --git a/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp b/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
index 803bbe10c..2b4de7bbe 100644
--- a/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
+++ b/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
@@ -1,4 +1,4 @@
-/* $Id: DrvDiskIntegrity.cpp 29412 2010-05-12 12:28:02Z vboxsync $ */
+/* $Id: DrvDiskIntegrity.cpp 29495 2010-05-14 19:01:41Z vboxsync $ */
/** @file
* VBox storage devices: Disk integrity check.
*/
@@ -60,17 +60,21 @@ typedef struct DRVDISKAIOREQ
/** Transfer direction. */
DRVDISKAIOTXDIR enmTxDir;
/** Start offset. */
- uint64_t off;
+ uint64_t off;
/** Transfer size. */
- size_t cbTransfer;
+ size_t cbTransfer;
/** Segment array. */
- PCRTSGSEG paSeg;
+ PCRTSGSEG paSeg;
/** Number of array entries. */
- unsigned cSeg;
+ unsigned cSeg;
/** User argument */
- void *pvUser;
+ void *pvUser;
/** Slot in the array. */
- unsigned iSlot;
+ unsigned iSlot;
+ /** Start timestamp */
+ uint64_t tsStart;
+ /** Completion timestamp. */
+ uint64_t tsComplete;
} DRVDISKAIOREQ, *PDRVDISKAIOREQ;
/**
@@ -161,6 +165,15 @@ typedef struct DRVDISKINTEGRITY
DRVDISKAIOREQACTIVE apReqActive[128];
/** Next free slot in the array */
volatile unsigned iNextFreeSlot;
+
+ /** Flag whether we check for requests completing twice. */
+ bool fCheckDoubleCompletion;
+ /** Number of requests we go back. */
+ unsigned cEntries;
+ /** Array of completed but still observed requests. */
+ PDRVDISKAIOREQ *papIoReq;
+ /** Current entry in the array. */
+ unsigned iEntry;
} DRVDISKINTEGRITY, *PDRVDISKINTEGRITY;
@@ -188,12 +201,53 @@ static PDRVDISKAIOREQ drvdiskintIoReqAlloc(DRVDISKAIOTXDIR enmTxDir, uint64_t of
pIoReq->paSeg = paSeg;
pIoReq->cSeg = cSeg;
pIoReq->pvUser = pvUser;
+ pIoReq->iSlot = 0;
+ pIoReq->tsStart = RTTimeSystemMilliTS();
+ pIoReq->tsComplete = 0;
}
return pIoReq;
}
/**
+ * Free a async I/O request.
+ *
+ * @returns nothing.
+ * @param pThis Disk driver.
+ * @param pIoReq The I/O request to free.
+ */
+static void drvdiskintIoReqFree(PDRVDISKINTEGRITY pThis, PDRVDISKAIOREQ pIoReq)
+{
+ if (pThis->fCheckDoubleCompletion)
+ {
+ /* Search if the I/O request completed already. */
+ for (unsigned i = 0; i < pThis->cEntries; i++)
+ {
+ if (RT_UNLIKELY(pThis->papIoReq[i] == pIoReq))
+ {
+ RTMsgError("Request %#p completed already!\n", pIoReq);
+ RTMsgError("Start timestamp %llu Completion timestamp %llu (completed after %llu ms)\n",
+ pIoReq->tsStart, pIoReq->tsComplete, pIoReq->tsComplete - pIoReq->tsStart);
+ RTAssertDebugBreak();
+ }
+ }
+
+ pIoReq->tsComplete = RTTimeSystemMilliTS();
+ Assert(!pThis->papIoReq[pThis->iEntry]);
+ pThis->papIoReq[pThis->iEntry] = pIoReq;
+
+ pThis->iEntry = (pThis->iEntry+1) % pThis->cEntries;
+ if (pThis->papIoReq[pThis->iEntry])
+ {
+ RTMemFree(pThis->papIoReq[pThis->iEntry]);
+ pThis->papIoReq[pThis->iEntry] = NULL;
+ }
+ }
+ else
+ RTMemFree(pIoReq);
+}
+
+/**
* Record a successful write to the virtual disk.
*
* @returns VBox status code.
@@ -413,7 +467,7 @@ static void drvdiskintIoReqAdd(PDRVDISKINTEGRITY pThis, PDRVDISKAIOREQ pIoReq)
PDRVDISKAIOREQACTIVE pReqActive = &pThis->apReqActive[pThis->iNextFreeSlot];
Assert(!pReqActive->pIoReq);
- pReqActive->tsStart = RTTimeSystemMilliTS();
+ pReqActive->tsStart = pIoReq->tsStart;
pReqActive->pIoReq = pIoReq;
pIoReq->iSlot = pThis->iNextFreeSlot;
@@ -468,6 +522,7 @@ static int drvdiskIntIoReqExpiredCheck(RTTHREAD pThread, void *pvUser)
PDRVDISKAIOREQ pIoReq = (PDRVDISKAIOREQ)ASMAtomicReadPtr((void * volatile *)&pReqActive->pIoReq);
if ( pIoReq
+ && (tsCurr > pReqActive->tsStart)
&& (tsCurr - pReqActive->tsStart) >= pThis->uExpireIntervalMs)
{
RTMsgError("Request %#p expired (active for %llu ms already)\n",
@@ -704,8 +759,11 @@ static DECLCALLBACK(int) drvdiskintAsyncTransferCompleteNotify(PPDMIMEDIAASYNCPO
AssertRC(rc);
}
- rc = pThis->pDrvMediaAsyncPort->pfnTransferCompleteNotify(pThis->pDrvMediaAsyncPort, pIoReq->pvUser, rcReq);
- RTMemFree(pIoReq);
+ void *pvUserComplete = pIoReq->pvUser;
+
+ drvdiskintIoReqFree(pThis, pIoReq);
+
+ rc = pThis->pDrvMediaAsyncPort->pfnTransferCompleteNotify(pThis->pDrvMediaAsyncPort, pvUserComplete, rcReq);
return rc;
}
@@ -758,6 +816,17 @@ static DECLCALLBACK(void) drvdiskintDestruct(PPDMDRVINS pDrvIns)
RTSemEventSignal(pThis->SemEvent);
RTSemEventDestroy(pThis->SemEvent);
}
+
+ if (pThis->fCheckDoubleCompletion)
+ {
+ /* Free all requests */
+ while (pThis->papIoReq[pThis->iEntry])
+ {
+ RTMemFree(pThis->papIoReq[pThis->iEntry]);
+ pThis->papIoReq[pThis->iEntry] = NULL;
+ pThis->iEntry = (pThis->iEntry+1) % pThis->cEntries;
+ }
+ }
}
/**
@@ -778,7 +847,9 @@ static DECLCALLBACK(int) drvdiskintConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg,
if (!CFGMR3AreValuesValid(pCfg, "CheckConsistency\0"
"TraceRequests\0"
"CheckIntervalMs\0"
- "ExpireIntervalMs\0"))
+ "ExpireIntervalMs\0"
+ "CheckDoubleCompletions\0"
+ "HistorySize\0"))
return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
rc = CFGMR3QueryBoolDef(pCfg, "CheckConsistency", &pThis->fCheckConsistency, false);
@@ -789,6 +860,10 @@ static DECLCALLBACK(int) drvdiskintConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg,
AssertRC(rc);
rc = CFGMR3QueryU32Def(pCfg, "ExpireIntervalMs", &pThis->uExpireIntervalMs, 20000); /* 20 seconds */
AssertRC(rc);
+ rc = CFGMR3QueryBoolDef(pCfg, "CheckDoubleCompletions", &pThis->fCheckDoubleCompletion, false);
+ AssertRC(rc);
+ rc = CFGMR3QueryU32Def(pCfg, "HistorySize", &pThis->cEntries, 512);
+ AssertRC(rc);
/*
* Initialize most of the data members.
@@ -864,6 +939,13 @@ static DECLCALLBACK(int) drvdiskintConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg,
AssertRC(rc);
}
+ if (pThis->fCheckDoubleCompletion)
+ {
+ pThis->iEntry = 0;
+ pThis->papIoReq = (PDRVDISKAIOREQ *)RTMemAllocZ(pThis->cEntries * sizeof(PDRVDISKAIOREQ));
+ AssertPtr(pThis->papIoReq);
+ }
+
return rc;
}
diff --git a/src/VBox/Devices/Storage/DrvSCSI.cpp b/src/VBox/Devices/Storage/DrvSCSI.cpp
index 2bc4c67a9..666ea05cb 100644
--- a/src/VBox/Devices/Storage/DrvSCSI.cpp
+++ b/src/VBox/Devices/Storage/DrvSCSI.cpp
@@ -1,4 +1,4 @@
-/* $Id: DrvSCSI.cpp 29330 2010-05-11 10:21:06Z vboxsync $ */
+/* $Id: DrvSCSI.cpp 29586 2010-05-17 21:25:30Z vboxsync $ */
/** @file
* VBox storage drivers: Generic SCSI command parser and execution driver
*/
@@ -177,7 +177,6 @@ static int drvscsiProcessRequestOne(PDRVSCSI pThis, VSCSIIOREQ hVScsiIoReq)
AssertMsgFailed(("Invalid transfer direction %d\n", enmTxDir));
}
- ASMAtomicDecU32(&pThis->StatIoDepth);
VSCSIIoReqCompleted(hVScsiIoReq, rc);
return VINF_SUCCESS;
@@ -207,7 +206,6 @@ static int drvscsiTransferCompleteNotify(PPDMIBLOCKASYNCPORT pInterface, void *p
else
AssertMsg(enmTxDir == VSCSIIOREQTXDIR_FLUSH, ("Invalid transfer direction %u\n", enmTxDir));
- ASMAtomicDecU32(&pThis->StatIoDepth);
VSCSIIoReqCompleted(hVScsiIoReq, rc);
return VINF_SUCCESS;
@@ -220,8 +218,6 @@ static int drvscsiReqTransferEnqueue(VSCSILUN hVScsiLun,
int rc = VINF_SUCCESS;
PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser;
- ASMAtomicIncU32(&pThis->StatIoDepth);
-
if (pThis->pDrvBlockAsync)
{
/* async I/O path. */
@@ -298,7 +294,6 @@ static int drvscsiReqTransferEnqueue(VSCSILUN hVScsiLun,
else
AssertMsg(enmTxDir == VSCSIIOREQTXDIR_FLUSH, ("Invalid transfer direction %u\n", enmTxDir));
- ASMAtomicDecU32(&pThis->StatIoDepth);
VSCSIIoReqCompleted(hVScsiIoReq, VINF_SUCCESS);
}
else if (rc == VERR_VD_ASYNC_IO_IN_PROGRESS)
@@ -312,7 +307,6 @@ static int drvscsiReqTransferEnqueue(VSCSILUN hVScsiLun,
else
AssertMsg(enmTxDir == VSCSIIOREQTXDIR_FLUSH, ("Invalid transfer direction %u\n", enmTxDir));
- ASMAtomicDecU32(&pThis->StatIoDepth);
VSCSIIoReqCompleted(hVScsiIoReq, rc);
rc = VINF_SUCCESS;
}
@@ -464,6 +458,7 @@ static DECLCALLBACK(int) drvscsiRequestSend(PPDMISCSICONNECTOR pInterface, PPDMS
if (RT_FAILURE(rc))
return rc;
+ ASMAtomicIncU32(&pThis->StatIoDepth);
rc = VSCSIDeviceReqEnqueue(pThis->hVScsiDevice, hVScsiReq);
return rc;
diff --git a/src/VBox/Devices/Storage/ISCSIHDDCore.cpp b/src/VBox/Devices/Storage/ISCSIHDDCore.cpp
index d8742d370..cf3c667df 100644
--- a/src/VBox/Devices/Storage/ISCSIHDDCore.cpp
+++ b/src/VBox/Devices/Storage/ISCSIHDDCore.cpp
@@ -1,4 +1,4 @@
-/* $Id: ISCSIHDDCore.cpp 28827 2010-04-27 13:55:04Z vboxsync $ */
+/* $Id: ISCSIHDDCore.cpp 29498 2010-05-14 21:05:14Z vboxsync $ */
/** @file
* iSCSI initiator driver, VD backend.
*/
@@ -2315,6 +2315,9 @@ static int iscsiOpenImage(PISCSIIMAGE pImage, unsigned uOpenFlags)
AssertRC(rc);
fHostIPDef = !!uHostIPTmp;
+ if (uOpenFlags & VD_OPEN_FLAGS_ASYNC_IO)
+ return VERR_NOT_SUPPORTED;
+
pImage->uOpenFlags = uOpenFlags;
/* Get error signalling interface. */
diff --git a/src/VBox/Devices/Storage/ParallelsHDDCore.cpp b/src/VBox/Devices/Storage/ParallelsHDDCore.cpp
index 8f71897ec..d72a56992 100644
--- a/src/VBox/Devices/Storage/ParallelsHDDCore.cpp
+++ b/src/VBox/Devices/Storage/ParallelsHDDCore.cpp
@@ -1204,11 +1204,6 @@ static int parallelsAsyncFlush(void *pvBackendData, PVDIOCTX pIoCtx)
return rc;
}
-static int parallelsAsyncFlush(void *pvBackendData, void *pvUser)
-{
- return VERR_NOT_IMPLEMENTED;
-}
-
VBOXHDDBACKEND g_ParallelsBackend =
{
/* pszBackendName */
diff --git a/src/VBox/Devices/Storage/RawHDDCore.cpp b/src/VBox/Devices/Storage/RawHDDCore.cpp
index 16bfcd01a..f78ec0a7c 100644
--- a/src/VBox/Devices/Storage/RawHDDCore.cpp
+++ b/src/VBox/Devices/Storage/RawHDDCore.cpp
@@ -1246,11 +1246,6 @@ static int rawAsyncFlush(void *pvBackendData, PVDIOCTX pIoCtx)
return rc;
}
-static int rawAsyncFlush(void *pvBackendData, void *pvUser)
-{
- return VERR_NOT_IMPLEMENTED;
-}
-
VBOXHDDBACKEND g_RawBackend =
{
/* pszBackendName */
diff --git a/src/VBox/Devices/Storage/VBoxHDD.cpp b/src/VBox/Devices/Storage/VBoxHDD.cpp
index 7260cbfdb..87246bb94 100644
--- a/src/VBox/Devices/Storage/VBoxHDD.cpp
+++ b/src/VBox/Devices/Storage/VBoxHDD.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxHDD.cpp 29413 2010-05-12 12:28:53Z vboxsync $ */
+/* $Id: VBoxHDD.cpp 29497 2010-05-14 19:45:44Z vboxsync $ */
/** @file
* VBoxHDD - VBox HDD Container implementation.
*/
@@ -1458,7 +1458,7 @@ static int vdWriteHelperAsync(PVDIOCTX pIoCtx)
uOffset, pTmp->cbSeg,
pTmp, 1,
pIoCtx, cbThisWrite,
- pTmp,
+ pTmp,
(pImage->uOpenFlags & VD_OPEN_FLAGS_HONOR_SAME)
? vdWriteHelperStandardAsync
: vdWriteHelperOptimizedAsync);
@@ -1839,7 +1839,7 @@ static int vdIOReqCompleted(void *pvUser, int rcReq)
if (RT_FAILURE(pIoCtx->rcReq))
ASMAtomicCmpXchgS32(&pIoCtxParent->rcReq, pIoCtx->rcReq, VINF_SUCCESS);
-
+
/*
* A completed child write means that we finsihed growing the image.
* We have to process any pending writes now.
@@ -3936,7 +3936,6 @@ VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
pImageFrom->Backend->pfnGetLCHSGeometry(pImageFrom->pvBackendData, &LCHSGeometryFrom);
RTUUID ImageUuid, ImageModificationUuid;
- RTUUID ParentUuid, ParentModificationUuid;
if (pDiskFrom != pDiskTo)
{
if (pDstUuid)
@@ -3953,12 +3952,6 @@ VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
rc = pImageFrom->Backend->pfnGetModificationUuid(pImageFrom->pvBackendData, &ImageModificationUuid);
if (RT_FAILURE(rc))
RTUuidClear(&ImageModificationUuid);
- rc = pImageFrom->Backend->pfnGetParentUuid(pImageFrom->pvBackendData, &ParentUuid);
- if (RT_FAILURE(rc))
- RTUuidClear(&ParentUuid);
- rc = pImageFrom->Backend->pfnGetParentModificationUuid(pImageFrom->pvBackendData, &ParentModificationUuid);
- if (RT_FAILURE(rc))
- RTUuidClear(&ParentModificationUuid);
char szComment[1024];
rc = pImageFrom->Backend->pfnGetComment(pImageFrom->pvBackendData, szComment, sizeof(szComment));
@@ -3974,19 +3967,28 @@ VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
AssertRC(rc2);
fLockReadFrom = false;
+ rc2 = vdThreadStartRead(pDiskTo);
+ AssertRC(rc2);
+ unsigned cImagesTo = pDiskTo->cImages;
+ rc2 = vdThreadFinishRead(pDiskTo);
+ AssertRC(rc2);
+
if (pszFilename)
{
if (cbSize == 0)
cbSize = cbSizeFrom;
- /* Create destination image with the properties of the source image. */
+ /* Create destination image with the properties of source image. */
/** @todo replace the VDCreateDiff/VDCreateBase calls by direct
* calls to the backend. Unifies the code and reduces the API
* dependencies. Would also make the synchronization explicit. */
- if (uImageFlags & VD_IMAGE_FLAGS_DIFF)
+ if (cImagesTo > 0)
{
- rc = VDCreateDiff(pDiskTo, pszBackend, pszFilename, uImageFlags,
- szComment, &ImageUuid, &ParentUuid, uOpenFlagsFrom & ~VD_OPEN_FLAGS_READONLY, NULL, NULL);
+ rc = VDCreateDiff(pDiskTo, pszBackend, pszFilename,
+ uImageFlags, szComment, &ImageUuid,
+ NULL /* pParentUuid */,
+ uOpenFlagsFrom & ~VD_OPEN_FLAGS_READONLY,
+ NULL, NULL);
rc2 = vdThreadStartWrite(pDiskTo);
AssertRC(rc2);
@@ -4023,8 +4025,6 @@ VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
if (RT_SUCCESS(rc) && !RTUuidIsNull(&ImageUuid))
pDiskTo->pLast->Backend->pfnSetUuid(pDiskTo->pLast->pvBackendData, &ImageUuid);
- if (RT_SUCCESS(rc) && !RTUuidIsNull(&ParentUuid))
- pDiskTo->pLast->Backend->pfnSetParentUuid(pDiskTo->pLast->pvBackendData, &ParentUuid);
}
if (RT_FAILURE(rc))
break;
@@ -4137,11 +4137,6 @@ VBOXDDU_DECL(int) VDCopy(PVBOXHDD pDiskFrom, unsigned nImage, PVBOXHDD pDiskTo,
* backend might not provide a valid modification UUID. */
if (!RTUuidIsNull(&ImageModificationUuid))
pImageTo->Backend->pfnSetModificationUuid(pImageTo->pvBackendData, &ImageModificationUuid);
- /** @todo double-check this - it makes little sense to copy over the parent modification uuid,
- * as the destination image can have a totally different parent. */
-#if 0
- pImageTo->Backend->pfnSetParentModificationUuid(pImageTo->pvBackendData, &ParentModificationUuid);
-#endif
}
} while (0);
@@ -6167,36 +6162,6 @@ VBOXDDU_DECL(int) VDAsyncFlush(PVBOXHDD pDisk, PFNVDASYNCTRANSFERCOMPLETE pfnCom
return rc;
}
-
-VBOXDDU_DECL(int) VDAsyncFlush(PVBOXHDD pDisk, void *pvUser)
-{
- int rc;
-
- LogFlowFunc(("pDisk=%#p\n", pDisk));
-
- do
- {
- /* sanity check */
- AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
- AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
-
- PVDIMAGE pImage = pDisk->pLast;
- AssertPtrBreakStmt(pImage, rc = VERR_VD_NOT_OPENED);
-
- vdResetModifiedFlag(pDisk);
- rc = pImage->Backend->pfnAsyncFlush(pImage->pvBackendData, pvUser);
- } while (0);
-
- if (rc == VINF_SUCCESS)
- rc = VINF_VD_ASYNC_IO_FINISHED;
- else if (rc == VINF_AIO_TASK_PENDING)
- rc = VINF_SUCCESS;
-
- LogFlowFunc(("returns %Rrc\n", rc));
- return rc;
-}
-
-
#if 0
/** @copydoc VBOXHDDBACKEND::pfnComposeLocation */
int genericFileComposeLocation(PVDINTERFACE pConfig, char **pszLocation)
diff --git a/src/VBox/Devices/Storage/VDIHDDCore.cpp b/src/VBox/Devices/Storage/VDIHDDCore.cpp
index b367e61b9..d843588fc 100644
--- a/src/VBox/Devices/Storage/VDIHDDCore.cpp
+++ b/src/VBox/Devices/Storage/VDIHDDCore.cpp
@@ -2495,10 +2495,6 @@ static int vdiCompact(void *pBackendData, unsigned uPercentStart,
return rc;
}
-static int vdiAsyncFlush(void *pvBackendData, void *pvUser)
-{
- return VERR_NOT_IMPLEMENTED;
-}
VBOXHDDBACKEND g_VDIBackend =
{
diff --git a/src/VBox/Devices/Storage/VmdkHDDCore.cpp b/src/VBox/Devices/Storage/VmdkHDDCore.cpp
index 4c997ea8f..a764df3e5 100644
--- a/src/VBox/Devices/Storage/VmdkHDDCore.cpp
+++ b/src/VBox/Devices/Storage/VmdkHDDCore.cpp
@@ -1,4 +1,4 @@
-/* $Id: VmdkHDDCore.cpp 29035 2010-05-04 14:52:07Z vboxsync $ */
+/* $Id: VmdkHDDCore.cpp 29649 2010-05-18 16:29:31Z vboxsync $ */
/** @file
* VMDK Disk image, Core Code.
*/
@@ -3480,34 +3480,21 @@ static int vmdkCreateRawImage(PVMDKIMAGE pImage, const PVBOXHDDRAW pRaw,
* file, write the partition information to a flat extent and
* open all the (flat) raw disk partitions. */
- /* First pass over the partitions to determine how many
- * extents we need. One partition can require up to 4 extents.
- * One to skip over unpartitioned space, one for the
- * partitioning data, one to skip over unpartitioned space
- * and one for the partition data. */
+ /* First pass over the partition data areas to determine how many
+ * extents we need. One data area can require up to 2 extents, as
+ * it might be necessary to skip over unpartitioned space. */
unsigned cExtents = 0;
uint64_t uStart = 0;
- for (unsigned i = 0; i < pRaw->cPartitions; i++)
+ for (unsigned i = 0; i < pRaw->cPartDescs; i++)
{
- PVBOXHDDRAWPART pPart = &pRaw->pPartitions[i];
- if (pPart->cbPartitionData)
- {
- if (uStart > pPart->uPartitionDataStart)
- return vmdkError(pImage, VERR_INVALID_PARAMETER, RT_SRC_POS, N_("VMDK: cannot go backwards for partitioning information in '%s'"), pImage->pszFilename);
- else if (uStart != pPart->uPartitionDataStart)
- cExtents++;
- uStart = pPart->uPartitionDataStart + pPart->cbPartitionData;
- cExtents++;
- }
- if (pPart->cbPartition)
- {
- if (uStart > pPart->uPartitionStart)
- return vmdkError(pImage, VERR_INVALID_PARAMETER, RT_SRC_POS, N_("VMDK: cannot go backwards for partition data in '%s'"), pImage->pszFilename);
- else if (uStart != pPart->uPartitionStart)
- cExtents++;
- uStart = pPart->uPartitionStart + pPart->cbPartition;
+ PVBOXHDDRAWPARTDESC pPart = &pRaw->pPartDescs[i];
+ if (uStart > pPart->uStart)
+ return vmdkError(pImage, VERR_INVALID_PARAMETER, RT_SRC_POS, N_("VMDK: incorrect partition data area ordering set up by the caller in '%s'"), pImage->pszFilename);
+
+ if (uStart < pPart->uStart)
cExtents++;
- }
+ uStart = pPart->uStart + pPart->cbData;
+ cExtents++;
}
/* Another extent for filling up the rest of the image. */
if (uStart != cbSize)
@@ -3543,24 +3530,27 @@ static int vmdkCreateRawImage(PVMDKIMAGE pImage, const PVBOXHDDRAW pRaw,
uint64_t uPartOffset = 0;
cExtents = 0;
uStart = 0;
- for (unsigned i = 0; i < pRaw->cPartitions; i++)
+ for (unsigned i = 0; i < pRaw->cPartDescs; i++)
{
- PVBOXHDDRAWPART pPart = &pRaw->pPartitions[i];
- if (pPart->cbPartitionData)
+ PVBOXHDDRAWPARTDESC pPart = &pRaw->pPartDescs[i];
+ pExtent = &pImage->pExtents[cExtents++];
+
+ if (uStart < pPart->uStart)
{
- if (uStart != pPart->uPartitionDataStart)
- {
- pExtent = &pImage->pExtents[cExtents++];
- pExtent->pszBasename = NULL;
- pExtent->pszFullname = NULL;
- pExtent->enmType = VMDKETYPE_ZERO;
- pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->uPartitionDataStart - uStart);
- pExtent->uSectorOffset = 0;
- pExtent->enmAccess = VMDKACCESS_READWRITE;
- pExtent->fMetaDirty = false;
- }
- uStart = pPart->uPartitionDataStart + pPart->cbPartitionData;
+ pExtent->pszBasename = NULL;
+ pExtent->pszFullname = NULL;
+ pExtent->enmType = VMDKETYPE_ZERO;
+ pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->uStart - uStart);
+ pExtent->uSectorOffset = 0;
+ pExtent->enmAccess = VMDKACCESS_READWRITE;
+ pExtent->fMetaDirty = false;
+ /* go to next extent */
pExtent = &pImage->pExtents[cExtents++];
+ }
+ uStart = pPart->uStart + pPart->cbData;
+
+ if (pPart->pvPartitionData)
+ {
/* Set up basename for extent description. Can't use StrDup. */
size_t cbBasename = strlen(pszPartition) + 1;
char *pszBasename = (char *)RTMemTmpAlloc(cbBasename);
@@ -3584,7 +3574,7 @@ static int vmdkCreateRawImage(PVMDKIMAGE pImage, const PVBOXHDDRAW pRaw,
return rc;
pExtent->pszFullname = pszFullname;
pExtent->enmType = VMDKETYPE_FLAT;
- pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->cbPartitionData);
+ pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->cbData);
pExtent->uSectorOffset = uPartOffset;
pExtent->enmAccess = VMDKACCESS_READWRITE;
pExtent->fMetaDirty = false;
@@ -3598,26 +3588,13 @@ static int vmdkCreateRawImage(PVMDKIMAGE pImage, const PVBOXHDDRAW pRaw,
rc = vmdkFileWriteAt(pExtent->pFile,
VMDK_SECTOR2BYTE(uPartOffset),
pPart->pvPartitionData,
- pPart->cbPartitionData, NULL);
+ pPart->cbData, NULL);
if (RT_FAILURE(rc))
return vmdkError(pImage, rc, RT_SRC_POS, N_("VMDK: could not write partition data to '%s'"), pExtent->pszFullname);
- uPartOffset += VMDK_BYTE2SECTOR(pPart->cbPartitionData);
+ uPartOffset += VMDK_BYTE2SECTOR(pPart->cbData);
}
- if (pPart->cbPartition)
+ else
{
- if (uStart != pPart->uPartitionStart)
- {
- pExtent = &pImage->pExtents[cExtents++];
- pExtent->pszBasename = NULL;
- pExtent->pszFullname = NULL;
- pExtent->enmType = VMDKETYPE_ZERO;
- pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->uPartitionStart - uStart);
- pExtent->uSectorOffset = 0;
- pExtent->enmAccess = VMDKACCESS_READWRITE;
- pExtent->fMetaDirty = false;
- }
- uStart = pPart->uPartitionStart + pPart->cbPartition;
- pExtent = &pImage->pExtents[cExtents++];
if (pPart->pszRawDevice)
{
/* Set up basename for extent descr. Can't use StrDup. */
@@ -3632,8 +3609,8 @@ static int vmdkCreateRawImage(PVMDKIMAGE pImage, const PVBOXHDDRAW pRaw,
if (!pExtent->pszFullname)
return VERR_NO_MEMORY;
pExtent->enmType = VMDKETYPE_FLAT;
- pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->cbPartition);
- pExtent->uSectorOffset = VMDK_BYTE2SECTOR(pPart->uPartitionStartOffset);
+ pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->cbData);
+ pExtent->uSectorOffset = VMDK_BYTE2SECTOR(pPart->uStartOffset);
pExtent->enmAccess = VMDKACCESS_READWRITE;
pExtent->fMetaDirty = false;
@@ -3649,7 +3626,7 @@ static int vmdkCreateRawImage(PVMDKIMAGE pImage, const PVBOXHDDRAW pRaw,
pExtent->pszBasename = NULL;
pExtent->pszFullname = NULL;
pExtent->enmType = VMDKETYPE_ZERO;
- pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->cbPartition);
+ pExtent->cNominalSectors = VMDK_BYTE2SECTOR(pPart->cbData);
pExtent->uSectorOffset = 0;
pExtent->enmAccess = VMDKACCESS_READWRITE;
pExtent->fMetaDirty = false;
@@ -6265,28 +6242,6 @@ out:
return rc;
}
-static int vmdkAsyncFlush(void *pvBackendData, void *pvUser)
-{
- PVMDKIMAGE pImage = (PVMDKIMAGE)pvBackendData;
- PVMDKEXTENT pExtent = NULL;
- void *pTask;
- int rc;
-
- uint64_t uSectorExtentRel;
-
- rc = vmdkFindExtent(pImage, VMDK_BYTE2SECTOR(0),
- &pExtent, &uSectorExtentRel);
- if (RT_FAILURE(rc))
- goto out;
-
- rc = pImage->pInterfaceAsyncIOCallbacks->pfnFlushAsync(pImage->pInterfaceAsyncIO->pvUser,
- pExtent->pFile->pStorage,
- pvUser, &pTask);
-
-out:
- LogFlowFunc(("returns %Rrc\n", rc));
- return rc;
-}
VBOXHDDBACKEND g_VmdkBackend =
{
diff --git a/src/VBox/Devices/VMMDev/VMMDev.cpp b/src/VBox/Devices/VMMDev/VMMDev.cpp
index 806856ff9..dc8340c89 100644
--- a/src/VBox/Devices/VMMDev/VMMDev.cpp
+++ b/src/VBox/Devices/VMMDev/VMMDev.cpp
@@ -1,4 +1,4 @@
-/* $Id: VMMDev.cpp 29425 2010-05-12 15:11:20Z vboxsync $ */
+/* $Id: VMMDev.cpp 29590 2010-05-18 07:02:17Z vboxsync $ */
/** @file
* VMMDev - Guest <-> VMM/Host communication device.
*/
@@ -1815,7 +1815,8 @@ static DECLCALLBACK(int) vmmdevRequestHandler(PPDMDEVINS pDevIns, void *pvUser,
}
else
{
- pReqStatus->fEnabled = pThis->fPageSharingEnabled;
+ pReqStatus->fEnabled = false;
+ pThis->pDrv->pfnIsPageFusionEnabled(pThis->pDrv, &pReqStatus->fEnabled);
pRequestHeader->rc = VINF_SUCCESS;
}
break;
@@ -2199,17 +2200,6 @@ static DECLCALLBACK(int) vmmdevSetMemoryBalloon(PPDMIVMMDEVPORT pInterface, uint
return VINF_SUCCESS;
}
-static DECLCALLBACK(int) vmmdevEnablePageSharing(PPDMIVMMDEVPORT pInterface, bool fEnabled)
-{
- VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
- PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
-
- Log(("vmmdevEnablePageSharing: old=%d. new=%d\n", pThis->fPageSharingEnabled, fEnabled));
- pThis->fPageSharingEnabled = fEnabled;
- PDMCritSectLeave(&pThis->CritSect);
- return VINF_SUCCESS;
-}
-
static DECLCALLBACK(int) vmmdevVRDPChange(PPDMIVMMDEVPORT pInterface, bool fVRDPEnabled, uint32_t u32VRDPExperienceLevel)
{
VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
@@ -2760,7 +2750,6 @@ static DECLCALLBACK(int) vmmdevConstruct(PPDMDEVINS pDevIns, int iInstance, PCFG
pThis->IPort.pfnVBVAChange = vmmdevVBVAChange;
pThis->IPort.pfnRequestSeamlessChange = vmmdevRequestSeamlessChange;
pThis->IPort.pfnSetMemoryBalloon = vmmdevSetMemoryBalloon;
- pThis->IPort.pfnEnablePageSharing = vmmdevEnablePageSharing;
pThis->IPort.pfnSetStatisticsInterval = vmmdevSetStatisticsInterval;
pThis->IPort.pfnVRDPChange = vmmdevVRDPChange;
pThis->IPort.pfnCpuHotUnplug = vmmdevCpuHotUnplug;
diff --git a/src/VBox/Devices/VMMDev/VMMDevState.h b/src/VBox/Devices/VMMDev/VMMDevState.h
index 0949d66c8..1e67392aa 100644
--- a/src/VBox/Devices/VMMDev/VMMDevState.h
+++ b/src/VBox/Devices/VMMDev/VMMDevState.h
@@ -1,4 +1,4 @@
-/* $Id: VMMDevState.h 29307 2010-05-10 15:18:22Z vboxsync $ */
+/* $Id: VMMDevState.h 29590 2010-05-18 07:02:17Z vboxsync $ */
/** @file
* VMMDev - Guest <-> VMM/Host communication device, internal header.
*/
@@ -170,9 +170,6 @@ typedef struct VMMDevState
/* seamless mode change request */
bool fLastSeamlessEnabled, fSeamlessEnabled;
- /* shared paging change request. */
- bool fPageSharingEnabled;
-
bool fVRDPEnabled;
uint32_t u32VRDPExperienceLevel;
diff --git a/src/VBox/Devices/testcase/tstDeviceStructSize.cpp b/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
index 3ab14e149..401542752 100644
--- a/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
+++ b/src/VBox/Devices/testcase/tstDeviceStructSize.cpp
@@ -1,4 +1,4 @@
-/* $Id: tstDeviceStructSize.cpp 29080 2010-05-05 13:22:44Z vboxsync $ */
+/* $Id: tstDeviceStructSize.cpp 29435 2010-05-12 20:55:39Z vboxsync $ */
/** @file
* tstDeviceStructSize - testcase for check structure sizes/alignment
* and to verify that HC and RC uses the same
@@ -269,6 +269,7 @@ int main()
#ifdef VBOX_WITH_E1000
CHECK_MEMBER_ALIGNMENT(E1KSTATE, cs, 8);
CHECK_MEMBER_ALIGNMENT(E1KSTATE, csRx, 8);
+ CHECK_MEMBER_ALIGNMENT(E1KSTATE, StatReceiveBytes, 8);
#endif
#ifdef VBOX_WITH_VIRTIO
CHECK_MEMBER_ALIGNMENT(VNETSTATE, StatReceiveBytes, 8);
@@ -299,8 +300,9 @@ int main()
CHECK_MEMBER_ALIGNMENT(PCIGLOBALS, pci_irq_levels, 16);
CHECK_MEMBER_ALIGNMENT(PCNetState, u64LastPoll, 8);
CHECK_MEMBER_ALIGNMENT(PCNetState, CritSect, 8);
+ CHECK_MEMBER_ALIGNMENT(PCNetState, StatReceiveBytes, 8);
#ifdef VBOX_WITH_STATISTICS
- CHECK_MEMBER_ALIGNMENT(PCNetState, StatMMIOReadGC, 8);
+ CHECK_MEMBER_ALIGNMENT(PCNetState, StatMMIOReadRZ, 8);
#endif
CHECK_MEMBER_ALIGNMENT(PITState, StatPITIrq, 8);
CHECK_MEMBER_ALIGNMENT(SerialState, CritSect, 8);
diff --git a/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp b/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
index c3416e8b8..50f129040 100644
--- a/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
+++ b/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
@@ -1,4 +1,4 @@
-/* $Id: tstDeviceStructSizeRC.cpp 29033 2010-05-04 14:42:46Z vboxsync $ */
+/* $Id: tstDeviceStructSizeRC.cpp 29614 2010-05-18 11:48:31Z vboxsync $ */
/** @file
* tstDeviceStructSizeGC - Generate structure member and size checks from the GC perspective.
*
@@ -426,12 +426,14 @@ int main()
GEN_CHECK_OFF(PCNetState, fAm79C973);
GEN_CHECK_OFF(PCNetState, u32LinkSpeed);
GEN_CHECK_OFF(PCNetState, StatReceiveBytes);
+ GEN_CHECK_OFF(PCNetState, StatTransmitBytes);
#ifdef VBOX_WITH_STATISTICS
- GEN_CHECK_OFF(PCNetState, StatMMIOReadGC);
+ GEN_CHECK_OFF(PCNetState, StatMMIOReadR3);
+ GEN_CHECK_OFF(PCNetState, StatMMIOReadRZ);
GEN_CHECK_OFF(PCNetState, StatMIIReads);
# ifdef PCNET_NO_POLLING
GEN_CHECK_OFF(PCNetState, StatRCVRingWrite);
- GEN_CHECK_OFF(PCNetState, StatRingWriteOutsideRangeGC);
+ GEN_CHECK_OFF(PCNetState, StatRingWriteOutsideRangeR3);
# endif
#endif
@@ -1456,6 +1458,7 @@ int main()
GEN_CHECK_OFF(BUSLOGIC, IBase);
GEN_CHECK_OFF(BUSLOGIC, ILeds);
GEN_CHECK_OFF(BUSLOGIC, pLedsConnector);
+ GEN_CHECK_OFF(BUSLOGIC, fSignalIdle);
#endif /* VBOX_WITH_BUSLOGIC */
#ifdef VBOX_WITH_LSILOGIC
@@ -1522,6 +1525,7 @@ int main()
GEN_CHECK_OFF(LSILOGICSCSI, ILeds);
GEN_CHECK_OFF(LSILOGICSCSI, pLedsConnector);
GEN_CHECK_OFF(LSILOGICSCSI, pConfigurationPages);
+ GEN_CHECK_OFF(LSILOGICSCSI, fSignalIdle);
#endif /* VBOX_WITH_LSILOGIC */
#ifdef VBOX_WITH_HPET
diff --git a/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp b/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
index 36ed17bb6..e749a785d 100644
--- a/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
+++ b/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxHeadless.cpp 28960 2010-05-02 19:36:26Z vboxsync $ */
+/* $Id: VBoxHeadless.cpp 29518 2010-05-17 10:06:22Z vboxsync $ */
/** @file
* VBoxHeadless - The VirtualBox Headless frontend for running VMs on servers.
*/
@@ -304,7 +304,7 @@ public:
VBOX_SCRIPTABLE_DISPATCH_IMPL(IConsoleCallback)
STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
- ULONG width, ULONG height, BYTE *shape)
+ ULONG width, ULONG height, ComSafeArrayIn(BYTE,shape))
{
return VBOX_E_DONT_CALL_AGAIN;
}
@@ -1242,4 +1242,3 @@ int main(int argc, char **argv, char **envp)
return TrustedMain(argc, argv, envp);
}
#endif /* !VBOX_WITH_HARDENING */
-
diff --git a/src/VBox/Frontends/VBoxManage/Makefile.kmk b/src/VBox/Frontends/VBoxManage/Makefile.kmk
index 93dee8998..8c25968f4 100644
--- a/src/VBox/Frontends/VBoxManage/Makefile.kmk
+++ b/src/VBox/Frontends/VBoxManage/Makefile.kmk
@@ -1,4 +1,4 @@
-# $Id: Makefile.kmk 29117 2010-05-05 22:59:38Z vboxsync $
+# $Id: Makefile.kmk 29555 2010-05-17 14:37:48Z vboxsync $
## @file
# Sub-Makefile for VBoxManage (the cli frontend).
#
@@ -42,7 +42,8 @@ else # !VBOX_ONLY_DOCS
$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS) \
$(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL) \
$(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) \
- $(if $(VBOX_WITH_VDE), VBOX_WITH_VDE)
+ $(if $(VBOX_WITH_VDE), VBOX_WITH_VDE) \
+ $(if $(VBOX_WITH_HGCM), VBOX_WITH_HGCM)
VBoxManage_DEFS.win = _WIN32_WINNT=0x0500
ifdef VBOX_DYNAMIC_NET_ATTACH
VBoxManage_DEFS += VBOX_DYNAMIC_NET_ATTACH
diff --git a/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp b/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
index 090b88f95..019b59247 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxInternalManage.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: VBoxInternalManage.cpp 29651 2010-05-18 17:11:18Z vboxsync $ */
/** @file
* VBoxManage - The 'internalcommands' command.
*
@@ -495,6 +495,16 @@ static DECLCALLBACK(void) handleVDError(void *pvUser, int rc, RT_SRC_POS_DECL, c
RTPrintf("Error code %Rrc at %s(%u) in function %s\n", rc, RT_SRC_POS_ARGS);
}
+static int handleVDMessage(void *pvUser, const char *pszFormat, ...)
+{
+ NOREF(pvUser);
+ va_list args;
+ va_start(args, pszFormat);
+ int rc = RTPrintfV(pszFormat, args);
+ va_end(args);
+ return rc;
+}
+
static int CmdSetHDUUID(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
{
/* we need exactly one parameter: the image file */
@@ -524,7 +534,7 @@ static int CmdSetHDUUID(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox,
vdInterfaceErrorCallbacks.cbSize = sizeof(VDINTERFACEERROR);
vdInterfaceErrorCallbacks.enmInterface = VDINTERFACETYPE_ERROR;
vdInterfaceErrorCallbacks.pfnError = handleVDError;
- vdInterfaceErrorCallbacks.pfnMessage = NULL;
+ vdInterfaceErrorCallbacks.pfnMessage = handleVDMessage;
rc = VDInterfaceAdd(&vdInterfaceError, "VBoxManage_IError", VDINTERFACETYPE_ERROR,
&vdInterfaceErrorCallbacks, NULL, &pVDIfs);
@@ -557,16 +567,6 @@ static int CmdSetHDUUID(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox,
}
-static int handleVDMessage(void *pvUser, const char *pszFormat, ...)
-{
- NOREF(pvUser);
- va_list args;
- va_start(args, pszFormat);
- int rc = RTPrintfV(pszFormat, args);
- va_end(args);
- return rc;
-}
-
static int CmdDumpHDInfo(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
{
/* we need exactly one parameter: the image file */
@@ -768,19 +768,17 @@ static int partRead(RTFILE File, PHOSTPARTITIONS pPart)
}
}
- /* Now do a lot of consistency checking. */
+ /* Fill out partitioning location info for MBR. */
+ pPart->aPartitions[0].uPartDataStart = 0;
+ pPart->aPartitions[0].cPartDataSectors = pPart->aPartitions[0].uStart;
+
+ /* Now do a some partition table consistency checking, to reject the most
+ * obvious garbage which can lead to trouble later. */
uint64_t uPrevEnd = 0;
for (unsigned i = 0; i < pPart->cPartitions-1; i++)
{
if (pPart->aPartitions[i].cPartDataSectors)
- {
- if (pPart->aPartitions[i].uPartDataStart < uPrevEnd)
- {
- RTPrintf("Overlapping partition description areas. Aborting\n");
- return VERR_INVALID_PARAMETER;
- }
uPrevEnd = pPart->aPartitions[i].uPartDataStart + pPart->aPartitions[i].cPartDataSectors;
- }
if (pPart->aPartitions[i].uStart < uPrevEnd)
{
RTPrintf("Overlapping partitions. Aborting\n");
@@ -790,10 +788,6 @@ static int partRead(RTFILE File, PHOSTPARTITIONS pPart)
uPrevEnd = pPart->aPartitions[i].uStart + pPart->aPartitions[i].uSize;
}
- /* Fill out partitioning location info for MBR. */
- pPart->aPartitions[0].uPartDataStart = 0;
- pPart->aPartitions[0].cPartDataSectors = pPart->aPartitions[0].uStart;
-
return VINF_SUCCESS;
}
@@ -832,15 +826,13 @@ static int CmdListPartitions(int argc, char **argv, ComPtr<IVirtualBox> aVirtual
HOSTPARTITIONS partitions;
vrc = partRead(RawFile, &partitions);
- if (RT_FAILURE(vrc))
- return vrc;
+ /* Don't bail out on errors, print the table and return the result code. */
RTPrintf("Number Type StartCHS EndCHS Size (MiB) Start (Sect)\n");
for (unsigned i = 0; i < partitions.cPartitions; i++)
{
- /* Suppress printing the extended partition. Otherwise people
- * might add it to the list of partitions for raw partition
- * access (which is not good). */
+ /* Don't show the extended partition, otherwise users might think they
+ * can add it to the list of partitions for raw partition access. */
if (PARTTYPE_IS_EXTENDED(partitions.aPartitions[i].uType))
continue;
@@ -857,7 +849,23 @@ static int CmdListPartitions(int argc, char **argv, ComPtr<IVirtualBox> aVirtual
partitions.aPartitions[i].uStart);
}
- return 0;
+ return vrc;
+}
+
+static PVBOXHDDRAWPARTDESC appendPartDesc(uint32_t *pcPartDescs, PVBOXHDDRAWPARTDESC *ppPartDescs)
+{
+ (*pcPartDescs)++;
+ PVBOXHDDRAWPARTDESC p;
+ p = (PVBOXHDDRAWPARTDESC)RTMemRealloc(*ppPartDescs,
+ *pcPartDescs * sizeof(VBOXHDDRAWPARTDESC));
+ *ppPartDescs = p;
+ if (p)
+ {
+ p = p + *pcPartDescs - 1;
+ memset(p, '\0', sizeof(VBOXHDDRAWPARTDESC));
+ }
+
+ return p;
}
static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox, ComPtr<ISession> aSession)
@@ -873,8 +881,6 @@ static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualB
uint64_t cbSize = 0;
PVBOXHDD pDisk = NULL;
VBOXHDDRAW RawDescriptor;
- HOSTPARTITIONS partitions;
- uint32_t uPartitions = 0;
PVDINTERFACE pVDIfs = NULL;
/* let's have a closer look at the arguments */
@@ -1137,7 +1143,10 @@ static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualB
{
RawDescriptor.fRawDisk = false;
RawDescriptor.pszRawDisk = NULL;
- RawDescriptor.cPartitions = 0;
+ RawDescriptor.cPartDescs = 0;
+ RawDescriptor.pPartDescs = NULL;
+
+ uint32_t uPartitions = 0;
const char *p = pszPartitions;
char *pszNext;
@@ -1162,6 +1171,7 @@ static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualB
}
}
+ HOSTPARTITIONS partitions;
vrc = partRead(RawFile, &partitions);
if (RT_FAILURE(vrc))
{
@@ -1185,24 +1195,95 @@ static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualB
}
}
- RawDescriptor.cPartitions = partitions.cPartitions;
- RawDescriptor.pPartitions = (PVBOXHDDRAWPART)RTMemAllocZ(partitions.cPartitions * sizeof(VBOXHDDRAWPART));
- if (!RawDescriptor.pPartitions)
- {
- RTPrintf("Out of memory allocating the partition list for '%s'\n", rawdisk.raw());
- vrc = VERR_NO_MEMORY;
- goto out;
- }
for (unsigned i = 0; i < partitions.cPartitions; i++)
{
+ PVBOXHDDRAWPARTDESC pPartDesc = NULL;
+
+ /* first dump the MBR/EPT data area */
+ if (partitions.aPartitions[i].cPartDataSectors)
+ {
+ pPartDesc = appendPartDesc(&RawDescriptor.cPartDescs,
+ &RawDescriptor.pPartDescs);
+ if (!pPartDesc)
+ {
+ RTPrintf("Out of memory allocating the partition list for '%s'\n", rawdisk.raw());
+ vrc = VERR_NO_MEMORY;
+ goto out;
+ }
+
+ /** @todo the clipping below isn't 100% accurate, as it should
+ * actually clip to the track size. However that's easier said
+ * than done as figuring out the track size is heuristics. In
+ * any case the clipping is adjusted later after sorting, to
+ * prevent overlapping data areas on the resulting image. */
+ pPartDesc->cbData = RT_MIN(partitions.aPartitions[i].cPartDataSectors, 63) * 512;
+ pPartDesc->uStart = partitions.aPartitions[i].uPartDataStart * 512;
+ Assert(pPartDesc->cbData - (size_t)pPartDesc->cbData == 0);
+ void *pPartData = RTMemAlloc((size_t)pPartDesc->cbData);
+ if (!pPartData)
+ {
+ RTPrintf("Out of memory allocating the partition descriptor for '%s'\n", rawdisk.raw());
+ vrc = VERR_NO_MEMORY;
+ goto out;
+ }
+ vrc = RTFileReadAt(RawFile, partitions.aPartitions[i].uPartDataStart * 512,
+ pPartData, (size_t)pPartDesc->cbData, NULL);
+ if (RT_FAILURE(vrc))
+ {
+ RTPrintf("Cannot read partition data from raw device '%s': %Rrc\n", rawdisk.raw(), vrc);
+ goto out;
+ }
+ /* Splice in the replacement MBR code if specified. */
+ if ( partitions.aPartitions[i].uPartDataStart == 0
+ && pszMBRFilename)
+ {
+ RTFILE MBRFile;
+ vrc = RTFileOpen(&MBRFile, pszMBRFilename, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
+ if (RT_FAILURE(vrc))
+ {
+ RTPrintf("Cannot open replacement MBR file '%s' specified with -mbr: %Rrc\n", pszMBRFilename, vrc);
+ goto out;
+ }
+ vrc = RTFileReadAt(MBRFile, 0, pPartData, 0x1be, NULL);
+ RTFileClose(MBRFile);
+ if (RT_FAILURE(vrc))
+ {
+ RTPrintf("Cannot read replacement MBR file '%s': %Rrc\n", pszMBRFilename, vrc);
+ goto out;
+ }
+ }
+ pPartDesc->pvPartitionData = pPartData;
+ }
+
+ if (PARTTYPE_IS_EXTENDED(partitions.aPartitions[i].uType))
+ {
+ /* Suppress exporting the actual extended partition. Only
+ * logical partitions should be processed. However completely
+ * ignoring it leads to leaving out the EBR data. */
+ continue;
+ }
+
+ /* set up values for non-relative device names */
+ const char *pszRawName = rawdisk.raw();
+ uint64_t uStartOffset = partitions.aPartitions[i].uStart * 512;
+
+ pPartDesc = appendPartDesc(&RawDescriptor.cPartDescs,
+ &RawDescriptor.pPartDescs);
+ if (!pPartDesc)
+ {
+ RTPrintf("Out of memory allocating the partition list for '%s'\n", rawdisk.raw());
+ vrc = VERR_NO_MEMORY;
+ goto out;
+ }
+
if (uPartitions & RT_BIT(partitions.aPartitions[i].uIndex))
{
if (fRelative)
{
#ifdef RT_OS_LINUX
/* Refer to the correct partition and use offset 0. */
- char *pszRawName;
- vrc = RTStrAPrintf(&pszRawName, "%s%u", rawdisk.raw(),
+ char *psz;
+ vrc = RTStrAPrintf(&psz, "%s%u", rawdisk.raw(),
partitions.aPartitions[i].uIndex);
if (RT_FAILURE(vrc))
{
@@ -1210,13 +1291,12 @@ static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualB
partitions.aPartitions[i].uIndex, vrc);
goto out;
}
- RawDescriptor.pPartitions[i].pszRawDevice = pszRawName;
- RawDescriptor.pPartitions[i].uPartitionStartOffset = 0;
- RawDescriptor.pPartitions[i].uPartitionStart = partitions.aPartitions[i].uStart * 512;
+ pszRawName = psz;
+ uStartOffset = 0;
#elif defined(RT_OS_DARWIN)
/* Refer to the correct partition and use offset 0. */
- char *pszRawName;
- vrc = RTStrAPrintf(&pszRawName, "%ss%u", rawdisk.raw(),
+ char *psz;
+ vrc = RTStrAPrintf(&psz, "%ss%u", rawdisk.raw(),
partitions.aPartitions[i].uIndex);
if (RT_FAILURE(vrc))
{
@@ -1224,101 +1304,88 @@ static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualB
partitions.aPartitions[i].uIndex, vrc);
goto out;
}
- RawDescriptor.pPartitions[i].pszRawDevice = pszRawName;
- RawDescriptor.pPartitions[i].uPartitionStartOffset = 0;
- RawDescriptor.pPartitions[i].uPartitionStart = partitions.aPartitions[i].uStart * 512;
+ pszRawName = psz;
+ uStartOffset = 0;
#else
- /** @todo not implemented yet for Windows host. Treat just
- * like not specified (this code is actually never reached). */
- RawDescriptor.pPartitions[i].pszRawDevice = rawdisk.raw();
- RawDescriptor.pPartitions[i].uPartitionStartOffset = partitions.aPartitions[i].uStart * 512;
- RawDescriptor.pPartitions[i].uPartitionStart = partitions.aPartitions[i].uStart * 512;
+ /** @todo not implemented for other hosts. Treat just like
+ * not specified (this code is actually never reached). */
#endif
}
- else
- {
- /* This is the "everything refers to the base raw device"
- * variant. This requires opening the base device in RW
- * mode even for creation. */
- RawDescriptor.pPartitions[i].pszRawDevice = rawdisk.raw();
- RawDescriptor.pPartitions[i].uPartitionStartOffset = partitions.aPartitions[i].uStart * 512;
- RawDescriptor.pPartitions[i].uPartitionStart = partitions.aPartitions[i].uStart * 512;
- }
+
+ pPartDesc->pszRawDevice = pszRawName;
+ pPartDesc->uStartOffset = uStartOffset;
}
else
{
- /* Suppress access to this partition. */
- RawDescriptor.pPartitions[i].pszRawDevice = NULL;
- RawDescriptor.pPartitions[i].uPartitionStartOffset = 0;
- /* This is used in the plausibility check in the creation
- * code. In theory it's a dummy, but I don't want to make
- * the VMDK creatiion any more complicated than what it needs
- * to be. */
- RawDescriptor.pPartitions[i].uPartitionStart = partitions.aPartitions[i].uStart * 512;
- }
- if (PARTTYPE_IS_EXTENDED(partitions.aPartitions[i].uType))
- {
- /* Suppress exporting the actual extended partition. Only
- * logical partitions should be processed. However completely
- * ignoring it leads to leaving out the MBR data. */
- RawDescriptor.pPartitions[i].cbPartition = 0;
+ pPartDesc->pszRawDevice = NULL;
+ pPartDesc->uStartOffset = 0;
}
- else
- RawDescriptor.pPartitions[i].cbPartition = partitions.aPartitions[i].uSize * 512;
- RawDescriptor.pPartitions[i].uPartitionDataStart = partitions.aPartitions[i].uPartDataStart * 512;
- /** @todo the clipping below isn't 100% accurate, as it should
- * actually clip to the track size. However that's easier said
- * than done as figuring out the track size is heuristics. */
- RawDescriptor.pPartitions[i].cbPartitionData = RT_MIN(partitions.aPartitions[i].cPartDataSectors, 63) * 512;
- if (RawDescriptor.pPartitions[i].cbPartitionData)
+
+ pPartDesc->uStart = partitions.aPartitions[i].uStart * 512;
+ pPartDesc->cbData = partitions.aPartitions[i].uSize * 512;
+ }
+
+ /* Sort data areas in ascending order of start. */
+ for (unsigned i = 0; i < RawDescriptor.cPartDescs-1; i++)
+ {
+ unsigned uMinIdx = i;
+ uint64_t uMinVal = RawDescriptor.pPartDescs[i].uStart;
+ for (unsigned j = i + 1; j < RawDescriptor.cPartDescs; j++)
{
- Assert (RawDescriptor.pPartitions[i].cbPartitionData -
- (size_t)RawDescriptor.pPartitions[i].cbPartitionData == 0);
- void *pPartData = RTMemAlloc((size_t)RawDescriptor.pPartitions[i].cbPartitionData);
- if (!pPartData)
+ if (RawDescriptor.pPartDescs[j].uStart < uMinVal)
{
- RTPrintf("Out of memory allocating the partition descriptor for '%s'\n", rawdisk.raw());
- vrc = VERR_NO_MEMORY;
- goto out;
+ uMinIdx = j;
+ uMinVal = RawDescriptor.pPartDescs[j].uStart;
}
- vrc = RTFileReadAt(RawFile, partitions.aPartitions[i].uPartDataStart * 512, pPartData, (size_t)RawDescriptor.pPartitions[i].cbPartitionData, NULL);
- if (RT_FAILURE(vrc))
+ }
+ if (uMinIdx != i)
+ {
+ /* Swap entries at index i and uMinIdx. */
+ VBOXHDDRAWPARTDESC tmp;
+ memcpy(&tmp, &RawDescriptor.pPartDescs[i], sizeof(tmp));
+ memcpy(&RawDescriptor.pPartDescs[i], &RawDescriptor.pPartDescs[uMinIdx], sizeof(tmp));
+ memcpy(&RawDescriptor.pPartDescs[uMinIdx], &tmp, sizeof(tmp));
+ }
+ }
+
+ /* Have a second go at MBR/EPT area clipping. Now that the data areas
+ * are sorted this is much easier to get 100% right. */
+ for (unsigned i = 0; i < RawDescriptor.cPartDescs-1; i++)
+ {
+ if (RawDescriptor.pPartDescs[i].pvPartitionData)
+ {
+ RawDescriptor.pPartDescs[i].cbData = RT_MIN(RawDescriptor.pPartDescs[i+1].uStart - RawDescriptor.pPartDescs[i].uStart, RawDescriptor.pPartDescs[i].cbData);
+ if (!RawDescriptor.pPartDescs[i].cbData)
{
- RTPrintf("Cannot read partition data from raw device '%s': %Rrc\n", rawdisk.raw(), vrc);
+ RTPrintf("MBR/EPT overlaps with data area\n");
+ vrc = VERR_INVALID_PARAMETER;
goto out;
}
- /* Splice in the replacement MBR code if specified. */
- if ( partitions.aPartitions[i].uPartDataStart == 0
- && pszMBRFilename)
- {
- RTFILE MBRFile;
- vrc = RTFileOpen(&MBRFile, pszMBRFilename, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
- if (RT_FAILURE(vrc))
- {
- RTPrintf("Cannot open replacement MBR file '%s' specified with -mbr: %Rrc\n", pszMBRFilename, vrc);
- goto out;
- }
- vrc = RTFileReadAt(MBRFile, 0, pPartData, 0x1be, NULL);
- RTFileClose(MBRFile);
- if (RT_FAILURE(vrc))
- {
- RTPrintf("Cannot read replacement MBR file '%s': %Rrc\n", pszMBRFilename, vrc);
- goto out;
- }
- }
- RawDescriptor.pPartitions[i].pvPartitionData = pPartData;
}
}
}
RTFileClose(RawFile);
+#ifdef DEBUG_klaus
+ RTPrintf("# start length startoffset partdataptr device\n");
+ for (unsigned i = 0; i < RawDescriptor.cPartDescs; i++)
+ {
+ RTPrintf("%2u %14RU64 %14RU64 %14RU64 %#18p %s\n", i,
+ RawDescriptor.pPartDescs[i].uStart,
+ RawDescriptor.pPartDescs[i].cbData,
+ RawDescriptor.pPartDescs[i].uStartOffset,
+ RawDescriptor.pPartDescs[i].pvPartitionData,
+ RawDescriptor.pPartDescs[i].pszRawDevice);
+ }
+#endif
+
VDINTERFACE vdInterfaceError;
VDINTERFACEERROR vdInterfaceErrorCallbacks;
vdInterfaceErrorCallbacks.cbSize = sizeof(VDINTERFACEERROR);
vdInterfaceErrorCallbacks.enmInterface = VDINTERFACETYPE_ERROR;
vdInterfaceErrorCallbacks.pfnError = handleVDError;
- vdInterfaceErrorCallbacks.pfnMessage = NULL;
+ vdInterfaceErrorCallbacks.pfnMessage = handleVDMessage;
vrc = VDInterfaceAdd(&vdInterfaceError, "VBoxManage_IError", VDINTERFACETYPE_ERROR,
&vdInterfaceErrorCallbacks, NULL, &pVDIfs);
@@ -1356,19 +1423,16 @@ static int CmdCreateRawVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualB
/* Clean up allocated memory etc. */
if (pszPartitions)
{
- for (unsigned i = 0; i < partitions.cPartitions; i++)
+ for (unsigned i = 0; i < RawDescriptor.cPartDescs; i++)
{
- if (uPartitions & RT_BIT(partitions.aPartitions[i].uIndex))
- {
- if (fRelative)
- {
-#ifdef RT_OS_LINUX
- /* Free memory allocated above. */
- RTStrFree((char *)(void *)RawDescriptor.pPartitions[i].pszRawDevice);
-#endif /* RT_OS_LINUX */
- }
- }
+ /* Free memory allocated for relative device name. */
+ if (fRelative && RawDescriptor.pPartDescs[i].pszRawDevice)
+ RTStrFree((char *)(void *)RawDescriptor.pPartDescs[i].pszRawDevice);
+ if (RawDescriptor.pPartDescs[i].pvPartitionData)
+ RTMemFree((void *)RawDescriptor.pPartDescs[i].pvPartitionData);
}
+ if (RawDescriptor.pPartDescs)
+ RTMemFree(RawDescriptor.pPartDescs);
}
if (fRegister)
@@ -1428,7 +1492,7 @@ static int CmdRenameVMDK(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBox,
vdInterfaceErrorCallbacks.cbSize = sizeof(VDINTERFACEERROR);
vdInterfaceErrorCallbacks.enmInterface = VDINTERFACETYPE_ERROR;
vdInterfaceErrorCallbacks.pfnError = handleVDError;
- vdInterfaceErrorCallbacks.pfnMessage = NULL;
+ vdInterfaceErrorCallbacks.pfnMessage = handleVDMessage;
int vrc = VDInterfaceAdd(&vdInterfaceError, "VBoxManage_IError", VDINTERFACETYPE_ERROR,
&vdInterfaceErrorCallbacks, NULL, &pVDIfs);
@@ -1510,7 +1574,7 @@ static int CmdConvertToRaw(int argc, char **argv, ComPtr<IVirtualBox> aVirtualBo
vdInterfaceErrorCallbacks.cbSize = sizeof(VDINTERFACEERROR);
vdInterfaceErrorCallbacks.enmInterface = VDINTERFACETYPE_ERROR;
vdInterfaceErrorCallbacks.pfnError = handleVDError;
- vdInterfaceErrorCallbacks.pfnMessage = NULL;
+ vdInterfaceErrorCallbacks.pfnMessage = handleVDMessage;
int vrc = VDInterfaceAdd(&vdInterfaceError, "VBoxManage_IError", VDINTERFACETYPE_ERROR,
&vdInterfaceErrorCallbacks, NULL, &pVDIfs);
@@ -1675,7 +1739,7 @@ static int CmdConvertHardDisk(int argc, char **argv, ComPtr<IVirtualBox> aVirtua
vdInterfaceErrorCallbacks.cbSize = sizeof(VDINTERFACEERROR);
vdInterfaceErrorCallbacks.enmInterface = VDINTERFACETYPE_ERROR;
vdInterfaceErrorCallbacks.pfnError = handleVDError;
- vdInterfaceErrorCallbacks.pfnMessage = NULL;
+ vdInterfaceErrorCallbacks.pfnMessage = handleVDMessage;
vrc = VDInterfaceAdd(&vdInterfaceError, "VBoxManage_IError", VDINTERFACETYPE_ERROR,
&vdInterfaceErrorCallbacks, NULL, &pVDIfs);
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
index ed734c6ab..228940973 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxManageGuestCtrl.cpp 29193 2010-05-07 09:57:16Z vboxsync $ */
+/* $Id: VBoxManageGuestCtrl.cpp 29645 2010-05-18 15:41:46Z vboxsync $ */
/** @file
* VBoxManage - The 'guestcontrol' command.
*/
@@ -30,6 +30,8 @@
#include <VBox/com/VirtualBox.h>
#include <VBox/com/EventQueue.h>
+#include <VBox/HostServices/GuestControlSvc.h> /* for PROC_STS_XXX */
+
#include <VBox/log.h>
#include <iprt/asm.h>
#include <iprt/getopt.h>
@@ -63,10 +65,11 @@ static volatile bool g_fExecCanceled = false;
void usageGuestControl(void)
{
RTPrintf("VBoxManage guestcontrol execute <vmname>|<uuid>\n"
- " <path to program> [--arguments \"<arguments>\"]\n"
+ " <path to program> --username <name>\n"
+ " [--password <password>]\n"
+ " [--arguments \"<arguments>\"]\n"
" [--environment \"<NAME>=<VALUE> [<NAME>=<VALUE>]\"]\n"
- " [--flags <flags>] [--timeout <msec>]\n"
- " [--username <name> [--password <password>]]\n"
+ " [--flags <flags>] [--timeout <msec>]\n"
" [--verbose] [--wait-for exit,stdout,stderr||]\n"
"\n");
}
@@ -84,6 +87,31 @@ static void execProcessSignalHandler(int iSignal)
ASMAtomicWriteBool(&g_fExecCanceled, true);
}
+static const char *getStatus(ULONG uStatus)
+{
+ switch (uStatus)
+ {
+ case guestControl::PROC_STS_STARTED:
+ return "started";
+ case guestControl::PROC_STS_TEN:
+ return "successfully terminated";
+ case guestControl::PROC_STS_TES:
+ return "terminated by signal";
+ case guestControl::PROC_STS_TEA:
+ return "abnormally aborted";
+ case guestControl::PROC_STS_TOK:
+ return "timed out";
+ case guestControl::PROC_STS_TOA:
+ return "timed out, hanging";
+ case guestControl::PROC_STS_DWN:
+ return "killed";
+ case guestControl::PROC_STS_ERROR:
+ return "error";
+ default:
+ return "unknown";
+ }
+}
+
static int handleExecProgram(HandlerArg *a)
{
/*
@@ -97,17 +125,14 @@ static int handleExecProgram(HandlerArg *a)
uint32_t uFlags = 0;
com::SafeArray <BSTR> args;
com::SafeArray <BSTR> env;
- Utf8Str Utf8StdIn;
- Utf8Str Utf8StdOut;
- Utf8Str Utf8StdErr;
Utf8Str Utf8UserName;
Utf8Str Utf8Password;
uint32_t u32TimeoutMS = 0;
- bool waitForExit = false;
- bool waitForStdOut = false;
- bool waitForStdErr = false;
- bool verbose = false;
- bool have_timeout = false;
+ bool fWaitForExit = false;
+ bool fWaitForStdOut = false;
+ bool fWaitForStdErr = false;
+ bool fVerbose = false;
+ bool fTimeout = false;
/* Always use the actual command line as argv[0]. */
args.push_back(Bstr(Utf8Cmd));
@@ -199,7 +224,7 @@ static int handleExecProgram(HandlerArg *a)
}
else
{
- have_timeout = true;
+ fTimeout = true;
++i;
}
}
@@ -210,16 +235,16 @@ static int handleExecProgram(HandlerArg *a)
else
{
if (!strcmp(a->argv[i + 1], "exit"))
- waitForExit = true;
+ fWaitForExit = true;
else if (!strcmp(a->argv[i + 1], "stdout"))
{
- waitForExit = true;
- waitForStdOut = true;
+ fWaitForExit = true;
+ fWaitForStdOut = true;
}
else if (!strcmp(a->argv[i + 1], "stderr"))
{
- waitForExit = true;
- waitForStdErr = true;
+ fWaitForExit = true;
+ fWaitForStdErr = true;
}
else
usageOK = false;
@@ -228,7 +253,7 @@ static int handleExecProgram(HandlerArg *a)
}
else if (!strcmp(a->argv[i], "--verbose"))
{
- verbose = true;
+ fVerbose = true;
}
/** @todo Add fancy piping stuff here. */
else
@@ -241,13 +266,9 @@ static int handleExecProgram(HandlerArg *a)
if (!usageOK)
return errorSyntax(USAGE_GUESTCONTROL, "Incorrect parameters");
- /* If a password was specified, check if we also got a user name. */
- if ( !Utf8Password.isEmpty()
- && Utf8UserName.isEmpty())
- {
+ if (Utf8UserName.isEmpty())
return errorSyntax(USAGE_GUESTCONTROL,
- "No user name for password specified!");
- }
+ "No user name specified!");
/* lookup VM. */
ComPtr<IMachine> machine;
@@ -282,7 +303,7 @@ static int handleExecProgram(HandlerArg *a)
ComPtr<IProgress> progress;
ULONG uPID = 0;
- if (verbose)
+ if (fVerbose)
{
if (u32TimeoutMS == 0)
RTPrintf("Waiting for guest to start process ...\n");
@@ -294,15 +315,22 @@ static int handleExecProgram(HandlerArg *a)
uint64_t u64StartMS = RTTimeMilliTS();
/* Execute the process. */
- CHECK_ERROR_BREAK(guest, ExecuteProcess(Bstr(Utf8Cmd), uFlags,
- ComSafeArrayAsInParam(args), ComSafeArrayAsInParam(env),
- Bstr(Utf8StdIn), Bstr(Utf8StdOut), Bstr(Utf8StdErr),
- Bstr(Utf8UserName), Bstr(Utf8Password), u32TimeoutMS,
- &uPID, progress.asOutParam()));
- if (verbose) RTPrintf("Process '%s' (PID: %u) started\n", Utf8Cmd.raw(), uPID);
- if (waitForExit)
+ rc = guest->ExecuteProcess(Bstr(Utf8Cmd), uFlags,
+ ComSafeArrayAsInParam(args), ComSafeArrayAsInParam(env),
+ Bstr(Utf8UserName), Bstr(Utf8Password), u32TimeoutMS,
+ &uPID, progress.asOutParam());
+ if (FAILED(rc))
{
- if (have_timeout)
+ ErrorInfo info(guest);
+ if (info.isFullAvailable())
+ RTPrintf("ERROR: %ls (%Rhrc).\n", info.getText().raw(), info.getResultCode());
+ break;
+ }
+ if (fVerbose)
+ RTPrintf("Process '%s' (PID: %u) started\n", Utf8Cmd.raw(), uPID);
+ if (fWaitForExit)
+ {
+ if (fTimeout)
{
/* Calculate timeout value left after process has been started. */
uint64_t u64Diff = RTTimeMilliTS() - u64StartMS;
@@ -310,17 +338,17 @@ static int handleExecProgram(HandlerArg *a)
if (u32TimeoutMS > u64Diff) /* Is timeout still bigger than current difference? */
{
u32TimeoutMS = u32TimeoutMS - u64Diff;
- if (verbose)
+ if (fVerbose)
RTPrintf("Waiting for process to exit (%ums left) ...\n", u32TimeoutMS);
}
else
{
- if (verbose)
+ if (fVerbose)
RTPrintf("No time left to wait for process!\n");
- }
+ }
}
- else if (verbose)
- RTPrintf("Waiting for process to exit ...\n");
+ else if (fVerbose)
+ RTPrintf("Waiting for process to exit ...\n");
/* setup signal handling if cancelable */
ASSERT(progress);
@@ -339,33 +367,19 @@ static int handleExecProgram(HandlerArg *a)
/* Wait for process to exit ... */
BOOL fCompleted = false;
- ULONG cbOutputData = 0;
- SafeArray<BYTE> aOutputData;
while (SUCCEEDED(progress->COMGETTER(Completed(&fCompleted))))
{
- /*
- * because we want to get all the output data even if the process
- * already ended, we first need to check whether there is some data
- * left to output before checking the actual timeout and is-process-completed
- * stuff.
- */
- if (cbOutputData <= 0)
- {
- if (fCompleted)
- break;
+ SafeArray<BYTE> aOutputData;
+ ULONG cbOutputData = 0;
- if ( have_timeout
- && RTTimeMilliTS() - u64StartMS > u32TimeoutMS + 5000)
- {
- progress->Cancel();
- break;
- }
- }
+ /*
+ * Some data left to output?
+ */
- if ( waitForStdOut
- || waitForStdErr)
+ if ( fWaitForStdOut
+ || fWaitForStdErr)
{
- CHECK_ERROR_BREAK(guest, GetProcessOutput(uPID, 0 /* aFlags */,
+ CHECK_ERROR_BREAK(guest, GetProcessOutput(uPID, 0 /* aFlags */,
u32TimeoutMS, _64K, ComSafeArrayAsOutParam(aOutputData)));
cbOutputData = aOutputData.size();
if (cbOutputData > 0)
@@ -391,6 +405,19 @@ static int handleExecProgram(HandlerArg *a)
}
}
+ if (cbOutputData <= 0)
+ {
+ if (fCompleted)
+ break;
+
+ if ( fTimeout
+ && RTTimeMilliTS() - u64StartMS > u32TimeoutMS + 5000)
+ {
+ progress->Cancel();
+ break;
+ }
+ }
+
/* process async cancelation */
if (g_fExecCanceled && !fCanceledAlready)
{
@@ -414,36 +441,27 @@ static int handleExecProgram(HandlerArg *a)
}
BOOL fCanceled;
- CHECK_ERROR_RET(progress, COMGETTER(Canceled)(&fCanceled), rc);
- if (fCanceled)
+ if (SUCCEEDED(progress->COMGETTER(Canceled)(&fCanceled)) && fCanceled)
+ if (fVerbose) RTPrintf("Process execution canceled!\n");
+
+ if (fCompleted)
{
- RTPrintf("Process execution canceled!\n");
- }
- else
- {
- if (fCompleted)
+ LONG iRc = false;
+ CHECK_ERROR_RET(progress, COMGETTER(ResultCode)(&iRc), rc);
+ if (FAILED(iRc))
{
- LONG iRc = false;
- CHECK_ERROR_RET(progress, COMGETTER(ResultCode)(&iRc), rc);
- if (FAILED(iRc))
- {
- ComPtr<IVirtualBoxErrorInfo> execError;
- rc = progress->COMGETTER(ErrorInfo)(execError.asOutParam());
- com::ErrorInfo info (execError);
- RTPrintf("\n\nProcess error details:\n");
- GluePrintErrorInfo(info);
- RTPrintf("\n");
- }
- if (verbose)
- {
- ULONG uRetStatus, uRetExitCode, uRetFlags;
- CHECK_ERROR_BREAK(guest, GetProcessStatus(uPID, &uRetExitCode, &uRetFlags, &uRetStatus));
- RTPrintf("Exit code=%u (Status=%u, Flags=%u)\n", uRetExitCode, uRetStatus, uRetFlags);
- }
+ ComPtr<IVirtualBoxErrorInfo> execError;
+ rc = progress->COMGETTER(ErrorInfo)(execError.asOutParam());
+ com::ErrorInfo info (execError);
+ RTPrintf("\n\nProcess error details:\n");
+ GluePrintErrorInfo(info);
+ RTPrintf("\n");
}
- else /* not completed yet? -> timeout */
+ if (fVerbose)
{
- RTPrintf("Process timed out!\n");
+ ULONG uRetStatus, uRetExitCode, uRetFlags;
+ CHECK_ERROR_BREAK(guest, GetProcessStatus(uPID, &uRetExitCode, &uRetFlags, &uRetStatus));
+ RTPrintf("Exit code=%u (Status=%u [%s], Flags=%u)\n", uRetExitCode, uRetStatus, getStatus(uRetStatus), uRetFlags);
}
}
}
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
index 97c6801d9..a7736e0fa 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxManageHelp.cpp 29364 2010-05-11 15:13:50Z vboxsync $ */
+/* $Id: VBoxManageHelp.cpp 29634 2010-05-18 13:41:15Z vboxsync $ */
/** @file
* VBoxManage - help and other message output.
*/
@@ -47,6 +47,7 @@ void showLogo(void)
void printUsage(USAGECATEGORY u64Cmd)
{
+ bool fDumpOpts = false;
#ifdef RT_OS_LINUX
bool fLinux = true;
#else
@@ -85,6 +86,7 @@ void printUsage(USAGECATEGORY u64Cmd)
if (u64Cmd == USAGE_DUMPOPTS)
{
+ fDumpOpts = true;
fLinux = true;
fWin = true;
fSolaris = true;
@@ -154,6 +156,7 @@ void printUsage(USAGECATEGORY u64Cmd)
" [--name <name>]\n"
" [--ostype <ostype>]\n"
" [--memory <memorysize in MB>]\n"
+ " [--pagefusion on|off]\n"
" [--vram <vramsize in MB>]\n"
" [--acpi on|off]\n"
" [--ioapic on|off]\n"
@@ -185,11 +188,12 @@ void printUsage(USAGECATEGORY u64Cmd)
" [--biospxedebug on|off]\n"
" [--boot<1-4> none|floppy|dvd|disk|net>]\n"
" [--nic<1-N> none|null|nat|bridged|intnet"
-#if defined(VBOX_WITH_NETFLT) /* RT_OS_LINUX || RT_OS_DARWIN */
+#if defined(VBOX_WITH_NETFLT)
"|hostonly"
#endif
#ifdef VBOX_WITH_VDE
- "|vde"
+ "|\n"
+ " vde"
#endif
"]\n"
" [--nictype<1-N> Am79C970A|Am79C973"
@@ -214,11 +218,11 @@ void printUsage(USAGECATEGORY u64Cmd)
#ifdef VBOX_WITH_VDE
" [--vdenet<1-N> <network>|default]\n"
#endif
- " [--natsettings<1-N> \"[<mtu>],[<socksnd>],[<sockrcv>],\n"
- " [<tcpsnd>],[<tcprcv>]\"]\n"
- " [--natpf<1-N> \"[<rulename>],tcp|udp,\n"
- " [<hostip>],<hostport>,\n"
- " [<guestip>],<guestport>\"]\n"
+ " [--natsettings<1-N> [<mtu>],[<socksnd>],\n"
+ " [<sockrcv>],[<tcpsnd>],\n"
+ " [<tcprcv>]]\n"
+ " [--natpf<1-N> [<rulename>],tcp|udp,[<hostip>],\n"
+ " <hostport>,[<guestip>],<guestport>]\n"
" [--natpf<1-N> delete <rulename>]\n"
" [--nattftpprefix<1-N> <prefix>]\n"
" [--nattftpfile<1-N> <file>]\n"
@@ -226,7 +230,8 @@ void printUsage(USAGECATEGORY u64Cmd)
" [--natdnspassdomain<1-N> on|off]\n"
" [--natdnsproxy<1-N> on|off]\n"
" [--natdnshostresolver<1-N> on|off]\n"
- " [--nataliasmode<1-N> default|[log],[proxyonly],[sameports]]\n"
+ " [--nataliasmode<1-N> default|[log],[proxyonly],\n"
+ " [sameports]]\n"
" [--macaddress<1-N> auto|<mac>]\n"
" [--mouse ps2|usb|usbtablet\n"
" [--keyboard ps2|usb\n"
@@ -269,11 +274,17 @@ void printUsage(USAGECATEGORY u64Cmd)
}
if (fFreeBSD)
{
- RTPrintf( "|oss"
+ /* Get the line break sorted when dumping all option variants. */
+ if (fDumpOpts)
+ {
+ RTPrintf( "|\n"
+ " oss");
+ }
+ else
+ RTPrintf( "|oss");
#ifdef VBOX_WITH_PULSE
- "|pulse"
+ RTPrintf( "|pulse");
#endif
- );
}
if (fDarwin)
{
@@ -429,8 +440,9 @@ void printUsage(USAGECATEGORY u64Cmd)
" --storagectl <name>\n"
" --port <number>\n"
" --device <number>\n"
- " [--type dvddrive|hdd|fdd\n"
- " --medium none|emptydrive|uuid|filename|host:<drive>]\n"
+ " [--type dvddrive|hdd|fdd]\n"
+ " [--medium none|emptydrive|\n"
+ " <uuid>|<filename>|host:<drive>]\n"
" [--passthrough on|off]\n"
" [--forceunmount]\n"
"\n");
@@ -441,11 +453,11 @@ void printUsage(USAGECATEGORY u64Cmd)
RTPrintf("VBoxManage storagectl <uuid|vmname>\n"
" --name <name>\n"
" [--add ide|sata|scsi|floppy|sas]\n"
- " [--controller LSILogic|LSILogicSAS|BusLogic|IntelAHCI|\n"
- " PIIX3|PIIX4|ICH6|I82078]\n"
+ " [--controller LSILogic|LSILogicSAS|BusLogic|\n"
+ " IntelAHCI|PIIX3|PIIX4|ICH6|I82078]\n"
" [--sataideemulation<1-4> <1-30>]\n"
" [--sataportcount <1-30>]\n"
- " [--iobackend Buffered|Unbuffered]\n"
+ " [--hostiocache on|off]\n"
" [--remove]\n"
"\n");
}
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
index aa68087f1..ecb74fa8e 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxManageInfo.cpp 29117 2010-05-05 22:59:38Z vboxsync $ */
+/* $Id: VBoxManageInfo.cpp 29465 2010-05-14 11:59:31Z vboxsync $ */
/** @file
* VBoxManage - The 'showvminfo' command and helper routines.
*/
@@ -228,6 +228,13 @@ HRESULT showVMInfo (ComPtr<IVirtualBox> virtualBox,
else
RTPrintf("Memory size: %uMB\n", memorySize);
+ BOOL fPageFusionEnabled;
+ rc = machine->COMGETTER(PageFusionEnabled)(&fPageFusionEnabled);
+ if (details == VMINFO_MACHINEREADABLE)
+ RTPrintf("pagefusion=\"%s\"\n", fPageFusionEnabled ? "on" : "off");
+ else
+ RTPrintf("Page Fusion: %s\n", fPageFusionEnabled ? "on" : "off");
+
ULONG vramSize;
rc = machine->COMGETTER(VRAMSize)(&vramSize);
if (details == VMINFO_MACHINEREADABLE)
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
index a0602bccd..ec5623668 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxManageModifyVM.cpp 29218 2010-05-07 14:52:27Z vboxsync $ */
+/* $Id: VBoxManageModifyVM.cpp 29465 2010-05-14 11:59:31Z vboxsync $ */
/** @file
* VBoxManage - Implementation of modifyvm command.
*/
@@ -55,6 +55,7 @@ enum
MODIFYVM_NAME = 1000,
MODIFYVM_OSTYPE,
MODIFYVM_MEMORY,
+ MODIFYVM_PAGEFUSION,
MODIFYVM_VRAM,
MODIFYVM_FIRMWARE,
MODIFYVM_ACPI,
@@ -163,6 +164,7 @@ static const RTGETOPTDEF g_aModifyVMOptions[] =
{ "--name", MODIFYVM_NAME, RTGETOPT_REQ_STRING },
{ "--ostype", MODIFYVM_OSTYPE, RTGETOPT_REQ_STRING },
{ "--memory", MODIFYVM_MEMORY, RTGETOPT_REQ_UINT32 },
+ { "--pagefusion", MODIFYVM_PAGEFUSION, RTGETOPT_REQ_BOOL_ONOFF },
{ "--vram", MODIFYVM_VRAM, RTGETOPT_REQ_UINT32 },
{ "--firmware", MODIFYVM_FIRMWARE, RTGETOPT_REQ_STRING },
{ "--acpi", MODIFYVM_ACPI, RTGETOPT_REQ_BOOL_ONOFF },
@@ -350,6 +352,12 @@ int handleModifyVM(HandlerArg *a)
break;
}
+ case MODIFYVM_PAGEFUSION:
+ {
+ CHECK_ERROR(machine, COMSETTER(PageFusionEnabled)(ValueUnion.f));
+ break;
+ }
+
case MODIFYVM_VRAM:
{
CHECK_ERROR(machine, COMSETTER(VRAMSize)(ValueUnion.u32));
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
index d0e58643d..2f96a148d 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxManageStorageController.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: VBoxManageStorageController.cpp 29480 2010-05-14 15:24:19Z vboxsync $ */
/** @file
* VBoxManage - The storage controller related commands.
*/
@@ -652,7 +652,7 @@ static const RTGETOPTDEF g_aStorageControllerOptions[] =
{ "--sataideemulation", 'e', RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_INDEX },
{ "--sataportcount", 'p', RTGETOPT_REQ_UINT32 },
{ "--remove", 'r', RTGETOPT_REQ_NOTHING },
- { "--iobackend", 'i', RTGETOPT_REQ_STRING },
+ { "--hostiocache", 'i', RTGETOPT_REQ_STRING },
};
int handleStorageController(HandlerArg *a)
@@ -662,7 +662,7 @@ int handleStorageController(HandlerArg *a)
const char *pszCtl = NULL;
const char *pszBusType = NULL;
const char *pszCtlType = NULL;
- const char *pszIoBackend = NULL;
+ const char *pszHostIOCache = NULL;
ULONG satabootdev = ~0U;
ULONG sataidedev = ~0U;
ULONG sataportcount = ~0U;
@@ -731,7 +731,7 @@ int handleStorageController(HandlerArg *a)
case 'i':
{
- pszIoBackend = ValueUnion.psz;
+ pszHostIOCache = ValueUnion.psz;
break;
}
@@ -920,26 +920,26 @@ int handleStorageController(HandlerArg *a)
}
}
- if ( pszIoBackend
+ if ( pszHostIOCache
&& SUCCEEDED(rc))
{
- ComPtr<IStorageController> ctl;
+ ComPtr<IStorageController> ctl;
- CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
+ CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
- if (!RTStrICmp(pszIoBackend, "buffered"))
- {
- CHECK_ERROR(ctl, COMSETTER(IoBackend)(IoBackendType_Buffered));
- }
- else if (!RTStrICmp(pszIoBackend, "unbuffered"))
- {
- CHECK_ERROR(ctl, COMSETTER(IoBackend)(IoBackendType_Unbuffered));
- }
- else
- {
- errorArgument("Invalid --type argument '%s'", pszIoBackend);
- rc = E_FAIL;
- }
+ if (!RTStrICmp(pszHostIOCache, "on"))
+ {
+ CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(TRUE));
+ }
+ else if (!RTStrICmp(pszHostIOCache, "off"))
+ {
+ CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(FALSE));
+ }
+ else
+ {
+ errorArgument("Invalid --hostiocache argument '%s'", pszHostIOCache);
+ rc = E_FAIL;
+ }
}
}
diff --git a/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp b/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
index 0a276630d..5deff3153 100644
--- a/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
+++ b/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
@@ -99,23 +99,22 @@ using namespace com;
struct PointerShapeChangeData
{
PointerShapeChangeData(BOOL aVisible, BOOL aAlpha, ULONG aXHot, ULONG aYHot,
- ULONG aWidth, ULONG aHeight, const uint8_t *aShape)
+ ULONG aWidth, ULONG aHeight, ComSafeArrayIn(BYTE,pShape))
: visible(aVisible), alpha(aAlpha), xHot(aXHot), yHot(aYHot),
- width(aWidth), height(aHeight), shape(NULL)
+ width(aWidth), height(aHeight)
{
// make a copy of the shape
- if (aShape)
+ com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape));
+ size_t cbShapeSize = aShape.size();
+ if (cbShapeSize > 0)
{
- uint32_t shapeSize = ((((aWidth + 7) / 8) * aHeight + 3) & ~3) + aWidth * 4 * aHeight;
- shape = new uint8_t [shapeSize];
- if (shape)
- memcpy((void *)shape, (void *)aShape, shapeSize);
+ shape.resize(cbShapeSize);
+ ::memcpy(shape.raw(), aShape.raw(), cbShapeSize);
}
}
~PointerShapeChangeData()
{
- if (shape) delete[] shape;
}
const BOOL visible;
@@ -124,7 +123,7 @@ struct PointerShapeChangeData
const ULONG yHot;
const ULONG width;
const ULONG height;
- const uint8_t *shape;
+ com::SafeArray<BYTE> shape;
};
enum TitlebarMode
@@ -400,11 +399,11 @@ public:
NS_DECL_ISUPPORTS
STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
- ULONG width, ULONG height, BYTE *shape)
+ ULONG width, ULONG height, ComSafeArrayIn(BYTE, shape))
{
PointerShapeChangeData *data;
data = new PointerShapeChangeData(visible, alpha, xHot, yHot, width, height,
- shape);
+ ComSafeArrayInArg(shape));
Assert(data);
if (!data)
return E_FAIL;
@@ -688,12 +687,6 @@ static void show_usage()
" --[no]hwvirtex Permit or deny the usage of VT-x/AMD-V\n"
#endif
"\n"
- " --convertSettings Allow to auto-convert settings files\n"
- " --convertSettingsBackup Allow to auto-convert settings files\n"
- " but create backup copies before\n"
- " --convertSettingsIgnore Allow to auto-convert settings files\n"
- " but don't explicitly save the results\n"
- "\n"
"Key bindings:\n"
" <hostkey> + f Switch to full screen / restore to previous view\n"
" h Press ACPI power button\n"
@@ -4435,15 +4428,16 @@ static void SetPointerShape(const PointerShapeChangeData *data)
if (gpOffCursor)
return;
- if (data->shape)
+ if (data->shape.size() > 0)
{
bool ok = false;
uint32_t andMaskSize = (data->width + 7) / 8 * data->height;
uint32_t srcShapePtrScan = data->width * 4;
- const uint8_t *srcAndMaskPtr = data->shape;
- const uint8_t *srcShapePtr = data->shape + ((andMaskSize + 3) & ~3);
+ const uint8_t* shape = data->shape.raw();
+ const uint8_t *srcAndMaskPtr = shape;
+ const uint8_t *srcShapePtr = shape + ((andMaskSize + 3) & ~3);
#if 0
/* pointer debugging code */
diff --git a/src/VBox/Frontends/VBoxShell/vboxshell.py b/src/VBox/Frontends/VBoxShell/vboxshell.py
index 241526354..5fe67ea42 100644
--- a/src/VBox/Frontends/VBoxShell/vboxshell.py
+++ b/src/VBox/Frontends/VBoxShell/vboxshell.py
@@ -37,7 +37,8 @@ class GuestMonitor:
self.mach = mach
def onMousePointerShapeChange(self, visible, alpha, xHot, yHot, width, height, shape):
- print "%s: onMousePointerShapeChange: visible=%d" %(self.mach.name, visible)
+ print "%s: onMousePointerShapeChange: visible=%d shape=%d bytes" %(self.mach.name, visible,len(shape))
+
def onMouseCapabilityChange(self, supportsAbsolute, supportsRelative, needsHostCursor):
print "%s: onMouseCapabilityChange: supportsAbsolute = %d, supportsRelative = %d, needsHostCursor = %d" %(self.mach.name, supportsAbsolute, supportsRelative, needsHostCursor)
@@ -159,6 +160,7 @@ def colored(string,color):
return string
if g_hasreadline:
+ import string
class CompleterNG(rlcompleter.Completer):
def __init__(self, dic, ctx):
self.ctx = ctx
@@ -169,11 +171,24 @@ if g_hasreadline:
taken from:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496812
"""
- if text == "":
+ if False and text == "":
return ['\t',None][state]
else:
return rlcompleter.Completer.complete(self,text,state)
+ def canBeCommand(self, phrase, word):
+ spaceIdx = phrase.find(" ")
+ begIdx = readline.get_begidx()
+ firstWord = (spaceIdx == -1 or begIdx < spaceIdx)
+ if firstWord:
+ return True
+ if phrase.startswith('help'):
+ return True
+ return False
+
+ def canBeMachine(self,phrase,word):
+ return not self.canBeCommand(phrase, word)
+
def global_matches(self, text):
"""
Compute matches when text is a simple name.
@@ -183,25 +198,26 @@ if g_hasreadline:
matches = []
n = len(text)
+ phrase = readline.get_line_buffer()
- for list in [ self.namespace ]:
- for word in list:
- if word[:n] == text:
- matches.append(word)
-
-
+ if self.canBeCommand(phrase,text):
+ for list in [ self.namespace ]:
+ for word in list:
+ if word[:n] == text:
+ matches.append(word)
try:
- for m in getMachines(self.ctx, False, True):
- # although it has autoconversion, we need to cast
- # explicitly for subscripts to work
- word = re.sub("(?<!\\\\) ", "\\ ", str(m.name))
- if word[:n] == text:
- matches.append(word)
- word = str(m.id)
- if word[0] == '{':
- word = word[1:-1]
- if word[:n] == text:
- matches.append(word)
+ if self.canBeMachine(phrase,text):
+ for m in getMachines(self.ctx, False, True):
+ # although it has autoconversion, we need to cast
+ # explicitly for subscripts to work
+ word = re.sub("(?<!\\\\) ", "\\ ", str(m.name))
+ if word[:n] == text:
+ matches.append(word)
+ word = str(m.id)
+ if word[0] == '{':
+ word = word[1:-1]
+ if word[:n] == text:
+ matches.append(word)
except Exception,e:
printErr(e)
if g_verbose:
@@ -265,9 +281,14 @@ def colCat(ctx,str):
def colVm(ctx,vm):
return colored(vm, 'blue')
-def colPath(ctx,vm):
- return colored(vm, 'green')
+def colPath(ctx,p):
+ return colored(p, 'green')
+
+def colSize(ctx,m):
+ return colored(m, 'red')
+def colSizeM(ctx,m):
+ return colored(str(m)+'M', 'red')
def createVm(ctx,name,kind,base):
mgr = ctx['mgr']
@@ -523,8 +544,11 @@ def ginfo(ctx,console, args):
printSf(ctx,sf)
def cmdExistingVm(ctx,mach,cmd,args):
+ session = None
try:
- session = ctx['global'].openMachineSession(mach.id)
+ vb = ctx['vb']
+ session = ctx['mgr'].getSessionObject(vb)
+ vb.openExistingSession(session, mach.id)
except Exception,e:
printErr(ctx, "Session to '%s' not open: %s" %(mach.name,str(e)))
if g_verbose:
@@ -824,7 +848,7 @@ def execInGuest(ctx,console,args,env):
# shall contain program name as argv[0]
gargs = args
print "executing %s with args %s" %(args[0], gargs)
- (progress, pid) = guest.executeProcess(args[0], 0, gargs, env, "", "", "", user, passwd, tmo)
+ (progress, pid) = guest.executeProcess(args[0], 0, gargs, env, user, passwd, tmo)
print "executed with pid %d" %(pid)
if pid != 0:
try:
@@ -1665,25 +1689,25 @@ def listMediaCmd(ctx,args):
else:
verbose = False
hdds = ctx['global'].getArray(ctx['vb'], 'hardDisks')
- print "Hard disks:"
+ print colCat(ctx,"Hard disks:")
for hdd in hdds:
if hdd.state != ctx['global'].constants.MediumState_Created:
hdd.refreshState()
- print " %s (%s)%s %dM [logical %dM]" %(hdd.location, hdd.format, optId(verbose,hdd.id),asSize(hdd.size, True), asSize(hdd.logicalSize, False))
+ print " %s (%s)%s %s [logical %s]" %(colPath(ctx,hdd.location), hdd.format, optId(verbose,hdd.id),colSizeM(ctx,asSize(hdd.size, True)), colSizeM(ctx,asSize(hdd.logicalSize, False)))
dvds = ctx['global'].getArray(ctx['vb'], 'DVDImages')
- print "CD/DVD disks:"
+ print colCat(ctx,"CD/DVD disks:")
for dvd in dvds:
if dvd.state != ctx['global'].constants.MediumState_Created:
dvd.refreshState()
- print " %s (%s)%s %dM" %(dvd.location, dvd.format,optId(verbose,hdd.id),asSize(hdd.size, True))
+ print " %s (%s)%s %s" %(colPath(ctx,dvd.location), dvd.format,optId(verbose,hdd.id),colSizeM(ctx,asSize(hdd.size, True)))
floppys = ctx['global'].getArray(ctx['vb'], 'floppyImages')
- print "Floopy disks:"
+ print colCat(ctx,"Floppy disks:")
for floppy in floppys:
if floppy.state != ctx['global'].constants.MediumState_Created:
floppy.refreshState()
- print " %s (%s)%s %dM" %(floppy.location, floppy.format,optId(verbose,hdd.id), asSize(hdd.size, True))
+ print " %s (%s)%s %s" %(colPath(ctx,floppy.location), floppy.format,optId(verbose,hdd.id), colSizeM(ctx,asSize(hdd.size, True)))
return 0
@@ -2172,12 +2196,12 @@ def snapshotCmd(ctx,args):
return 0
def natAlias(ctx, mach, nicnum, nat, args=[]):
- """This command shows/alters NAT's alias settings.
+ """This command shows/alters NAT's alias settings.
usage: nat <vm> <nicnum> alias [default|[log] [proxyonly] [sameports]]
default - set settings to default values
log - switch on alias loging
proxyonly - switch proxyonly mode on
- sameports - enforces NAT using the same ports
+ sameports - enforces NAT using the same ports
"""
alias = {
'log': 0x1,
@@ -2187,12 +2211,12 @@ def natAlias(ctx, mach, nicnum, nat, args=[]):
if len(args) == 1:
first = 0
msg = ''
- for aliasmode, aliaskey in alias.iteritems():
+ for aliasmode, aliaskey in alias.iteritems():
if first == 0:
first = 1
else:
msg += ', '
- if int(nat.aliasMode) & aliaskey:
+ if int(nat.aliasMode) & aliaskey:
msg += '{0}: {1}'.format(aliasmode, 'on')
else:
msg += '{0}: {1}'.format(aliasmode, 'off')
@@ -2213,7 +2237,7 @@ def natSettings(ctx, mach, nicnum, nat, args):
"""This command shows/alters NAT settings.
usage: nat <vm> <nicnum> settings [<mtu> [[<socsndbuf> <sockrcvbuf> [<tcpsndwnd> <tcprcvwnd>]]]]
mtu - set mtu <= 16000
- socksndbuf/sockrcvbuf - sets amount of kb for socket sending/receiving buffer
+ socksndbuf/sockrcvbuf - sets amount of kb for socket sending/receiving buffer
tcpsndwnd/tcprcvwnd - sets size of initial tcp sending/receiving window
"""
if len(args) == 1:
@@ -2232,13 +2256,13 @@ def natSettings(ctx, mach, nicnum, nat, args):
for i in range(2, len(args)):
if not args[i].isdigit() or int(args[i]) < 8 or int(args[i]) > 1024:
print 'invalid {0} parameter ({1} not in range [8-1024])'.format(i, args[i])
- return (1, None)
+ return (1, None)
a = [args[1]]
if len(args) < 6:
- for i in range(2, len(args)): a.append(args[i])
+ for i in range(2, len(args)): a.append(args[i])
for i in range(len(args), 6): a.append(0)
else:
- for i in range(2, len(args)): a.append(args[i])
+ for i in range(2, len(args)): a.append(args[i])
#print a
nat.setNetworkSettings(int(a[0]), int(a[1]), int(a[2]), int(a[3]), int(a[4]))
return (0, None)
@@ -2303,9 +2327,9 @@ def natTftp(ctx, mach, nicnum, nat, args):
def natPortForwarding(ctx, mach, nicnum, nat, args):
"""This command shows/manages port-forwarding settings
- usage:
+ usage:
nat <vm> <nicnum> <pf> [ simple tcp|udp <hostport> <guestport>]
- |[no_name tcp|udp <hostip> <hostport> <guestip> <guestport>]
+ |[no_name tcp|udp <hostip> <hostport> <guestip> <guestport>]
|[ex tcp|udp <pf-name> <hostip> <hostport> <guestip> <guestport>]
|[delete <pf-name>]
"""
@@ -2322,22 +2346,22 @@ def natPortForwarding(ctx, mach, nicnum, nat, args):
proto = {'udp': 0, 'tcp': 1}
pfcmd = {
'simple': {
- 'validate': lambda: args[1] in pfcmd.keys() and args[2] in proto.keys() and len(args) == 5,
+ 'validate': lambda: args[1] in pfcmd.keys() and args[2] in proto.keys() and len(args) == 5,
'func':lambda: nat.addRedirect('', proto[args[2]], '', int(args[3]), '', int(args[4]))
},
- 'no_name': {
- 'validate': lambda: args[1] in pfcmd.keys() and args[2] in proto.keys() and len(args) == 7,
+ 'no_name': {
+ 'validate': lambda: args[1] in pfcmd.keys() and args[2] in proto.keys() and len(args) == 7,
'func': lambda: nat.addRedirect('', proto[args[2]], args[3], int(args[4]), args[5], int(args[6]))
},
- 'ex': {
- 'validate': lambda: args[1] in pfcmd.keys() and args[2] in proto.keys() and len(args) == 8,
+ 'ex': {
+ 'validate': lambda: args[1] in pfcmd.keys() and args[2] in proto.keys() and len(args) == 8,
'func': lambda: nat.addRedirect(args[3], proto[args[2]], args[4], int(args[5]), args[6], int(args[7]))
},
'delete': {
'validate': lambda: len(args) == 3,
'func': lambda: nat.removeRedirect(args[2])
}
- }
+ }
if not pfcmd[args[1]]['validate']():
print 'invalid port-forwarding or args of sub command ', args[1]
@@ -2348,7 +2372,7 @@ def natPortForwarding(ctx, mach, nicnum, nat, args):
return (0, None)
def natNetwork(ctx, mach, nicnum, nat, args):
- """This command shows/alters NAT network settings
+ """This command shows/alters NAT network settings
usage: nat <vm> <nicnum> network [<network>]
"""
if len(args) == 1:
@@ -2401,8 +2425,8 @@ def natCmd(ctx, args):
cmdargs = []
for i in range(3, len(args)):
cmdargs.append(args[i])
-
- # @todo vvl if nicnum is missed but command is entered
+
+ # @todo vvl if nicnum is missed but command is entered
# use NAT func for every adapter on machine.
func = args[3]
rosession = 1
@@ -2414,7 +2438,7 @@ def natCmd(ctx, args):
adapter = mach.getNetworkAdapter(nicnum)
natEngine = adapter.natDriver
- (rc, report) = natcommands[func](ctx, mach, nicnum, natEngine, cmdargs)
+ (rc, report) = natcommands[func](ctx, mach, nicnum, natEngine, cmdargs)
if rosession == 0:
if rc == 0:
mach.saveSettings()
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_da.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_da.ts
index df7387b31..7ab79f0e6 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_da.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_da.ts
@@ -401,7 +401,7 @@
<name>QIWizardPage</name>
<message>
<source>Use the &lt;b&gt;%1&lt;/b&gt; button to go to the next page of the wizard and the &lt;b&gt;%2&lt;/b&gt; button to return to the previous page. You can also press &lt;b&gt;%3&lt;/b&gt; if you want to cancel the execution of this wizard.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Brug knappen &lt;b&gt;%1&lt;/b&gt; for at gå til næste trin af guiden og &lt;b&gt;%2&lt;/b&gt; for at gå til forrige trin. Du kan også bruge &lt;b&gt;%3&lt;/b&gt; hvis du vil afbryde guiden.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -412,7 +412,7 @@
</message>
<message>
<source>The download process has been canceled by the user.</source>
- <translation type="unfinished"></translation>
+ <translation>Filhentning annulleret af bruger.</translation>
</message>
</context>
<context>
@@ -442,7 +442,7 @@
<name>UIDownloaderUserManual</name>
<message>
<source>Select folder to save User Manual to</source>
- <translation type="unfinished"></translation>
+ <translation>Vælg folderen, hvor brugermanualen skal gemmes</translation>
</message>
</context>
<context>
@@ -584,116 +584,117 @@ p, li { white-space: pre-wrap; }
<name>UIExportApplianceWzdPage1</name>
<message>
<source>Welcome to the Appliance Export Wizard!</source>
- <translation type="unfinished">Denne guide hjælper dig med at eksportere et Prækonfigureret system!</translation>
+ <translation>Denne guide hjælper dig med at eksportere et Prækonfigureret system!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the process of exporting an appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Please select the virtual machines that should be added to the appliance. You can select more than one. Please note that these machines have to be turned off before they can be exported.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Denne guide hjælper dig med at eksportere et Prækonfigureret system.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Vælg en eller flere virtuelle maskiner, der skal tilføjes til det prækonfigurerede system. De virtuelle maskiner skal være inaktive før de kan eksporteres.</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage2</name>
<message>
<source>Here you can change additional configuration values of the selected virtual machines. You can modify most of the properties shown by double-clicking on the items.</source>
- <translation type="unfinished">Her kan du tilpasse yderligere indstillinger for de valgte virtuelle maskiner. Du kan ændre de fleste af de viste egenskaber ved at dobbeltklikke på værdien.</translation>
+ <translation>Her kan du tilpasse yderligere indstillinger for de valgte virtuelle maskiner. Du kan ændre de fleste af de viste egenskaber ved at dobbeltklikke på værdien.</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished">Indstillinger for eksport af Prækonfigureret system</translation>
+ <translation>Indstillinger for eksport af Prækonfigureret system</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage3</name>
<message>
<source>Please specify the target for the OVF export. You can choose between a local file system export, uploading the OVF to the Sun Cloud service or an S3 storage server.</source>
- <translation type="unfinished">Angiv destinationen for OVF-eksporten. Du kan vælge at eksportere til et lokalt filsystem eller sende OVF&apos;en til Sun Cloud servicen eller en S3 lagerserver.</translation>
+ <translation>Angiv destinationen for OVF-eksporten. Du kan vælge at eksportere til et lokalt filsystem eller sende OVF&apos;en til Sun Cloud servicen eller en S3 lagerserver.</translation>
</message>
<message>
<source>&amp;Local Filesystem </source>
- <translation type="unfinished">&amp;Lokalt filsystem</translation>
+ <translation>&amp;Lokalt filsystem</translation>
</message>
<message>
<source>Sun &amp;Cloud</source>
- <translation type="unfinished">Sun &amp;Cloud</translation>
+ <translation>Sun &amp;Cloud</translation>
</message>
<message>
<source>&amp;Simple Storage System (S3)</source>
- <translation type="unfinished">&amp;Simple Storage System (S3)</translation>
+ <translation>&amp;Simple Storage System (S3)</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished">Indstillinger for eksport af Prækonfigureret system</translation>
+ <translation>Indstillinger for eksport af Prækonfigureret system</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage4</name>
<message>
<source>&amp;Username:</source>
- <translation type="unfinished">Br&amp;ugernavn:</translation>
+ <translation>Br&amp;ugernavn:</translation>
</message>
<message>
<source>&amp;Password:</source>
- <translation type="unfinished">Kodeord:</translation>
+ <translation>Kodeord:</translation>
</message>
<message>
<source>&amp;Hostname:</source>
- <translation type="unfinished">Værtsnavn:</translation>
+ <translation>Værtsnavn:</translation>
</message>
<message>
<source>&amp;Bucket:</source>
- <translation type="unfinished">&amp;Bucket:</translation>
+ <translatorcomment>I hvilken sammenhæng?</translatorcomment>
+ <translation>&amp;Bucket:</translation>
</message>
<message>
<source>&amp;File:</source>
- <translation type="unfinished">&amp;Fil:</translation>
+ <translation>&amp;Fil:</translation>
</message>
<message>
<source>Write in legacy OVF 0.9 format for compatibility with other virtualization products.</source>
- <translation type="unfinished">Gem i OVF 0.9 format for kompatibilitet med andre virtualiseringsprogrammer.</translation>
+ <translation>Gem i OVF 0.9 format for kompatibilitet med andre virtualiseringsprogrammer.</translation>
</message>
<message>
<source>&amp;Write legacy OVF 0.9</source>
- <translation type="unfinished">Gem i OVF 0.9 format</translation>
+ <translation>Gem i OVF 0.9 format</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished">Indstillinger for eksport af Prækonfigureret system</translation>
+ <translation>Indstillinger for eksport af Prækonfigureret system</translation>
</message>
<message>
<source>Appliance</source>
- <translation type="unfinished">Prækonfigureret system</translation>
+ <translation>Prækonfigureret system</translation>
</message>
<message>
<source>Select a file to export into</source>
- <translation type="unfinished">Vælg den fil, der skal eksporteres til</translation>
+ <translation>Vælg den fil, der skal eksporteres til</translation>
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Open Virtualization Format (%1)</translation>
+ <translation>Open Virtualization Format (%1)</translation>
</message>
<message>
<source>Please choose a filename to export the OVF to.</source>
- <translation type="unfinished">Angiv et filnavn til OVF-eksporten.</translation>
+ <translation>Angiv et filnavn til OVF-eksporten.</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password and the bucket, and provide a filename for the OVF target.</source>
- <translation type="unfinished">Udfyld de øvrige felter såsom brugernavn, kodeord og bucket. Afslut med at angive et filnavn til OVF-eksporten.</translation>
+ <translation>Udfyld de øvrige felter såsom brugernavn, kodeord og bucket. Afslut med at angive et filnavn til OVF-eksporten.</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password, hostname and the bucket, and provide a filename for the OVF target.</source>
- <translation type="unfinished">Udfyld de øvrige felter såsom brugernavn, kodeord, værtsnavn og bucket. Afslut med at angive et filnavn til OVF-eksporten.</translation>
+ <translation>Udfyld de øvrige felter såsom brugernavn, kodeord, værtsnavn og bucket. Afslut med at angive et filnavn til OVF-eksporten.</translation>
</message>
<message>
<source>Checking files ...</source>
- <translation type="unfinished">Kontrollerer filer ...</translation>
+ <translation>Kontrollerer filer ...</translation>
</message>
<message>
<source>Removing files ...</source>
- <translation type="unfinished">Fjerner filer ...</translation>
+ <translation>Fjerner filer ...</translation>
</message>
<message>
<source>Exporting Appliance ...</source>
- <translation type="unfinished">Eksporterer Prækonfigureret system ...</translation>
+ <translation>Eksporterer Prækonfigureret system ...</translation>
</message>
</context>
<context>
@@ -835,71 +836,71 @@ p, li { white-space: pre-wrap; }
<name>UIFirstRunWzdPage1</name>
<message>
<source>Welcome to the First Run Wizard!</source>
- <translation type="unfinished">Velkommen til 1.gang-guiden!</translation>
+ <translation>Velkommen til 1.gang-guiden!</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for installing an operating system of your choice onto this virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Du har startet en nyoprettet virtuel maskine for første gang. Denne guide hjælper dig med at installere et operativsystem efter eget valg i denne virtuelle maskine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for booting an operating system of your choice on the virtual machine.&lt;/p&gt;&lt;p&gt;Note that you will not be able to install an operating system into this virtual machine right now because you did not attach any hard disk to it. If this is not what you want, you can cancel the execution of this wizard, select &lt;b&gt;Settings&lt;/b&gt; from the &lt;b&gt;Machine&lt;/b&gt; menu of the main VirtualBox window to access the settings dialog of this machine and change the hard disk configuration.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Du har startet en nyoprettet virtuel maskine for første gang. Denne guide hjælper dig med at udføre de trin, der er nødvendige for at starte et operativsystem i den virtuelle maskine.&lt;/p&gt;&lt;p&gt;Bemærk at du ikke kan installere et operativsystem i denne virtuelle maskine endnu, da du ikke har tilsluttet en harddisk til den. Hvis du ønsker at tilføje en harddisk, så skal du afbryde denne guide og vælge &lt;b&gt;Indstillinger&lt;/b&gt; fra menuen &lt;b&gt;Maskine&lt;/b&gt; i VirtualBox&apos; hovedvindue for at ændre konfigurationen af harddiske.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIFirstRunWzdPage2</name>
<message>
<source>&lt;p&gt;Select the media which contains the setup program of the operating system you want to install. This media must be bootable, otherwise the setup program will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vælg mediet, som indeholder opsætningsprogrammet til det ønskede operativsystem. Det skal være muligt at starte op på mediet for at opsætningsprogrammet kan køre.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vælg mediet, som indeholder opsætningsprogrammet til det ønskede operativsystem. Det skal være muligt at starte op på mediet for at opsætningsprogrammet kan køre.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Select the media that contains the operating system you want to work with. This media must be bootable, otherwise the operating system will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vælg mediet, som indeholder operativsystemet du vil anvende. Det skal være muligt at starte op på mediet for at operativsystem kan starte.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vælg mediet, som indeholder operativsystemet du vil anvende. Det skal være muligt at starte op på mediet for at operativsystem kan starte.&lt;/p&gt;</translation>
</message>
<message>
<source>Media Source</source>
- <translation type="unfinished">Mediekilde</translation>
+ <translation>Mediekilde</translation>
</message>
<message>
<source>Select Installation Media</source>
- <translation type="unfinished">Vælg installationsmedie</translation>
+ <translation>Vælg installationsmedie</translation>
</message>
</context>
<context>
<name>UIFirstRunWzdPage3</name>
<message>
<source>&lt;p&gt;You have selected the following media to boot from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Du har valgt at starte op på følgende medie:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Du har valgt at starte op på følgende medie:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have selected the following media to boot an operating system from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Du har valgt at starte et operativsystem fra følgende medie:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Du har valgt at starte et operativsystem fra følgende medie:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be temporarily mounted on the virtual machine and the machine will start execution.&lt;/p&gt;&lt;p&gt;Please note that when you close the virtual machine, the specified media will be automatically unmounted and the boot device will be set back to the first hard disk.&lt;/p&gt;&lt;p&gt;Depending on the type of the setup program, you may need to manually unmount (eject) the media after the setup program reboots the virtual machine, to prevent the installation process from starting again. You can do this by selecting the corresponding &lt;b&gt;Unmount...&lt;/b&gt; action in the &lt;b&gt;Devices&lt;/b&gt; menu.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Tryk på knappen &lt;b&gt;Færdig&lt;/b&gt;, hvis ovenstående er korrekt. Når du trykker, vil det valgte medie midlertidigt blive monteret i den virtuelle maskine, som derefter vil starte op.&lt;/p&gt;&lt;p&gt;Bemærk at når du lukker den virtuelle maskine, vil det angivne medie automatisk blive afmonteret og opstartsenheden vil igen være den første harddisk.&lt;/p&gt;&lt;p&gt;Afhængig af dit installationsprogram kan det være nødvendigt manuelt at afmontere mediet efter installationsprogrammet har genstartet den virtuelle maskine for at undgå at installationsprogrammet starter forfra. Du kan gøre dette ved at vælge &lt;b&gt;Afmontér...&lt;/b&gt; i menuen &lt;b&gt;Enheder&lt;/b&gt;.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Tryk på knappen &lt;b&gt;Færdig&lt;/b&gt;, hvis ovenstående er korrekt. Når du trykker, vil det valgte medie midlertidigt blive monteret i den virtuelle maskine, som derefter vil starte op.&lt;/p&gt;&lt;p&gt;Bemærk at når du lukker den virtuelle maskine, vil det angivne medie automatisk blive afmonteret og opstartsenheden vil igen være den første harddisk.&lt;/p&gt;&lt;p&gt;Afhængig af dit installationsprogram kan det være nødvendigt manuelt at afmontere mediet efter installationsprogrammet har genstartet den virtuelle maskine for at undgå at installationsprogrammet starter forfra. Du kan gøre dette ved at vælge &lt;b&gt;Afmontér...&lt;/b&gt; i menuen &lt;b&gt;Enheder&lt;/b&gt;.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be mounted on the virtual machine and the machine will start execution.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Tryk &lt;b&gt;Færdig&lt;/b&gt; hvis ovenstående er korrekt. Det valgte medie vil så blive monteret på den virtuelle maskine og maskinen vil begynde afviklingen.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Tryk &lt;b&gt;Færdig&lt;/b&gt; hvis ovenstående er korrekt. Det valgte medie vil så blive monteret på den virtuelle maskine og maskinen vil begynde afviklingen.&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Oversigt</translation>
+ <translation>Oversigt</translation>
</message>
<message>
<source>CD/DVD-ROM Device</source>
- <translation type="unfinished">CD/DVD-ROM drev</translation>
+ <translation>CD/DVD-ROM drev</translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Type</translation>
+ <translation>Type</translation>
</message>
<message>
<source>Source</source>
<comment>summary</comment>
- <translation type="unfinished">Kilde</translation>
+ <translation>Kilde</translation>
</message>
</context>
<context>
@@ -969,30 +970,30 @@ p, li { white-space: pre-wrap; }
<name>UIImportApplianceWzdPage1</name>
<message>
<source>Select an appliance to import</source>
- <translation type="unfinished">Vælg det Prækonfigurerede system, der skal importeres</translation>
+ <translation>Vælg det Prækonfigurerede system, der skal importeres</translation>
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Open Virtualization Format (%1)</translation>
+ <translation>Open Virtualization Format (%1)</translation>
</message>
<message>
<source>Welcome to the Appliance Import Wizard!</source>
- <translation type="unfinished">Denne guide hjælper dig med at importere et Prækonfigureret system!</translation>
+ <translation>Denne guide hjælper dig med at importere et Prækonfigureret system!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through importing an appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;VirtualBox currently supports importing appliances saved in the Open Virtualization Format (OVF). To continue, select the file to import below:&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Denne guide hjælper dig med at importere et Prækonfigureret system.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;VirtualBox understøtter Open Virtualization Format (OVF). For at fortsætte, vælg filen herunder:&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIImportApplianceWzdPage2</name>
<message>
<source>These are the virtual machines contained in the appliance and the suggested settings of the imported VirtualBox machines. You can change many of the properties shown by double-clicking on the items and disable others using the check boxes below.</source>
- <translation type="unfinished">Disse virtuelle maskiner og deres konfiguration er en del af det Prækonfigurerede system og kan importeres til VirtualBox. Du kan ændre de fleste af de viste egenskaber ved at dobbeltklikke på værdierne og deaktivere andre ved hjælp af afkrydsningsfelterne.</translation>
+ <translation>Disse virtuelle maskiner og deres konfiguration er en del af det Prækonfigurerede system og kan importeres til VirtualBox. Du kan ændre de fleste af de viste egenskaber ved at dobbeltklikke på værdierne og deaktivere andre ved hjælp af afkrydsningsfelterne.</translation>
</message>
<message>
<source>Appliance Import Settings</source>
- <translation type="unfinished">Indstillinger for import af Prækonfigureret system</translation>
+ <translation>Indstillinger for import af Prækonfigureret system</translation>
</message>
</context>
<context>
@@ -1034,56 +1035,56 @@ p, li { white-space: pre-wrap; }
<name>UIMachineLogic</name>
<message>
<source>VirtualBox OSE</source>
- <translation type="unfinished">VirtualBox OSE</translation>
+ <translation>VirtualBox OSE</translation>
</message>
<message>
<source> EXPERIMENTAL build %1r%2 - %3</source>
- <translation type="unfinished">EKSPERIMENTEL version %1r%2 - %3</translation>
+ <translation>EKSPERIMENTEL version %1r%2 - %3</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetAdditions</name>
<message>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>Annullér</translation>
</message>
<message>
<source>Cancel the VirtualBox Guest Additions CD image download</source>
- <translation type="unfinished">Afbryd hentningen af CD&apos;en med VirtualBox Gæstetilføjelser</translation>
+ <translation>Afbryd hentningen af CD&apos;en med VirtualBox Gæstetilføjelser</translation>
</message>
<message>
<source>Downloading the VirtualBox Guest Additions CD image from &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished">Henter CD&apos;en med VirtualBox Gæstetilføjelser fra &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
+ <translation>Henter CD&apos;en med VirtualBox Gæstetilføjelser fra &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetUserManual</name>
<message>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>Annullér</translation>
</message>
<message>
<source>Cancel the VirtualBox User Manual download</source>
- <translation type="unfinished"></translation>
+ <translation>Afbryd hentningen af brugermanual til VirtualBox</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual</source>
- <translation type="unfinished"></translation>
+ <translation>Henter brugermanual til VirtualBox</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Henter brugermanual til VirtualBox &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMultiScreenLayout</name>
<message>
<source>Virtual Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>Virtuel skærm %1</translation>
</message>
<message>
<source>Use Host Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>Brug værtsskærm %1</translation>
</message>
</context>
<context>
@@ -1205,103 +1206,103 @@ p, li { white-space: pre-wrap; }
<name>UINewHDWzdPage1</name>
<message>
<source>Welcome to the Create New Virtual Disk Wizard!</source>
- <translation type="unfinished">Denne guide hjælper dig med at oprette en ny virtuel disk!</translation>
+ <translation>Denne guide hjælper dig med at oprette en ny virtuel disk!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will help you to create a new virtual hard disk for your virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Denne guide hjælper dig med at oprette en ny virtuel disk til din virtuelle maskine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage2</name>
<message>
<source>&lt;p&gt;Select the type of virtual hard disk you want to create.&lt;/p&gt;&lt;p&gt;A &lt;b&gt;dynamically expanding storage&lt;/b&gt; initially occupies a very small amount of space on your physical hard disk. It will grow dynamically (up to the size specified) as the Guest OS claims disk space.&lt;/p&gt;&lt;p&gt;A &lt;b&gt;fixed-size storage&lt;/b&gt; does not grow. It is stored in a file of approximately the same size as the size of the virtual hard disk. The creation of a fixed-size storage may take a long time depending on the storage size and the write performance of your harddisk.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vælg en allokeringsstrategi for din virtuelle harddisk.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Dynamisk udvidelse&lt;/b&gt; optager kun lidt plads i starten, men vokser dynamisk (op til den angivne størrelse i takt med at gæsteoperativsystemet allokerer plads.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Fast størrelse&lt;/b&gt; vokser aldrig. Pladsen allokeres på forhånd i en fil af samme størrelse som den virtuelle harddisk. Oprettelsen af denne type harddisk kan tage lang tid afhængig af den valgte størrelse og skrivehastigheden på din fysiske harddisk.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vælg en allokeringsstrategi for din virtuelle harddisk.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Dynamisk udvidelse&lt;/b&gt; optager kun lidt plads i starten, men vokser dynamisk op til den angivne størrelse i takt med at gæsteoperativsystemet allokerer plads.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Fast størrelse&lt;/b&gt; vokser aldrig. Pladsen allokeres på forhånd i en fil af samme størrelse som den virtuelle harddisk. Oprettelsen af denne type harddisk kan tage lang tid afhængig af den valgte størrelse og skrivehastigheden på din fysiske harddisk.&lt;/p&gt;</translation>
</message>
<message>
<source>Storage Type</source>
- <translation type="unfinished">Allokeringsstrategi</translation>
+ <translation>Allokeringsstrategi</translation>
</message>
<message>
<source>&amp;Dynamically expanding storage</source>
- <translation type="unfinished">&amp;Dynamisk udvidelse</translation>
+ <translation>&amp;Dynamisk udvidelse</translation>
</message>
<message>
<source>&amp;Fixed-size storage</source>
- <translation type="unfinished">&amp;Fast størrelse</translation>
+ <translation>&amp;Fast størrelse</translation>
</message>
<message>
<source>Hard Disk Storage Type</source>
- <translation type="unfinished">Allokeringsstrategi</translation>
+ <translation>Allokeringsstrategi</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage3</name>
<message>
<source>&lt;p&gt;Press the &lt;b&gt;Select&lt;/b&gt; button to select the location of a file to store the hard disk data or type a file name in the entry field.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Klik på &lt;b&gt;Vælg&lt;/b&gt; for at vælge placeringen af filen, som harddisken gemmes i eller indtast et filnavn i feltet.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Klik på &lt;b&gt;Vælg&lt;/b&gt; for at vælge placeringen af filen, som harddisken gemmes i eller indtast et filnavn i feltet.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Location</source>
- <translation type="unfinished">P&amp;lacering</translation>
+ <translation>P&amp;lacering</translation>
</message>
<message>
<source>&lt;p&gt;Select the size of the virtual hard disk in megabytes. This size will be reported to the Guest OS as the maximum size of this hard disk.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Angiv størrelsen af den virtuelle harddisk i megabytes. Gæsteoperativsystemet vil se denne værdi som harddiskens maksimale størrelse.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Angiv størrelsen af den virtuelle harddisk i megabytes. Gæsteoperativsystemet vil se denne værdi som harddiskens maksimale størrelse.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Size</source>
- <translation type="unfinished">&amp;Størrelse</translation>
+ <translation>&amp;Størrelse</translation>
</message>
<message>
<source>Virtual Disk Location and Size</source>
- <translation type="unfinished">Placering og størrelse af virtuel disk</translation>
+ <translation>Placering og størrelse af virtuel disk</translation>
</message>
<message>
<source>Select a file for the new hard disk image file</source>
- <translation type="unfinished">Vælg et filnavn til det nye harddisk-aftryk</translation>
+ <translation>Vælg et filnavn til det nye harddisk-aftryk</translation>
</message>
<message>
<source>Hard disk images (*.vdi)</source>
- <translation type="unfinished">Harddisk-aftryk (*.vdi)</translation>
+ <translation>Harddisk-aftryk (*.vdi)</translation>
</message>
<message>
<source>&lt;nobr&gt;%1 (%2 B)&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;nobr&gt;%1 (%2 B)&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage4</name>
<message>
<source>You are going to create a new virtual hard disk with the following parameters:</source>
- <translation type="unfinished">Du er ved at oprette en ny virtuel harddisk med følgende egenskaber:</translation>
+ <translation>Du er ved at oprette en ny virtuel harddisk med følgende egenskaber:</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Oversigt</translation>
+ <translation>Oversigt</translation>
</message>
<message>
<source>%1 B</source>
- <translation type="unfinished"></translation>
+ <translation>%1 B</translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Type</translation>
+ <translation>Type</translation>
</message>
<message>
<source>Location</source>
<comment>summary</comment>
- <translation type="unfinished">Placering</translation>
+ <translation>Placering</translation>
</message>
<message>
<source>Size</source>
<comment>summary</comment>
- <translation type="unfinished">Størrelse</translation>
+ <translation>Størrelse</translation>
</message>
<message>
<source>If the above settings are correct, press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new hard disk will be created.</source>
- <translation type="unfinished"></translation>
+ <translation>Tryk &lt;b&gt;%1&lt;/b&gt;, hvis ovenstående indstillinger er korrekte. Når du trykker vil den nye harddisk blive oprettet.</translation>
</message>
</context>
<context>
@@ -1436,125 +1437,125 @@ p, li { white-space: pre-wrap; }
<name>UINewVMWzdPage1</name>
<message>
<source>Welcome to the New Virtual Machine Wizard!</source>
- <translation type="unfinished">Denne guide hjælper dig med at oprette en ny virtuel maskine!</translation>
+ <translation>Denne guide hjælper dig med at oprette en ny virtuel maskine!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the steps that are necessary to create a new virtual machine for VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Denne guide hjælper dig igennem de trin, der kræves for at oprette en ny virtuel maskine i VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage2</name>
<message>
<source>&lt;p&gt;Enter a name for the new virtual machine and select the type of the guest operating system you plan to install onto the virtual machine.&lt;/p&gt;&lt;p&gt;The name of the virtual machine usually indicates its software and hardware configuration. It will be used by all VirtualBox components to identify your virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Indtast navnet på den nye virtuelle maskine og vælg typen af operativsystem du planlægger at installere på den.&lt;/p&gt;&lt;p&gt;Navnet på den virtuelle maskine bør indikere dens software- og hardware-konfiguration, da det vil blive brugt af alle VirtualBox&apos; komponenter til at identificere din virtuelle maskine.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Indtast navnet på den nye virtuelle maskine og vælg typen af operativsystem du planlægger at installere på den.&lt;/p&gt;&lt;p&gt;Navnet på den virtuelle maskine bør indikere dens software- og hardware-konfiguration, da det vil blive brugt af alle VirtualBox&apos; komponenter til at identificere din virtuelle maskine.&lt;/p&gt;</translation>
</message>
<message>
<source>N&amp;ame</source>
- <translation type="unfinished">N&amp;avn</translation>
+ <translation>N&amp;avn</translation>
</message>
<message>
<source>OS &amp;Type</source>
- <translation type="unfinished">OS &amp;type</translation>
+ <translation>OS &amp;type</translation>
</message>
<message>
<source>VM Name and OS Type</source>
- <translation type="unfinished">VM-navn og OS-type</translation>
+ <translation>VM-navn og OS-type</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage3</name>
<message>
<source>&lt;p&gt;Select the amount of base memory (RAM) in megabytes to be allocated to the virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vælg størrelsen af hukommelsen (RAM) i megabytes, der skal tildeles den virtuelle maskine.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vælg størrelsen af hukommelsen (RAM) i megabytes, der skal tildeles den virtuelle maskine.&lt;/p&gt;</translation>
</message>
<message>
<source>Base &amp;Memory Size</source>
- <translation type="unfinished">Størrelse på huko&amp;mmelse</translation>
+ <translation>Størrelse på huko&amp;mmelse</translation>
</message>
<message>
<source>MB</source>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
<message>
<source>Memory</source>
- <translation type="unfinished">Hukommelse</translation>
+ <translation>Hukommelse</translation>
</message>
<message>
<source>The recommended base memory size is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">Anbefalet størrelse på hukommelsen er &lt;b&gt;%1&lt;/b&gt; MB.</translation>
+ <translation>Anbefalet størrelse på hukommelsen er &lt;b&gt;%1&lt;/b&gt; MB.</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage4</name>
<message>
<source>&lt;p&gt;Select a hard disk image to be used as the boot hard disk of the virtual machine. You can either create a new hard disk using the &lt;b&gt;New&lt;/b&gt; button or select an existing hard disk image from the drop-down list or by pressing the &lt;b&gt;Existing&lt;/b&gt; button (to invoke the Virtual Media Manager dialog).&lt;/p&gt;&lt;p&gt;If you need a more complicated hard disk setup, you can also skip this step and attach hard disks later using the VM Settings dialog.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vælg det harddisk-aftryk, som den virtuelle maskine skal starte op fra. Du kan enten oprette en ny harddisk ved hjælp af knappen &lt;b&gt;Ny&lt;/b&gt; eller vælge et eksisterende harddisk-aftryk fra rullegardinmenuen eller ved at klikke på knappen &lt;b&gt;Eksisterende&lt;/b&gt; (starter Virtuel diskhåndtering).&lt;/p&gt;&lt;p&gt;Har du brug for en mere avanceret harddisk-opsætning, kan du springe dette trin over og montere dine harddiske senere i &lt;i&gt;Indstillinger for VM&lt;/i&gt;&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vælg det harddisk-aftryk, som den virtuelle maskine skal starte op fra. Du kan enten oprette en ny harddisk ved hjælp af knappen &lt;b&gt;Ny&lt;/b&gt; eller vælge et eksisterende harddisk-aftryk fra rullegardinmenuen eller ved at klikke på knappen &lt;b&gt;Eksisterende&lt;/b&gt; (starter Virtuel diskhåndtering).&lt;/p&gt;&lt;p&gt;Har du brug for en mere avanceret harddisk-opsætning, kan du springe dette trin over og montere dine harddiske senere i &lt;i&gt;Indstillinger for VM&lt;/i&gt;&lt;/p&gt;</translation>
</message>
<message>
<source>Boot Hard &amp;Disk (Primary Master)</source>
- <translation type="unfinished">Opstarts&amp;disk (Primær master)</translation>
+ <translation>Opstarts&amp;disk (Primær master)</translation>
</message>
<message>
<source>&amp;Create new hard disk</source>
- <translation type="unfinished">Opret ny harddisk</translation>
+ <translation>Opret ny harddisk</translation>
</message>
<message>
<source>&amp;Use existing hard disk</source>
- <translation type="unfinished">Br&amp;ug eksisterende harddisk</translation>
+ <translation>Br&amp;ug eksisterende harddisk</translation>
</message>
<message>
<source>Virtual Hard Disk</source>
- <translation type="unfinished">Virtuel harddisk</translation>
+ <translation>Virtuel harddisk</translation>
</message>
<message>
<source>The recommended size of the boot hard disk is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">Anbefalet størrelse på opstartsharddisken er &lt;b&gt;%1&lt;/b&gt; MB.</translation>
+ <translation>Anbefalet størrelse på opstartsharddisken er &lt;b&gt;%1&lt;/b&gt; MB.</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage5</name>
<message>
<source>&lt;p&gt;You are going to create a new virtual machine with the following parameters:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Du er ved at oprette en ny virtuel maskine med følgende egenskaber:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Du er ved at oprette en ny virtuel maskine med følgende egenskaber:&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Oversigt</translation>
+ <translation>Oversigt</translation>
</message>
<message>
<source>Name</source>
<comment>summary</comment>
- <translation type="unfinished">Navn</translation>
+ <translation>Navn</translation>
</message>
<message>
<source>OS Type</source>
<comment>summary</comment>
- <translation type="unfinished">OS type</translation>
+ <translation>OS type</translation>
</message>
<message>
<source>Base Memory</source>
<comment>summary</comment>
- <translation type="unfinished">Hukommelse</translation>
+ <translation>Hukommelse</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
<message>
<source>Boot Hard Disk</source>
<comment>summary</comment>
- <translation type="unfinished">Opstartsdisk</translation>
+ <translation>Opstartsdisk</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new virtual machine will be created. &lt;/p&gt;&lt;p&gt;Note that you can alter these and all other setting of the created virtual machine at any time using the &lt;b&gt;Settings&lt;/b&gt; dialog accessible through the menu of the main window.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Tryk &lt;b&gt;%1&lt;/b&gt;, hvis ovenstående er korrekt. Når du trykker vil en ny virtuel maskine blive oprettet. &lt;/p&gt;&lt;p&gt;Du kan altid ændre disse og alle øvrige indstillinger for den oprettede virtuelle maskine via menuen &lt;b&gt;Indstillinger&lt;/b&gt; i hovedvinduet.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -1681,12 +1682,12 @@ p, li { white-space: pre-wrap; }
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
</context>
<context>
@@ -2249,48 +2250,48 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Dock Icon</source>
- <translation type="unfinished"></translation>
+ <translation>Dok-ikon</translation>
</message>
<message>
<source>Show Application Icon</source>
- <translation type="unfinished"></translation>
+ <translation>Vis programikon</translation>
</message>
<message>
<source>Show Monitor Preview</source>
- <translation type="unfinished"></translation>
+ <translation>Vis monitor miniature</translation>
</message>
<message>
<source>&lt;br&gt;&lt;nobr&gt;&lt;b&gt;Adapter %1 (%2)&lt;/b&gt;: %3 cable %4&lt;/nobr&gt;</source>
<comment>Network adapters tooltip</comment>
- <translation type="unfinished"></translation>
+ <translation>&lt;br&gt;&lt;nobr&gt;&lt;b&gt;Netkort %1 (%2)&lt;/b&gt;: %3 kabel %4&lt;/nobr&gt;</translation>
</message>
<message>
<source>ACPI Sh&amp;utdown</source>
- <translation type="unfinished"></translation>
+ <translation>ACPI Nedl&amp;ukning</translation>
</message>
<message>
<source>&amp;View</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Vis</translation>
</message>
<message>
<source>Preview Monitor %1</source>
- <translation type="unfinished"></translation>
+ <translation>Monitor miniature %1</translation>
</message>
<message>
<source>No CD/DVD devices attached to that VM</source>
- <translation type="unfinished"></translation>
+ <translation>Ingen CD/DVD-drev tilsluttet den virtuelle maskine</translation>
</message>
<message>
<source>No floppy devices attached to that VM</source>
- <translation type="unfinished"></translation>
+ <translation>Ingen diskettedrev tilsluttet den virtuelle maskine</translation>
</message>
<message>
<source>No USB Devices Connected</source>
- <translation type="unfinished"></translation>
+ <translation>Ingen USB-enheder tilsluttet</translation>
</message>
<message>
<source>No supported devices connected to the host PC</source>
- <translation type="unfinished">Ingen understøttede enheder forbundet til værtsmaskinen</translation>
+ <translation>Ingen understøttede enheder forbundet til værtsmaskinen</translation>
</message>
</context>
<context>
@@ -2453,11 +2454,11 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Reset Host Key</source>
- <translation type="unfinished"></translation>
+ <translation>Nulstil værtstast</translation>
</message>
<message>
<source>Resets the key used as a Host Key in the VM window.</source>
- <translation type="unfinished"></translation>
+ <translation>Nulstiller valget af værtstast til standardvalget.</translation>
</message>
</context>
<context>
@@ -3893,81 +3894,82 @@ p, li { white-space: pre-wrap; }
<message>
<source>Screens</source>
<comment>details report</comment>
- <translation type="unfinished"></translation>
+ <translation>Skærme</translation>
</message>
<message>
<source>VDE network, &apos;%1&apos;</source>
<comment>details report (network)</comment>
- <translation type="unfinished"></translation>
+ <translation>VDE netværk, &apos;%1&apos;</translation>
</message>
<message>
<source>SAS</source>
<comment>StorageBus</comment>
- <translation type="unfinished"></translation>
+ <translation>SAS</translation>
</message>
<message>
<source>VDE Adapter</source>
<comment>NetworkAttachmentType</comment>
- <translation type="unfinished"></translation>
+ <translation>VDE-adapter</translation>
</message>
<message>
<source>LsiLogic SAS</source>
<comment>StorageControllerType</comment>
- <translation type="unfinished"></translation>
+ <translation>LsiLogic SAS</translation>
</message>
<message>
<source>^(?:(?:(\d+)(?:\s?(B|KB|MB|GB|TB|PB))?)|(?:(\d*)%1(\d{1,2})(?:\s?(KB|MB|GB|TB|PB))))$</source>
<comment>regexp for matching ####[.##] B|KB|MB|GB|TB|PB, %1=decimal point</comment>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>B</source>
<comment>size suffix Bytes</comment>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>KB</source>
<comment>size suffix KBytes=1024 Bytes</comment>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
<message>
<source>GB</source>
<comment>size suffix GBytes=1024 MBytes</comment>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>TB</source>
<comment>size suffix TBytes=1024 GBytes</comment>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>PB</source>
<comment>size suffix PBytes=1024 TBytes</comment>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>Enabled</source>
<comment>nested paging</comment>
- <translation type="unfinished"></translation>
+ <translation>Aktiv</translation>
</message>
<message>
<source>Disabled</source>
<comment>nested paging</comment>
- <translation type="unfinished"></translation>
+ <translation>Deaktiveret</translation>
</message>
<message>
<source>Nested Paging</source>
- <translation type="unfinished">Nested Paging</translation>
+ <translation>Nested Paging</translation>
</message>
<message>
<source>Shareable</source>
<comment>DiskType</comment>
- <translation type="unfinished"></translation>
+ <translatorcomment>I tvivl om kontekst</translatorcomment>
+ <translation>Delt</translation>
</message>
</context>
<context>
@@ -5177,51 +5179,51 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>&lt;p&gt;VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;VT-x/AMD-V hardware-acceleration er ikke tilgængelig i dit system. Din 64-bit gæst vil ikke se en 64-bit CPU og kan ikke starte op.</translation>
</message>
<message>
<source>&lt;p&gt;VT-x/AMD-V hardware acceleration is not available on your system. Certain guests (e.g. OS/2 and QNX) require this feature and will fail to boot without it.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;VT-x/AMD-V hardware-acceleration er ikke tilgængelig i dit system. Visse gæster (såsom OS/2 og QNX) kræver denne facilitet og kan derfor ikke starte uden.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Deleting the snapshot %1 will temporarily need more disk space. In the worst case the size of image %2 will grow by %3, however on this filesystem there is only %4 free.&lt;/p&gt;&lt;p&gt;Running out of disk space during the merge operation can result in corruption of the image and the VM configuration, i.e. loss of the VM and its data.&lt;/p&gt;&lt;p&gt;You may continue with deleting the snapshot at your own risk.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Sletning af øjebliksbilledet %1 vil midlertidigt kræve mere diskplads. I værste fald vil størrelsen af %2 vokse med %3, men der er kun %4 ledigt i filsystemet.&lt;/p&gt;&lt;p&gt;Løber du tør for diskplads under konsolideringen risikerer du at korrumpere øjebliksbilledet og dets VM-konfiguration, dvs du mister både VM&apos;en og dens data.&lt;/p&gt;&lt;p&gt;Du kan fortsætte med sletningen af øjebliksbilledet på eget ansvar.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Could not change the guest screen to this host screen due to insufficient guest video memory.&lt;/p&gt;&lt;p&gt;You should configure the virtual machine to have at least &lt;b&gt;%1&lt;/b&gt; of video memory.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Kunne ikke forbinde gæstens skærm til denne værtsskærm på grund af for lidt grafikhukommelse i gæsten.&lt;/p&gt;&lt;p&gt;Du bør konfigure den virtuelle maskine til at have en grafikhukommelse på mindst &lt;b&gt;%1&lt;/b&gt;.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Could not change the guest screen to this host screen due to insufficient guest video memory.&lt;/p&gt;&lt;p&gt;You should configure the virtual machine to have at least &lt;b&gt;%1&lt;/b&gt; of video memory.&lt;/p&gt;&lt;p&gt;Press &lt;b&gt;Ignore&lt;/b&gt; to switch the screen anyway or press &lt;b&gt;Cancel&lt;/b&gt; to cancel the operation.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Kunne ikke forbinde gæstens skærm til denne værtsskærm på grund af for lidt grafikhukommelse i gæsten.&lt;/p&gt;&lt;p&gt;Du bør konfigure den virtuelle maskine til at have en grafikhukommelse på mindst &lt;b&gt;%1&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;Tryk &lt;b&gt;Ignorer&lt;/b&gt; for at forsøge at skifte alligevel eller tryk &lt;b&gt;Annullér&lt;/b&gt; for at afbryde.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Can not switch the guest display to fullscreen mode. You have more virtual screens configured than physical screens are attached to your host.&lt;/p&gt;&lt;p&gt;Please either lower the virtual screens in your VM configuration or attach additional screens to your host.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Kan ikke ændre gæsteskærmen til fuldskærm, da du har konfigureret flere virtuelle skærme end der er fysiske skærme tilsluttet din vært.&lt;/p&gt;&lt;p&gt;Du kan enten formindske antallet af virtuelle skærme i din VM-konfiguration eller tilslutte yderligere skærme til din vært&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Can not switch the guest display to seamless mode. You have more virtual screens configured than physical screens are attached to your host.&lt;/p&gt;&lt;p&gt;Please either lower the virtual screens in your VM configuration or attach additional screens to your host.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Kan ikke ændre gæsteskærmen til rammefri tilstand, da du har konfigureret flere virtuelle skærme end der er fysiske skærme tilsluttet din vært.&lt;/p&gt;&lt;p&gt;Du kan enten formindske antallet af virtuelle skærme i din VM-konfiguration eller tilslutte yderligere skærme til din vært&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Could not find the VirtualBox User Manual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;Do you wish to download this file from the Internet?&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Kunne ikke finde VirtualBox&apos; brugermanual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;Ønsker du at hente denne fil fra internettet?&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Are you sure you want to download the VirtualBox User Manual from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; (size %3 bytes)?&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Er du sikker på at du vil hente VirtualBox&apos; brugermanual fra &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; (størrelse %3 bytes)?&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Failed to download the VirtualBox User Manual from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;%3&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Kunne ikke hente VirtualBox&apos; brugermanual fra &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;%3&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;The VirtualBox User Manual has been successfully downloaded from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; and saved locally as &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;VirtualBox&apos; brugermanual blev hentet fra &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; og gemt lokalt som &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;The VirtualBox User Manual has been successfully downloaded from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; but can&apos;t be saved locally as &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;Please choose another location for that file.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;VirtualBox&apos; brugermanual blev hentet fra &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; men kunne ikke gemmes lokalt som &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;Vælg venligtst en anden placering til filen.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -6396,15 +6398,15 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Mo&amp;nitor Count:</source>
- <translation type="unfinished"></translation>
+ <translation>Mo&amp;nitor antal:</translation>
</message>
<message>
<source>Controls the amount of virtual monitors provided to the virtual machine.</source>
- <translation type="unfinished"></translation>
+ <translation>Styrer antallet af virtuelle monitorer tildelt den virtuelle maskine.</translation>
</message>
<message>
<source>&lt;qt&gt;%1&lt;/qt&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;qt&gt;%1&lt;/qt&gt;</translation>
</message>
</context>
<context>
@@ -6483,7 +6485,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>you have enabled a USB HID (Human Interface Device). This will not work unless USB emulation is also enabled. This will be done automatically when you accept the VM Settings by pressing the OK button.</source>
- <translation type="unfinished"></translation>
+ <translation>du har tilsluttet en USB HID (Human Interface Device). Den vil ikke virke medmindre USB emulering er aktiveret. Dette vil ske automatisk når du accepterer VM-indstillingerne ved at trykke OK.</translation>
</message>
</context>
<context>
@@ -6885,27 +6887,27 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Allows to use host I/O caching capabilities.</source>
- <translation type="unfinished"></translation>
+ <translation>Tillader værten at bruge sit I/O mellemlager.</translation>
</message>
<message>
<source>Use host I/O cache</source>
- <translation type="unfinished"></translation>
+ <translation>Brug I/O mellemlager</translation>
</message>
<message>
<source>Add SAS Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Tilføj SAS styreenhed</translation>
</message>
<message>
<source>SAS Controller</source>
- <translation type="unfinished"></translation>
+ <translation>SAS styreenhed</translation>
</message>
<message>
<source>Storage Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Lagringsstyreenhed</translation>
</message>
<message>
<source>Storage Controller 1</source>
- <translation type="unfinished"></translation>
+ <translation>Lagringsstyreenhed 1</translation>
</message>
</context>
<context>
@@ -7454,23 +7456,23 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>If checked, the RTC device will report the time in UTC, otherwise in local (host) time. Unix usually expects the hardware clock to be set to UTC.</source>
- <translation type="unfinished"></translation>
+ <translation>Hvis markeret, vil uret bruge UTC som tidszone - hvis ikke bruges lokal (vært) tid. Unix forventer normalt at hardware-uret er sat til UTC.</translation>
</message>
<message>
<source>Hardware clock in &amp;UTC time</source>
- <translation type="unfinished"></translation>
+ <translation>Hardware-ur i &amp;UTC time</translation>
</message>
<message>
<source>Controls the number of virtual CPUs in the virtual machine. You need hardware virtualization support on your host system to use more than one virtual CPU.</source>
- <translation type="unfinished"></translation>
+ <translation>Styrer antallet af virtuelle CPU&apos;er i den virtuelle maskine.Der kræves understøttelse af hardware-virtualisering på værtssystemet for at kunne bruge mere end én virtuel CPU.</translation>
</message>
<message>
<source>If checked, an absolute pointing device (a USB tablet) will be supported. Otherwise, only a standard PS/2 mouse will be emulated.</source>
- <translation type="unfinished"></translation>
+ <translation>Hvis markeret, understøttes en &quot;absolut&quot; pegeenhed (såsom en USB tablet). Hvis ikke vil kun en standard PS/2 mus blive emuleret.</translation>
</message>
<message>
<source>Enable &amp;absolute pointing device</source>
- <translation type="unfinished"></translation>
+ <translation>Aktiver &amp;absolut pegeenhed</translation>
</message>
</context>
<context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_fr.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_fr.ts
index db0f62cca..3ae5a0d74 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_fr.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_fr.ts
@@ -26,7 +26,7 @@
<message>
<source>Oracle Corporation</source>
<comment>Comma-separated list of translators</comment>
- <translation>Martin d'Allens, Jean-Jacques Sarton, Oracle Corporation</translation>
+ <translation>Martin d&apos;Allens, Jean-Jacques Sarton, Oracle Corporation</translation>
</message>
</context>
<context>
@@ -1336,7 +1336,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
</message>
<message>
<source>Switch to seamless desktop integration mode</source>
- <translation>Utiliser le bureau intégré</translation>
+ <translation>Utiliser le bureau intégré</translation>
</message>
<message>
<source>Indicates whether the keyboard is captured by the guest OS (&lt;img src=:/hostkey_captured_16px.png/&gt;) or not (&lt;img src=:/hostkey_16px.png/&gt;).</source>
@@ -1407,7 +1407,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
</message>
<message>
<source>Shows the currently assigned Host key.&lt;br&gt;This key, when pressed alone, toggles the keyboard and mouse capture state. It can also be used in combination with other keys to quickly perform actions from the main menu.</source>
- <translation>Affiche la touche hôte qui est configurée. &lt;br&gt;Appuyer sur cette touche inverse la capture du clavier et de la souris. En combinaison avec d&apos;autres touches elle peu aussi servir de raccourci pour les actions du menu principal.</translation>
+ <translation>Affiche la touche hôte qui est configurée. &lt;br&gt;Appuyer sur cette touche inverse la capture du clavier et de la souris. En combinaison avec d&apos;autres touches elle peut aussi servir de raccourci pour les actions du menu principal.</translation>
</message>
<message>
<source>Indicates the status of the hardware virtualization features used by this virtual machine:&lt;br&gt;&lt;nobr&gt;&lt;b&gt;%1:&lt;/b&gt;&amp;nbsp;%2&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;b&gt;%3:&lt;/b&gt;&amp;nbsp;%4&lt;/nobr&gt;</source>
@@ -1958,7 +1958,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
</message>
<message>
<source>Use manual configuration for this host-only network adapter.</source>
- <translation>Utiliser la configuration manuelle pour cette interface du réseau privé hôte.</translation>
+ <translation>Utiliser la configuration manuelle pour cette interface de réseau privé hôte.</translation>
</message>
<message>
<source>&amp;IPv4 Address:</source>
@@ -2090,17 +2090,17 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<source>Name</source>
<comment>details report</comment>
<translatorcomment>In French we need spaces at the end of many of these entries of &quot;details report&quot; because they are followed by a colon.</translatorcomment>
- <translation>Nom</translation>
+ <translation>Nom </translation>
</message>
<message>
<source>OS Type</source>
<comment>details report</comment>
- <translation>Type d&apos;OS</translation>
+ <translation>Type d&apos;OS </translation>
</message>
<message>
<source>Base Memory</source>
<comment>details report</comment>
- <translation>Mémoire vive</translation>
+ <translation>Mémoire vive </translation>
</message>
<message>
<source>General</source>
@@ -2110,17 +2110,17 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Video Memory</source>
<comment>details report</comment>
- <translation>Mémoire vidéo</translation>
+ <translation>Mémoire vidéo </translation>
</message>
<message>
<source>Boot Order</source>
<comment>details report</comment>
- <translation>Ordre d&apos;amorçage</translation>
+ <translation>Ordre d&apos;amorçage </translation>
</message>
<message>
<source>ACPI</source>
<comment>details report</comment>
- <translation>ACPI</translation>
+ <translation>ACPI </translation>
</message>
<message>
<source>IO APIC</source>
@@ -2160,7 +2160,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Adapter %1</source>
<comment>details report (network)</comment>
- <translation>Carte %1</translation>
+ <translation>Carte %1 </translation>
</message>
<message>
<source>Disabled</source>
@@ -2175,7 +2175,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Device Filters</source>
<comment>details report (USB)</comment>
- <translation>Filtres</translation>
+ <translation>Filtres </translation>
</message>
<message>
<source>%1 (%2 active)</source>
@@ -2416,7 +2416,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Port %1</source>
<comment>details report (serial ports)</comment>
- <translation>Port série %1</translation>
+ <translation>Port série %1 </translation>
</message>
<message>
<source>Disabled</source>
@@ -2446,7 +2446,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Shared Folders</source>
<comment>details report</comment>
- <translation>Dossiers partagés</translation>
+ <translation>Dossiers partagés </translation>
</message>
<message>
<source>Disconnected</source>
@@ -2471,12 +2471,12 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>VT-x/AMD-V</source>
<comment>details report</comment>
- <translation>VT-x/AMD-V</translation>
+ <translation>VT-x/AMD-V </translation>
</message>
<message>
<source>PAE/NX</source>
<comment>details report</comment>
- <translation>PAE/NX</translation>
+ <translation>PAE/NX </translation>
</message>
<message>
<source>Enabled</source>
@@ -2501,17 +2501,17 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Host Driver</source>
<comment>details report (audio)</comment>
- <translation>Pilote hôte</translation>
+ <translation>Pilote hôte </translation>
</message>
<message>
<source>Controller</source>
<comment>details report (audio)</comment>
- <translation>Contrôleur</translation>
+ <translation>Contrôleur </translation>
</message>
<message>
<source>Port %1</source>
<comment>details report (parallel ports)</comment>
- <translation>Port %1</translation>
+ <translation>Port %1 </translation>
</message>
<message>
<source>Disabled</source>
@@ -2521,7 +2521,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Parallel Ports</source>
<comment>details report</comment>
- <translation>Ports parallèles</translation>
+ <translation>Ports parallèles </translation>
</message>
<message>
<source>USB</source>
@@ -2531,7 +2531,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Shared Folder</source>
<comment>DeviceType</comment>
- <translation>Dossier partagé</translation>
+ <translation>Dossier partagé </translation>
</message>
<message>
<source>IDE</source>
@@ -2666,7 +2666,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>3D Acceleration</source>
<comment>details report</comment>
- <translation>Accélération 3D</translation>
+ <translation>Accélération 3D </translation>
</message>
<message>
<source>Enabled</source>
@@ -2691,7 +2691,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Nested Paging</source>
<comment>details report</comment>
- <translation>Pagination imbriquée</translation>
+ <translation>Pagination imbriquée </translation>
</message>
<message>
<source>Enabled</source>
@@ -2706,7 +2706,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Internal network, &apos;%1&apos;</source>
<comment>details report (network)</comment>
- <translation>Réseau interne, &apos;%1&apos;</translation>
+ <translation>Réseau interne, &apos;%1&apos; </translation>
</message>
<message>
<source>SCSI</source>
@@ -2751,12 +2751,12 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Bridged adapter, %1</source>
<comment>details report (network)</comment>
- <translation>Pont avec l&apos;interface %1</translation>
+ <translation>Pont avec l&apos;interface %1 </translation>
</message>
<message>
<source>Host-only adapter, &apos;%1&apos;</source>
<comment>details report (network)</comment>
- <translation>Réseau privé hôte, &apos;%1&apos;</translation>
+ <translation>Réseau privé hôte, &apos;%1&apos; </translation>
</message>
<message>
<source>Bridged Adapter</source>
@@ -2771,34 +2771,34 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>&lt;nobr&gt;%1 MB&lt;/nobr&gt;</source>
<comment>details report</comment>
- <translation>&lt;nobr&gt;%1 Mo&lt;/nobr&gt;</translation>
+ <translation>&lt;nobr&gt;%1 Mo&lt;/nobr&gt; </translation>
</message>
<message>
<source>Processor(s)</source>
<comment>details report</comment>
- <translation>Nombre de processeurs</translation>
+ <translation>Nombre de processeurs </translation>
</message>
<message>
<source>&lt;nobr&gt;%1&lt;/nobr&gt;</source>
<comment>details report</comment>
- <translation>&lt;nobr&gt;%1&lt;/nobr&gt;</translation>
+ <translation>&lt;nobr&gt;%1&lt;/nobr&gt; </translation>
</message>
<message>
<source>System</source>
<comment>details report</comment>
- <translation>Système</translation>
+ <translation>Système </translation>
</message>
<message>
<source>Remote Display Server Port</source>
<comment>details report (VRDP Server)</comment>
<translatorcomment>Again, Remote Desktop</translatorcomment>
- <translation>Port du bureau à distance</translation>
+ <translation>Port du bureau à distance </translation>
</message>
<message>
<source>Remote Display Server</source>
<comment>details report (VRDP Server)</comment>
<translatorcomment>Again, Remote Desktop</translatorcomment>
- <translation>Serveur du bureau à distance (RDP)</translation>
+ <translation>Serveur du bureau à distance (RDP) </translation>
</message>
<message>
<source>Disabled</source>
@@ -2828,7 +2828,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>2D Video Acceleration</source>
<comment>details report</comment>
- <translation>Accélération 2D</translation>
+ <translation>Accélération 2D </translation>
</message>
<message>
<source>Not Attached</source>
@@ -2863,17 +2863,17 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Device %1</source>
<comment>StorageBusDevice</comment>
- <translation>Périphérique %1</translation>
+ <translation>Périphérique %1 </translation>
</message>
<message>
<source>IDE Primary Master</source>
<comment>New Storage UI : Slot Name</comment>
- <translation>Maître primaire IDE</translation>
+ <translation>Maître primaire IDE </translation>
</message>
<message>
<source>IDE Primary Slave</source>
<comment>New Storage UI : Slot Name</comment>
- <translation>Esclave primaire IDE</translation>
+ <translation>Esclave primaire IDE </translation>
</message>
<message>
<source>IDE Secondary Master</source>
@@ -2883,22 +2883,22 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>IDE Secondary Slave</source>
<comment>New Storage UI : Slot Name</comment>
- <translation>Esclave secondaire IDE</translation>
+ <translation>Esclave secondaire IDE </translation>
</message>
<message>
<source>SATA Port %1</source>
<comment>New Storage UI : Slot Name</comment>
- <translation>Port SATA %1</translation>
+ <translation>Port SATA %1 </translation>
</message>
<message>
<source>SCSI Port %1</source>
<comment>New Storage UI : Slot Name</comment>
- <translation>Port SCSI %1</translation>
+ <translation>Port SCSI %1 </translation>
</message>
<message>
<source>Floppy Device %1</source>
<comment>New Storage UI : Slot Name</comment>
- <translation>Lecteur disquette %1</translation>
+ <translation>Lecteur disquette %1 </translation>
</message>
<message>
<source>I82078</source>
@@ -2913,12 +2913,12 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Host Drive &apos;%1&apos;</source>
<comment>medium</comment>
- <translation>Lecteur de l&apos;hôte « %1 »</translation>
+ <translation>Lecteur de l&apos;hôte « %1 » </translation>
</message>
<message>
<source>Host Drive %1 (%2)</source>
<comment>medium</comment>
- <translation>Lecteur de l&apos;hôte %1 (%2)</translation>
+ <translation>Lecteur de l&apos;hôte %1 (%2) </translation>
</message>
<message>
<source>Teleported</source>
@@ -3053,12 +3053,12 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>Screens</source>
<comment>details report</comment>
- <translation>Écrans</translation>
+ <translation>Écrans </translation>
</message>
<message>
<source>VDE network, &apos;%1&apos;</source>
<comment>details report (network)</comment>
- <translation>Réseau VDE, &apos;%1&apos;</translation>
+ <translation>Réseau VDE, &apos;%1&apos; </translation>
</message>
<message>
<source>SAS</source>
@@ -3078,7 +3078,7 @@ And the size is not necessarily &quot;in megabytes&quot;, the slider chooses the
<message>
<source>^(?:(?:(\d+)(?:\s?(B|KB|MB|GB|TB|PB))?)|(?:(\d*)%1(\d{1,2})(?:\s?(KB|MB|GB|TB|PB))))$</source>
<comment>regexp for matching ####[.##] B|KB|MB|GB|TB|PB, %1=decimal point</comment>
- <translation>^(?:(?:(\d+)(?:\s?(o|Ko|Mo|Go|To|Po))?)|(?:(\d*)%1(\d{1,2})(?:\s?(Ko|Mo|Go|To|Po))))$</translation>
+ <translation>^(?:(?:(\d+)(?:\s?(octets|Kio|Mio|Gio|Tio|Pio))?)|(?:(\d*)%1(\d{1,2})(?:\s?(Kio|Mio|Gio|Tio|Pio))))$</translation>
</message>
<message>
<source>B</source>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_hu.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_hu.ts
index 947c26789..86bfba8c5 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_hu.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_hu.ts
@@ -6747,7 +6747,7 @@ to the system default language.&lt;/qt&gt;
<name>VBoxRegistrationDlg</name>
<message>
<source>VirtualBox Registration Dialog</source>
- <translation>VirtualBox regisztrálása</translation>
+ <translation type="obsolete">VirtualBox regisztrálása</translation>
</message>
<message>
<source>&lt;p&gt;Please fill out this registration form to let us know that you use VirtualBox and, optionally, to keep you informed about VirtualBox news and updates.&lt;/p&gt;&lt;p&gt;Enter your full name using Latin characters and your e-mail address to the fields below. Please note that innotek will use this information only to gather product usage statistics and to send you VirtualBox newsletters. In particular, innotek will never pass your data to third parties. Detailed information about how we use your personal data can be found in the &lt;b&gt;Privacy Policy&lt;/b&gt; section of the VirtualBox Manual or on the &lt;a href=http://www.virtualbox.org/wiki/PrivacyPolicy&gt;Privacy Policy&lt;/a&gt; page of the VirtualBox web-site.&lt;/p&gt;</source>
@@ -6759,7 +6759,7 @@ to the system default language.&lt;/qt&gt;
</message>
<message>
<source>Enter your full name using Latin characters.</source>
- <translation>Ãrd be a teljes neved speciális karakterek nélkül.</translation>
+ <translation type="obsolete">Ãrd be a teljes neved speciális karakterek nélkül.</translation>
</message>
<message>
<source>&amp;E-mail</source>
@@ -6767,7 +6767,7 @@ to the system default language.&lt;/qt&gt;
</message>
<message>
<source>Enter your e-mail address. Please use a valid address here.</source>
- <translation>Ãrd be a használt e-mail címedet.</translation>
+ <translation type="obsolete">Ãrd be a használt e-mail címedet.</translation>
</message>
<message>
<source>&amp;Please do not use this information to contact me</source>
@@ -6779,7 +6779,7 @@ to the system default language.&lt;/qt&gt;
</message>
<message>
<source>Welcome to the VirtualBox Registration Form!</source>
- <translation>A VirtualBox regisztrációs űrlap üdvözöl!</translation>
+ <translation type="obsolete">A VirtualBox regisztrációs űrlap üdvözöl!</translation>
</message>
<message>
<source>&amp;Confirm</source>
@@ -6795,7 +6795,7 @@ to the system default language.&lt;/qt&gt;
</message>
<message>
<source>Could not perform connection handshake.</source>
- <translation>A kapcsolódási próbálkozás sikertelen volt.</translation>
+ <translation type="obsolete">A kapcsolódási próbálkozás sikertelen volt.</translation>
</message>
<message>
<source>&lt;p&gt;Please fill out this registration form to let us know that you use VirtualBox and, optionally, to keep you informed about VirtualBox news and updates.&lt;/p&gt;&lt;p&gt;Enter your full name using Latin characters and your e-mail address to the fields below. Sun Microsystems will use this information only to gather product usage statistics and to send you VirtualBox newsletters. In particular, Sun Microsystems will never pass your data to third parties. Detailed information about how we use your personal data can be found in the &lt;b&gt;Privacy Policy&lt;/b&gt; section of the VirtualBox Manual or on the &lt;a href=http://www.virtualbox.org/wiki/PrivacyPolicy&gt;Privacy Policy&lt;/a&gt; page of the VirtualBox web-site.&lt;/p&gt;</source>
@@ -6811,63 +6811,63 @@ to the system default language.&lt;/qt&gt;
</message>
<message>
<source>Cancel</source>
- <translation>Mégsem</translation>
+ <translation type="obsolete">Mégsem</translation>
</message>
<message>
<source>Select Country/Territory</source>
- <translation>Válassz országot/területet</translation>
+ <translation type="obsolete">Válassz országot/területet</translation>
</message>
<message>
<source>&lt;p&gt;Please fill out this registration form to let us know that you use VirtualBox and, optionally, to keep you informed about VirtualBox news and updates.&lt;/p&gt;&lt;p&gt;Please use Latin characters only to fill in the fields below. Sun Microsystems will use this information only to gather product usage statistics and to send you VirtualBox newsletters. In particular, Sun Microsystems will never pass your data to third parties. Detailed information about how we use your personal data can be found in the &lt;b&gt;Privacy Policy&lt;/b&gt; section of the VirtualBox Manual or on the &lt;a href=http://www.virtualbox.org/wiki/PrivacyPolicy&gt;Privacy Policy&lt;/a&gt; page of the VirtualBox web-site.&lt;/p&gt;</source>
- <translation>&lt;p&gt;Kérlek, töltsd ki ezt a regisztrációs űrlapot, hogy tudjuk azt, hogy a felhasználóink táborába tartozol, valamint, hogy informálhassunk téged a különböző hírekről, újdonságokról.&lt;/p&gt;&lt;p&gt;Add meg speciális karakterek nélkül a neved, illetve az e-mail címedet. A Sun Microsystems az adataidat kizárólag statisztikai célokra, és a te informálásodra használja, harmadik fél számára ki nem adja. A személyes adatok felhasználásának és kezelésének részleteiről a kézikönyv &lt;b&gt;Adatvédemi nyilatkozat&lt;/b&gt; részéből vagy a VirtualBox weboldalának &lt;a href=http://www.virtualbox.org/wiki/PrivacyPolicy&gt;Adatvédemi nyilatkozat&lt;/a&gt; oldalán tájékozódhatsz.&lt;/p&gt;</translation>
+ <translation type="obsolete">&lt;p&gt;Kérlek, töltsd ki ezt a regisztrációs űrlapot, hogy tudjuk azt, hogy a felhasználóink táborába tartozol, valamint, hogy informálhassunk téged a különböző hírekről, újdonságokról.&lt;/p&gt;&lt;p&gt;Add meg speciális karakterek nélkül a neved, illetve az e-mail címedet. A Sun Microsystems az adataidat kizárólag statisztikai célokra, és a te informálásodra használja, harmadik fél számára ki nem adja. A személyes adatok felhasználásának és kezelésének részleteiről a kézikönyv &lt;b&gt;Adatvédemi nyilatkozat&lt;/b&gt; részéből vagy a VirtualBox weboldalának &lt;a href=http://www.virtualbox.org/wiki/PrivacyPolicy&gt;Adatvédemi nyilatkozat&lt;/a&gt; oldalán tájékozódhatsz.&lt;/p&gt;</translation>
</message>
<message>
<source>I &amp;already have a Sun Online account:</source>
- <translation>A meglevő Sun Online fiókomat &amp;használom:</translation>
+ <translation type="obsolete">A meglevő Sun Online fiókomat &amp;használom:</translation>
</message>
<message>
<source>&amp;E-mail:</source>
- <translation>&amp;E-mail:</translation>
+ <translation type="obsolete">&amp;E-mail:</translation>
</message>
<message>
<source>&amp;Password:</source>
- <translation>&amp;Jelszó:</translation>
+ <translation type="obsolete">&amp;Jelszó:</translation>
</message>
<message>
<source>I &amp;would like to create a new Sun Online account:</source>
- <translation>Szeretnék egy új Sun &amp;Online fiókot regisztrálni:</translation>
+ <translation type="obsolete">Szeretnék egy új Sun &amp;Online fiókot regisztrálni:</translation>
</message>
<message>
<source>&amp;First Name:</source>
- <translation>&amp;Keresztnév:</translation>
+ <translation type="obsolete">&amp;Keresztnév:</translation>
</message>
<message>
<source>&amp;Last Name:</source>
- <translation>&amp;Vezetéknév:</translation>
+ <translation type="obsolete">&amp;Vezetéknév:</translation>
</message>
<message>
<source>&amp;Company:</source>
- <translation>&amp;Cég:</translation>
+ <translation type="obsolete">&amp;Cég:</translation>
</message>
<message>
<source>Co&amp;untry:</source>
- <translation>Orszá&amp;g:</translation>
+ <translation type="obsolete">Orszá&amp;g:</translation>
</message>
<message>
<source>E-&amp;mail:</source>
- <translation>E-&amp;mail:</translation>
+ <translation type="obsolete">E-&amp;mail:</translation>
</message>
<message>
<source>P&amp;assword:</source>
- <translation>J&amp;elszó:</translation>
+ <translation type="obsolete">J&amp;elszó:</translation>
</message>
<message>
<source>Co&amp;nfirm Password:</source>
- <translation>Jelszó &amp;megerősítése:</translation>
+ <translation type="obsolete">Jelszó &amp;megerősítése:</translation>
</message>
<message>
<source>&amp;Register</source>
- <translation>&amp;Regisztráció</translation>
+ <translation type="obsolete">&amp;Regisztráció</translation>
</message>
</context>
<context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ro.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ro.ts
index c8c6bdae6..0b581fe73 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ro.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ro.ts
@@ -117,11 +117,11 @@
</message>
<message>
<source>The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing&lt;br/&gt;&lt;br/&gt; &lt;font color=blue&gt;&apos;/etc/init.d/vboxdrv setup&apos;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.</source>
- <translation type="unfinished"></translation>
+ <translation>Fie Driverul de nucleu Linux al VirtualBox (vboxdrv) nu este încărcat fie există o problemă cu permisiunile pe /dev/vboxdrv. Vă rugăm reinstalați modulul kernel executând &lt;br/&gt;&lt;br/&gt; &lt;font color=blue&gt;&apos;/etc/init.d/vboxdrv setup&apos;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt; ca root. Utilizatorii de Ubuntu, Fedora sau Mandriva ar trebui să instaleze pachetul DKMS mai întâi. Acest pachet urmărește schimbările nucleului și recompilează modulul vboxdv atunci când este cazul.</translation>
</message>
<message>
<source>Make sure the kernel module has been loaded successfully.</source>
- <translation type="unfinished"></translation>
+ <translation>Verifică dacă modulul de nucleu a fost încărcat cu succes.</translation>
</message>
<message>
<source>VirtualBox - Runtime Error</source>
@@ -129,15 +129,15 @@
</message>
<message>
<source>&lt;b&gt;Cannot access the kernel driver!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;b&gt;Nu se poate accesa driverul de nucleu!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;</translation>
</message>
<message>
<source>Unknown error %2 during initialization of the Runtime</source>
- <translation type="unfinished"></translation>
+ <translation>Eroare necunoscută %2 în timpul inițializării aplicației</translation>
</message>
<message>
<source>Kernel driver not accessible</source>
- <translation type="unfinished"></translation>
+ <translation>Driver nucleu inaccesibil</translation>
</message>
<message>
<source>The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Please try completely uninstalling and reinstalling VirtualBox.</source>
@@ -375,7 +375,7 @@
<name>QILabel</name>
<message>
<source>&amp;Copy</source>
- <translation type="unfinished">&amp;Copiază</translation>
+ <translation>&amp;Copiază</translation>
</message>
</context>
<context>
@@ -448,7 +448,7 @@
<name>QIWizardPage</name>
<message>
<source>Use the &lt;b&gt;%1&lt;/b&gt; button to go to the next page of the wizard and the &lt;b&gt;%2&lt;/b&gt; button to return to the previous page. You can also press &lt;b&gt;%3&lt;/b&gt; if you want to cancel the execution of this wizard.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Folosiți butonul &lt;b&gt;%1&lt;/b&gt; pentru a merge la pagina următoare a asistentului și butonul &lt;b&gt;%2&lt;/b&gt; pentru a reveni la pagina precedentă. Puteți de asemenea apăsa &lt;b&gt;%3&lt;/b&gt; dacă doriți să anulați execuția acestui asistent.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -506,7 +506,7 @@
</message>
<message>
<source>The download process has been canceled by the user.</source>
- <translation type="unfinished"></translation>
+ <translation>Procesul de descărcare a fost anulat de către utilizator.</translation>
</message>
</context>
<context>
@@ -536,7 +536,7 @@
<name>UIDownloaderUserManual</name>
<message>
<source>Select folder to save User Manual to</source>
- <translation type="unfinished"></translation>
+ <translation>Selectați dosarul în care să se salveze Manualul utilizator</translation>
</message>
</context>
<context>
@@ -646,18 +646,18 @@
<name>UIExportApplianceWzdPage1</name>
<message>
<source>Welcome to the Appliance Export Wizard!</source>
- <translation type="unfinished">Bun venit la asistentul export Mașină virtuală!</translation>
+ <translation type="unfinished">Bun venit la Asistentul export mașină virtuală!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the process of exporting an appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Please select the virtual machines that should be added to the appliance. You can select more than one. Please note that these machines have to be turned off before they can be exported.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">&lt;p&gt;Acest asistent va va ghida prin procesul de exportare a unei mașini virtuale.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Vă rugăm selectați mașinile virtuale pentru a fi adăugată la instalație. Puteți selecta mai mult de una. Notați faptul că aceste mașini trebuie oprite înainte de a fi exportate.&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage2</name>
<message>
<source>Here you can change additional configuration values of the selected virtual machines. You can modify most of the properties shown by double-clicking on the items.</source>
- <translation type="unfinished">Aici puteți modifica setări adiționale pentru mașinile virtuale selectate. Puteți modifica majoritatea proprietăților afișate, făcând dublu click pe ele.</translation>
+ <translation>Aici puteți modifica setări adiționale pentru mașinile virtuale selectate. Puteți modifica majoritatea proprietăților afișate, făcând dublu click pe ele.</translation>
</message>
<message>
<source>Appliance Export Settings</source>
@@ -668,19 +668,19 @@
<name>UIExportApplianceWzdPage3</name>
<message>
<source>Please specify the target for the OVF export. You can choose between a local file system export, uploading the OVF to the Sun Cloud service or an S3 storage server.</source>
- <translation type="unfinished"></translation>
+ <translation>Vă rugăm specificați ținta exportului OVF. Puteți alege între un export pe sistemul de fișiere local, încărcare OVF către serviciul Sun Cloud sau către serverul de stocare S3.</translation>
</message>
<message>
<source>&amp;Local Filesystem </source>
- <translation type="unfinished">Sistem de fișiere &amp;local</translation>
+ <translation>Sistem de fișiere &amp;local</translation>
</message>
<message>
<source>Sun &amp;Cloud</source>
- <translation type="unfinished">Sun &amp;Cloud</translation>
+ <translation>Sun &amp;Cloud</translation>
</message>
<message>
<source>&amp;Simple Storage System (S3)</source>
- <translation type="unfinished">&amp;Simple Storage System (S3)</translation>
+ <translation>&amp;Simple Storage System (S3)</translation>
</message>
<message>
<source>Appliance Export Settings</source>
@@ -691,15 +691,15 @@
<name>UIExportApplianceWzdPage4</name>
<message>
<source>&amp;Username:</source>
- <translation type="unfinished">Nume &amp;utilizator:</translation>
+ <translation>Nume &amp;utilizator:</translation>
</message>
<message>
<source>&amp;Password:</source>
- <translation type="unfinished">&amp;Parolă:</translation>
+ <translation>&amp;Parolă:</translation>
</message>
<message>
<source>&amp;Hostname:</source>
- <translation type="unfinished">&amp;Nume de gazdă:</translation>
+ <translation>&amp;Nume de gazdă:</translation>
</message>
<message>
<source>&amp;Bucket:</source>
@@ -707,15 +707,15 @@
</message>
<message>
<source>&amp;File:</source>
- <translation type="unfinished">&amp;Fișier:</translation>
+ <translation>&amp;Fișier:</translation>
</message>
<message>
<source>Write in legacy OVF 0.9 format for compatibility with other virtualization products.</source>
- <translation type="unfinished">Scrie în formatul vechi OVF 0.9 pentru a păstra compatibilitatea cu alte produse de virtualizare.</translation>
+ <translation>Scrie în formatul vechi OVF 0.9 pentru a păstra compatibilitatea cu alte produse de virtualizare.</translation>
</message>
<message>
<source>&amp;Write legacy OVF 0.9</source>
- <translation type="unfinished">&amp;Scrie OVF 0.9 (format vechi)</translation>
+ <translation>&amp;Scrie OVF 0.9 (format vechi)</translation>
</message>
<message>
<source>Appliance Export Settings</source>
@@ -727,19 +727,19 @@
</message>
<message>
<source>Select a file to export into</source>
- <translation type="unfinished">Selectați un fișier în care să export</translation>
+ <translation>Selectați un fișier în care să se exporte</translation>
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Open Virtualization Format (%1)</translation>
+ <translation>Format Open Virtualization (%1)</translation>
</message>
<message>
<source>Please choose a filename to export the OVF to.</source>
- <translation type="unfinished">Vă rugăm selectați un nume de fișier pentru a salva fișierul OVF.</translation>
+ <translation>Vă rugăm selectați un nume de fișier pentru a salva fișierul OVF.</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password and the bucket, and provide a filename for the OVF target.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Vă rugăm completați câmpurile adiționale precum numele de utilizator, parola și bucket, și oferiți un nume de fișier pentru ținta OVF</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password, hostname and the bucket, and provide a filename for the OVF target.</source>
@@ -747,11 +747,11 @@
</message>
<message>
<source>Checking files ...</source>
- <translation type="unfinished">Verificare fișiere ...</translation>
+ <translation>Se verifică fișierele ...</translation>
</message>
<message>
<source>Removing files ...</source>
- <translation type="unfinished">Ștergere fișiere ...</translation>
+ <translation>Se șterg fișierele ...</translation>
</message>
<message>
<source>Exporting Appliance ...</source>
@@ -915,71 +915,71 @@
<name>UIFirstRunWzdPage1</name>
<message>
<source>Welcome to the First Run Wizard!</source>
- <translation type="unfinished">Bine ați venit la asistentul Prima rulare!</translation>
+ <translation>Bun venit la asistentul Prima rulare!</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for installing an operating system of your choice onto this virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ați pornit pentru prima oară o mașină virtuală proaspăt creată. Acest asistent vă va ajuta să parcurgeți pașii necesari pentru instalarea unui sistem de operare la alegerea dvs pe această mașină virtuală.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for booting an operating system of your choice on the virtual machine.&lt;/p&gt;&lt;p&gt;Note that you will not be able to install an operating system into this virtual machine right now because you did not attach any hard disk to it. If this is not what you want, you can cancel the execution of this wizard, select &lt;b&gt;Settings&lt;/b&gt; from the &lt;b&gt;Machine&lt;/b&gt; menu of the main VirtualBox window to access the settings dialog of this machine and change the hard disk configuration.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ați pornit pentru prima oară o mașină virtuală proaspăt creată. Acest asistent vă va ajuta să parcurgeți pașii necesari pentru bootarea unui sistem de operare la alegerea dvs pe această mașină virtuală.&lt;/p&gt;&lt;p&gt;Notați faptul că nu veți putea instala acum un sistem de operare pe această mașină virtuală deoarece nu ați atașat niciun disc dur la ea. Dacă acest lucru nu este ceea ce doriți, puteți anula execuția acestui asistent, apoi selecta &lt;b&gt;Setări&lt;/b&gt; din meniul &lt;b&gt;Mașină&lt;/b&gt; al ferestrei principale VirtualBox pentru a accesa dialogul de setări și a schimba configurarea discurilor dure.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIFirstRunWzdPage2</name>
<message>
<source>&lt;p&gt;Select the media which contains the setup program of the operating system you want to install. This media must be bootable, otherwise the setup program will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Selectați mediul care conține programul de instalare al sistemului de operare pe care doriți să îl instalați. Acest mediu trebuie să fie bootabil, altfel programul de instalare nu va putea porni.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Selectați mediul care conține programul de instalare al sistemului de operare pe care doriți să îl instalați. Acest mediu trebuie să fie bootabil, altfel programul de instalare nu va putea porni.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Select the media that contains the operating system you want to work with. This media must be bootable, otherwise the operating system will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Selectați mediul care conține sistemul de operare cu care doriți să lucrați. Acest mediu trebuie să fie bootabil, altfel sistemul de operare nu va putea porni. &lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Selectați mediul care conține sistemul de operare cu care doriți să lucrați. Acest mediu trebuie să fie bootabil, altfel sistemul de operare nu va putea porni. &lt;/p&gt;</translation>
</message>
<message>
<source>Media Source</source>
- <translation type="unfinished">Sursă media</translation>
+ <translation>Mediu sursă</translation>
</message>
<message>
<source>Select Installation Media</source>
- <translation type="unfinished">Selectați mediul de instalare</translation>
+ <translation>Selectați mediul de instalare</translation>
</message>
</context>
<context>
<name>UIFirstRunWzdPage3</name>
<message>
<source>&lt;p&gt;You have selected the following media to boot from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ați ales să bootați de pe următorul mediu:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Ați ales să bootați de pe următorul mediu:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have selected the following media to boot an operating system from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ați selectat următorul mediu pentru a boota un sistem de operare de pe el.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Ați selectat următorul mediu pentru a boota un sistem de operare de pe el:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be temporarily mounted on the virtual machine and the machine will start execution.&lt;/p&gt;&lt;p&gt;Please note that when you close the virtual machine, the specified media will be automatically unmounted and the boot device will be set back to the first hard disk.&lt;/p&gt;&lt;p&gt;Depending on the type of the setup program, you may need to manually unmount (eject) the media after the setup program reboots the virtual machine, to prevent the installation process from starting again. You can do this by selecting the corresponding &lt;b&gt;Unmount...&lt;/b&gt; action in the &lt;b&gt;Devices&lt;/b&gt; menu.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Dacă datele de mai jos sunt corecte, apăsați butonul &lt;b&gt;Terminare&lt;/b&gt;. O dată apăsat, mediul selectat va fi montat temporar la mașina virtuală, iar mașina își va începe execuția.&lt;/p&gt;&lt;p&gt;Notați faptul că atunci când închideți mașina virtuală, mediul specificat va fi demontat automat, iar dispozitivul de boot va fi setat înapoi la primul disc hard.&lt;/p&gt;&lt;p&gt;În funcție de tipul programului de instalare, s-ar putea să fie nevoie să demontați manual (eject) mediul după ce programul repornește mașina virtuală, pentru a preveni pornirea din nou a procesului de instalare. Puteți face acest lucru selectând acțiunea &lt;b&gt;Demontare...&lt;/b&gt; corespunzătoare din meniul &lt;b&gt;Dispozitive&lt;/b&gt;.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Dacă datele de mai jos sunt corecte, apăsați butonul &lt;b&gt;Terminare&lt;/b&gt;. Odată apăsat, mediul selectat va fi montat temporar la mașina virtuală, iar mașina își va începe execuția.&lt;/p&gt;&lt;p&gt;Notați faptul că atunci când închideți mașina virtuală, mediul specificat va fi demontat automat, iar dispozitivul de boot va fi setat înapoi la primul disc hard.&lt;/p&gt;&lt;p&gt;În funcție de tipul programului de instalare, s-ar putea să fie nevoie să demontați manual (eject) mediul după ce programul repornește mașina virtuală, pentru a preveni pornirea din nou a procesului de instalare. Puteți face acest lucru selectând acțiunea &lt;b&gt;Demontare...&lt;/b&gt; corespunzătoare din meniul &lt;b&gt;Dispozitive&lt;/b&gt;.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be mounted on the virtual machine and the machine will start execution.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Dacă informația de mai jos este corectă, apăsați butonul &lt;b&gt;Terminare&lt;/b&gt;. O dată apăsat, mediul selectat va fi montat la mașina virtuală și mașina va porni execuția.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Dacă informația de mai jos este corectă, apăsați butonul &lt;b&gt;Terminare&lt;/b&gt;. O dată apăsat, mediul selectat va fi montat la mașina virtuală și mașina va începe execuția.&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Rezumat</translation>
+ <translation>Rezumat</translation>
</message>
<message>
<source>CD/DVD-ROM Device</source>
- <translation type="unfinished">Dispozitiv CD/DVD-ROM </translation>
+ <translation>Dispozitiv CD/DVD-ROM </translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Tip</translation>
+ <translation>Tip</translation>
</message>
<message>
<source>Source</source>
<comment>summary</comment>
- <translation type="unfinished">Sursă</translation>
+ <translation>Sursă</translation>
</message>
</context>
<context>
@@ -1010,7 +1010,7 @@
</message>
<message>
<source>Restore Defaults</source>
- <translation type="unfinished">Restabilire valori implicite</translation>
+ <translation>Restabilește valori implicite</translation>
</message>
<message>
<source>&amp;Import &gt;</source>
@@ -1025,7 +1025,7 @@
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Open Virtualization Format (%1)</translation>
+ <translation>Format Open Virtualization (%1)</translation>
</message>
<message>
<source>Welcome to the Appliance Import Wizard!</source>
@@ -1051,7 +1051,7 @@
<name>UIImportLicenseViewer</name>
<message>
<source>&lt;b&gt;The virtual system &quot;%1&quot; requires that you agree to the terms and conditions of the software license agreement shown below.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Click &lt;b&gt;Agree&lt;/b&gt; to continue or click &lt;b&gt;Disagree&lt;/b&gt; to cancel the import.</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;b&gt;Sistemul virtual &quot;%1&quot; necesită acceptarea următorilor termeni și condiții ai licenței software.&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Faceți clic pe &lt;b&gt;Acceptă&lt;/b&gt; pentru a continua sau pe &lt;b&gt;Refuză&lt;/b&gt; pentru anularea importului.</translation>
</message>
<message>
<source>Software License Agreement</source>
@@ -1086,56 +1086,56 @@
<name>UIMachineLogic</name>
<message>
<source>VirtualBox OSE</source>
- <translation type="unfinished">VirtualBox OSE</translation>
+ <translation>VirtualBox OSE</translation>
</message>
<message>
<source> EXPERIMENTAL build %1r%2 - %3</source>
- <translation type="unfinished"></translation>
+ <translation> versiune EXPERIMENTALÄ‚ %1r%2 - %3</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetAdditions</name>
<message>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>Renunță</translation>
</message>
<message>
<source>Cancel the VirtualBox Guest Additions CD image download</source>
- <translation type="unfinished"></translation>
+ <translation>Anulează descărcarea imaginii CD VirtualBox Guest Additions</translation>
</message>
<message>
<source>Downloading the VirtualBox Guest Additions CD image from &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished">Descarc imaginea de CD a VirtualBox Guest Additions de la &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
+ <translation>Se descarcă imaginea de CD a VirtualBox Guest Additions de la &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetUserManual</name>
<message>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>Renunță</translation>
</message>
<message>
<source>Cancel the VirtualBox User Manual download</source>
- <translation type="unfinished"></translation>
+ <translation>Anulează descărcarea manualului utilizator VirtualBox</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual</source>
- <translation type="unfinished"></translation>
+ <translation>Se descarcă manualul utilizator VirtualBox</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Se descarcă manualul utilizator VirtualBox de la &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMultiScreenLayout</name>
<message>
<source>Virtual Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>Ecran virtual %1</translation>
</message>
<message>
<source>Use Host Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>Folosește ecranul mașinii gazdă %1</translation>
</message>
</context>
<context>
@@ -1377,103 +1377,104 @@ time depending on the image size and the write performance of your harddisk.&lt;
<name>UINewHDWzdPage1</name>
<message>
<source>Welcome to the Create New Virtual Disk Wizard!</source>
- <translation type="unfinished">Bun venit la asistentul Creează disc virtual nou!</translation>
+ <translation>Bun venit la asistentul Creează disc virtual nou!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will help you to create a new virtual hard disk for your virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Acest asistent vă va ghida în procesul de creare a unui nou disc dur virtual pentru mașina dvs virtuală.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage2</name>
<message>
<source>&lt;p&gt;Select the type of virtual hard disk you want to create.&lt;/p&gt;&lt;p&gt;A &lt;b&gt;dynamically expanding storage&lt;/b&gt; initially occupies a very small amount of space on your physical hard disk. It will grow dynamically (up to the size specified) as the Guest OS claims disk space.&lt;/p&gt;&lt;p&gt;A &lt;b&gt;fixed-size storage&lt;/b&gt; does not grow. It is stored in a file of approximately the same size as the size of the virtual hard disk. The creation of a fixed-size storage may take a long time depending on the storage size and the write performance of your harddisk.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Selectați tipul de imagine virtuală de disc fix pe care doriți să o creați.&lt;/p&gt;&lt;p&gt;O &lt;b&gt;imagine expandabilă dinamic&lt;/b&gt; ocupă inițial un spațiu foarte mic pe discul fix fizic. Va crește dinamic (până la dimensiunre specificată), pe măsură ce SO musafir face uz de spațiul de pe disc. &lt;/p&gt;&lt;p&gt;O &lt;b&gt;imagine de dimensiune fixă&lt;/b&gt; nu crește. Este salvată într-un fișier de aproximativ aceeași dimensiune cu discul fix virtual. Crearea unei imagini de dimensiune fixă poate dura destul de mult în funcție de dimensiunea imaginii și de viteza de scriere a discului dvs.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Selectați tipul de imagine virtuală de disc fix pe care doriți să o creați.&lt;/p&gt;&lt;p&gt;O &lt;b&gt;imagine expandabilă dinamic&lt;/b&gt; ocupă inițial un spațiu foarte mic pe discul fix fizic. Va crește dinamic (până la dimensiunre specificată), pe măsură ce SO musafir face uz de spațiul de pe disc. &lt;/p&gt;&lt;p&gt;O &lt;b&gt;imagine de dimensiune fixă&lt;/b&gt; nu crește. Este salvată într-un fișier de aproximativ aceeași dimensiune cu discul fix virtual. Crearea unei imagini de dimensiune fixă poate dura destul de mult în funcție de dimensiunea imaginii și de viteza de scriere a discului dvs.&lt;/p&gt;</translation>
</message>
<message>
<source>Storage Type</source>
- <translation type="unfinished">TIp stocare</translation>
+ <translation>TIp stocare</translation>
</message>
<message>
<source>&amp;Dynamically expanding storage</source>
- <translation type="unfinished">Imagine expandabilă &amp;dinamic</translation>
+ <translation>Imagine expandabilă &amp;dinamic</translation>
</message>
<message>
<source>&amp;Fixed-size storage</source>
- <translation type="unfinished">Imagine de dimensiune &amp;fixă</translation>
+ <translation>Imagine de dimensiune &amp;fixă</translation>
</message>
<message>
<source>Hard Disk Storage Type</source>
- <translation type="unfinished">Tip stocare disc fix</translation>
+ <translation>Tip stocare disc fix</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage3</name>
<message>
<source>&lt;p&gt;Press the &lt;b&gt;Select&lt;/b&gt; button to select the location of a file to store the hard disk data or type a file name in the entry field.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Apăsați butonul &lt;b&gt;Selectare&lt;/b&gt; pentru a selecta amplasarea imaginii discului fix virtual sau tastați un nume de fișier în câmpul de intrare.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Apăsați butonul &lt;b&gt;Selectează&lt;/b&gt; pentru a selecta amplasarea imaginii discului fix virtual sau tastați un nume de fișier în câmpul de intrare.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Location</source>
- <translation type="unfinished">Amp&amp;lasare</translation>
+ <translation>Amp&amp;lasare</translation>
</message>
<message>
<source>&lt;p&gt;Select the size of the virtual hard disk in megabytes. This size will be reported to the Guest OS as the maximum size of this hard disk.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Selectați dimensiunea imaginii discului fix virtual (în megaocteți). Această dimensiune va fi raportată SO musafir ca dimensiunea discului fix virtual.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Selectați dimensiunea imaginii discului fix virtual (în megaocteți). Această dimensiune va fi raportată SO musafir ca dimensiunea discului fix virtual.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Size</source>
- <translation type="unfinished">Dimen&amp;siune</translation>
+ <translation>Dimen&amp;siune</translation>
</message>
<message>
<source>Virtual Disk Location and Size</source>
- <translation type="unfinished">Amplasare disc virtual și dimensiune</translation>
+ <translation>Amplasare disc virtual și dimensiune</translation>
</message>
<message>
<source>Select a file for the new hard disk image file</source>
- <translation type="unfinished">Selectați un fișier pentru noua imagine de disc fix</translation>
+ <translation>Selectați un fișier pentru noua imagine de disc fix</translation>
</message>
<message>
<source>Hard disk images (*.vdi)</source>
- <translation type="unfinished">Imagini disc fix (*.vdi)</translation>
+ <translation>Imagini disc dur (*.vdi)</translation>
</message>
<message>
<source>&lt;nobr&gt;%1 (%2 B)&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>hmm</translatorcomment>
+ <translation>&lt;nobr&gt;%1 (%2 B)&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage4</name>
<message>
<source>You are going to create a new virtual hard disk with the following parameters:</source>
- <translation type="unfinished">Veți crea o nouă imagine virtuală de disc fix cu următorii parametrii:</translation>
+ <translation>Veți crea o nouă imagine virtuală de disc dur cu următorii parametrii:</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Rezumat</translation>
+ <translation>Rezumat</translation>
</message>
<message>
<source>%1 B</source>
- <translation type="unfinished"></translation>
+ <translation>%1 B</translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Tip</translation>
+ <translation>Tip</translation>
</message>
<message>
<source>Location</source>
<comment>summary</comment>
- <translation type="unfinished">Amplasare</translation>
+ <translation>Amplasare</translation>
</message>
<message>
<source>Size</source>
<comment>summary</comment>
- <translation type="unfinished">Dimensiune</translation>
+ <translation>Dimensiune</translation>
</message>
<message>
<source>If the above settings are correct, press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new hard disk will be created.</source>
- <translation type="unfinished"></translation>
+ <translation>Dacă setările de mai sus sunt corecte, apăsați butonul &lt;b&gt;Finalizare&lt;/b&gt;. Odată apăsat, o nouă imagine de disc dur va fi creată.</translation>
</message>
</context>
<context>
@@ -1731,125 +1732,125 @@ din listă apăsând butonul &lt;b&gt;Existent&lt;/b&gt; (pentru a invoca dialog
<name>UINewVMWzdPage1</name>
<message>
<source>Welcome to the New Virtual Machine Wizard!</source>
- <translation type="unfinished">Bun venit la asistentul Mașină virtuală nouă!</translation>
+ <translation>Bun venit la asistentul Mașină virtuală nouă!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the steps that are necessary to create a new virtual machine for VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Acest asistent vă va ghida în procesul de creare a noi mașini virtuale pentru VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage2</name>
<message>
<source>&lt;p&gt;Enter a name for the new virtual machine and select the type of the guest operating system you plan to install onto the virtual machine.&lt;/p&gt;&lt;p&gt;The name of the virtual machine usually indicates its software and hardware configuration. It will be used by all VirtualBox components to identify your virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Introduceți un nume pentru noua mașină virtuală și selectați tipul sistemului de operare musafir pe care plănuiți să îl instalați în mașină.&lt;/p&gt;&lt;p&gt;Numele mașinii virtuale indică în mod uzual configurația software și hardware. Va fi folosit de către toate produsele VirtualBox pentru a identifica mașina virtuală creată.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Introduceți un nume pentru noua mașină virtuală și selectați tipul sistemului de operare musafir pe care plănuiți să îl instalați în mașină.&lt;/p&gt;&lt;p&gt;Numele mașinii virtuale indică în mod uzual configurația software și hardware. Va fi folosit de către toate produsele VirtualBox pentru a identifica mașina virtuală creată.&lt;/p&gt;</translation>
</message>
<message>
<source>N&amp;ame</source>
- <translation type="unfinished">N&amp;ume</translation>
+ <translation>N&amp;ume</translation>
</message>
<message>
<source>OS &amp;Type</source>
- <translation type="unfinished">&amp;Tip SO</translation>
+ <translation>&amp;Tip SO</translation>
</message>
<message>
<source>VM Name and OS Type</source>
- <translation type="unfinished">Nume MV și tip SO</translation>
+ <translation>Nume MV și tip SO</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage3</name>
<message>
<source>&lt;p&gt;Select the amount of base memory (RAM) in megabytes to be allocated to the virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Selectați cantitatea de memorie RAM în megaocteți pentru a fi alocată mașinii virtuale.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Selectați cantitatea de memorie RAM în megaocteți pentru a fi alocată mașinii virtuale.&lt;/p&gt;</translation>
</message>
<message>
<source>Base &amp;Memory Size</source>
- <translation type="unfinished">Dimensiune &amp;memorie RAM</translation>
+ <translation>Dimensiune &amp;memorie RAM</translation>
</message>
<message>
<source>MB</source>
- <translation type="unfinished">MO</translation>
+ <translation>MO</translation>
</message>
<message>
<source>Memory</source>
- <translation type="unfinished">Memorie</translation>
+ <translation>Memorie</translation>
</message>
<message>
<source>The recommended base memory size is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">Memoria RAM recomandată este &lt;b&gt;%1&lt;/b&gt; MO.</translation>
+ <translation>Cantitatea de memorie recomandată este &lt;b&gt;%1&lt;/b&gt; MO.</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MO</translation>
+ <translation>MO</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage4</name>
<message>
<source>&lt;p&gt;Select a hard disk image to be used as the boot hard disk of the virtual machine. You can either create a new hard disk using the &lt;b&gt;New&lt;/b&gt; button or select an existing hard disk image from the drop-down list or by pressing the &lt;b&gt;Existing&lt;/b&gt; button (to invoke the Virtual Media Manager dialog).&lt;/p&gt;&lt;p&gt;If you need a more complicated hard disk setup, you can also skip this step and attach hard disks later using the VM Settings dialog.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Selectați imaginea de disc hard virtual care va fi folosită ca disc de pornire pentru mașina virtuală. Puteți fie crea un disc fix nou utilizând butonul &lt;b&gt;Nou&lt;/b&gt; sau selecta o imagine de disc fix existentă din listă apăsând butonul &lt;b&gt;Existent&lt;/b&gt; (pentru a invoca dialogul Gestionar discuri virtuale).&lt;/p&gt;&lt;p&gt;Dacă aveți nevoie de setarea mai complexă a unui disc virtual, puteți sări peste acest pas și atașa ulterior un disc fix utilizând dialogul Setări mașină virtuală.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Selectați imaginea de disc hard virtual care va fi folosită ca disc de pornire pentru mașina virtuală. Puteți fie crea un disc fix nou utilizând butonul &lt;b&gt;Nou&lt;/b&gt; sau selecta o imagine de disc fix existentă din listă apăsând butonul &lt;b&gt;Existent&lt;/b&gt; (pentru a invoca dialogul Administrator discuri virtuale).&lt;/p&gt;&lt;p&gt;Dacă aveți nevoie de setarea mai complexă a unui disc virtual, puteți sări peste acest pas și atașa ulterior un disc fix utilizând dialogul Setări mașină virtuală.&lt;/p&gt;</translation>
</message>
<message>
<source>Boot Hard &amp;Disk (Primary Master)</source>
- <translation type="unfinished">Disc de P&amp;ornire (Primar Master)</translation>
+ <translation>Disc de P&amp;ornire (Primar Master)</translation>
</message>
<message>
<source>&amp;Create new hard disk</source>
- <translation type="unfinished">&amp;Creează disc dur nou</translation>
+ <translation>&amp;Creează disc dur nou</translation>
</message>
<message>
<source>&amp;Use existing hard disk</source>
- <translation type="unfinished">F&amp;olosește disc dur existent</translation>
+ <translation>F&amp;olosește un disc dur existent</translation>
</message>
<message>
<source>Virtual Hard Disk</source>
- <translation type="unfinished">Hard disc virtual</translation>
+ <translation>Disc dur virtual</translation>
</message>
<message>
<source>The recommended size of the boot hard disk is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">Dimensiunea discului de boot recomandată este &lt;b&gt;%1&lt;/b&gt; MO.</translation>
+ <translation>Dimensiunea discului de boot recomandată este &lt;b&gt;%1&lt;/b&gt; MO.</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage5</name>
<message>
<source>&lt;p&gt;You are going to create a new virtual machine with the following parameters:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Veți crea o nouă mașină virtuală cu următorii parametrii:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Veți crea o nouă mașină virtuală cu următorii parametrii:&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Rezumat</translation>
+ <translation>Rezumat</translation>
</message>
<message>
<source>Name</source>
<comment>summary</comment>
- <translation type="unfinished">Nume</translation>
+ <translation>Nume</translation>
</message>
<message>
<source>OS Type</source>
<comment>summary</comment>
- <translation type="unfinished">Tip SO</translation>
+ <translation>Tip SO</translation>
</message>
<message>
<source>Base Memory</source>
<comment>summary</comment>
- <translation type="unfinished">Memorie RAM</translation>
+ <translation>Memorie RAM</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">MO</translation>
+ <translation>MO</translation>
</message>
<message>
<source>Boot Hard Disk</source>
<comment>summary</comment>
- <translation type="unfinished">Disc de pornire</translation>
+ <translation>Disc de pornire</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new virtual machine will be created. &lt;/p&gt;&lt;p&gt;Note that you can alter these and all other setting of the created virtual machine at any time using the &lt;b&gt;Settings&lt;/b&gt; dialog accessible through the menu of the main window.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Dacă informațiile sunt corecte, apăsați butonul &lt;b&gt;Finalizare&lt;/b&gt;. O dată ce l-ați apăsat, o nouă mașină virtuală va fi creată.&lt;/p&gt;&lt;p&gt;Notați faptul că puteți schimba aceste setări și altele în orice moment prin dialogul &lt;b&gt;Setări&lt;/b&gt; accesibil din meniul ferestrei principale.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -2093,12 +2094,12 @@ Versiunea %1</translation>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MO</translation>
+ <translation>MO</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">MO</translation>
+ <translation>MO</translation>
</message>
</context>
<context>
@@ -2826,27 +2827,27 @@ Versiunea %1</translation>
</message>
<message>
<source> EXPERIMENTAL build %1r%2 - %3</source>
- <translation type="unfinished"></translation>
+ <translation> versiune EXPERIMENTALÄ‚ %1r%2 - %3</translation>
</message>
<message>
<source>&amp;CD/DVD Devices</source>
- <translation type="unfinished"></translation>
+ <translation>Dispozitive &amp;CD/DVD</translation>
</message>
<message>
<source>&amp;Floppy Devices</source>
- <translation type="unfinished"></translation>
+ <translation>Unități de &amp;dischetă</translation>
</message>
<message>
<source>&amp;Network Adapters...</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Plăci de rețea...</translation>
</message>
<message>
<source>Change the settings of network adapters</source>
- <translation type="unfinished"></translation>
+ <translation>Modifică setările plăcilor de rețea</translation>
</message>
<message>
<source>&amp;Remote Display</source>
- <translation type="unfinished"></translation>
+ <translation>Ecran la &amp;distanță</translation>
</message>
<message>
<source>More CD/DVD Images...</source>
@@ -2914,32 +2915,33 @@ Versiunea %1</translation>
</message>
<message>
<source>Dock Icon</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>dock hmm</translatorcomment>
+ <translation type="unfinished">Icon în dock</translation>
</message>
<message>
<source>Show Application Icon</source>
- <translation type="unfinished"></translation>
+ <translation>Arată iconul aplicației</translation>
</message>
<message>
<source>Show Monitor Preview</source>
- <translation type="unfinished"></translation>
+ <translation>Arată previzualizare monitor</translation>
</message>
<message>
<source>&lt;br&gt;&lt;nobr&gt;&lt;b&gt;Adapter %1 (%2)&lt;/b&gt;: %3 cable %4&lt;/nobr&gt;</source>
<comment>Network adapters tooltip</comment>
- <translation type="unfinished"></translation>
+ <translation>&lt;br&gt;&lt;nobr&gt;&lt;b&gt;Placa de rețea %1 (%2)&lt;/b&gt;: %3 cablu %4&lt;/nobr&gt;</translation>
</message>
<message>
<source>ACPI Sh&amp;utdown</source>
- <translation type="unfinished"></translation>
+ <translation>ÃŽnc&amp;hide ACPI</translation>
</message>
<message>
<source>&amp;View</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Vizualizare</translation>
</message>
<message>
<source>Preview Monitor %1</source>
- <translation type="unfinished"></translation>
+ <translation>Previzualizare monitor %1</translation>
</message>
<message>
<source>No CD/DVD devices attached to that VM</source>
@@ -2947,7 +2949,7 @@ Versiunea %1</translation>
</message>
<message>
<source>No floppy devices attached to that VM</source>
- <translation type="unfinished"></translation>
+ <translation>Nicio unitate de dischetă atașată la acea mașina virtuală</translation>
</message>
<message>
<source>No USB Devices Connected</source>
@@ -3452,11 +3454,11 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
</message>
<message>
<source>Reset Host Key</source>
- <translation type="unfinished"></translation>
+ <translation>Resetează tasta gazdă</translation>
</message>
<message>
<source>Resets the key used as a Host Key in the VM window.</source>
- <translation type="unfinished"></translation>
+ <translation>Resetează tasta care este folosită pe post de Tastă gazdă în fereastra MV.</translation>
</message>
</context>
<context>
@@ -3731,7 +3733,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
</message>
<message>
<source>Displays the address of the DHCP server servicing the network associated with this host-only adapter.</source>
- <translation type="unfinished"></translation>
+ <translation>Arată adresa serverului DHCP în funcțione în rețeaua asociată acestei plăci de rețea numai-gazdă.</translation>
</message>
<message>
<source>Server &amp;Mask:</source>
@@ -3782,7 +3784,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
</message>
<message>
<source>Check for:</source>
- <translation type="unfinished"></translation>
+ <translation>Verifică după:</translation>
</message>
<message>
<source>&lt;p&gt;Choose this if you only wish to be notified about stable updates to VirtualBox.&lt;/p&gt;</source>
@@ -3790,7 +3792,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
</message>
<message>
<source>&amp;Stable release versions</source>
- <translation type="unfinished"></translation>
+ <translation>Lansări versiuni &amp;stabile</translation>
</message>
<message>
<source>&lt;p&gt;Choose this if you wish to be notified about all new VirtualBox releases.&lt;/p&gt;</source>
@@ -3798,7 +3800,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
</message>
<message>
<source>&amp;All new releases</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Toate noile lansări</translation>
</message>
<message>
<source>&lt;p&gt;Choose this to be notified about all new VirtualBox releases and pre-release versions of VirtualBox.&lt;/p&gt;</source>
@@ -3806,7 +3808,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
</message>
<message>
<source>All new releases and &amp;pre-releases</source>
- <translation type="unfinished"></translation>
+ <translation>Toate noile lansări și &amp;prelansări</translation>
</message>
</context>
<context>
@@ -4671,7 +4673,8 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>Setting Up</source>
<comment>MachineState</comment>
- <translation type="unfinished"></translation>
+ <translatorcomment>hmm</translatorcomment>
+ <translation>Se configurează</translation>
</message>
<message>
<source>Differencing</source>
@@ -4766,12 +4769,12 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>Processor(s)</source>
<comment>details report</comment>
- <translation type="unfinished"></translation>
+ <translation>Procesoare</translation>
</message>
<message>
<source>&lt;nobr&gt;%1&lt;/nobr&gt;</source>
<comment>details report</comment>
- <translation type="unfinished"></translation>
+ <translation>&lt;nobr&gt;%1&lt;/nobr&gt;</translation>
</message>
<message>
<source>System</source>
@@ -4791,7 +4794,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>Disabled</source>
<comment>details report (VRDP Server)</comment>
- <translation type="unfinished"></translation>
+ <translation>Dezactivat</translation>
</message>
<message>
<source>Display</source>
@@ -4806,27 +4809,27 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>Enabled</source>
<comment>details report (2D Video Acceleration)</comment>
- <translation type="unfinished"></translation>
+ <translation>Activată</translation>
</message>
<message>
<source>Disabled</source>
<comment>details report (2D Video Acceleration)</comment>
- <translation type="unfinished"></translation>
+ <translation>Dezactivată</translation>
</message>
<message>
<source>2D Video Acceleration</source>
<comment>details report</comment>
- <translation type="unfinished"></translation>
+ <translation>Accelerare video 2D</translation>
</message>
<message>
<source>Not Attached</source>
<comment>details report (Storage)</comment>
- <translation type="unfinished">Neconectat</translation>
+ <translation>Neconectat</translation>
</message>
<message>
<source>Storage</source>
<comment>details report</comment>
- <translation type="unfinished">Stocare</translation>
+ <translation>Stocare</translation>
</message>
<message>
<source>Teleported</source>
@@ -4866,7 +4869,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>Floppy</source>
<comment>StorageBus</comment>
- <translation type="unfinished">Dischetă</translation>
+ <translation>Dischetă</translation>
</message>
<message>
<source>Device %1</source>
@@ -4993,60 +4996,60 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
</message>
<message numerus="yes">
<source>%n year(s)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n ani</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>%n month(s)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n luni</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>%n day(s)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n zile</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>%n hour(s)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n ore</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>%n minute(s)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n minute</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>%n second(s)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n secunde</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>(CD/DVD)</source>
- <translation type="unfinished"></translation>
+ <translation>(CD/DVD)</translation>
</message>
<message>
<source>Screens</source>
<comment>details report</comment>
- <translation type="unfinished"></translation>
+ <translation>Ecrane</translation>
</message>
<message>
<source>VDE network, &apos;%1&apos;</source>
@@ -5056,7 +5059,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>SAS</source>
<comment>StorageBus</comment>
- <translation type="unfinished"></translation>
+ <translation>SATA</translation>
</message>
<message>
<source>VDE Adapter</source>
@@ -5081,37 +5084,37 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>KB</source>
<comment>size suffix KBytes=1024 Bytes</comment>
- <translation type="unfinished"></translation>
+ <translation>KO</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MO</translation>
+ <translation>MO</translation>
</message>
<message>
<source>GB</source>
<comment>size suffix GBytes=1024 MBytes</comment>
- <translation type="unfinished"></translation>
+ <translation>GO</translation>
</message>
<message>
<source>TB</source>
<comment>size suffix TBytes=1024 GBytes</comment>
- <translation type="unfinished"></translation>
+ <translation>TO</translation>
</message>
<message>
<source>PB</source>
<comment>size suffix PBytes=1024 TBytes</comment>
- <translation type="unfinished"></translation>
+ <translation>PO</translation>
</message>
<message>
<source>Enabled</source>
<comment>nested paging</comment>
- <translation type="unfinished"></translation>
+ <translation>Activată</translation>
</message>
<message>
<source>Disabled</source>
<comment>nested paging</comment>
- <translation type="unfinished"></translation>
+ <translation>Dezactivată</translation>
</message>
<message>
<source>Nested Paging</source>
@@ -5120,7 +5123,7 @@ Acest director este folosit, dacă nu este explicit specificat altfel, atunci cÃ
<message>
<source>Shareable</source>
<comment>DiskType</comment>
- <translation type="unfinished"></translation>
+ <translation>Partajabil</translation>
</message>
</context>
<context>
@@ -5723,7 +5726,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<name>VBoxHelpButton</name>
<message>
<source>&amp;Help</source>
- <translation type="unfinished">&amp;Ajutor</translation>
+ <translation>&amp;Ajutor</translation>
</message>
</context>
<context>
@@ -5967,17 +5970,17 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<message>
<source>Attached to</source>
<comment>VMM: Virtual Disk</comment>
- <translation type="unfinished">Conectat la</translation>
+ <translation>Conectat la</translation>
</message>
<message>
<source>Attached to</source>
<comment>VMM: CD/DVD Image</comment>
- <translation type="unfinished">Conectat la</translation>
+ <translation>Conectată la</translation>
</message>
<message>
<source>Attached to</source>
<comment>VMM: Floppy Image</comment>
- <translation type="unfinished">Conectat la</translation>
+ <translation>Conectată la</translation>
</message>
</context>
<context>
@@ -6034,7 +6037,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<name>VBoxNetworkDialog</name>
<message>
<source>Network Adapters</source>
- <translation type="unfinished"></translation>
+ <translation>Plăci de rețea</translation>
</message>
</context>
<context>
@@ -6886,11 +6889,11 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
</message>
<message>
<source>Close VM</source>
- <translation type="unfinished">ÃŽnchide MV</translation>
+ <translation>ÃŽnchide MV</translation>
</message>
<message>
<source>Continue</source>
- <translation type="unfinished">Continuă</translation>
+ <translation>Continuă</translation>
</message>
<message>
<source>Discard</source>
@@ -6898,20 +6901,20 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
</message>
<message>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>Renunță</translation>
</message>
<message>
<source>&lt;p&gt;There are hard disks attached to ports of the additional controller. If you disable the additional controller, all these hard disks will be automatically detached.&lt;/p&gt;&lt;p&gt;Are you sure you want to disable the additional controller?&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Există discuri hard atașate la porturile contrlolorului adițional. Dacă dezactivați controlorul adițional, toate aceste discuri dure vor fi deconectate automat.&lt;/p&gt;&lt;p&gt;Sigur doriți dezactivarea controlorului adițional?&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;There are hard disks attached to ports of the additional controller. If you change the additional controller, all these hard disks will be automatically detached.&lt;/p&gt;&lt;p&gt;Are you sure you want to change the additional controller?&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Există discuri dure atașate la porturile contrlolorului adițional. Dacă dezactivați controlorul adițional, toate aceste discuri dure vor fi deconectate automat.&lt;/p&gt;&lt;p&gt;Sigur doriți dezactivarea controlorului adițional?&lt;/p&gt;</translation>
</message>
<message>
<source>Change</source>
<comment>hard disk</comment>
- <translation type="unfinished"></translation>
+ <translation>Modifică</translation>
</message>
<message>
<source>&lt;p&gt;Do you want to remove the selected host network interface &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;?&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This interface may be in use by one or more network adapters of this or another VM. After it is removed, these adapters will no longer work until you correct their settings by either choosing a different interface name or a different adapter attachment type.&lt;/p&gt;</source>
@@ -6919,7 +6922,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
</message>
<message>
<source>Failed to create the host-only network interface.</source>
- <translation type="unfinished"></translation>
+ <translation>Crearea interfeței de rețea numai-gazdă a eșuat.</translation>
</message>
<message>
<source>&lt;p&gt;Your existing VirtualBox settings files will be automatically converted from the old format to a new format required by the new version of VirtualBox.&lt;/p&gt;&lt;p&gt;Press &lt;b&gt;OK&lt;/b&gt; to start VirtualBox now or press &lt;b&gt;Exit&lt;/b&gt; if you want to terminate the VirtualBox application without any further actions.&lt;/p&gt;</source>
@@ -6995,7 +6998,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
</message>
<message>
<source>Restore</source>
- <translation type="unfinished"></translation>
+ <translation>Restabilește</translation>
</message>
<message>
<source>&lt;p&gt;Deleting the snapshot will cause the state information saved in it to be lost, and disk data spread over several image files that VirtualBox has created together with the snapshot will be merged into one file. This can be a lengthy process, and the information in the snapshot cannot be recovered.&lt;/p&gt;&lt;/p&gt;Are you sure you want to delete the selected snapshot &lt;b&gt;%1&lt;/b&gt;?&lt;/p&gt;</source>
@@ -7003,7 +7006,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
</message>
<message>
<source>Delete</source>
- <translation type="unfinished">Șterge</translation>
+ <translation>Șterge</translation>
</message>
<message>
<source>Failed to restore the snapshot &lt;b&gt;%1&lt;/b&gt; of the virtual machine &lt;b&gt;%2&lt;/b&gt;.</source>
@@ -7020,12 +7023,12 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<message>
<source>&amp;Create</source>
<comment>medium</comment>
- <translation type="unfinished">&amp;Creează</translation>
+ <translation>&amp;Creează</translation>
</message>
<message>
<source>&amp;Select</source>
<comment>medium</comment>
- <translation type="unfinished">&amp;Selectare</translation>
+ <translation>&amp;Selectează</translation>
</message>
<message>
<source>&lt;p&gt;There are no unused media available for the newly created attachment.&lt;/p&gt;&lt;p&gt;Press the &lt;b&gt;Select&lt;/b&gt; if you wish to open the &lt;i&gt;Virtual Media Manager&lt;/i&gt;.&lt;/p&gt;</source>
@@ -7070,7 +7073,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<message>
<source>E&amp;xit</source>
<comment>warnAboutSettingsAutoConversion message box</comment>
- <translation type="unfinished">Ieși&amp;re</translation>
+ <translation>Ieși&amp;re</translation>
</message>
<message>
<source>&lt;p&gt;The following VirtualBox settings files will be automatically converted from the old format to a new format required by the new version of VirtualBox.&lt;/p&gt;&lt;p&gt;Press &lt;b&gt;OK&lt;/b&gt; to start VirtualBox now or press &lt;b&gt;Exit&lt;/b&gt; if you want to terminate the VirtualBox application without any further actions.&lt;/p&gt;</source>
@@ -7099,22 +7102,22 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<message>
<source>floppy image</source>
<comment>failed to mount ...</comment>
- <translation type="unfinished">imagine dischetă</translation>
+ <translation>imagine dischetă</translation>
</message>
<message>
<source>hard disk</source>
<comment>failed to attach ...</comment>
- <translation type="unfinished"></translation>
+ <translation>disc dur</translation>
</message>
<message>
<source>CD/DVD device</source>
<comment>failed to attach ...</comment>
- <translation type="unfinished"></translation>
+ <translation>dispozitiv CD/DVD</translation>
</message>
<message>
<source>floppy device</source>
<comment>failed to close ...</comment>
- <translation type="unfinished"></translation>
+ <translation>dispozitiv dischetă</translation>
</message>
<message>
<source>&lt;p&gt;Are you sure you want to delete the CD/DVD-ROM device?&lt;/p&gt;&lt;p&gt;You will not be able to mount any CDs or ISO images or install the Guest Additions without it!&lt;/p&gt;</source>
@@ -7123,7 +7126,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<message>
<source>&amp;Remove</source>
<comment>medium</comment>
- <translation type="unfinished"></translation>
+ <translation>Ș&amp;terge</translation>
</message>
<message>
<source>&lt;p&gt;VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.</source>
@@ -7178,29 +7181,29 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<name>VBoxProgressDialog</name>
<message>
<source>&amp;Cancel</source>
- <translation type="unfinished">&amp;Revocare</translation>
+ <translation>&amp;Renunță</translation>
</message>
<message>
<source>A few seconds remaining</source>
- <translation type="unfinished"></translation>
+ <translation>Câteva secudne rămase</translation>
</message>
<message>
<source>Canceling...</source>
- <translation type="unfinished"></translation>
+ <translation>Se anulează...</translation>
</message>
<message>
<source>Cancel the current operation</source>
- <translation type="unfinished"></translation>
+ <translation>Anulează operația curentă</translation>
</message>
<message>
<source>%1, %2 remaining</source>
<comment>You may wish to translate this more like &quot;Time remaining: %1, %2&quot;</comment>
- <translation type="unfinished"></translation>
+ <translation>Timp rămas: %1, %2</translation>
</message>
<message>
<source>%1 remaining</source>
<comment>You may wish to translate this more like &quot;Time remaining: %1&quot;</comment>
- <translation type="unfinished"></translation>
+ <translation>Timp rămas: %1</translation>
</message>
</context>
<context>
@@ -7349,15 +7352,15 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
<name>VBoxScreenshotViewer</name>
<message>
<source>Screenshot of %1 (%2)</source>
- <translation type="unfinished"></translation>
+ <translation>Captură de ecran a %1 (%2)</translation>
</message>
<message>
<source>Click to view non-scaled screenshot.</source>
- <translation type="unfinished"></translation>
+ <translation>Faceți clic pentru a vedea captura de ecran la dimensiunea reală</translation>
</message>
<message>
<source>Click to view scaled screenshot.</source>
- <translation type="unfinished"></translation>
+ <translation>Faceți clic pentru a vedea captura de ecran scalată</translation>
</message>
</context>
<context>
@@ -7457,7 +7460,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
</message>
<message>
<source>D&amp;iscard</source>
- <translation>Renun&amp;ță</translation>
+ <translation>Anu&amp;lează starea salvată</translation>
</message>
<message>
<source>Discard</source>
@@ -7557,7 +7560,7 @@ Folosiți meniul contextual sau butaonele din dreapta pentru a adâuga sau șter
</message>
<message>
<source>S&amp;tart</source>
- <translation>S&amp;tart</translation>
+ <translation>PorneÈ™&amp;te</translation>
</message>
<message>
<source>Start</source>
@@ -7887,23 +7890,23 @@ pentru a-l accesa dintr-un SO Linux. Această funcție necesită Guest Additions
</message>
<message>
<source>Click to enlarge the screenshot.</source>
- <translation type="unfinished"></translation>
+ <translation>Faceți clic pentru a mări captura de ecran.</translation>
</message>
<message>
<source>&amp;Name:</source>
- <translation type="unfinished">&amp;Nume:</translation>
+ <translation>&amp;Nume:</translation>
</message>
<message>
<source>Taken:</source>
- <translation type="unfinished"></translation>
+ <translation>Luat:</translation>
</message>
<message>
<source>&amp;Description:</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Descriere:</translation>
</message>
<message>
<source>D&amp;etails:</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Detalii:</translation>
</message>
</context>
<context>
@@ -8082,27 +8085,27 @@ pentru a-l accesa dintr-un SO Linux. Această funcție necesită Guest Additions
</message>
<message>
<source> (%1)</source>
- <translation type="unfinished"></translation>
+ <translation> (%1)</translation>
</message>
<message>
<source>&amp;Restore Snapshot</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Restabilește instantaneu</translation>
</message>
<message>
<source>&amp;Delete Snapshot</source>
- <translation type="unfinished"></translation>
+ <translation>Ș&amp;terge instantaneu</translation>
</message>
<message>
<source>Restore the selected snapshot of the virtual machine</source>
- <translation type="unfinished"></translation>
+ <translation>Restabilește instantaneul selectat al mașinii virtuale</translation>
</message>
<message>
<source>Delete the selected snapshot of the virtual machine</source>
- <translation type="unfinished"></translation>
+ <translation>Șterge instantaneul selectat al mașinii virtuale</translation>
</message>
<message>
<source> (%1 ago)</source>
- <translation type="unfinished"></translation>
+ <translation> (acum %1)</translation>
</message>
</context>
<context>
@@ -8158,8 +8161,6 @@ pentru a-l accesa dintr-un SO Linux. Această funcție necesită Guest Additions
<source>Warning: You are taking a snapshot of a running machine which has %n immutable image(s) attached to it. As long as you are working from this snapshot the immutable image(s) will not be reset to avoid loss of data.</source>
<translation type="unfinished">
<numerusform></numerusform>
- <numerusform></numerusform>
- <numerusform></numerusform>
</translation>
</message>
</context>
@@ -8179,7 +8180,7 @@ pentru a-l accesa dintr-un SO Linux. Această funcție necesită Guest Additions
</message>
<message>
<source>Text (*.txt);;All (*.*)</source>
- <translation type="unfinished"></translation>
+ <translation>Text (*.txt);;Toate fișierele (*.*)</translation>
</message>
<message>
<source>Select a file to open...</source>
@@ -8771,19 +8772,19 @@ value.&lt;/qt&gt;</source>
<message>
<source>Not Available</source>
<comment>details report (VRDP server port)</comment>
- <translation type="unfinished"></translation>
+ <translation>Indisponibil</translation>
</message>
<message>
<source>Storage Statistics</source>
- <translation type="unfinished"></translation>
+ <translation>Statistici stocare</translation>
</message>
<message>
<source>No Storage Devices</source>
- <translation type="unfinished"></translation>
+ <translation>Lipsă dispozitive de stocare</translation>
</message>
<message>
<source>Network Statistics</source>
- <translation type="unfinished"></translation>
+ <translation>Statistici rețea</translation>
</message>
</context>
<context>
@@ -9395,7 +9396,7 @@ value.&lt;/qt&gt;</source>
</message>
<message>
<source>&amp;Remote Display</source>
- <translation type="unfinished"></translation>
+ <translation>Ecran la &amp;distanță</translation>
</message>
<message>
<source>When checked, the VM will act as a Remote Desktop Protocol (RDP) server, allowing remote clients to connect and operate the VM (when it is running) using a standard RDP client.</source>
@@ -9439,7 +9440,7 @@ value.&lt;/qt&gt;</source>
</message>
<message>
<source>Enable &amp;2D Video Acceleration</source>
- <translation type="unfinished"></translation>
+ <translation>Activează accelerarea video &amp;2D</translation>
</message>
<message>
<source>The VRDP Server port number. You may specify &lt;tt&gt;0&lt;/tt&gt; (zero), to select port 3389, the standard port for RDP.</source>
@@ -9447,15 +9448,15 @@ value.&lt;/qt&gt;</source>
</message>
<message>
<source>Mo&amp;nitor Count:</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Număr monitoare:</translation>
</message>
<message>
<source>Controls the amount of virtual monitors provided to the virtual machine.</source>
- <translation type="unfinished"></translation>
+ <translation>Controlează numărul de monitoare virtuale oferite mașinii virtuale.</translation>
</message>
<message>
<source>&lt;qt&gt;%1&lt;/qt&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;qt&gt;%1&lt;/qt&gt;</translation>
</message>
</context>
<context>
@@ -10853,11 +10854,11 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>If checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</source>
- <translation type="unfinished"></translation>
+ <translation>Dacă este bifată, poziționează minibara în partea de sus a ecranului, deși poziția implicită este la baza ecranului.</translation>
</message>
<message>
<source>Show At &amp;Top Of Screen</source>
- <translation type="unfinished"></translation>
+ <translation>Poziționează &amp;sus</translation>
</message>
</context>
<context>
@@ -10928,7 +10929,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>&lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;Bus:&amp;nbsp;&amp;nbsp;%2&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;Type:&amp;nbsp;&amp;nbsp;%3&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;Magistrală:&amp;nbsp;&amp;nbsp;%2&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;Tip:&amp;nbsp;&amp;nbsp;%3&lt;/nobr&gt;</translation>
</message>
<message>
<source>&lt;nobr&gt;Expand/Collapse&amp;nbsp;Item&lt;/nobr&gt;</source>
@@ -10956,47 +10957,47 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Add Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă controlor</translation>
</message>
<message>
<source>Add IDE Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă controlor IDE</translation>
</message>
<message>
<source>Add SATA Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă controlor SATA</translation>
</message>
<message>
<source>Add SCSI Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă controlor SCSI</translation>
</message>
<message>
<source>Add Floppy Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă controlor dischetă</translation>
</message>
<message>
<source>Remove Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Șterge controlor</translation>
</message>
<message>
<source>Add Attachment</source>
- <translation type="unfinished">Adaugă atașament</translation>
+ <translation>Adaugă atașament</translation>
</message>
<message>
<source>Add Hard Disk</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă disc dur</translation>
</message>
<message>
<source>Add CD/DVD Device</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă dispozitiv CD/DVD</translation>
</message>
<message>
<source>Add Floppy Device</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă unitate de dischetă</translation>
</message>
<message>
<source>Remove Attachment</source>
- <translation type="unfinished">Șterge atașament</translation>
+ <translation>Șterge atașament</translation>
</message>
<message>
<source>Adds a new controller to the end of the Storage Tree.</source>
@@ -11020,39 +11021,39 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>SATA Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Controlor SATA</translation>
</message>
<message>
<source>SCSI Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Controlor SCSI</translation>
</message>
<message>
<source>Floppy Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Controlor unitate de dischetă</translation>
</message>
<message>
<source>Hard &amp;Disk:</source>
- <translation type="unfinished"></translation>
+ <translation>Disc &amp;dur:</translation>
</message>
<message>
<source>&amp;CD/DVD Device:</source>
- <translation type="unfinished"></translation>
+ <translation>Dispozitiv &amp;CD/DVD:</translation>
</message>
<message>
<source>&amp;Floppy Device:</source>
- <translation type="unfinished"></translation>
+ <translation>Unitate de &amp;dischetă:</translation>
</message>
<message>
<source>&amp;Storage Tree</source>
- <translation type="unfinished"></translation>
+ <translation>Arbore de &amp;stocare:</translation>
</message>
<message>
<source>Contains all storage controllers for this machine and the virtual images and host drives attached to them.</source>
- <translation type="unfinished"></translation>
+ <translation>Conține toate controlerele de stocare ale acestei mașini și imaginile virtuale și unitățile gazdă atașate la ele.</translation>
</message>
<message>
<source>Information</source>
- <translation type="unfinished"></translation>
+ <translation>Informație</translation>
</message>
<message>
<source>The Storage Tree can contain several controllers of different types. This machine currently has no controllers.</source>
@@ -11060,27 +11061,27 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Attributes</source>
- <translation type="unfinished"></translation>
+ <translation>Proprietăți</translation>
</message>
<message>
<source>&amp;Name:</source>
- <translation type="unfinished">&amp;Nume:</translation>
+ <translation>&amp;Nume:</translation>
</message>
<message>
<source>Changes the name of the storage controller currently selected in the Storage Tree.</source>
- <translation type="unfinished"></translation>
+ <translation>Schimba numele controlorului de stocare selectat în Arborele de stocare.</translation>
</message>
<message>
<source>&amp;Type:</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Tip:</translation>
</message>
<message>
<source>Selects the sub-type of the storage controller currently selected in the Storage Tree.</source>
- <translation type="unfinished"></translation>
+ <translation>Alege subtipul controlorului de stocare selectat în Arborele de stocare</translation>
</message>
<message>
<source>S&amp;lot:</source>
- <translation type="unfinished"></translation>
+ <translation>S&amp;lot:</translation>
</message>
<message>
<source>Selects the slot on the storage controller used by this attachment. The available slots depend on the type of the controller and other attachments on it.</source>
@@ -11096,7 +11097,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Open Virtual Media Manager</source>
- <translation type="unfinished"></translation>
+ <translation>Deschide Administratorul medii virtuale</translation>
</message>
<message>
<source>D&amp;ifferencing Disks</source>
@@ -11112,51 +11113,51 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Virtual Size:</source>
- <translation type="unfinished"></translation>
+ <translation>Dimensiune virtuală:</translation>
</message>
<message>
<source>Actual Size:</source>
- <translation type="unfinished"></translation>
+ <translation>Dimensiune reală:</translation>
</message>
<message>
<source>Size:</source>
- <translation type="unfinished"></translation>
+ <translation>Dimensiune:</translation>
</message>
<message>
<source>Location:</source>
- <translation type="unfinished"></translation>
+ <translation>Amplasare:</translation>
</message>
<message>
<source>Type (Format):</source>
- <translation type="unfinished"></translation>
+ <translation>Tip (Format):</translation>
</message>
<message>
<source>Attached To:</source>
- <translation type="unfinished"></translation>
+ <translation>Conectat la:</translation>
</message>
<message>
<source>Allows to use host I/O caching capabilities.</source>
- <translation type="unfinished"></translation>
+ <translation>Permite folosirea capabilităților de caching I/O ale gazdei.</translation>
</message>
<message>
<source>Use host I/O cache</source>
- <translation type="unfinished"></translation>
+ <translation>Folosește I/O cache gazdă</translation>
</message>
<message>
<source>Add SAS Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Adaugă controlor SAS</translation>
</message>
<message>
<source>SAS Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Controlor SAS</translation>
</message>
<message>
<source>Storage Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Controlor stocare</translation>
</message>
<message>
<source>Storage Controller 1</source>
- <translation type="unfinished"></translation>
+ <translation>Controlor stocare 1</translation>
</message>
</context>
<context>
@@ -11207,11 +11208,11 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Displays the MAC address of this adapter. It contains exactly 12 characters chosen from {0-9,A-F}. Note that the second character must be an even digit.</source>
- <translation type="unfinished">Afișează adresa MAC a acestei plăci de rețea. Conține exact 12 caractere alese din {0-9,A-F}. Notați faptul că al doile caracter trebuie să fie un număr par.</translation>
+ <translation>Afișează adresa MAC a acestei plăci de rețea. Conține exact 12 caractere alese din {0-9,A-F}. Notați faptul că al doilea caracter trebuie să fie un număr par.</translation>
</message>
<message>
<source>Generates a new random MAC address.</source>
- <translation type="unfinished">Generează o nouă adresă MAC aleatoare.</translation>
+ <translation>Generează o nouă adresă MAC aleatoare.</translation>
</message>
<message>
<source>&amp;Generate</source>
@@ -11219,7 +11220,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Indicates whether the virtual network cable is plugged in on machine startup or not.</source>
- <translation type="unfinished">Indică dacă rețeaua virtuală este conectată la mașină la pornire sau nu.</translation>
+ <translation>Indică dacă rețeaua virtuală este conectată sau nu la pornirea mașinii virtuale.</translation>
</message>
<message>
<source>Ca&amp;ble Connected</source>
@@ -11277,7 +11278,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Adapter &amp;Type:</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Tip placă:</translation>
</message>
<message>
<source>no bridged network adapter is selected</source>
@@ -11294,11 +11295,11 @@ makes the guest see an audio card, however every access to it will be ignored.&l
<message>
<source>Not selected</source>
<comment>network adapter name</comment>
- <translation type="unfinished"></translation>
+ <translation>Neselectat</translation>
</message>
<message>
<source>&amp;Name:</source>
- <translation type="unfinished">&amp;Nume:</translation>
+ <translation>&amp;Nume:</translation>
</message>
<message>
<source>Selects the name of the network adapter for &lt;b&gt;Bridged Adapter&lt;/b&gt; or &lt;b&gt;Host-only Adapter&lt;/b&gt; attachments and the name of the network &lt;b&gt;Internal Network&lt;/b&gt; attachments.</source>
@@ -11306,19 +11307,19 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>A&amp;dvanced</source>
- <translation type="unfinished"></translation>
+ <translation>A&amp;vansat</translation>
</message>
<message>
<source>Shows or hides additional network adapter options.</source>
- <translation type="unfinished"></translation>
+ <translation>Arată sau ascunde opțiuni adiționale pentru placa de rețea.</translation>
</message>
<message>
<source>&amp;Mac Address:</source>
- <translation type="unfinished"></translation>
+ <translation>Adresă &amp;MAC:</translation>
</message>
<message>
<source>&amp;Cable connected</source>
- <translation type="unfinished">Ca&amp;blu de rețea conectat</translation>
+ <translation>Ca&amp;blu de rețea conectat</translation>
</message>
</context>
<context>
@@ -11412,11 +11413,11 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Displays the IRQ number of this parallel port. This should be a whole number between &lt;tt&gt;0&lt;/tt&gt; and &lt;tt&gt;255&lt;/tt&gt;. Values greater than &lt;tt&gt;15&lt;/tt&gt; may only be used if the &lt;b&gt;IO APIC&lt;/b&gt; setting is enabled for this virtual machine.</source>
- <translation type="unfinished"></translation>
+ <translation>Afișează numărul IRQ al acestui port paralel. Valori valide sunt întregi între &lt;tt&gt;0&lt;/tt&gt; și &lt;tt&gt;255&lt;/tt&gt;. Valorile mai mari decât &lt;tt&gt;15&lt;/tt&gt; pot fi folosite numai dacă &lt;b&gt;IO ACPI&lt;/b&gt; este activ pentru această mașină virtuală.</translation>
</message>
<message>
<source>Displays the base I/O port address of this parallel port. Valid values are integer numbers in range from &lt;tt&gt;0&lt;/tt&gt; to &lt;tt&gt;0xFFFF&lt;/tt&gt;.</source>
- <translation type="unfinished"></translation>
+ <translation>Afișează adresa portului I/O de bază pentru acest port paralel. Valori valide sunt întregi între &lt;tt&gt;0&lt;/tt&gt; și &lt;tt&gt;0xFFFF&lt;/tt&gt;.</translation>
</message>
</context>
<context>
@@ -11494,23 +11495,23 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source> Global Folders</source>
- <translation type="unfinished"></translation>
+ <translation>Dosare globale</translation>
</message>
<message>
<source>&amp;Add Shared Folder</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Adaugă dosar partajat</translation>
</message>
<message>
<source>&amp;Edit Shared Folder</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Modifică dosar partajat</translation>
</message>
<message>
<source>&amp;Remove Shared Folder</source>
- <translation type="unfinished"></translation>
+ <translation>Ște&amp;rge dosar partajat</translation>
</message>
<message>
<source>&amp;Folders List</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Listă dosare</translation>
</message>
</context>
<context>
@@ -11621,11 +11622,11 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>Displays the IRQ number of this serial port. This should be a whole number between &lt;tt&gt;0&lt;/tt&gt; and &lt;tt&gt;255&lt;/tt&gt;. Values greater than &lt;tt&gt;15&lt;/tt&gt; may only be used if the &lt;b&gt;IO APIC&lt;/b&gt; setting is enabled for this virtual machine.</source>
- <translation type="unfinished"></translation>
+ <translation>Afișează numărul IRQ al acestui port paralel. Valori valide sunt întregi între &lt;tt&gt;0&lt;/tt&gt; și &lt;tt&gt;255&lt;/tt&gt;. Valorile mai mari decât &lt;tt&gt;15&lt;/tt&gt; pot fi folosite numai dacă &lt;b&gt;IO ACPI&lt;/b&gt; este activ pentru această mașină virtuală.</translation>
</message>
<message>
<source>Displays the base I/O port address of this serial port. Valid values are integer numbers in range from &lt;tt&gt;0&lt;/tt&gt; to &lt;tt&gt;0xFFFF&lt;/tt&gt;.</source>
- <translation type="unfinished"></translation>
+ <translation>Afișează adresa portului I/O de bază pentru acest port paralel. Valori valide sunt întregi între &lt;tt&gt;0&lt;/tt&gt; și &lt;tt&gt;0xFFFF&lt;/tt&gt;.</translation>
</message>
</context>
<context>
@@ -11647,15 +11648,15 @@ makes the guest see an audio card, however every access to it will be ignored.&l
<name>VBoxVMSettingsSystem</name>
<message>
<source>you have assigned more than &lt;b&gt;%1%&lt;/b&gt; of your computer&apos;s memory (&lt;b&gt;%2&lt;/b&gt;) to the virtual machine. Not enough memory is left for your host operating system. Please select a smaller amount.</source>
- <translation type="unfinished"></translation>
+ <translation>ați asociat mașinii virtuale mai mult de &lt;b&gt;%1%&lt;/b&gt; din memoria computerului dvs (&lt;b&gt;%2&lt;/b&gt;). Memoria rămasă pentru sistemul de operare gazdă este insuficientă. Vă rugăm selectați o cantitate mai mică.</translation>
</message>
<message>
<source>you have assigned more than &lt;b&gt;%1%&lt;/b&gt; of your computer&apos;s memory (&lt;b&gt;%2&lt;/b&gt;) to the virtual machine. There might not be enough memory left for your host operating system. Continue at your own risk.</source>
- <translation type="unfinished"></translation>
+ <translation>ați asociat mașinii virtuale mai mult de &lt;b&gt;%1%&lt;/b&gt; din memoria computerului dvs (&lt;b&gt;%2&lt;/b&gt;). Memoria rămasă pentru sistemul de operare gazdă ar putea fi insuficientă. Continuați pe propriul dvs. risc.</translation>
</message>
<message>
<source>for performance reasons, the number of virtual CPUs attached to the virtual machine may not be more than twice the number of physical CPUs on the host (&lt;b&gt;%1&lt;/b&gt;). Please reduce the number of virtual CPUs.</source>
- <translation type="unfinished"></translation>
+ <translation>din motive de performanță, numărul de procesoare virtuale atașat la mașina virtuală nu poate fi mai mare decât de două ori numărulde procesoare fizice de pe gazdă (&lt;b&gt;%1&lt;/b&gt;). Vă rugăm micșorați numărul de procesoare virtuale.</translation>
</message>
<message>
<source>you have assigned more virtual CPUs to the virtual machine than the number of physical CPUs on your host system (&lt;b&gt;%1&lt;/b&gt;). This is likely to degrade the performance of your virtual machine. Please consider reducing the number of virtual CPUs.</source>
@@ -11753,27 +11754,27 @@ makes the guest see an audio card, however every access to it will be ignored.&l
</message>
<message>
<source>When checked, the Physical Address Extension (PAE) feature of the host CPU will be exposed to the virtual machine.</source>
- <translation type="unfinished">Când este bifat, CPU gazdă va expune opțiunea PAE (Extensie de adresă fizică) către mașina virtuală.</translation>
+ <translation>Când este bifat, procesorul gazdă va expune opțiunea PAE (extensie de adresă fizică) către mașina virtuală.</translation>
</message>
<message>
<source>Enable PA&amp;E/NX</source>
- <translation type="unfinished">Activează PA&amp;E/NX</translation>
+ <translation>Activează PA&amp;E/NX</translation>
</message>
<message>
<source>Acce&amp;leration</source>
- <translation type="unfinished"></translation>
+ <translation>Acce&amp;lerare</translation>
</message>
<message>
<source>Hardware Virtualization:</source>
- <translation type="unfinished"></translation>
+ <translation>Virtualizare hardware:</translation>
</message>
<message>
<source>When checked, the virtual machine will try to make use of the host CPU&apos;s hardware virtualization extensions such as Intel VT-x and AMD-V.</source>
- <translation type="unfinished">Când este bifat, mașina virtuală va încerca să folosească extensiile de virtualizare hardware a CPU-ului, cum ar fi Intel VT-x sau AMD-V.</translation>
+ <translation>Când este bifat, mașina virtuală va încerca să folosească extensiile de virtualizare hardware a procesorului, cum ar fi Intel VT-x sau AMD-V.</translation>
</message>
<message>
<source>Enable &amp;VT-x/AMD-V</source>
- <translation type="unfinished">Activează &amp;VT-x/AMD-V</translation>
+ <translation>Activează &amp;VT-x/AMD-V</translation>
</message>
<message>
<source>When checked, the virtual machine will try to make use of the nested paging extension of Intel VT-x and AMD-V.</source>
@@ -11786,7 +11787,7 @@ makes the guest see an audio card, however every access to it will be ignored.&l
<message>
<source>&lt;qt&gt;%1&amp;nbsp;CPUs&lt;/qt&gt;</source>
<comment>%1 is host cpu count * 2 for now</comment>
- <translation type="unfinished">&lt;qt&gt;%1&amp;nbsp;CPU-uri&lt;/qt&gt;</translation>
+ <translation>&lt;qt&gt;%1&amp;nbsp;procesoare&lt;/qt&gt;</translation>
</message>
<message>
<source>When checked, the guest will support the Extended Firmware Interface (EFI), which is required to boot certain guest OSes. Non-EFI aware OSes will not be able to boot if this option is activated.</source>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts
index 2edbea197..23980fb72 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts
@@ -396,7 +396,7 @@
<name>QIWizardPage</name>
<message>
<source>Use the &lt;b&gt;%1&lt;/b&gt; button to go to the next page of the wizard and the &lt;b&gt;%2&lt;/b&gt; button to return to the previous page. You can also press &lt;b&gt;%3&lt;/b&gt; if you want to cancel the execution of this wizard.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>ИÑпользуйте кнопку &lt;b&gt;%1&lt;/b&gt; чтобы перейти к Ñледующей Ñтранице маÑтера, либо кнопку &lt;b&gt;%2&lt;/b&gt; чтобы вернутьÑÑ Ðº предыдущей. Ð’Ñ‹ также можете воÑпользоватьÑÑ ÐºÐ½Ð¾Ð¿ÐºÐ¾Ð¹ &lt;b&gt;%3&lt;/b&gt; еÑли хотите прервать работу маÑтера вовÑе.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -407,7 +407,7 @@
</message>
<message>
<source>The download process has been canceled by the user.</source>
- <translation type="unfinished"></translation>
+ <translation>ПроцеÑÑ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ файла был прерван пользователем.</translation>
</message>
</context>
<context>
@@ -437,7 +437,7 @@
<name>UIDownloaderUserManual</name>
<message>
<source>Select folder to save User Manual to</source>
- <translation type="unfinished"></translation>
+ <translation>Выберите каталог Ð´Ð»Ñ Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð ÑƒÐºÐ¾Ð²Ð¾Ð´Ñтва ПользователÑ</translation>
</message>
</context>
<context>
@@ -460,7 +460,7 @@
</message>
<message>
<source>Appliance Export Wizard</source>
- <translation>МаÑтер ÑкÑпорта конфигурации</translation>
+ <translation>МаÑтер ÑкÑпорта конфигураций</translation>
</message>
<message>
<source>Welcome to the Appliance Export Wizard!</source>
@@ -583,116 +583,116 @@ p, li { white-space: pre-wrap; }
<name>UIExportApplianceWzdPage1</name>
<message>
<source>Welcome to the Appliance Export Wizard!</source>
- <translation type="unfinished">Добро пожаловать в маÑтер ÑкÑпорта конфигурации!</translation>
+ <translation>МаÑтер ÑкÑпорта конфигураций</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the process of exporting an appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Please select the virtual machines that should be added to the appliance. You can select more than one. Please note that these machines have to be turned off before they can be exported.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Данный маÑтер поможет Вам оÑущеÑтвить процеÑÑ ÑкÑпорта конфигураций виртуальных машин.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;ПожалуйÑта выберете виртуальные машины, конфигурации которых должны быть ÑкÑпортированы. Ð’Ñ‹ можете выбрать неÑколько виртуальных машин, но пожалуйÑта учтите, что выбранные машины должны быть выключены перед тем, как ÑкÑпортирование Ñтанет возможным.&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage2</name>
<message>
<source>Here you can change additional configuration values of the selected virtual machines. You can modify most of the properties shown by double-clicking on the items.</source>
- <translation type="unfinished">ЗдеÑÑŒ Ð’Ñ‹ можете изменить дополнительные параметры конфигурации выбранных виртуальных машин. БольшинÑтво из указанных параметров можно поменÑÑ‚ÑŒ двойным щелчком мыши на выбранном Ñлементе.</translation>
+ <translation>ЗдеÑÑŒ Ð’Ñ‹ можете изменить дополнительные параметры конфигураций выбранных виртуальных машин. БольшинÑтво из указанных параметров можно изменить дважды щёлкнув мышью на выбранном Ñлементе.</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished">Опции ÑкÑпорта конфигурации</translation>
+ <translation>Опции ÑкÑпорта конфигураций</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage3</name>
<message>
<source>Please specify the target for the OVF export. You can choose between a local file system export, uploading the OVF to the Sun Cloud service or an S3 storage server.</source>
- <translation type="unfinished">ПожалуйÑта укажите точку ÑкÑпорта OVF. Ð’Ñ‹ можете ÑкÑпортировать OVF в локальную файловую ÑиÑтему, а также выгрузить OVF либо на Ñервер Sun Cloud либо на Ñервер хранилище S3.</translation>
+ <translation>ПожалуйÑта укажите точку ÑкÑпорта OVF. Ð’Ñ‹ можете Ñохранить OVF в локальной файловой ÑиÑтеме, а также выгрузить OVF иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÑÐµÑ€Ð²Ð¸Ñ Sun Cloud либо на любой другой Ñервер-хранилище S3.</translation>
</message>
<message>
<source>&amp;Local Filesystem </source>
- <translation type="unfinished">&amp;Ð›Ð¾ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема</translation>
+ <translation>&amp;Ð›Ð¾ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема</translation>
</message>
<message>
<source>Sun &amp;Cloud</source>
- <translation type="unfinished">С&amp;ÐµÑ€Ð²Ð¸Ñ Sun Cloud</translation>
+ <translation>С&amp;ÐµÑ€Ð²Ð¸Ñ Sun Cloud</translation>
</message>
<message>
<source>&amp;Simple Storage System (S3)</source>
- <translation type="unfinished">Сервер &amp;хранилище S3</translation>
+ <translation>Сервер &amp;хранилище S3</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished">Опции ÑкÑпорта конфигурации</translation>
+ <translation>Опции ÑкÑпорта конфигураций</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage4</name>
<message>
<source>&amp;Username:</source>
- <translation type="unfinished">&amp;Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ:</translation>
+ <translation>&amp;Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ:</translation>
</message>
<message>
<source>&amp;Password:</source>
- <translation type="unfinished">&amp;Пароль:</translation>
+ <translation>&amp;Пароль:</translation>
</message>
<message>
<source>&amp;Hostname:</source>
- <translation type="unfinished">Ð˜Ð¼Ñ Ñ…&amp;оÑта:</translation>
+ <translation>Ð˜Ð¼Ñ Ñ…&amp;оÑта:</translation>
</message>
<message>
<source>&amp;Bucket:</source>
- <translation type="unfinished">Х&amp;ранилище:</translation>
+ <translation>Х&amp;ранилище:</translation>
</message>
<message>
<source>&amp;File:</source>
- <translation type="unfinished">&amp;Файл:</translation>
+ <translation>&amp;Файл:</translation>
</message>
<message>
<source>Write in legacy OVF 0.9 format for compatibility with other virtualization products.</source>
- <translation type="unfinished">Сохранить в формате OVF 0.9 Ð´Ð»Ñ ÑовмеÑтимоÑти Ñ Ð¾Ñтальными продуктами виртуализации.</translation>
+ <translation>Сохранить в формате OVF 0.9 Ð´Ð»Ñ ÑовмеÑтимоÑти Ñ Ð¾Ñтальными программными ÑредÑтвами виртуализации.</translation>
</message>
<message>
<source>&amp;Write legacy OVF 0.9</source>
- <translation type="unfinished">&amp;Сохранить в формате OVF 0.9</translation>
+ <translation>&amp;Сохранить в формате OVF 0.9</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished">Опции ÑкÑпорта конфигурации</translation>
+ <translation>Опции ÑкÑпорта конфигураций</translation>
</message>
<message>
<source>Appliance</source>
- <translation type="unfinished">КонфигурациÑ</translation>
+ <translation>КонфигурациÑ</translation>
</message>
<message>
<source>Select a file to export into</source>
- <translation type="unfinished">Укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ ÑкÑпорта конфигурации</translation>
+ <translation>Укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ ÑкÑпорта конфигураций</translation>
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Открытый Формат Виртуализации (%1)</translation>
+ <translation>Открытый Формат Виртуализации (%1)</translation>
</message>
<message>
<source>Please choose a filename to export the OVF to.</source>
- <translation type="unfinished">ПожалуйÑта укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ ÑкÑпорта OVF.</translation>
+ <translation>ПожалуйÑта укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° Ð´Ð»Ñ ÑкÑпорта OVF.</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password and the bucket, and provide a filename for the OVF target.</source>
- <translation type="unfinished">ПожалуйÑта заполните дополнительные Ð¿Ð¾Ð»Ñ Ñ‚Ð°ÐºÐ¸Ðµ как Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ, пароль и Ð¸Ð¼Ñ Ñ…Ñ€Ð°Ð½Ð¸Ð»Ð¸Ñ‰Ð°. Ð’ конце укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°-цели Ð´Ð»Ñ ÑкÑпорта OVF.</translation>
+ <translation>ПожалуйÑта заполните дополнительные Ð¿Ð¾Ð»Ñ Ñ‚Ð°ÐºÐ¸Ðµ как Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ, пароль и Ð¸Ð¼Ñ Ñ…Ñ€Ð°Ð½Ð¸Ð»Ð¸Ñ‰Ð°. Ð’ конце укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°-цели Ð´Ð»Ñ ÑкÑпорта OVF.</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password, hostname and the bucket, and provide a filename for the OVF target.</source>
- <translation type="unfinished">ПожалуйÑта заполните дополнительные Ð¿Ð¾Ð»Ñ Ñ‚Ð°ÐºÐ¸Ðµ как Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ, пароль, Ð¸Ð¼Ñ Ñ…Ð¾Ñта и Ð¸Ð¼Ñ Ñ…Ñ€Ð°Ð½Ð¸Ð»Ð¸Ñ‰Ð°. Ð’ конце укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°-цели Ð´Ð»Ñ ÑкÑпорта OVF.</translation>
+ <translation>ПожалуйÑта заполните дополнительные Ð¿Ð¾Ð»Ñ Ñ‚Ð°ÐºÐ¸Ðµ как Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ, пароль, Ð¸Ð¼Ñ Ñ…Ð¾Ñта и Ð¸Ð¼Ñ Ñ…Ñ€Ð°Ð½Ð¸Ð»Ð¸Ñ‰Ð°. Ð’ конце укажите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°-цели Ð´Ð»Ñ ÑкÑпорта OVF.</translation>
</message>
<message>
<source>Checking files ...</source>
- <translation type="unfinished">Проверка файлов ...</translation>
+ <translation>Проверка файлов ...</translation>
</message>
<message>
<source>Removing files ...</source>
- <translation type="unfinished">Удаление файлов ...</translation>
+ <translation>Удаление файлов ...</translation>
</message>
<message>
<source>Exporting Appliance ...</source>
- <translation type="unfinished">ЭкÑпорт конфигурации ...</translation>
+ <translation>ЭкÑпорт конфигураций ...</translation>
</message>
</context>
<context>
@@ -829,71 +829,71 @@ p, li { white-space: pre-wrap; }
<name>UIFirstRunWzdPage1</name>
<message>
<source>Welcome to the First Run Wizard!</source>
- <translation type="unfinished">МаÑтер первого запуÑка</translation>
+ <translation>МаÑтер первого запуÑка</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for installing an operating system of your choice onto this virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ð’Ñ‹ запуÑтили вновь Ñозданную машину первый раз. Данный маÑтер поможет Вам оÑущеÑтвить уÑтановку выбранной Вами операционной ÑиÑтемы на данную машину.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for booting an operating system of your choice on the virtual machine.&lt;/p&gt;&lt;p&gt;Note that you will not be able to install an operating system into this virtual machine right now because you did not attach any hard disk to it. If this is not what you want, you can cancel the execution of this wizard, select &lt;b&gt;Settings&lt;/b&gt; from the &lt;b&gt;Machine&lt;/b&gt; menu of the main VirtualBox window to access the settings dialog of this machine and change the hard disk configuration.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ð’Ñ‹ запуÑтили вновь Ñозданную машину первый раз. Данный маÑтер поможет Вам оÑущеÑтвить загрузку выбранной Вами операционной ÑиÑтемы на данной машине.&lt;/p&gt;&lt;p&gt;Учтите, что в данный момент Ð’Ñ‹ не имеете возможноÑти уÑтановить операционную ÑиÑтему на данную машину, поÑкольку Ð’Ñ‹ не подÑоединили к ней ни одного жёÑткого диÑка. ЕÑли Ñто не то, что Ð’Ñ‹ планировали, Ð’Ñ‹ можете прервать выполнение данного маÑтера, выбрать &lt;b&gt;СвойÑтва&lt;/b&gt; из меню &lt;b&gt;Машина&lt;/b&gt; главного окна VirtualBox Ð´Ð»Ñ Ð´Ð¾Ñтупа к наÑтройкам данной машины и иÑправить конфигурацию жёÑтких диÑков по Вашему уÑмотрению.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIFirstRunWzdPage2</name>
<message>
<source>&lt;p&gt;Select the media which contains the setup program of the operating system you want to install. This media must be bootable, otherwise the setup program will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Выберите ноÑитель, который Ñодержит программу уÑтановки операционной ÑиÑтемы, которую Ð’Ñ‹ хотите уÑтановить. Этот ноÑитель должен быть загрузочным, иначе программа уÑтановки не Ñможет начать работу.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Выберите ноÑитель, который Ñодержит программу уÑтановки операционной ÑиÑтемы, которую Ð’Ñ‹ хотите уÑтановить. Этот ноÑитель должен быть загрузочным, иначе программа уÑтановки не Ñможет начать работу.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Select the media that contains the operating system you want to work with. This media must be bootable, otherwise the operating system will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Выберите ноÑитель, который Ñодержит операционную ÑиÑтему, Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ Ð’Ñ‹ хотите работать. Этот ноÑитель должен быть загрузочным, иначе Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÑиÑтема не Ñможет начать работу.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Выберите ноÑитель, который Ñодержит операционную ÑиÑтему, Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ Ð’Ñ‹ хотите работать. Этот ноÑитель должен быть загрузочным, иначе Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÑиÑтема не Ñможет начать работу.&lt;/p&gt;</translation>
</message>
<message>
<source>Media Source</source>
- <translation type="unfinished">ÐоÑитель</translation>
+ <translation>ÐоÑитель</translation>
</message>
<message>
<source>Select Installation Media</source>
- <translation type="unfinished">Выберите уÑтановочный ноÑитель</translation>
+ <translation>Выберите уÑтановочный ноÑитель</translation>
</message>
</context>
<context>
<name>UIFirstRunWzdPage3</name>
<message>
<source>&lt;p&gt;You have selected the following media to boot from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ð’Ñ‹ выбрали Ñледующий ноÑитель Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ виртуальной машины:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Ð’Ñ‹ выбрали Ñледующий ноÑитель Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ виртуальной машины:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have selected the following media to boot an operating system from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ð’Ñ‹ выбрали Ñледующий ноÑитель Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ операционной ÑиÑтемы:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Ð’Ñ‹ выбрали Ñледующий ноÑитель Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ операционной ÑиÑтемы:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be temporarily mounted on the virtual machine and the machine will start execution.&lt;/p&gt;&lt;p&gt;Please note that when you close the virtual machine, the specified media will be automatically unmounted and the boot device will be set back to the first hard disk.&lt;/p&gt;&lt;p&gt;Depending on the type of the setup program, you may need to manually unmount (eject) the media after the setup program reboots the virtual machine, to prevent the installation process from starting again. You can do this by selecting the corresponding &lt;b&gt;Unmount...&lt;/b&gt; action in the &lt;b&gt;Devices&lt;/b&gt; menu.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;ЕÑли вышеÑказанное верно, нажмите кнопку &lt;b&gt;Готово&lt;/b&gt;. Ð’ результате Ñтого дейÑтвиÑ, выбранное уÑтройÑтво будет временно подключено (диÑк вÑтавлен) к виртуальной машине, поÑле чего машина будет запущена.&lt;/p&gt;&lt;p&gt;Учтите, что как только Ð’Ñ‹ закроете виртуальную машину, данное уÑтройÑтво будет автоматичеÑки отключено (диÑк изъÑÑ‚) и машина в дальнейшем будет грузитьÑÑ Ñ Ð¿ÐµÑ€Ð²Ð¾Ð³Ð¾ из жеÑтких диÑков.&lt;/p&gt;&lt;p&gt;Ð’ завиÑимоÑти от типа уÑтановочного Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¸ Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð¾Ñ‚Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ ÐµÐ³Ð¾ повторного запуÑка, Вам, возможно, придётÑÑ Ð²Ñ€ÑƒÑ‡Ð½ÑƒÑŽ отключить уÑтройÑтво (изъÑÑ‚ÑŒ диÑк) поÑле того, как уÑтановочное приложение перезагрузит виртуальную машину. Ð’Ñ‹ можете выполнить данное дейÑтвие выбрав ÑоответÑтвующий пункт &lt;b&gt;Извлечь...&lt;/b&gt; меню &lt;b&gt;УÑтройÑтва&lt;/b&gt;.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;ЕÑли вышеÑказанное верно, нажмите кнопку &lt;b&gt;Готово&lt;/b&gt;. Ð’ результате Ñтого дейÑтвиÑ, выбранное уÑтройÑтво будет временно подключено (диÑк вÑтавлен) к виртуальной машине, поÑле чего машина будет запущена.&lt;/p&gt;&lt;p&gt;Учтите, что как только Ð’Ñ‹ закроете виртуальную машину, данное уÑтройÑтво будет автоматичеÑки отключено (диÑк изъÑÑ‚) и машина в дальнейшем будет грузитьÑÑ Ñ Ð¿ÐµÑ€Ð²Ð¾Ð³Ð¾ из жеÑтких диÑков.&lt;/p&gt;&lt;p&gt;Ð’ завиÑимоÑти от типа уÑтановочного Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¸ Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð¾Ñ‚Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ ÐµÐ³Ð¾ повторного запуÑка, Вам, возможно, придётÑÑ Ð²Ñ€ÑƒÑ‡Ð½ÑƒÑŽ отключить уÑтройÑтво (изъÑÑ‚ÑŒ диÑк) поÑле того, как уÑтановочное приложение перезагрузит виртуальную машину. Ð’Ñ‹ можете выполнить данное дейÑтвие выбрав ÑоответÑтвующий пункт &lt;b&gt;Извлечь...&lt;/b&gt; меню &lt;b&gt;УÑтройÑтва&lt;/b&gt;.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be mounted on the virtual machine and the machine will start execution.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;ЕÑли Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ð°Ñ Ð²Ñ‹ÑˆÐµ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð²ÐµÑ€Ð½Ð°, нажмите кнопку &lt;b&gt;Готово&lt;/b&gt;. ПоÑле Ñтого, указанный ноÑитель будет подключен к виртуальной машине, и машина начнет загрузку Ñ Ñтого ноÑителÑ.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;ЕÑли Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ð°Ñ Ð²Ñ‹ÑˆÐµ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð²ÐµÑ€Ð½Ð°, нажмите кнопку &lt;b&gt;Готово&lt;/b&gt;. ПоÑле Ñтого, указанный ноÑитель будет подключен к виртуальной машине, и машина начнет загрузку Ñ Ñтого ноÑителÑ.&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Итог</translation>
+ <translation>Итог</translation>
</message>
<message>
<source>CD/DVD-ROM Device</source>
- <translation type="unfinished">Привод оптичеÑких диÑков</translation>
+ <translation>Привод оптичеÑких диÑков</translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Тип</translation>
+ <translation>Тип</translation>
</message>
<message>
<source>Source</source>
<comment>summary</comment>
- <translation type="unfinished">ÐоÑитель</translation>
+ <translation>ÐоÑитель</translation>
</message>
</context>
<context>
@@ -908,7 +908,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Appliance Import Wizard</source>
- <translation>МаÑтер импорта конфигурации</translation>
+ <translation>МаÑтер импорта конфигураций</translation>
</message>
<message>
<source>Welcome to the Appliance Import Wizard!</source>
@@ -963,30 +963,30 @@ p, li { white-space: pre-wrap; }
<name>UIImportApplianceWzdPage1</name>
<message>
<source>Select an appliance to import</source>
- <translation type="unfinished">Укажите файл конфигурации Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°</translation>
+ <translation>Укажите файл конфигураций Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°</translation>
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Открытый Формат Виртуализации (%1)</translation>
+ <translation>Открытый Формат Виртуализации (%1)</translation>
</message>
<message>
<source>Welcome to the Appliance Import Wizard!</source>
- <translation type="unfinished">Добро пожаловать в маÑтер импорта конфигурации!</translation>
+ <translation>МаÑтер импорта конфигураций</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through importing an appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;VirtualBox currently supports importing appliances saved in the Open Virtualization Format (OVF). To continue, select the file to import below:&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Данный маÑтер поможет Вам оÑущеÑтвить процеÑÑ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð° конфигураций.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;VirtualBox в наÑтоÑщий момент поддерживает импорт конфигураций, Ñохранённых в Открытом Виртуализационном Формате (OVF). Ð”Ð»Ñ Ñ‚Ð¾Ð³Ð¾ чтобы продолжить, Вам необходимо выбрать файл Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°:&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIImportApplianceWzdPage2</name>
<message>
<source>These are the virtual machines contained in the appliance and the suggested settings of the imported VirtualBox machines. You can change many of the properties shown by double-clicking on the items and disable others using the check boxes below.</source>
- <translation type="unfinished">Далее перечиÑлены виртуальные машины и их уÑтройÑтва, опиÑанные в конфигурации, Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð° в VirtualBox. БольшинÑтво из указанных параметров можно изменить двойным щелчком мыши на выбранном Ñлементе, либо отключить иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÑоответÑтвующие галочки.</translation>
+ <translation>Далее перечиÑлены виртуальные машины и их уÑтройÑтва, опиÑанные в конфигурации, Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð° в VirtualBox. БольшинÑтво из указанных параметров можно изменить дважды щёлкнув мышью на выбранном Ñлементе, либо отключить иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ ÑоответÑтвующие галочки.</translation>
</message>
<message>
<source>Appliance Import Settings</source>
- <translation type="unfinished">Опции импорта конфигурации</translation>
+ <translation>Опции импорта конфигураций</translation>
</message>
</context>
<context>
@@ -1028,63 +1028,63 @@ p, li { white-space: pre-wrap; }
<name>UIMachineLogic</name>
<message>
<source>VirtualBox OSE</source>
- <translation type="unfinished">VirtualBox OSE</translation>
+ <translation>VirtualBox OSE</translation>
</message>
<message>
<source> EXPERIMENTAL build %1r%2 - %3</source>
- <translation type="unfinished">ЭКСПЕРИМЕÐТÐЛЬÐÐЯ верÑÐ¸Ñ %1r%2 - %3</translation>
+ <translation>ЭКСПЕРИМЕÐТÐЛЬÐÐЯ верÑÐ¸Ñ %1Ñ€%2 - %3</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetAdditions</name>
<message>
<source>Cancel</source>
- <translation type="unfinished">Отмена</translation>
+ <translation>Отмена</translation>
</message>
<message>
<source>Cancel the VirtualBox Guest Additions CD image download</source>
- <translation type="unfinished">Отменить Ñкачивание CD-образа пакета Дополнений гоÑтевой ОС</translation>
+ <translation>Отменить Ñкачивание CD-образа пакета Дополнений гоÑтевой ОС</translation>
</message>
<message>
<source>Downloading the VirtualBox Guest Additions CD image from &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished">СкачиваетÑÑ CD-образ пакета Дополнений гоÑтевой ОС Ñ &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
+ <translation>СкачиваетÑÑ CD-образ пакета Дополнений гоÑтевой ОС Ñ &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetUserManual</name>
<message>
<source>Cancel</source>
- <translation type="unfinished">Отмена</translation>
+ <translation>Отмена</translation>
</message>
<message>
<source>Cancel the VirtualBox User Manual download</source>
- <translation type="unfinished"></translation>
+ <translation>Отменить Ñкачивание РуководÑтва ПользователÑ</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual</source>
- <translation type="unfinished"></translation>
+ <translation>СкачиваетÑÑ Ð ÑƒÐºÐ¾Ð²Ð¾Ð´Ñтво ПользователÑ</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>СкачиваетÑÑ Ð ÑƒÐºÐ¾Ð²Ð¾Ð´Ñтво ÐŸÐ¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMultiScreenLayout</name>
<message>
<source>Virtual Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>Виртуальный Ñкран %1</translation>
</message>
<message>
<source>Use Host Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>ИÑпользовать диÑплей хоÑта %1</translation>
</message>
</context>
<context>
<name>UINewHDWzd</name>
<message>
<source>Create New Virtual Disk</source>
- <translation>Создать новый виртуальный диÑк</translation>
+ <translation>Создать новый виртуальный жёÑткий диÑк</translation>
</message>
<message>
<source>Welcome to the Create New Virtual Disk Wizard!</source>
@@ -1199,103 +1199,103 @@ p, li { white-space: pre-wrap; }
<name>UINewHDWzdPage1</name>
<message>
<source>Welcome to the Create New Virtual Disk Wizard!</source>
- <translation type="unfinished">МаÑтер ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ виртуального диÑка</translation>
+ <translation>МаÑтер ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ виртуального жёÑткого диÑка</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will help you to create a new virtual hard disk for your virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Данный маÑтер поможет Вам оÑущеÑтвить Ñоздание нового виртуального жёÑткого диÑка Ð´Ð»Ñ Ð’Ð°ÑˆÐµÐ¹ виртуальной машины.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage2</name>
<message>
<source>&lt;p&gt;Select the type of virtual hard disk you want to create.&lt;/p&gt;&lt;p&gt;A &lt;b&gt;dynamically expanding storage&lt;/b&gt; initially occupies a very small amount of space on your physical hard disk. It will grow dynamically (up to the size specified) as the Guest OS claims disk space.&lt;/p&gt;&lt;p&gt;A &lt;b&gt;fixed-size storage&lt;/b&gt; does not grow. It is stored in a file of approximately the same size as the size of the virtual hard disk. The creation of a fixed-size storage may take a long time depending on the storage size and the write performance of your harddisk.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Выберите тип виртуального жеÑткого диÑка, который Ð’Ñ‹ хотите Ñоздать.&lt;/p&gt;&lt;p&gt;&lt;b&gt;ДинамичеÑки раÑширÑющийÑÑ Ð¾Ð±Ñ€Ð°Ð·&lt;/b&gt; первоначально занимает очень мало меÑта на физичеÑком жеÑтком диÑке. Он будет динамичеÑки раÑти (до заданного размера) по мере того, как гоÑÑ‚ÐµÐ²Ð°Ñ ÐžÐ¡ иÑпользует диÑковое проÑтранÑтво.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Образ фикÑированного размера&lt;/b&gt; не увеличиваетÑÑ. Он хранитÑÑ Ð² файле примерно того же размера, что и размер виртуального жеÑткого диÑка. Создание жеÑткого диÑка фикÑированного размера может занÑÑ‚ÑŒ длительное времÑ, в завиÑимоÑти от размера образа и производительноÑти физичеÑкого диÑка.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Выберите тип образа виртуального жёÑткого диÑка, который Ð’Ñ‹ хотите Ñоздать.&lt;/p&gt;&lt;p&gt;&lt;b&gt;ДинамичеÑки раÑширÑющийÑÑ Ð¾Ð±Ñ€Ð°Ð·&lt;/b&gt; первоначально занимает очень мало меÑта на физичеÑком жёÑтком диÑке. Он будет динамичеÑки раÑти (до заданного размера) по мере того, как гоÑÑ‚ÐµÐ²Ð°Ñ ÐžÐ¡ иÑпользует диÑковое проÑтранÑтво.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Образ фикÑированного размера&lt;/b&gt; не увеличиваетÑÑ. Он хранитÑÑ Ð² файле примерно того же размера, что и размер виртуального жёÑткого диÑка. Создание жёÑткого диÑка фикÑированного размера может занÑÑ‚ÑŒ длительное времÑ, в завиÑимоÑти от размера образа и производительноÑти физичеÑкого диÑка.&lt;/p&gt;</translation>
</message>
<message>
<source>Storage Type</source>
- <translation type="unfinished">Тип файла</translation>
+ <translation>Тип образа виртуального жёÑткого диÑка</translation>
</message>
<message>
<source>&amp;Dynamically expanding storage</source>
- <translation type="unfinished">Д&amp;инамичеÑки раÑширÑющийÑÑ Ð¾Ð±Ñ€Ð°Ð·</translation>
+ <translation>Д&amp;инамичеÑки раÑширÑющийÑÑ Ð¾Ð±Ñ€Ð°Ð·</translation>
</message>
<message>
<source>&amp;Fixed-size storage</source>
- <translation type="unfinished">Образ &amp;фикÑированного размера</translation>
+ <translation>Образ &amp;фикÑированного размера</translation>
</message>
<message>
<source>Hard Disk Storage Type</source>
- <translation type="unfinished">Тип виртуального диÑка</translation>
+ <translation>Тип образа виртуального жёÑткого диÑка</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage3</name>
<message>
<source>&lt;p&gt;Press the &lt;b&gt;Select&lt;/b&gt; button to select the location of a file to store the hard disk data or type a file name in the entry field.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ðажмите кнопку &lt;b&gt;Выбрать&lt;/b&gt; Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð° раÑÐ¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¸ имени файла виртуального жеÑткого диÑка или введите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° в поле ввода.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Ðажмите кнопку &lt;b&gt;Выбрать&lt;/b&gt; Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð° раÑÐ¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¸ имени файла виртуального жёÑткого диÑка или введите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° в поле ввода.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Location</source>
- <translation type="unfinished">&amp;РаÑположение</translation>
+ <translation>&amp;РаÑположение</translation>
</message>
<message>
<source>&lt;p&gt;Select the size of the virtual hard disk in megabytes. This size will be reported to the Guest OS as the maximum size of this hard disk.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Выберите размер виртуального жеÑткого диÑка в мегабайтах. Указанный размер будет фигурировать в гоÑтевой ОС в качеÑтве размера данного жеÑткого диÑка.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Выберите размер виртуального жёÑткого диÑка в мегабайтах. Указанный размер будет фигурировать в гоÑтевой ОС в качеÑтве размера данного жёÑткого диÑка.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Size</source>
- <translation type="unfinished">Р&amp;азмер</translation>
+ <translation>Р&amp;азмер</translation>
</message>
<message>
<source>Virtual Disk Location and Size</source>
- <translation type="unfinished">МеÑтоположение и размер виртуального диÑка</translation>
+ <translation>МеÑтоположение и размер виртуального жёÑткого диÑка</translation>
</message>
<message>
<source>Select a file for the new hard disk image file</source>
- <translation type="unfinished">Выберите файл Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð·Ð° нового жеÑткого диÑка</translation>
+ <translation>Выберите файл Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð·Ð° нового жёÑткого диÑка</translation>
</message>
<message>
<source>Hard disk images (*.vdi)</source>
- <translation type="unfinished">Образы жеÑтких диÑков (*.vdi)</translation>
+ <translation>Образы жёÑтких диÑков (*.vdi)</translation>
</message>
<message>
<source>&lt;nobr&gt;%1 (%2 B)&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;nobr&gt;%1 (%2 Б)&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage4</name>
<message>
<source>You are going to create a new virtual hard disk with the following parameters:</source>
- <translation type="unfinished">Ð’Ñ‹ ÑобираетеÑÑŒ Ñоздать виртуальный жеÑткий диÑк Ñо Ñледующими параметрами:</translation>
+ <translation>Ð’Ñ‹ ÑобираетеÑÑŒ Ñоздать виртуальный жёÑткий диÑк Ñо Ñледующими параметрами:</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Итог</translation>
+ <translation>Итог</translation>
</message>
<message>
<source>%1 B</source>
- <translation type="unfinished"></translation>
+ <translation>%1 Б</translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Тип</translation>
+ <translation>Тип</translation>
</message>
<message>
<source>Location</source>
<comment>summary</comment>
- <translation type="unfinished">РаÑположение</translation>
+ <translation>РаÑположение</translation>
</message>
<message>
<source>Size</source>
<comment>summary</comment>
- <translation type="unfinished">Размер</translation>
+ <translation>Размер</translation>
</message>
<message>
<source>If the above settings are correct, press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new hard disk will be created.</source>
- <translation type="unfinished"></translation>
+ <translation>ЕÑли Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ð°Ñ Ð²Ñ‹ÑˆÐµ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð²ÐµÑ€Ð½Ð°, нажмите кнопку &lt;b&gt;%1&lt;/b&gt;. ПоÑле Ñтого будет Ñоздан новый жёÑткий диÑк.</translation>
</message>
</context>
<context>
@@ -1438,125 +1438,125 @@ p, li { white-space: pre-wrap; }
<name>UINewVMWzdPage1</name>
<message>
<source>Welcome to the New Virtual Machine Wizard!</source>
- <translation type="unfinished">МаÑтер ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð¹ виртуальной машины</translation>
+ <translation>МаÑтер ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð¹ виртуальной машины</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the steps that are necessary to create a new virtual machine for VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Данный маÑтер поможет Вам оÑущеÑтвить Ñоздание новой виртуальной машины VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage2</name>
<message>
<source>&lt;p&gt;Enter a name for the new virtual machine and select the type of the guest operating system you plan to install onto the virtual machine.&lt;/p&gt;&lt;p&gt;The name of the virtual machine usually indicates its software and hardware configuration. It will be used by all VirtualBox components to identify your virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Введите Ð¸Ð¼Ñ Ð´Ð»Ñ Ð½Ð¾Ð²Ð¾Ð¹ виртуальной машины и выберите тип гоÑтевой операционной ÑиÑтемы, которую Ð’Ñ‹ планируете уÑтановить на Ñту машину.&lt;/p&gt;&lt;p&gt;Ð˜Ð¼Ñ Ð²Ð¸Ñ€Ñ‚ÑƒÐ°Ð»ÑŒÐ½Ð¾Ð¹ машины обычно отражает ее программную и аппаратную конфигурацию. Это Ð¸Ð¼Ñ Ð±ÑƒÐ´ÐµÑ‚ иÑпользоватьÑÑ Ð²Ñеми приложениÑми VirtualBox Ð´Ð»Ñ Ð¾Ð±Ð¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñозданной виртуальной машины.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Введите Ð¸Ð¼Ñ Ð´Ð»Ñ Ð½Ð¾Ð²Ð¾Ð¹ виртуальной машины и выберите тип гоÑтевой операционной ÑиÑтемы, которую Ð’Ñ‹ планируете уÑтановить на Ñту машину.&lt;/p&gt;&lt;p&gt;Ð˜Ð¼Ñ Ð²Ð¸Ñ€Ñ‚ÑƒÐ°Ð»ÑŒÐ½Ð¾Ð¹ машины обычно отражает ее программную и аппаратную конфигурацию. Это Ð¸Ð¼Ñ Ð±ÑƒÐ´ÐµÑ‚ иÑпользоватьÑÑ Ð²Ñеми компонентами VirtualBox Ð´Ð»Ñ Ð¾Ð±Ð¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ виртуальной машины.&lt;/p&gt;</translation>
</message>
<message>
<source>N&amp;ame</source>
- <translation type="unfinished">&amp;ИмÑ</translation>
+ <translation>&amp;ИмÑ</translation>
</message>
<message>
<source>OS &amp;Type</source>
- <translation type="unfinished">&amp;Тип ОС</translation>
+ <translation>&amp;Тип ОС</translation>
</message>
<message>
<source>VM Name and OS Type</source>
- <translation type="unfinished">Ð˜Ð¼Ñ Ð¼Ð°ÑˆÐ¸Ð½Ñ‹ и тип ОС</translation>
+ <translation>Ð˜Ð¼Ñ Ð¼Ð°ÑˆÐ¸Ð½Ñ‹ и тип ОС</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage3</name>
<message>
<source>&lt;p&gt;Select the amount of base memory (RAM) in megabytes to be allocated to the virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Выберите количеÑтво оÑновной памÑти (RAM) в мегабайтах, выделÑемой виртуальной машине.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Выберите количеÑтво оÑновной памÑти (RAM или ОЗУ) в мегабайтах, выделÑемой виртуальной машине.&lt;/p&gt;</translation>
</message>
<message>
<source>Base &amp;Memory Size</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Размер оÑновной памÑти</translation>
</message>
<message>
<source>MB</source>
- <translation type="unfinished">МБ</translation>
+ <translation>МБ</translation>
</message>
<message>
<source>Memory</source>
- <translation type="unfinished">ПамÑÑ‚ÑŒ</translation>
+ <translation>ПамÑÑ‚ÑŒ</translation>
</message>
<message>
<source>The recommended base memory size is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">Рекомендуемый размер оÑновной памÑти: &lt;b&gt;%1&lt;/b&gt; Мб.</translation>
+ <translation>Рекомендуемый размер оÑновной памÑти: &lt;b&gt;%1&lt;/b&gt; МБ.</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">МБ</translation>
+ <translation>МБ</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage4</name>
<message>
<source>&lt;p&gt;Select a hard disk image to be used as the boot hard disk of the virtual machine. You can either create a new hard disk using the &lt;b&gt;New&lt;/b&gt; button or select an existing hard disk image from the drop-down list or by pressing the &lt;b&gt;Existing&lt;/b&gt; button (to invoke the Virtual Media Manager dialog).&lt;/p&gt;&lt;p&gt;If you need a more complicated hard disk setup, you can also skip this step and attach hard disks later using the VM Settings dialog.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Выберите жеÑткий диÑк, который будет загрузочным диÑком виртуальной машины. Ð’Ñ‹ можете Ñоздать новый жеÑткий диÑк, нажав кнопку &lt;b&gt;Создать&lt;/b&gt;, либо выбрать ÑущеÑтвующий из выпадающего ÑпиÑка или из Менеджера виртуальных ноÑителей (который откроетÑÑ Ð¿Ñ€Ð¸ нажатии на кнопку &lt;b&gt;СущеÑтвующий&lt;/b&gt;).&lt;/p&gt;&lt;p&gt;ЕÑли Вам требуетÑÑ Ð±Ð¾Ð»ÐµÐµ ÑÐ»Ð¾Ð¶Ð½Ð°Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¶ÐµÑтких диÑков, то можно пропуÑтить Ñтот шаг и подÑоединить жеÑткие диÑки позднее Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ диалога СвойÑтв машины.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Выберите жёÑткий диÑк, который будет загрузочным диÑком виртуальной машины. Ð’Ñ‹ можете Ñоздать новый жёÑткий диÑк, выбрав опцию &lt;b&gt;Создать новый жёÑткий диÑк&lt;/b&gt;, либо указать ÑущеÑтвующий, выбрав опцию &lt;b&gt;ИÑпользовать ÑущеÑтвующий жёÑткий диÑк&lt;/b&gt;, а затем выбрать диÑк из выпадающего ÑпиÑка или из &lt;b&gt;Менеджера виртуальных ноÑителей&lt;/b&gt; (который откроетÑÑ Ð¿Ñ€Ð¸ нажатии на кнопку Ñправа от ÑпиÑка).&lt;/p&gt;&lt;p&gt;ЕÑли Вам требуетÑÑ Ð±Ð¾Ð»ÐµÐµ ÑÐ»Ð¾Ð¶Ð½Ð°Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¶Ñ‘Ñтких диÑков, то можно пропуÑтить Ñтот шаг и подÑоединить жёÑткие диÑки позднее Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ диалога наÑтроек машины.&lt;/p&gt;</translation>
</message>
<message>
- <source>Boot Hard &amp;Disk (Primary Master)</source>
- <translation type="unfinished">&amp;Загрузочный жёÑткий диÑк (первичный маÑтер)</translation>
+ <source>Boot Hard &amp;Disk</source>
+ <translation>&amp;Загрузочный жёÑткий диÑк</translation>
</message>
<message>
<source>&amp;Create new hard disk</source>
- <translation type="unfinished">&amp;Создать новый жёÑткий диÑк</translation>
+ <translation>&amp;Создать новый жёÑткий диÑк</translation>
</message>
<message>
<source>&amp;Use existing hard disk</source>
- <translation type="unfinished">&amp;ИÑпользовать ÑущеÑтвующий жёÑткий диÑк</translation>
+ <translation>&amp;ИÑпользовать ÑущеÑтвующий жёÑткий диÑк</translation>
</message>
<message>
<source>Virtual Hard Disk</source>
- <translation type="unfinished">Виртуальный жеÑткий диÑк</translation>
+ <translation>Виртуальный жёÑткий диÑк</translation>
</message>
<message>
<source>The recommended size of the boot hard disk is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">Рекомендуемый размер загрузочного жеÑткого диÑка: &lt;b&gt;%1&lt;/b&gt; Мб.</translation>
+ <translation>Рекомендуемый размер загрузочного жёÑткого диÑка: &lt;b&gt;%1&lt;/b&gt; МБ.</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage5</name>
<message>
<source>&lt;p&gt;You are going to create a new virtual machine with the following parameters:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ð’Ñ‹ ÑобираетеÑÑŒ Ñоздать виртуальную машину Ñо Ñледующими параметрами:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Ð’Ñ‹ ÑобираетеÑÑŒ Ñоздать виртуальную машину Ñо Ñледующими параметрами:&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Итог</translation>
+ <translation>Итог</translation>
</message>
<message>
<source>Name</source>
<comment>summary</comment>
- <translation type="unfinished">ИмÑ</translation>
+ <translation>ИмÑ</translation>
</message>
<message>
<source>OS Type</source>
<comment>summary</comment>
- <translation type="unfinished">Тип ОС</translation>
+ <translation>Тип ОС</translation>
</message>
<message>
<source>Base Memory</source>
<comment>summary</comment>
- <translation type="unfinished">ОÑÐ½Ð¾Ð²Ð½Ð°Ñ Ð¿Ð°Ð¼ÑÑ‚ÑŒ</translation>
+ <translation>ОÑÐ½Ð¾Ð²Ð½Ð°Ñ Ð¿Ð°Ð¼ÑÑ‚ÑŒ</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">МБ</translation>
+ <translation>МБ</translation>
</message>
<message>
<source>Boot Hard Disk</source>
<comment>summary</comment>
- <translation type="unfinished">Загрузочный жеÑткий диÑк</translation>
+ <translation>Загрузочный жёÑткий диÑк</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new virtual machine will be created. &lt;/p&gt;&lt;p&gt;Note that you can alter these and all other setting of the created virtual machine at any time using the &lt;b&gt;Settings&lt;/b&gt; dialog accessible through the menu of the main window.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;ЕÑли Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ð°Ñ Ð²Ñ‹ÑˆÐµ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð²ÐµÑ€Ð½Ð°, нажмите кнопку &lt;b&gt;%1&lt;/b&gt;. ПоÑле Ñтого будет Ñоздана Ð½Ð¾Ð²Ð°Ñ Ð²Ð¸Ñ€Ñ‚ÑƒÐ°Ð»ÑŒÐ½Ð°Ñ Ð¼Ð°ÑˆÐ¸Ð½Ð°. &lt;/p&gt;&lt;p&gt;Обратите внимание, что Ñти и другие параметры Ñозданной машины можно будет изменить в любое Ð²Ñ€ÐµÐ¼Ñ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ диалога &lt;b&gt;СвойÑтва&lt;/b&gt;, доÑтуп к которому можно получить через меню главного окна VirtualBox.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -1706,12 +1706,12 @@ p, li { white-space: pre-wrap; }
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">МБ</translation>
+ <translation>МБ</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">МБ</translation>
+ <translation>МБ</translation>
</message>
</context>
<context>
@@ -2276,48 +2276,48 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Dock Icon</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Иконка дока</translation>
</message>
<message>
<source>Show Application Icon</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Показать иконку приложениÑ</translation>
</message>
<message>
<source>Show Monitor Preview</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">ПредпроÑмотр монитора</translation>
</message>
<message>
<source>&lt;br&gt;&lt;nobr&gt;&lt;b&gt;Adapter %1 (%2)&lt;/b&gt;: %3 cable %4&lt;/nobr&gt;</source>
<comment>Network adapters tooltip</comment>
- <translation type="unfinished"></translation>
+ <translation>&lt;br&gt;&lt;nobr&gt;&lt;b&gt;Ðдаптер %1 (%2)&lt;/b&gt;: %3 кабель %4&lt;/nobr&gt;</translation>
</message>
<message>
<source>ACPI Sh&amp;utdown</source>
- <translation type="unfinished"></translation>
+ <translation>В&amp;ыключить через ACPI</translation>
</message>
<message>
<source>&amp;View</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Вид</translation>
</message>
<message>
<source>Preview Monitor %1</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">ПредпроÑмотр монитора %1</translation>
</message>
<message>
<source>No CD/DVD devices attached to that VM</source>
- <translation type="unfinished"></translation>
+ <translation>Ðет подÑоединенных приводов оптичеÑких диÑков</translation>
</message>
<message>
<source>No floppy devices attached to that VM</source>
- <translation type="unfinished"></translation>
+ <translation>Ðет подÑоединенных приводов гибких диÑков</translation>
</message>
<message>
<source>No USB Devices Connected</source>
- <translation type="unfinished"></translation>
+ <translation>Ðет подÑоединенных USB уÑтройÑтв</translation>
</message>
<message>
<source>No supported devices connected to the host PC</source>
- <translation type="unfinished">Ðет поддерживаемых уÑтройÑтв, подключенных к оÑновному ПК</translation>
+ <translation>Ðет поддерживаемых уÑтройÑтв, подключенных к хоÑту</translation>
</message>
</context>
<context>
@@ -2480,11 +2480,11 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Reset Host Key</source>
- <translation type="unfinished"></translation>
+ <translation>СброÑить</translation>
</message>
<message>
<source>Resets the key used as a Host Key in the VM window.</source>
- <translation type="unfinished"></translation>
+ <translation>СбраÑывает назначенную хоÑÑ‚-клавишу в значение &apos;не уÑтановлено&apos;.</translation>
</message>
</context>
<context>
@@ -3768,7 +3768,7 @@ p, li { white-space: pre-wrap; }
<message>
<source>Disabled</source>
<comment>details report (2D Video Acceleration)</comment>
- <translation>Отключено</translation>
+ <translation>Выключено</translation>
</message>
<message>
<source>2D Video Acceleration</source>
@@ -4003,81 +4003,81 @@ p, li { white-space: pre-wrap; }
<message>
<source>Screens</source>
<comment>details report</comment>
- <translation type="unfinished"></translation>
+ <translation>Мониторы</translation>
</message>
<message>
<source>VDE network, &apos;%1&apos;</source>
<comment>details report (network)</comment>
- <translation type="unfinished"></translation>
+ <translation>VDE-Ñеть, &apos;%1&apos;</translation>
</message>
<message>
<source>SAS</source>
<comment>StorageBus</comment>
- <translation type="unfinished"></translation>
+ <translation>SAS</translation>
</message>
<message>
<source>VDE Adapter</source>
<comment>NetworkAttachmentType</comment>
- <translation type="unfinished"></translation>
+ <translation>VDE-Ðдаптер</translation>
</message>
<message>
<source>LsiLogic SAS</source>
<comment>StorageControllerType</comment>
- <translation type="unfinished"></translation>
+ <translation>LsiLogic SAS</translation>
</message>
<message>
<source>^(?:(?:(\d+)(?:\s?(B|KB|MB|GB|TB|PB))?)|(?:(\d*)%1(\d{1,2})(?:\s?(KB|MB|GB|TB|PB))))$</source>
<comment>regexp for matching ####[.##] B|KB|MB|GB|TB|PB, %1=decimal point</comment>
- <translation type="unfinished"></translation>
+ <translation>^(?:(?:(\d+)(?:\s?(Б|КБ|МБ|ГБ|ТБ|ПБ))?)|(?:(\d*)%1(\d{1,2})(?:\s?(КБ|МБ|ГБ|ТБ|ПБ))))$</translation>
</message>
<message>
<source>B</source>
<comment>size suffix Bytes</comment>
- <translation type="unfinished"></translation>
+ <translation>Б</translation>
</message>
<message>
<source>KB</source>
<comment>size suffix KBytes=1024 Bytes</comment>
- <translation type="unfinished"></translation>
+ <translation>КБ</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">МБ</translation>
+ <translation>МБ</translation>
</message>
<message>
<source>GB</source>
<comment>size suffix GBytes=1024 MBytes</comment>
- <translation type="unfinished"></translation>
+ <translation>ГБ</translation>
</message>
<message>
<source>TB</source>
<comment>size suffix TBytes=1024 GBytes</comment>
- <translation type="unfinished"></translation>
+ <translation>ТБ</translation>
</message>
<message>
<source>PB</source>
<comment>size suffix PBytes=1024 TBytes</comment>
- <translation type="unfinished"></translation>
+ <translation>ПБ</translation>
</message>
<message>
<source>Enabled</source>
<comment>nested paging</comment>
- <translation type="unfinished"></translation>
+ <translation>Включено</translation>
</message>
<message>
<source>Disabled</source>
<comment>nested paging</comment>
- <translation type="unfinished"></translation>
+ <translation>Выключено</translation>
</message>
<message>
<source>Nested Paging</source>
- <translation type="unfinished"></translation>
+ <translation>Nested Paging</translation>
</message>
<message>
<source>Shareable</source>
<comment>DiskType</comment>
- <translation type="unfinished"></translation>
+ <translation>С общим доÑтупом</translation>
</message>
</context>
<context>
@@ -5344,51 +5344,51 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>&lt;p&gt;VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðппаратное уÑкорение (VT-x/AMD-V) не доÑтупно в Вашей ÑиÑтеме. Ваша 64Ñ…-Ð±Ð¸Ñ‚Ð½Ð°Ñ Ð³Ð¾ÑÑ‚ÐµÐ²Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÑиÑтема не Ñможет определить 64Ñ…-битный процеÑÑор и, таким образом, не Ñможет загрузитьÑÑ.</translation>
</message>
<message>
<source>&lt;p&gt;VT-x/AMD-V hardware acceleration is not available on your system. Certain guests (e.g. OS/2 and QNX) require this feature and will fail to boot without it.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðппаратное уÑкорение (VT-x/AMD-V) не доÑтупно в Вашей ÑиÑтеме. Ðекоторым операционным ÑиÑтемам (таким как OS/2 и QNX) данный функционал необходим, они не Ñмогут загрузитьÑÑ Ð±ÐµÐ· него.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Deleting the snapshot %1 will temporarily need more disk space. In the worst case the size of image %2 will grow by %3, however on this filesystem there is only %4 free.&lt;/p&gt;&lt;p&gt;Running out of disk space during the merge operation can result in corruption of the image and the VM configuration, i.e. loss of the VM and its data.&lt;/p&gt;&lt;p&gt;You may continue with deleting the snapshot at your own risk.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ð”Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ðµ Ñнимка %1 временно понадобитÑÑ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ðµ количеÑтво Ñвободного диÑкового проÑтранÑтва. Ð’ Ñамом худшем Ñлучае размер образа %2 увеличитÑÑ Ð½Ð° %3, однако в данной ÑиÑтеме доÑтупно лишь %4.&lt;/p&gt;&lt;p&gt;Ð’ Ñлучае нехватки Ñвободного меÑта в процеÑÑе операции Ð¾Ð±ÑŠÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¾Ð±Ñ€Ð°Ð·Ð¾Ð², может произойти критичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°, что приведёт к повреждению образа и конфигурации виртуальной машины, иными Ñловами - к потере данной машины и её данных.&lt;/p&gt;&lt;p&gt;Однако, Ð’Ñ‹ вÑе же можете попытатьÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ данный Ñнимок на Ñвой Ñтрах и риÑк.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Could not change the guest screen to this host screen due to insufficient guest video memory.&lt;/p&gt;&lt;p&gt;You should configure the virtual machine to have at least &lt;b&gt;%1&lt;/b&gt; of video memory.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðе удалоÑÑŒ ÑопоÑтавить монитор гоÑтевой машины Ñ Ð´Ð°Ð½Ð½Ñ‹Ð¼ монитором хоÑта из-за нехватки видео-памÑти.&lt;/p&gt;&lt;p&gt;Вам Ñледует наÑтроить виртуальную машину таким образом, что бы она имела как минимум &lt;b&gt;%1&lt;/b&gt; видео-памÑти.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Could not change the guest screen to this host screen due to insufficient guest video memory.&lt;/p&gt;&lt;p&gt;You should configure the virtual machine to have at least &lt;b&gt;%1&lt;/b&gt; of video memory.&lt;/p&gt;&lt;p&gt;Press &lt;b&gt;Ignore&lt;/b&gt; to switch the screen anyway or press &lt;b&gt;Cancel&lt;/b&gt; to cancel the operation.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðе удалоÑÑŒ ÑопоÑтавить монитор гоÑтевой машины Ñ Ð´Ð°Ð½Ð½Ñ‹Ð¼ монитором хоÑта из-за нехватки видео-памÑти.&lt;/p&gt;&lt;p&gt;Вам Ñледует наÑтроить виртуальную машину таким образом, что бы она имела как минимум &lt;b&gt;%1&lt;/b&gt; видео-памÑти.&lt;/p&gt;&lt;p&gt;Ðажмите кнопку &lt;b&gt;Игнорировать&lt;/b&gt; чтобы попытатьÑÑ Ñто Ñделать в любом Ñлучае или &lt;b&gt;Отмена&lt;/b&gt; чтобы прервать данную операцию.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Can not switch the guest display to fullscreen mode. You have more virtual screens configured than physical screens are attached to your host.&lt;/p&gt;&lt;p&gt;Please either lower the virtual screens in your VM configuration or attach additional screens to your host.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðе удалоÑÑŒ переключить гоÑтевую операционную ÑиÑтему в режим полного Ñкрана. Ð”Ð°Ð½Ð½Ð°Ñ Ð¼Ð°ÑˆÐ¸Ð½Ð° наÑтроена на поддержку большего количеÑтва виртуальных мониторов, чем реально имеетÑÑ Ð½Ð° Вашем хоÑте.&lt;/p&gt;&lt;p&gt;ПожалуйÑта уменьшите количеÑтво виртуальных мониторов в наÑтройках Вашей машины, либо подключите дополнительные мониторы к Вашему хоÑту.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Can not switch the guest display to seamless mode. You have more virtual screens configured than physical screens are attached to your host.&lt;/p&gt;&lt;p&gt;Please either lower the virtual screens in your VM configuration or attach additional screens to your host.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðе удалоÑÑŒ переключить гоÑтевую операционную ÑиÑтему в режим интеграции Ñкрана. Ð”Ð°Ð½Ð½Ð°Ñ Ð¼Ð°ÑˆÐ¸Ð½Ð° наÑтроена на поддержку большего количеÑтва виртуальных мониторов, чем реально имеетÑÑ Ð½Ð° Вашем хоÑте.&lt;/p&gt;&lt;p&gt;ПожалуйÑта уменьшите количеÑтво виртуальных мониторов в наÑтройках Вашей машины, либо подключите дополнительные мониторы к Вашему хоÑту.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Could not find the VirtualBox User Manual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;Do you wish to download this file from the Internet?&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðе удалоÑÑŒ обнаружить РуководÑтво ÐŸÐ¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ VirtualBox &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;Ðе желаете ли загрузить данный документ Ñ Ñайта в Ñети Интернет?&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Are you sure you want to download the VirtualBox User Manual from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; (size %3 bytes)?&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ð’Ñ‹ уверены, что хотите загрузить РуководÑтво ÐŸÐ¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ VirtualBox, находÑщееÑÑ Ð¿Ð¾ адреÑу &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; (размер %3 б)?&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Failed to download the VirtualBox User Manual from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;%3&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ðе удалоÑÑŒ загрузить РуководÑтво ÐŸÐ¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ VirtualBox, находÑщееÑÑ Ð¿Ð¾ адреÑу &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;%3&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;The VirtualBox User Manual has been successfully downloaded from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; and saved locally as &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;РуководÑтво ÐŸÐ¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ VirtualBox было уÑпешно загружено Ñ Ñетевого адреÑа &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; и Ñохранено локально по адреÑу &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;The VirtualBox User Manual has been successfully downloaded from &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt; but can&apos;t be saved locally as &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;Please choose another location for that file.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;РуководÑтво ÐŸÐ¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ VirtualBox было уÑпешно загружено Ñ Ñетевого адреÑа &lt;nobr&gt;&lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/nobr&gt;, но не может быть Ñохранено локально по адреÑу &lt;nobr&gt;&lt;b&gt;%3&lt;/b&gt;.&lt;/nobr&gt;&lt;/p&gt;&lt;p&gt;ПожалуйÑта укажите иное меÑтоположение Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ файла.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -6585,15 +6585,15 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Mo&amp;nitor Count:</source>
- <translation type="unfinished"></translation>
+ <translation>КоличеÑтво &amp;мониторов:</translation>
</message>
<message>
<source>Controls the amount of virtual monitors provided to the virtual machine.</source>
- <translation type="unfinished"></translation>
+ <translation>Задаёт количеÑтво виртуальных мониторов, подключенных к данной виртуальной машине.</translation>
</message>
<message>
<source>&lt;qt&gt;%1&lt;/qt&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;qt&gt;%1&lt;/qt&gt;</translation>
</message>
</context>
<context>
@@ -6680,7 +6680,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>you have enabled a USB HID (Human Interface Device). This will not work unless USB emulation is also enabled. This will be done automatically when you accept the VM Settings by pressing the OK button.</source>
- <translation type="unfinished"></translation>
+ <translation>Ð’Ñ‹ включили поддержку USB HID (уÑтройÑтва пользовательÑкого интерфейÑа). Ð”Ð°Ð½Ð½Ð°Ñ Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ðµ работает без активированной USB ÑмулÑции, поÑтому USB ÑмулÑÑ†Ð¸Ñ Ð±ÑƒÐ´ÐµÑ‚ активирована в момент ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð½Ð°Ñтроек виртуальной машины при закрытии данного диалога.</translation>
</message>
</context>
<context>
@@ -7245,27 +7245,27 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Allows to use host I/O caching capabilities.</source>
- <translation type="unfinished"></translation>
+ <translation>ПозволÑет иÑпользовать функции ÐºÐµÑˆÐ¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¹ ввода/вывода данного хоÑта.</translation>
</message>
<message>
<source>Use host I/O cache</source>
- <translation type="unfinished"></translation>
+ <translation>Кеширование операций ввода/вывода</translation>
</message>
<message>
<source>Add SAS Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Добавить SAS контроллер</translation>
</message>
<message>
<source>SAS Controller</source>
- <translation type="unfinished"></translation>
+ <translation>SAS контроллер</translation>
</message>
<message>
<source>Storage Controller</source>
- <translation type="unfinished"></translation>
+ <translation>Контроллер</translation>
</message>
<message>
<source>Storage Controller 1</source>
- <translation type="unfinished"></translation>
+ <translation>Контроллер 1</translation>
</message>
</context>
<context>
@@ -8008,23 +8008,23 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>If checked, the RTC device will report the time in UTC, otherwise in local (host) time. Unix usually expects the hardware clock to be set to UTC.</source>
- <translation type="unfinished"></translation>
+ <translation>ЕÑли Ñтоит галочка, чаÑÑ‹ Вашего хоÑта отобразÑÑ‚ Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾ шкале вÑемирного координированного времени (UTC), иначе будет отображено локальное Ð²Ñ€ÐµÐ¼Ñ Ñ…Ð¾Ñта. Unix-подобные ÑиÑтемы обычно придерживаютÑÑ ÑиÑтемы UTC.</translation>
</message>
<message>
<source>Hardware clock in &amp;UTC time</source>
- <translation type="unfinished"></translation>
+ <translation>ЧаÑÑ‹ в ÑиÑтеме &amp;UTC</translation>
</message>
<message>
<source>Controls the number of virtual CPUs in the virtual machine. You need hardware virtualization support on your host system to use more than one virtual CPU.</source>
- <translation type="unfinished"></translation>
+ <translation>Контролирует количеÑтво процеÑÑоров виртуальной машины. Вам необходима поддержка аппаратной виртуализации Ð´Ð»Ñ Ð·Ð°Ð´ÐµÐ¹ÑÑ‚Ð²Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±Ð¾Ð»ÐµÐµ одного процеÑÑора в виртуальной машине.</translation>
</message>
<message>
<source>If checked, an absolute pointing device (a USB tablet) will be supported. Otherwise, only a standard PS/2 mouse will be emulated.</source>
- <translation type="unfinished"></translation>
+ <translation>ЕÑли Ñтоит галочка, будут поддерживатьÑÑ Ð°Ð±Ñолютные уÑтройÑтва Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¾Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ (такие как USB планшет). Ð’ противном Ñлучае, Ñмулированы будут лишь Ñтандартные PS/2 мыши.</translation>
</message>
<message>
<source>Enable &amp;absolute pointing device</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;ÐбÑолютные уÑтройÑтва позиционированиÑ</translation>
</message>
</context>
<context>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_sk.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_sk.ts
index 8143ffe6a..d1ba46758 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_sk.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_sk.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="sk">
+<!DOCTYPE TS><TS version="1.1" language="sk">
+<defaultcodec></defaultcodec>
<context>
<name>@@@</name>
<message>
@@ -125,7 +125,7 @@
</message>
<message>
<source>Unknown error %2 during initialization of the Runtime</source>
- <translation type="unfinished"></translation>
+ <translation>Vyskytla sa neznáma chyba %2 pri spúšťaní</translation>
</message>
<message>
<source>Kernel driver not accessible</source>
@@ -141,7 +141,7 @@
</message>
<message>
<source>This error means that the kernel driver was either not able to allocate enough memory or that some mapping operation failed.</source>
- <translation type="unfinished"></translation>
+ <translation>Táto chyba znamená, že ovládaÄ jadra nebol schopný alokovaÅ¥ dostatok pamäte alebo zlyhala operácia mapovania.</translation>
</message>
</context>
<context>
@@ -440,7 +440,7 @@
<name>QIWizardPage</name>
<message>
<source>Use the &lt;b&gt;%1&lt;/b&gt; button to go to the next page of the wizard and the &lt;b&gt;%2&lt;/b&gt; button to return to the previous page. You can also press &lt;b&gt;%3&lt;/b&gt; if you want to cancel the execution of this wizard.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Použite tlaÄidlo &lt;b&gt;%1&lt;/b&gt; pre prechod na ÄalÅ¡iu stránku sprievodcu a tlaÄidlo &lt;b&gt;%2&lt;/b&gt; pre návrat na predchádzajúcu stránku. Ak chcete sprievodcu preruÅ¡iÅ¥, stlaÄte tlaÄidlo &lt;b&gt;%3&lt;/b&gt;.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -491,7 +491,7 @@
</message>
<message>
<source>The download process has been canceled by the user.</source>
- <translation type="unfinished"></translation>
+ <translation>Proces sťahovania bol zrušený používateľom.</translation>
</message>
</context>
<context>
@@ -521,7 +521,7 @@
<name>UIDownloaderUserManual</name>
<message>
<source>Select folder to save User Manual to</source>
- <translation type="unfinished"></translation>
+ <translation>Vyberte prieÄinok pre uloženie používateľskej príruÄky</translation>
</message>
</context>
<context>
@@ -536,7 +536,7 @@
</message>
<message>
<source>Appliance Export Wizard</source>
- <translation type="unfinished"></translation>
+ <translation>Sprievodca exportom appliance</translation>
</message>
<message>
<source>&lt; &amp;Back</source>
@@ -607,116 +607,116 @@
<name>UIExportApplianceWzdPage1</name>
<message>
<source>Welcome to the Appliance Export Wizard!</source>
- <translation type="unfinished"></translation>
+ <translation>Víta vás sprievodca exportom appliance!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the process of exporting an appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Please select the virtual machines that should be added to the appliance. You can select more than one. Please note that these machines have to be turned off before they can be exported.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Tento sprievodca vás prevedie procesom exportu appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Vyberte prosím virtuálny poÄítaÄ, ktorý bude pridaný do appliance. Môžete vybraÅ¥ viac ako jeden. Majte prosím na pamäti, že pred exportom budú tieto virtuálne poÄítaÄe vypnuté.&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage2</name>
<message>
<source>Here you can change additional configuration values of the selected virtual machines. You can modify most of the properties shown by double-clicking on the items.</source>
- <translation type="unfinished"></translation>
+ <translation>Tu môžete zmeniÅ¥ ÄalÅ¡ie nastavenia konfigurácie pre vybrané virtuálne poÄítaÄe. VäÄÅ¡inu zobrazených vlastností zmeníte dvojklikom na danú položku.</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished"></translation>
+ <translation>Nastavenia exportu appliance</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage3</name>
<message>
<source>Please specify the target for the OVF export. You can choose between a local file system export, uploading the OVF to the Sun Cloud service or an S3 storage server.</source>
- <translation type="unfinished"></translation>
+ <translation>Zadajte, prosím, cieľ pre export OVF. Môžete si vybrať medzi lokálnym súborovým systémom, nahraním OVF na Sun Cloud alebo použitím služby S3 pre ukladanie.</translation>
</message>
<message>
<source>&amp;Local Filesystem </source>
- <translation type="unfinished">&amp;Miestny súborový systém </translation>
+ <translation>&amp;Miestny súborový systém </translation>
</message>
<message>
<source>Sun &amp;Cloud</source>
- <translation type="unfinished"></translation>
+ <translation>Sun &amp;Cloud</translation>
</message>
<message>
<source>&amp;Simple Storage System (S3)</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Jednoduchý systém na ukladanie (S3)</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished"></translation>
+ <translation>Nastavenia exportu appliance</translation>
</message>
</context>
<context>
<name>UIExportApplianceWzdPage4</name>
<message>
<source>&amp;Username:</source>
- <translation type="unfinished">&amp;Meno užívateľa:</translation>
+ <translation>&amp;Meno používateľa:</translation>
</message>
<message>
<source>&amp;Password:</source>
- <translation type="unfinished">&amp;Heslo:</translation>
+ <translation>&amp;Heslo:</translation>
</message>
<message>
<source>&amp;Hostname:</source>
- <translation type="unfinished">&amp;Hostiteľ:</translation>
+ <translation>&amp;Názov hostiteľa:</translation>
</message>
<message>
<source>&amp;Bucket:</source>
- <translation type="unfinished">&amp;Sektor:</translation>
+ <translation>&amp;Sektor:</translation>
</message>
<message>
<source>&amp;File:</source>
- <translation type="unfinished">&amp;Súbor:</translation>
+ <translation>&amp;Súbor:</translation>
</message>
<message>
<source>Write in legacy OVF 0.9 format for compatibility with other virtualization products.</source>
- <translation type="unfinished">UložiÅ¥ v starÅ¡om formáte OVF 0.9 kvôli kompatibilite so staršími virtualizaÄnými produktami.</translation>
+ <translation>UložiÅ¥ v starÅ¡om formáte OVF 0.9 kvôli kompatibilite so staršími virtualizaÄnými produktami.</translation>
</message>
<message>
<source>&amp;Write legacy OVF 0.9</source>
- <translation type="unfinished">&amp;Uložiť vo formáte OVF 0.9</translation>
+ <translation>&amp;Uložiť vo formáte OVF 0.9</translation>
</message>
<message>
<source>Appliance Export Settings</source>
- <translation type="unfinished"></translation>
+ <translation>Nastavenia exportu appliance</translation>
</message>
<message>
<source>Appliance</source>
- <translation type="unfinished"></translation>
+ <translation>Appliance</translation>
</message>
<message>
<source>Select a file to export into</source>
- <translation type="unfinished">Vyberte súbor pre export</translation>
+ <translation>Vyberte súbor pre export</translation>
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Formát Open Virtualization Format (%1)</translation>
+ <translation>Formát Open Virtualization Format (%1)</translation>
</message>
<message>
<source>Please choose a filename to export the OVF to.</source>
- <translation type="unfinished">Prosím, vyberte názov súboru pre export OVF.</translation>
+ <translation>Prosím, vyberte názov súboru pre export OVF.</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password and the bucket, and provide a filename for the OVF target.</source>
- <translation type="unfinished"></translation>
+ <translation>Vyplňte, prosím, nasledujúce položky ako je meno používateľa, heslo a sektor. Nakoniec zadajte cieľ, kam sa bude OVF exportovať.</translation>
</message>
<message>
<source>Please complete the additional fields like the username, password, hostname and the bucket, and provide a filename for the OVF target.</source>
- <translation type="unfinished"></translation>
+ <translation>Prosím, vyplňte nasledujúce položky ako je meno používateľa, jeho heslo, názov hostiteľa a sektor. Nakoniec zadajte cieľ, kam sa bude OVF exportovať.</translation>
</message>
<message>
<source>Checking files ...</source>
- <translation type="unfinished">Kontrolujem súbory ...</translation>
+ <translation>Kontrolujem súbory ...</translation>
</message>
<message>
<source>Removing files ...</source>
- <translation type="unfinished">Odstraňujem súbory ...</translation>
+ <translation>Odstraňujem súbory ...</translation>
</message>
<message>
<source>Exporting Appliance ...</source>
- <translation type="unfinished"></translation>
+ <translation>Export appliance...</translation>
</message>
</context>
<context>
@@ -844,11 +844,11 @@
<name>UIFirstRunWzdPage1</name>
<message>
<source>Welcome to the First Run Wizard!</source>
- <translation type="unfinished">Vitajte v Sprievodcovi prvým spustením!</translation>
+ <translation>Vitajte v Sprievodcovi prvým spustením!</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for installing an operating system of your choice onto this virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Spustili ste po prvýkrát Äerstvo vytvorený virtuálny poÄítaÄ. Tento sprievodca vám pomôže urobiÅ¥ kroky potrebné pre inÅ¡taláciu vybraného operaÄného systému do tohto virtuálneho poÄítaÄa.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for booting an operating system of your choice on the virtual machine.&lt;/p&gt;&lt;p&gt;Note that you will not be able to install an operating system into this virtual machine right now because you did not attach any hard disk to it. If this is not what you want, you can cancel the execution of this wizard, select &lt;b&gt;Settings&lt;/b&gt; from the &lt;b&gt;Machine&lt;/b&gt; menu of the main VirtualBox window to access the settings dialog of this machine and change the hard disk configuration.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
@@ -859,56 +859,56 @@
<name>UIFirstRunWzdPage2</name>
<message>
<source>&lt;p&gt;Select the media which contains the setup program of the operating system you want to install. This media must be bootable, otherwise the setup program will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vyberte médium, ktoré obsahuje inÅ¡talaÄný program pre operaÄný systém, ktorý chcete nainÅ¡talovaÅ¥. Toto médium musí byÅ¥ bootovateľné, inak inÅ¡talaÄný program nebude možné spustiÅ¥.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vyberte médium, ktoré obsahuje inÅ¡talaÄný program pre operaÄný systém, ktorý chcete nainÅ¡talovaÅ¥. Toto médium musí byÅ¥ bootovateľné, inak inÅ¡talaÄný program nebude možné spustiÅ¥.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;Select the media that contains the operating system you want to work with. This media must be bootable, otherwise the operating system will not be able to start.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vyberte médium, ktoré obsahuje inÅ¡talaÄný program pre operaÄný systém, ktorý chcete nainÅ¡talovaÅ¥. Toto médium musí byÅ¥ bootovateľné, inak inÅ¡talaÄný program nebude možné spustiÅ¥.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vyberte médium, ktoré obsahuje inÅ¡talaÄný program pre operaÄný systém, ktorý chcete nainÅ¡talovaÅ¥. Toto médium musí byÅ¥ bootovateľné, inak inÅ¡talaÄný program nebude možné spustiÅ¥.&lt;/p&gt;</translation>
</message>
<message>
<source>Media Source</source>
- <translation type="unfinished">Zdroj média</translation>
+ <translation>Zdroj média</translation>
</message>
<message>
<source>Select Installation Media</source>
- <translation type="unfinished">Vyberte inÅ¡talaÄné médium</translation>
+ <translation>Vyberte inÅ¡talaÄné médium</translation>
</message>
</context>
<context>
<name>UIFirstRunWzdPage3</name>
<message>
<source>&lt;p&gt;You have selected the following media to boot from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vybrali ste bootovanie z nasledujúcich médii:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vybrali ste nasledujúce médiá pre bootovanie:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;You have selected the following media to boot an operating system from:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vybrali ste bootovanie operaÄného systmu z nasledujúcich médii:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vybrali ste bootovanie operaÄného systému z nasledujúcich médii:&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be temporarily mounted on the virtual machine and the machine will start execution.&lt;/p&gt;&lt;p&gt;Please note that when you close the virtual machine, the specified media will be automatically unmounted and the boot device will be set back to the first hard disk.&lt;/p&gt;&lt;p&gt;Depending on the type of the setup program, you may need to manually unmount (eject) the media after the setup program reboots the virtual machine, to prevent the installation process from starting again. You can do this by selecting the corresponding &lt;b&gt;Unmount...&lt;/b&gt; action in the &lt;b&gt;Devices&lt;/b&gt; menu.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ak sú vyÅ¡Å¡ie uvedené údaje správne, stlaÄte tlaÄidlo &lt;b&gt;DokonÄiÅ¥&lt;/b&gt;. KeÄ ho stlaÄíte, vybrané médium bude doÄasne pripojené k virtuálnemu stroju a stroj bude spustený.&lt;/p&gt;&lt;p&gt;Majte na pamäti, že pri ukonÄení virtuálneho stroja bude Å¡pecifikované médium automaticky odpojené a bootovateľné zariadenie bude znovu nastavené na prvý pevný disk.&lt;/p&gt;&lt;p&gt;V závislosti na type inÅ¡talaÄného programu budete možno musieÅ¥ manuálne odpojiÅ¥ (vybraÅ¥) médium predtým, ako inÅ¡talácia reÅ¡tartuje virtuálny stroj, aby ste tak zabránili opätovnému spusteniu inÅ¡talácie. Môžete tak uÄiniÅ¥ výberom zodpovedajúcej akcie &lt;b&gt;OdpojiÅ¥...&lt;/b&gt; z ponuky &lt;b&gt;Zariadenia&lt;/b&gt;.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Ak sú vyÅ¡Å¡ie uvedené údaje správne, stlaÄte tlaÄidlo &lt;b&gt;DokonÄiÅ¥&lt;/b&gt;. KeÄ ho stlaÄíte, vybrané médium bude doÄasne pripojené k virtuálnemu stroju a stroj bude spustený.&lt;/p&gt;&lt;p&gt;Majte na pamäti, že pri ukonÄení virtuálneho stroja bude Å¡pecifikované médium automaticky odpojené a bootovateľné zariadenie bude znovu nastavené na prvý pevný disk.&lt;/p&gt;&lt;p&gt;V závislosti na type inÅ¡talaÄného programu budete možno musieÅ¥ manuálne odpojiÅ¥ (vybraÅ¥) médium predtým, ako inÅ¡talácia reÅ¡tartuje virtuálny stroj, aby ste tak zabránili opätovnému spusteniu inÅ¡talácie. Môžete tak uÄiniÅ¥ výberom zodpovedajúcej akcie &lt;b&gt;OdpojiÅ¥...&lt;/b&gt; z ponuky &lt;b&gt;Zariadenia&lt;/b&gt;.&lt;/p&gt;</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, the selected media will be mounted on the virtual machine and the machine will start execution.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Ak sú vyÅ¡Å¡ie uvedené nastavenia správne, stlaÄte tlaÄidlo &lt;b&gt;DokonÄiÅ¥&lt;/b&gt;. KeÄ ho stlaÄíte, vybrané médium bude pripojené pre virtuálny stroj a stroj bude spustený.&lt;/p&gt; </translation>
+ <translation>&lt;p&gt;Ak sú vyÅ¡Å¡ie uvedené nastavenia správne, stlaÄte tlaÄidlo &lt;b&gt;DokonÄiÅ¥&lt;/b&gt;. KeÄ ho stlaÄíte, vybrané médium bude pripojené k virtuálnemu stroju a stroj bude spustený.&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Zhrnutie</translation>
+ <translation>Zhrnutie</translation>
</message>
<message>
<source>CD/DVD-ROM Device</source>
- <translation type="unfinished">Zariadenie CD/DVD-ROM</translation>
+ <translation>Mechanika CD/DVD-ROM</translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Typ</translation>
+ <translation>Typ</translation>
</message>
<message>
<source>Source</source>
<comment>summary</comment>
- <translation type="unfinished">Zdroj</translation>
+ <translation>Zdroj</translation>
</message>
</context>
<context>
@@ -919,7 +919,7 @@
</message>
<message>
<source>Appliance Import Wizard</source>
- <translation type="unfinished"></translation>
+ <translation>Sprievodca importom appliance</translation>
</message>
<message>
<source>&lt; &amp;Back</source>
@@ -946,19 +946,19 @@
<name>UIImportApplianceWzdPage1</name>
<message>
<source>Select an appliance to import</source>
- <translation type="unfinished"></translation>
+ <translation>Vyberte appliance pre import</translation>
</message>
<message>
<source>Open Virtualization Format (%1)</source>
- <translation type="unfinished">Formát Open Virtualization Format (%1)</translation>
+ <translation>Formát Open Virtualization Format (%1)</translation>
</message>
<message>
<source>Welcome to the Appliance Import Wizard!</source>
- <translation type="unfinished"></translation>
+ <translation>Víta vás sprievodca importom appliance!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through importing an appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;VirtualBox currently supports importing appliances saved in the Open Virtualization Format (OVF). To continue, select the file to import below:&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Tento sprievodca vás prevedie importom appliance.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;VirtualBox momentálne podporuje import appliancí uložených vo formáte Open Virtualization Format (OVF). Pre pokraÄovanie vyberte súbor pre import nižšie:&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -969,18 +969,18 @@
</message>
<message>
<source>Appliance Import Settings</source>
- <translation type="unfinished"></translation>
+ <translation>Nastavenia importu appliance</translation>
</message>
</context>
<context>
<name>UIImportLicenseViewer</name>
<message>
<source>&lt;b&gt;The virtual system &quot;%1&quot; requires that you agree to the terms and conditions of the software license agreement shown below.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Click &lt;b&gt;Agree&lt;/b&gt; to continue or click &lt;b&gt;Disagree&lt;/b&gt; to cancel the import.</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;b&gt;Virtuálny systém &quot;%1&quot; vyžaduje súhlas s podmienkami používania uvedenými v softvérovej licencii zobrazenej nižšie.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Kliknite na &lt;b&gt;Súhlasím&lt;/b&gt; pre pokraÄovanie alebo na &lt;b&gt;Nesúhlasím&lt;/b&gt; pre preruÅ¡enie importu.</translation>
</message>
<message>
<source>Software License Agreement</source>
- <translation type="unfinished"></translation>
+ <translation>Zmluva o používaní softvéru</translation>
</message>
<message>
<source>&amp;Disagree</source>
@@ -1011,56 +1011,56 @@
<name>UIMachineLogic</name>
<message>
<source>VirtualBox OSE</source>
- <translation type="unfinished">VirtualBox OSE</translation>
+ <translation>VirtualBox OSE</translation>
</message>
<message>
<source> EXPERIMENTAL build %1r%2 - %3</source>
- <translation type="unfinished"> EXPERIMENTÃLNY build %1r%2 - %3</translation>
+ <translation> EXPERIMENTÃLNE zostavenie %1r%2 - %3</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetAdditions</name>
<message>
<source>Cancel</source>
- <translation type="unfinished">Zrušiť</translation>
+ <translation>Zrušiť</translation>
</message>
<message>
<source>Cancel the VirtualBox Guest Additions CD image download</source>
- <translation type="unfinished"></translation>
+ <translation>Zrušiť sťahovanie obrazu CD s Hosťovskými doplnkami VirtualBoxu</translation>
</message>
<message>
<source>Downloading the VirtualBox Guest Additions CD image from &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Sťahujem obraz CD s Hosťovskými doplnkami VirtualBoxu &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMiniProcessWidgetUserManual</name>
<message>
<source>Cancel</source>
- <translation type="unfinished">Zrušiť</translation>
+ <translation>Zrušiť</translation>
</message>
<message>
<source>Cancel the VirtualBox User Manual download</source>
- <translation type="unfinished"></translation>
+ <translation>ZruÅ¡iÅ¥ sÅ¥ahovanie používateľskej príruÄky VirtualBoxu</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual</source>
- <translation type="unfinished"></translation>
+ <translation>SÅ¥ahujem používateľskú príruÄku VirtualBoxu</translation>
</message>
<message>
<source>Downloading the VirtualBox User Manual &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>SÅ¥ahujem príruÄku užívateľa pre VirtualBoxu &lt;nobr&gt;&lt;b&gt;%1&lt;/b&gt;...&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UIMultiScreenLayout</name>
<message>
<source>Virtual Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>Virtuálna obrazovka %1</translation>
</message>
<message>
<source>Use Host Screen %1</source>
- <translation type="unfinished"></translation>
+ <translation>Použiť obrazovku hostiteľa %1</translation>
</message>
</context>
<context>
@@ -1268,11 +1268,11 @@ ako veľkosť virtuálneho pevného disku.&lt;/p&gt;</translation>
<name>UINewHDWzdPage1</name>
<message>
<source>Welcome to the Create New Virtual Disk Wizard!</source>
- <translation type="unfinished">Vitajte v sprievodcovi vytvorením nového virtuálneho disku!</translation>
+ <translation>Vitajte v sprievodcovi vytvorením nového virtuálneho disku!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will help you to create a new virtual hard disk for your virtual machine.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Tento sprievodca vám pomôže vytvoriť nový virtuálny disk pre virtuálny stroj&gt;.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -1283,88 +1283,88 @@ ako veľkosť virtuálneho pevného disku.&lt;/p&gt;</translation>
</message>
<message>
<source>Storage Type</source>
- <translation type="unfinished">Typ úložiska</translation>
+ <translation>Typ úložiska</translation>
</message>
<message>
<source>&amp;Dynamically expanding storage</source>
- <translation type="unfinished">&amp;Dynamicky sa zväÄÅ¡ujúce úložisko</translation>
+ <translation>&amp;Dynamicky sa zväÄÅ¡ujúce úložisko</translation>
</message>
<message>
<source>&amp;Fixed-size storage</source>
- <translation type="unfinished">Ú&amp;ložisko s fixnou veľkosťou</translation>
+ <translation>Ú&amp;ložisko s fixnou veľkosťou</translation>
</message>
<message>
<source>Hard Disk Storage Type</source>
- <translation type="unfinished">Typ úložiska pevného disku</translation>
+ <translation>Typ úložiska pevného disku</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage3</name>
<message>
<source>&lt;p&gt;Press the &lt;b&gt;Select&lt;/b&gt; button to select the location of a file to store the hard disk data or type a file name in the entry field.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;StlaÄte tlaÄidlo &lt;b&gt;Výber&lt;/b&gt; a vyberte umiestnenie súboru, ktoré bude slúžiÅ¥ na ukladanie dát pevného disku alebo napíšte jeho meno do poľa vstupu.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;StlaÄte tlaÄidlo &lt;b&gt;Výber&lt;/b&gt; a vyberte umiestnenie súboru, ktoré bude slúžiÅ¥ na ukladanie dát pevného disku alebo napíšte jeho meno do vstupného poľa.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Location</source>
- <translation type="unfinished">&amp;Umiestnenie</translation>
+ <translation>&amp;Umiestnenie</translation>
</message>
<message>
<source>&lt;p&gt;Select the size of the virtual hard disk in megabytes. This size will be reported to the Guest OS as the maximum size of this hard disk.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Vyberte veľkosť virtuálneho pevného disku v megabajtoch. Túto veľkosť bude vidieť OS hosťa ako maximálnu veľkosť pevného disku.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Vyberte veľkosť virtuálneho pevného disku v megabajtoch. Túto veľkosť bude vidieť OS hosťa ako maximálnu veľkosť pevného disku.&lt;/p&gt;</translation>
</message>
<message>
<source>&amp;Size</source>
- <translation type="unfinished">&amp;Veľkosť</translation>
+ <translation>&amp;Veľkosť</translation>
</message>
<message>
<source>Virtual Disk Location and Size</source>
- <translation type="unfinished">Umiestnenie a veľkosť virtuálneho disku</translation>
+ <translation>Umiestnenie a veľkosť virtuálneho disku</translation>
</message>
<message>
<source>Select a file for the new hard disk image file</source>
- <translation type="unfinished">Vyberte súbor pre obraz nového pevného disku</translation>
+ <translation>Vyberte súbor pre obraz nového pevného disku</translation>
</message>
<message>
<source>Hard disk images (*.vdi)</source>
- <translation type="unfinished">Obrazy pevných diskov (*.vdi)</translation>
+ <translation>Obrazy pevných diskov (*.vdi)</translation>
</message>
<message>
<source>&lt;nobr&gt;%1 (%2 B)&lt;/nobr&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;nobr&gt;%1 (%2 B)&lt;/nobr&gt;</translation>
</message>
</context>
<context>
<name>UINewHDWzdPage4</name>
<message>
<source>You are going to create a new virtual hard disk with the following parameters:</source>
- <translation type="unfinished">Chystáte sa vytvoriť nový virtuálny pevný disk s nasledujúcimi parametrami:</translation>
+ <translation>Chystáte sa vytvoriť nový virtuálny pevný disk s nasledujúcimi parametrami:</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Zhrnutie</translation>
+ <translation>Zhrnutie</translation>
</message>
<message>
<source>%1 B</source>
- <translation type="unfinished"></translation>
+ <translation>%1 B</translation>
</message>
<message>
<source>Type</source>
<comment>summary</comment>
- <translation type="unfinished">Typ</translation>
+ <translation>Typ</translation>
</message>
<message>
<source>Location</source>
<comment>summary</comment>
- <translation type="unfinished">Umiestnenie</translation>
+ <translation>Umiestnenie</translation>
</message>
<message>
<source>Size</source>
<comment>summary</comment>
- <translation type="unfinished">Veľkosť</translation>
+ <translation>Veľkosť</translation>
</message>
<message>
<source>If the above settings are correct, press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new hard disk will be created.</source>
- <translation type="unfinished"></translation>
+ <translation>Ak sú vyÅ¡Å¡ie uvedené udaje v poriadku, stlaÄte tlaÄidlo &lt;b&gt;%1&lt;/b&gt;. Po jeho stlaÄení bude vytvorený nový obraz pevného disku.</translation>
</message>
</context>
<context>
@@ -1608,58 +1608,58 @@ preskoÄiÅ¥ a pripojiÅ¥ pevné disky neskôr pomocou dialógu Nastavenia virtuá
<name>UINewVMWzdPage1</name>
<message>
<source>Welcome to the New Virtual Machine Wizard!</source>
- <translation type="unfinished">Vitajte v sprievodcovi vytvorením nového virtuálneho stroja!</translation>
+ <translation>Vitajte v sprievodcovi vytvorením nového virtuálneho stroja!</translation>
</message>
<message>
<source>&lt;p&gt;This wizard will guide you through the steps that are necessary to create a new virtual machine for VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Tento sprievodca vás prevedie všetkými krokmi, ktoré sú potrebné pre vytvorenie nového virtuálneho stroja pre VirtualBox.&lt;/p&gt;&lt;p&gt;%1&lt;/p&gt;</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage2</name>
<message>
<source>&lt;p&gt;Enter a name for the new virtual machine and select the type of the guest operating system you plan to install onto the virtual machine.&lt;/p&gt;&lt;p&gt;The name of the virtual machine usually indicates its software and hardware configuration. It will be used by all VirtualBox components to identify your virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Zadajte názov nového virtuálneho stroja a vyberte typ hosÅ¥ovaného operaÄného systému, ktorý naň hodláte inÅ¡talovaÅ¥.&lt;/p&gt;&lt;p&gt;Názov virtuálneho poÄítaÄa obvykle indikuje jeho softvérovú a hardvérovú konfiguráciu. Bude použité Äalšími komponentami VirtualBoxu pre identifikáciu vášho virtuálneho stroja.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Zadajte názov nového virtuálneho stroja a vyberte typ hosÅ¥ovaného operaÄného systému, ktorý naň hodláte inÅ¡talovaÅ¥.&lt;/p&gt;&lt;p&gt;Názov virtuálneho poÄítaÄa obvykle indikuje jeho softvérovú a hardvérovú konfiguráciu. Bude použité Äalšími komponentami VirtualBoxu pre identifikáciu vášho virtuálneho stroja.&lt;/p&gt;</translation>
</message>
<message>
<source>N&amp;ame</source>
- <translation type="unfinished">&amp;Názov</translation>
+ <translation>&amp;Názov</translation>
</message>
<message>
<source>OS &amp;Type</source>
- <translation type="unfinished">&amp;Typ OS</translation>
+ <translation>&amp;Typ OS</translation>
</message>
<message>
<source>VM Name and OS Type</source>
- <translation type="unfinished">Názov virtuálneho stroja a typ úložiska</translation>
+ <translation>Názov virtuálneho stroja a typ OS</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage3</name>
<message>
<source>&lt;p&gt;Select the amount of base memory (RAM) in megabytes to be allocated to the virtual machine.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Zvoľte veľkosť základnej pamäte (RAM) v megabajtoch, ktorá sa alokuje pre virtuálny stroj.&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Zvoľte veľkosť základnej pamäte (RAM) v megabajtoch, ktorá sa alokuje pre virtuálny stroj.&lt;/p&gt;</translation>
</message>
<message>
<source>Base &amp;Memory Size</source>
- <translation type="unfinished">Veľkosť &amp;základnej pamäte</translation>
+ <translation>Veľkosť &amp;základnej pamäte</translation>
</message>
<message>
<source>MB</source>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
<message>
<source>Memory</source>
- <translation type="unfinished">Pamäť</translation>
+ <translation>Pamäť</translation>
</message>
<message>
<source>The recommended base memory size is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">OdporúÄaná veľkosÅ¥ základnej pamäťe je &lt;b&gt;%1&lt;/b&gt; MB.</translation>
+ <translation>OdporúÄaná veľkosÅ¥ základnej pamäťe je &lt;b&gt;%1&lt;/b&gt; MB.</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
</context>
<context>
@@ -1670,63 +1670,63 @@ preskoÄiÅ¥ a pripojiÅ¥ pevné disky neskôr pomocou dialógu Nastavenia virtuá
</message>
<message>
<source>Boot Hard &amp;Disk (Primary Master)</source>
- <translation type="unfinished">Boo&amp;tovací pevný disk (Primary Master)</translation>
+ <translation>Boo&amp;tovací pevný disk (Primary Master)</translation>
</message>
<message>
<source>&amp;Create new hard disk</source>
- <translation type="unfinished">&amp;Vytvoriť nový pevný disk</translation>
+ <translation>&amp;Vytvoriť nový pevný disk</translation>
</message>
<message>
<source>&amp;Use existing hard disk</source>
- <translation type="unfinished">&amp;Použiť existujúci pevný disk</translation>
+ <translation>&amp;Použiť existujúci pevný disk</translation>
</message>
<message>
<source>Virtual Hard Disk</source>
- <translation type="unfinished">Virtuálny pevný disk</translation>
+ <translation>Virtuálny pevný disk</translation>
</message>
<message>
<source>The recommended size of the boot hard disk is &lt;b&gt;%1&lt;/b&gt; MB.</source>
- <translation type="unfinished">OdporúÄaná veľkosÅ¥ bootovacieho pevného disku je &lt;b&gt;%1&lt;/b&gt; MB.</translation>
+ <translation>OdporúÄaná veľkosÅ¥ bootovacieho pevného disku je &lt;b&gt;%1&lt;/b&gt; MB.</translation>
</message>
</context>
<context>
<name>UINewVMWzdPage5</name>
<message>
<source>&lt;p&gt;You are going to create a new virtual machine with the following parameters:&lt;/p&gt;</source>
- <translation type="unfinished">&lt;p&gt;Chystáte sa vytvoriť nový virtuálny pevný disk s nasledujúcimi parametrami:&lt;/p&gt;</translation>
+ <translation>&lt;p&gt;Chystáte sa vytvoriť nový virtuálny pevný disk s nasledujúcimi parametrami:&lt;/p&gt;</translation>
</message>
<message>
<source>Summary</source>
- <translation type="unfinished">Zhrnutie</translation>
+ <translation>Zhrnutie</translation>
</message>
<message>
<source>Name</source>
<comment>summary</comment>
- <translation type="unfinished">Názov</translation>
+ <translation>Názov</translation>
</message>
<message>
<source>OS Type</source>
<comment>summary</comment>
- <translation type="unfinished">Typ OS</translation>
+ <translation>Typ OS</translation>
</message>
<message>
<source>Base Memory</source>
<comment>summary</comment>
- <translation type="unfinished">Základná pamäť</translation>
+ <translation>Základná pamäť</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
<message>
<source>Boot Hard Disk</source>
<comment>summary</comment>
- <translation type="unfinished">Bootovací pevný disk</translation>
+ <translation>Bootovací pevný disk</translation>
</message>
<message>
<source>&lt;p&gt;If the above is correct press the &lt;b&gt;%1&lt;/b&gt; button. Once you press it, a new virtual machine will be created. &lt;/p&gt;&lt;p&gt;Note that you can alter these and all other setting of the created virtual machine at any time using the &lt;b&gt;Settings&lt;/b&gt; dialog accessible through the menu of the main window.&lt;/p&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;Ak sú vyÅ¡Å¡ie uvedené údaje v poriadku, stlaÄte tlaÄidlo &lt;b&gt;%1&lt;/b&gt; Potom sa zaÄne vytváraÅ¥ virtuálny stroj.&lt;/p&gt;&lt;p&gt;Poznámka: VÅ¡etky tieto i dodatoÄené nastavenia pre virtuálny stroj môžete kedykoľvek zmeniÅ¥ v dialógovom okne &lt;b&gt;Nastavenia&lt;/b&gt;, ktoré vyvoláte z ponuky v hlavnom menu.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -1950,12 +1950,12 @@ verzia %1</translation>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024 KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
<message>
<source>MB</source>
<comment>size suffix MBytes=1024KBytes</comment>
- <translation type="unfinished">MB</translation>
+ <translation>MB</translation>
</message>
</context>
<context>
@@ -9798,11 +9798,11 @@ je zobrazený &lt;b&gt;tuÄným&lt;/b&gt; písmom. Voľbou &lt;i&gt;Å tandardný
</message>
<message>
<source>Controls the working mode of this serial port. If you select &lt;b&gt;Disconnected&lt;/b&gt;, the guest OS will detect the serial port but will not be able to operate it.</source>
- <translation type="unfinished"></translation>
+ <translation>Ovláda pracovný režim tohto sériového portu. Ak vyberiete &lt;b&gt;Odpojený&lt;/b&gt;, OS hosťa nájde sériový port, ale nebude schopný ho ovládať.</translation>
</message>
<message>
<source>If checked, the pipe specified in the &lt;b&gt;Port Path&lt;/b&gt; field will be created by the virtual machine when it starts. Otherwise, the virtual machine will assume that the pipe exists and try to use it.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Ak je zaÅ¡krtnuté, rúra uvedená v poli &lt;b&gt;Cesta portu&lt;/b&gt; bude vytvorená virtuálnym strojom pri spustení. Inak sa virtuálny poÄítaÄ pokúsi použiÅ¥ existujúcu rúru.</translation>
</message>
<message>
<source>&amp;Create Pipe</source>
diff --git a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_CN.ts b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_CN.ts
index 570d7aa40..0f183d2fb 100644
--- a/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_CN.ts
+++ b/src/VBox/Frontends/VirtualBox/nls/VirtualBox_zh_CN.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS><TS version="1.1" language="zh_CN">
-<defaultcodec></defaultcodec>
+<!DOCTYPE TS>
+<TS version="2.0" language="zh_CN">
<context>
<name>@@@</name>
<message>
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
index 8e1c72af3..3dfec9cf5 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxConsoleView.cpp 28960 2010-05-02 19:36:26Z vboxsync $ */
+/* $Id: VBoxConsoleView.cpp 29542 2010-05-17 13:41:20Z vboxsync $ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
@@ -29,6 +29,7 @@
#include "VBoxFrameBuffer.h"
#include "VBoxGlobal.h"
#include "VBoxProblemReporter.h"
+#include "VBox/com/array.h"
#ifdef Q_WS_PM
#include "QIHotKeyEdit.h"
@@ -208,22 +209,20 @@ class MousePointerChangeEvent : public QEvent
public:
MousePointerChangeEvent (bool visible, bool alpha, uint xhot, uint yhot,
uint width, uint height,
- const uchar *shape) :
+ ComSafeArrayIn(BYTE,pShape)) :
QEvent ((QEvent::Type) VBoxDefs::MousePointerChangeEventType),
- vis (visible), alph (alpha), xh (xhot), yh (yhot), w (width), h (height),
- data (NULL)
+ vis (visible), alph (alpha), xh (xhot), yh (yhot), w (width), h (height)
{
- // make a copy of shape
- uint dataSize = ((((width + 7) / 8 * height) + 3) & ~3) + width * 4 * height;
-
- if (shape) {
- data = new uchar [dataSize];
- memcpy ((void *) data, (void *) shape, dataSize);
+ com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape));
+ size_t cbShapeSize = aShape.size();
+ if (cbShapeSize > 0)
+ {
+ shape.resize(cbShapeSize);
+ ::memcpy(shape.raw(), aShape.raw(), cbShapeSize);
}
}
~MousePointerChangeEvent()
{
- if (data) delete[] data;
}
bool isVisible() const { return vis; }
bool hasAlpha() const { return alph; }
@@ -231,11 +230,11 @@ public:
uint yHot() const { return yh; }
uint width() const { return w; }
uint height() const { return h; }
- const uchar *shapeData() const { return data; }
+ const uchar *shapeData() const { return shape.size() > 0 ? shape.raw() : NULL; }
private:
bool vis, alph;
uint xh, yh, w, h;
- const uchar *data;
+ com::SafeArray <uint8_t> shape;
};
/** Guest mouse absolute positioning capability change event. */
@@ -422,12 +421,12 @@ public:
STDMETHOD(OnMousePointerShapeChange) (BOOL visible, BOOL alpha,
ULONG xhot, ULONG yhot,
ULONG width, ULONG height,
- BYTE *shape)
+ ComSafeArrayIn(BYTE,shape))
{
QApplication::postEvent (mView,
new MousePointerChangeEvent (visible, alpha,
xhot, yhot,
- width, height, shape));
+ width, height, ComSafeArrayInArg(shape)));
return S_OK;
}
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
index 872538129..e25761f18 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxConsoleWnd.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: VBoxConsoleWnd.cpp 29471 2010-05-14 13:22:16Z vboxsync $ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
@@ -3265,7 +3265,7 @@ void VBoxConsoleWnd::updateAppearanceOf (int aElement)
"<br><nobr><b>%3:</b>&nbsp;%4</nobr>",
"Virtualization Stuff LED")
.arg (VBoxGlobal::tr ("VT-x/AMD-V", "details report"), virtualization)
- .arg (VBoxVMInformationDlg::tr ("Nested Paging"), nestedPaging));
+ .arg (VBoxVMInformationDlg::tr ("Nested Paging", "details report"), nestedPaging));
int cpuCount = console.GetMachine().GetCPUCount();
if (cpuCount > 1)
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
index 35f639fae..eacd3ed85 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
@@ -2315,9 +2315,9 @@ int VBoxVHWAImage::vhwaSurfaceCreate (struct _VBOXVHWACMD_SURF_CREATE *pCmd)
QRect(0, 0, surfSize.width(), surfSize.height()),
mViewport,
format,
- pSrcBltCKey, pDstBltCKey, pSrcOverlayCKey, pDstOverlayCKey
+ pSrcBltCKey, pDstBltCKey, pSrcOverlayCKey, pDstOverlayCKey,
#ifdef VBOXVHWA_USE_TEXGROUP
- , 0
+ 0,
#endif
fFlags);
}
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
index 216249a5f..f3a604b1b 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxMediaManagerDlg.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: VBoxMediaManagerDlg.cpp 29526 2010-05-17 10:59:21Z vboxsync $ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -504,10 +504,13 @@ void VBoxMediaManagerDlg::showModeless (QWidget *aCenterWidget /* = 0 */, bool a
{
mModelessDialog = new VBoxMediaManagerDlg (0, Qt::Window);
mModelessDialog->centerAccording (aCenterWidget);
- connect (vboxGlobal().mainWindow(), SIGNAL (closing()), mModelessDialog, SLOT (close()));
mModelessDialog->setAttribute (Qt::WA_DeleteOnClose);
mModelessDialog->setup (VBoxDefs::MediumType_All, false /* aDoSelect */, aRefresh);
+ /* Setup 'closing' connection if main window is VBoxSelectorWnd: */
+ if (vboxGlobal().mainWindow() && vboxGlobal().mainWindow()->inherits("VBoxSelectorWnd"))
+ connect(vboxGlobal().mainWindow(), SIGNAL(closing()), mModelessDialog, SLOT(close()));
+
/* listen to events that may change the media status and refresh
* the contents of the modeless dialog */
/// @todo refreshAll() may be slow, so it may be better to analyze
diff --git a/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp b/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
index 24c09b50d..07a7cd5f5 100644
--- a/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxVMInformationDlg.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: VBoxVMInformationDlg.cpp 29526 2010-05-17 10:59:21Z vboxsync $ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -48,7 +48,6 @@ void VBoxVMInformationDlg::createInformationDlg(UIMachineWindow *pMachineWindow)
VBoxVMInformationDlg *id = new VBoxVMInformationDlg(pMachineWindow, Qt::Window);
id->centerAccording (pMachineWindow->machineWindow());
// TODO_NEW_CORE: this seems not necessary, cause we set WA_DeleteOnClose.
- connect (vboxGlobal().mainWindow(), SIGNAL (closing()), id, SLOT (close()));
id->setAttribute (Qt::WA_DeleteOnClose);
mSelfArray [machine.GetName()] = id;
}
@@ -145,7 +144,6 @@ void VBoxVMInformationDlg::createInformationDlg (const CSession &aSession, VBoxC
/* Creating new information dialog if there is no one existing */
VBoxVMInformationDlg *id = new VBoxVMInformationDlg (aConsole, aSession, Qt::Window);
id->centerAccording (aConsole);
- connect (vboxGlobal().mainWindow(), SIGNAL (closing()), id, SLOT (close()));
id->setAttribute (Qt::WA_DeleteOnClose);
mSelfArray [machine.GetName()] = id;
}
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
index 05faba282..c4e63e2a6 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxGlobal.cpp 29334 2010-05-11 10:29:44Z vboxsync $ */
+/* $Id: VBoxGlobal.cpp 29607 2010-05-18 09:44:38Z vboxsync $ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
@@ -1770,25 +1770,31 @@ QString VBoxGlobal::details (const CMedium &aMedium, bool aPredictDiff)
QString VBoxGlobal::details (const CUSBDevice &aDevice) const
{
QString sDetails;
- QString m = aDevice.GetManufacturer().trimmed();
- QString p = aDevice.GetProduct().trimmed();
- if (m.isEmpty() && p.isEmpty())
- {
- sDetails =
- tr ("Unknown device %1:%2", "USB device details")
- .arg (QString().sprintf ("%04hX", aDevice.GetVendorId()))
- .arg (QString().sprintf ("%04hX", aDevice.GetProductId()));
- }
+ if (aDevice.isNull())
+ sDetails = tr("Unknown device", "USB device details");
else
{
- if (p.toUpper().startsWith (m.toUpper()))
- sDetails = p;
+ QString m = aDevice.GetManufacturer().trimmed();
+ QString p = aDevice.GetProduct().trimmed();
+
+ if (m.isEmpty() && p.isEmpty())
+ {
+ sDetails =
+ tr ("Unknown device %1:%2", "USB device details")
+ .arg (QString().sprintf ("%04hX", aDevice.GetVendorId()))
+ .arg (QString().sprintf ("%04hX", aDevice.GetProductId()));
+ }
else
- sDetails = m + " " + p;
+ {
+ if (p.toUpper().startsWith (m.toUpper()))
+ sDetails = p;
+ else
+ sDetails = m + " " + p;
+ }
+ ushort r = aDevice.GetRevision();
+ if (r != 0)
+ sDetails += QString().sprintf (" [%04hX]", r);
}
- ushort r = aDevice.GetRevision();
- if (r != 0)
- sDetails += QString().sprintf (" [%04hX]", r);
return sDetails.trimmed();
}
@@ -1899,7 +1905,7 @@ QString VBoxGlobal::detailsReport (const CMachine &aMachine, bool aWithLinks)
static const char *sSectionItemTpl1 =
"<tr><td width=40%><nobr><i>%1</i></nobr></td><td/><td/></tr>";
static const char *sSectionItemTpl2 =
- "<tr><td width=40%><nobr>%1</nobr></td><td/><td>%2</td></tr>";
+ "<tr><td width=40%><nobr>%1:</nobr></td><td/><td>%2</td></tr>";
static const char *sSectionItemTpl3 =
"<tr><td width=40%><nobr>%1</nobr></td><td/><td/></tr>";
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
index 4c35168b0..74086ece7 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
@@ -1,4 +1,4 @@
-/* $Id: UIMachineLogic.cpp 29014 2010-05-04 13:17:17Z vboxsync $ */
+/* $Id: UIMachineLogic.cpp 29445 2010-05-13 11:16:40Z vboxsync $ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
@@ -991,7 +991,12 @@ void UIMachineLogic::sltTakeSnapshot()
/* Restore the running state if needed. */
if (!fWasPaused)
+ {
+ /* Make sure machine-state-change callback is processed: */
+ QApplication::sendPostedEvents(uisession(), UIConsoleEventType_StateChange);
+ /* Unpause VM: */
uisession()->unpause();
+ }
}
void UIMachineLogic::sltShowInformationDialog()
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
index 76b18a2dc..2c0e354e0 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
@@ -1,4 +1,4 @@
-/* $Id: UIMachineView.cpp 29410 2010-05-12 11:32:52Z vboxsync $ */
+/* $Id: UIMachineView.cpp 29558 2010-05-17 15:05:22Z vboxsync $ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
@@ -614,6 +614,13 @@ void UIMachineView::prepareFrameBuffer()
/* always perform SetFramebuffer to ensure 3D gets notified */
display.SetFramebuffer(m_uScreenId, CFramebuffer(m_pFrameBuffer));
}
+
+#ifdef Q_WS_X11
+ /* Processing pseudo resize-event to synchronize frame-buffer with stored framebuffer size: */
+ QSize size = guestSizeHint();
+ UIResizeEvent event(FramebufferPixelFormat_Opaque, NULL, 0, 0, size.width(), size.height());
+ frameBuffer()->resizeEvent(&event);
+#endif /* Q_WS_X11 */
}
void UIMachineView::prepareCommon()
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
index 2953b3b6a..b6134970d 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
@@ -1,4 +1,4 @@
-/* $Id: UISession.cpp 29219 2010-05-07 14:58:50Z vboxsync $ */
+/* $Id: UISession.cpp 29545 2010-05-17 14:04:53Z vboxsync $ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
@@ -54,21 +54,14 @@ class UIMousePointerShapeChangeEvent : public QEvent
{
public:
- UIMousePointerShapeChangeEvent(bool bIsVisible, bool bIsAlpha, uint uXHot, uint uYHot, uint uWidth, uint uHeight, const uchar *pShape)
+ UIMousePointerShapeChangeEvent(bool bIsVisible, bool bIsAlpha, uint uXHot, uint uYHot, uint uWidth, uint uHeight, const QVector<uint8_t>& shape)
: QEvent((QEvent::Type)UIConsoleEventType_MousePointerShapeChange)
- , m_bIsVisible(bIsVisible), m_bIsAlpha(bIsAlpha), m_uXHot(uXHot), m_uYHot(uYHot), m_uWidth(uWidth), m_uHeight(uHeight), m_pData(0)
+ , m_bIsVisible(bIsVisible), m_bIsAlpha(bIsAlpha), m_uXHot(uXHot), m_uYHot(uYHot), m_uWidth(uWidth), m_uHeight(uHeight), m_shape(shape)
{
- uint dataSize = ((((m_uWidth + 7) / 8 * m_uHeight) + 3) & ~3) + m_uWidth * 4 * m_uHeight;
- if (pShape)
- {
- m_pData = new uchar[dataSize];
- memcpy((void*)m_pData, (void*)pShape, dataSize);
- }
}
virtual ~UIMousePointerShapeChangeEvent()
{
- if (m_pData) delete[] m_pData;
}
bool isVisible() const { return m_bIsVisible; }
@@ -77,13 +70,13 @@ public:
uint yHot() const { return m_uYHot; }
uint width() const { return m_uWidth; }
uint height() const { return m_uHeight; }
- const uchar *shapeData() const { return m_pData; }
+ const uchar *shapeData() const { return m_shape.size() > 0 ? m_shape.data() : NULL; }
private:
bool m_bIsVisible, m_bIsAlpha;
uint m_uXHot, m_uYHot, m_uWidth, m_uHeight;
- const uchar *m_pData;
+ QVector<uint8_t> m_shape;
};
/* Guest mouse absolute positioning capability change event: */
@@ -385,9 +378,13 @@ public:
VBOX_SCRIPTABLE_DISPATCH_IMPL(IConsoleCallback)
- STDMETHOD(OnMousePointerShapeChange)(BOOL bIsVisible, BOOL bAlpha, ULONG uXHot, ULONG uYHot, ULONG uWidth, ULONG uHeight, BYTE *pShape)
+ STDMETHOD(OnMousePointerShapeChange)(BOOL bIsVisible, BOOL bAlpha, ULONG uXHot, ULONG uYHot, ULONG uWidth, ULONG uHeight, ComSafeArrayIn(BYTE, pShape))
{
- QApplication::postEvent(m_pEventHandler, new UIMousePointerShapeChangeEvent(bIsVisible, bAlpha, uXHot, uYHot, uWidth, uHeight, pShape));
+ com::SafeArray<BYTE> aShape(ComSafeArrayInArg(pShape));
+ QVector<uint8_t> shapeVec(static_cast<int>(aShape.size()));
+ for (int i = 0; i < shapeVec.size(); ++i)
+ shapeVec[i] = aShape[i];
+ QApplication::postEvent(m_pEventHandler, new UIMousePointerShapeChangeEvent(bIsVisible, bAlpha, uXHot, uYHot, uWidth, uHeight, shapeVec));
return S_OK;
}
@@ -558,7 +555,7 @@ UISession::UISession(UIMachine *pMachine, CSession &sessionReference)
#endif
/* Common flags: */
, m_fIsFirstTimeStarted(false)
- , m_fIsIgnoreRutimeMediumsChanging(false)
+ , m_fIsIgnoreRuntimeMediumsChanging(false)
, m_fIsGuestResizeIgnored(false)
, m_fIsSeamlessModeRequested(false)
/* Guest additions flags: */
@@ -797,8 +794,10 @@ QMenuBar* UISession::newMenuBar(UIMainMenuType fOptions /* = UIMainMenuType_ALL
bool UISession::setPause(bool fOn)
{
- if (isPaused() == fOn)
- return true;
+ /* Commenting it out as isPaused() could reflect
+ * quite obsolete state due to synchronization: */
+ //if (isPaused() == fOn)
+ // return true;
CConsole console = session().GetConsole();
@@ -1190,7 +1189,7 @@ void UISession::loadSessionSettings()
/* Ignore mediums mounted at runtime? */
strSettings = machine.GetExtraData(VBoxDefs::GUI_SaveMountedAtRuntime);
if (strSettings == "no")
- m_fIsIgnoreRutimeMediumsChanging = true;
+ m_fIsIgnoreRuntimeMediumsChanging = true;
/* Should guest autoresize? */
strSettings = machine.GetExtraData(VBoxDefs::GUI_AutoresizeGuest);
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
index f35a11849..48445bf50 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
@@ -98,7 +98,7 @@ public:
machineState() == KMachineState_Teleporting ||
machineState() == KMachineState_LiveSnapshotting; }
bool isFirstTimeStarted() const { return m_fIsFirstTimeStarted; }
- bool isIgnoreRuntimeMediumsChanging() const { return m_fIsIgnoreRutimeMediumsChanging; }
+ bool isIgnoreRuntimeMediumsChanging() const { return m_fIsIgnoreRuntimeMediumsChanging; }
bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; }
bool isSeamlessModeRequested() const { return m_fIsSeamlessModeRequested; }
@@ -230,7 +230,7 @@ private:
/* Common flags: */
bool m_fIsFirstTimeStarted : 1;
- bool m_fIsIgnoreRutimeMediumsChanging : 1;
+ bool m_fIsIgnoreRuntimeMediumsChanging : 1;
bool m_fIsGuestResizeIgnored : 1;
bool m_fIsSeamlessModeRequested : 1;
diff --git a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
index d2f0c3a06..dcbbc4a06 100644
--- a/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
@@ -1,4 +1,4 @@
-/* $Id: UIMachineWindowNormal.cpp 29339 2010-05-11 10:52:38Z vboxsync $ */
+/* $Id: UIMachineWindowNormal.cpp 29558 2010-05-17 15:05:22Z vboxsync $ */
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
@@ -560,16 +560,15 @@ void UIMachineWindowNormal::loadWindowSettings()
}
/* Normalize view to the optimal size:
- Note: Cause of the async behavior of some Linux WM's we have to
- delay this a little bit. On Mac OS X this is not necessary and
- create even wrong resize events. So there we set the geometry
- immediately. */
+ * Note: Cause of the async behavior of X11 (at least GNOME) we have to delay this a little bit.
+ * On Mac OS X and MS Windows this is not necessary and create even wrong resize events.
+ * So there we set the geometry immediately. */
if (machineView())
-#if defined(Q_WS_MAC) || defined(Q_WS_WIN)
- machineView()->normalizeGeometry(true);
-#else /* Q_WS_MAC || Q_WS_WIN */
+#ifdef Q_WS_X11
QTimer::singleShot(0, machineView(), SLOT(sltNormalizeGeometry()));
-#endif /* Q_WS_MAC || Q_WS_WIN */
+#else /* Q_WS_X11 */
+ machineView()->normalizeGeometry(true);
+#endif /* !Q_WS_X11 */
}
/* Load availability settings: */
diff --git a/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsHD.cpp b/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsHD.cpp
index 147eb8e6a..05f77d948 100644
--- a/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsHD.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsHD.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxVMSettingsHD.cpp 29199 2010-05-07 12:04:23Z vboxsync $ */
+/* $Id: VBoxVMSettingsHD.cpp 29480 2010-05-14 15:24:19Z vboxsync $ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -1795,9 +1795,7 @@ void VBoxVMSettingsHD::getFrom (const CMachine &aMachine)
QModelIndex ctrIndex = mStorageModel->addController (controllerName, controller.GetBus(), controller.GetControllerType());
QUuid ctrId = QUuid (mStorageModel->data (ctrIndex, StorageModel::R_ItemId).toString());
- bool useIoCache = true;
- if (controller.GetIoBackend() == KIoBackendType_Unbuffered)
- useIoCache = false;
+ bool useIoCache = controller.GetUseHostIOCache();
mStorageModel->setData (ctrIndex, useIoCache, StorageModel::R_CtrIoCache);
@@ -1843,7 +1841,7 @@ void VBoxVMSettingsHD::putBackTo()
bool useIoCache = mStorageModel->data (ctrIndex, StorageModel::R_CtrIoCache).toBool();
CStorageController ctr = mMachine.AddStorageController (ctrName, ctrBusType);
ctr.SetControllerType (ctrType);
- ctr.SetIoBackend(useIoCache ? KIoBackendType_Buffered : KIoBackendType_Unbuffered);
+ ctr.SetUseHostIOCache(useIoCache);
int maxUsedPort = -1;
for (int j = 0; j < mStorageModel->rowCount (ctrIndex); ++ j)
{
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp
index c3f81c5ad..ddf6d7817 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/VBoxApplianceEditorWgt.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxApplianceEditorWgt.cpp 29405 2010-05-12 10:20:34Z vboxsync $ */
+/* $Id: VBoxApplianceEditorWgt.cpp 29484 2010-05-14 16:08:20Z vboxsync $ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -396,7 +396,7 @@ QWidget * HardwareItem::createEditor (QWidget *aParent, const QStyleOptionViewIt
{
QSpinBox *e = new QSpinBox (aParent);
e->setRange (VBoxApplianceEditorWgt::minGuestRAM(), VBoxApplianceEditorWgt::maxGuestRAM());
- e->setSuffix (" " + VBoxApplianceEditorWgt::tr ("MB", "size suffix MBytes=1024KBytes"));
+ e->setSuffix (" " + VBoxApplianceEditorWgt::tr ("MB", "size suffix MBytes=1024 KBytes"));
editor = e;
break;
}
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage2.ui b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage2.ui
index 2a7d81dd9..62b0b76b2 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage2.ui
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage2.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<comment>
- VBox frontends: Qt4 GUI ("VirtualBox"):
+ VBox frontends: Qt4 GUI (&quot;VirtualBox&quot;):
Copyright (C) 2009-2010 Oracle Corporation
@@ -9,7 +9,7 @@
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and/or modify it under the terms of the GNU
General Public License (GPL) as published by the Free Software
- Foundation, in version 2 as it comes in the "COPYING" file of the
+ Foundation, in version 2 as it comes in the &quot;COPYING&quot; file of the
VirtualBox OSE distribution. VirtualBox OSE is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
</comment>
@@ -30,7 +30,7 @@
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="m_pLayout1">
- <property name="bottomMargin" >
+ <property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -74,10 +74,13 @@
</item>
<item>
<spacer name="m_pSpacer1">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
- <height>62</height>
+ <height>0</height>
</size>
</property>
</spacer>
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage3.ui b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage3.ui
index 1003a8b9f..4b68f0895 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage3.ui
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage3.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<comment>
- VBox frontends: Qt4 GUI ("VirtualBox"):
+ VBox frontends: Qt4 GUI (&quot;VirtualBox&quot;):
Copyright (C) 2009-2010 Oracle Corporation
@@ -9,7 +9,7 @@
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and/or modify it under the terms of the GNU
General Public License (GPL) as published by the Free Software
- Foundation, in version 2 as it comes in the "COPYING" file of the
+ Foundation, in version 2 as it comes in the &quot;COPYING&quot; file of the
VirtualBox OSE distribution. VirtualBox OSE is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
</comment>
@@ -20,7 +20,7 @@
<x>0</x>
<y>0</y>
<width>600</width>
- <height>600</height>
+ <height>661</height>
</rect>
</property>
<property name="sizePolicy">
@@ -30,7 +30,7 @@
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="m_pLayout1">
- <property name="bottomMargin" >
+ <property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -97,10 +97,13 @@
</item>
<item>
<spacer name="m_pSpacer1">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
- <height>117</height>
+ <height>0</height>
</size>
</property>
</spacer>
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp
index dd4732430..4f44ae0f1 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp
@@ -1,4 +1,4 @@
-/* $Id: UINewHDWzd.cpp 29350 2010-05-11 13:09:21Z vboxsync $ */
+/* $Id: UINewHDWzd.cpp 29437 2010-05-12 21:40:07Z vboxsync $ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -444,9 +444,9 @@ void UINewHDWzdPage4::retranslateUi()
summary += QString
(
- "<tr><td><nobr>%1 </nobr></td><td><nobr>%2</nobr></td></tr>"
- "<tr><td><nobr>%3 </nobr></td><td><nobr>%4</nobr></td></tr>"
- "<tr><td><nobr>%5 </nobr></td><td><nobr>%6 (%7)</nobr></td></tr>"
+ "<tr><td><nobr>%1: </nobr></td><td><nobr>%2</nobr></td></tr>"
+ "<tr><td><nobr>%3: </nobr></td><td><nobr>%4</nobr></td></tr>"
+ "<tr><td><nobr>%5: </nobr></td><td><nobr>%6 (%7)</nobr></td></tr>"
)
.arg (tr("Type", "summary"), type)
.arg (tr("Location", "summary"), location)
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
index 85939e67d..dcf6b3bb1 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
@@ -1,4 +1,4 @@
-/* $Id: UINewVMWzd.cpp 29350 2010-05-11 13:09:21Z vboxsync $ */
+/* $Id: UINewVMWzd.cpp 29437 2010-05-12 21:40:07Z vboxsync $ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -574,9 +574,9 @@ void UINewVMWzdPage5::retranslateUi()
summary += QString
(
- "<tr><td><nobr>%1 </nobr></td><td>%2</td></tr>"
- "<tr><td><nobr>%3 </nobr></td><td>%4</td></tr>"
- "<tr><td><nobr>%5 </nobr></td><td>%6 %7</td></tr>"
+ "<tr><td><nobr>%1: </nobr></td><td>%2</td></tr>"
+ "<tr><td><nobr>%3: </nobr></td><td>%4</td></tr>"
+ "<tr><td><nobr>%5: </nobr></td><td>%6 %7</td></tr>"
)
.arg(tr("Name", "summary"), name)
.arg(tr("OS Type", "summary"), type)
@@ -589,7 +589,7 @@ void UINewVMWzdPage5::retranslateUi()
if (!field("hardDiskId").toString().isNull())
{
summary += QString(
- "<tr><td><nobr>%8 </nobr></td><td><nobr>%9</nobr></td></tr>")
+ "<tr><td><nobr>%8: </nobr></td><td><nobr>%9</nobr></td></tr>")
.arg(tr("Boot Hard Disk", "summary"), field("hardDiskName").toString());
/* Extend summary to 4 lines */
setSummaryFieldLinesNumber(m_pSummaryText, 4);
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/registration/UIRegistrationWzd.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/registration/UIRegistrationWzd.cpp
index 05084e66b..22936a4db 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/registration/UIRegistrationWzd.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/registration/UIRegistrationWzd.cpp
@@ -1,4 +1,4 @@
-/* $Id: UIRegistrationWzd.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: UIRegistrationWzd.cpp 29526 2010-05-17 10:59:21Z vboxsync $ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
@@ -417,8 +417,9 @@ UIRegistrationWzd::UIRegistrationWzd(UIRegistrationWzd **ppSelf)
assignWatermark(":/vmw_new_user.png");
#endif /* Q_WS_MAC */
- /* Setup connections */
- connect(vboxGlobal().mainWindow(), SIGNAL(closing()), this, SLOT(reject()));
+ /* Setup 'closing' connection if main window is VBoxSelectorWnd: */
+ if (vboxGlobal().mainWindow() && vboxGlobal().mainWindow()->inherits("VBoxSelectorWnd"))
+ connect(vboxGlobal().mainWindow(), SIGNAL(closing()), this, SLOT(reject()));
}
UIRegistrationWzd::~UIRegistrationWzd()
diff --git a/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py b/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
index 537ef2322..b3d6cb057 100644
--- a/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
+++ b/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py
@@ -35,9 +35,7 @@ print """
# endif
#include <string.h> /* VBOX */
#elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1)
-#if defined(Linux) || defined(SunOS) /* bird: why not all? */
#include <string.h>
-#endif
#if defined(AIX)
#define SYSTEM_GL "libGL.o"
#else
diff --git a/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c b/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
index 29ea1dd21..3809f6f8e 100644
--- a/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
+++ b/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
@@ -1,4 +1,4 @@
-/* $Id: SUPDrv-freebsd.c 25484 2009-12-18 14:04:56Z vboxsync $ */
+/* $Id: SUPDrv-freebsd.c 29501 2010-05-14 21:43:32Z vboxsync $ */
/** @file
* VBoxDrv - The VirtualBox Support Driver - FreeBSD specifics.
*/
@@ -55,6 +55,7 @@
#include <VBox/log.h>
#include <iprt/alloc.h>
#include <iprt/err.h>
+#include <iprt/asm.h>
#ifdef VBOX_WITH_HARDENING
# define VBOXDRV_PERM 0600
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
index e49e64b47..6c049e98a 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFlt.c 29150 2010-05-06 13:13:03Z vboxsync $ */
+/* $Id: VBoxNetFlt.c 29635 2010-05-18 13:42:54Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Common Code.
*/
@@ -534,6 +534,68 @@ static DECLCALLBACK(INTNETTRUNKIFSTATE) vboxNetFltPortSetState(PINTNETTRUNKIFPOR
/**
+ * @copydoc INTNETTRUNKIFPORT::pfnNotifyMacAddress
+ */
+static DECLCALLBACK(void) vboxNetFltPortNotifyMacAddress(PINTNETTRUNKIFPORT pIfPort, INTNETIFHANDLE hIf, PCRTMAC pMac)
+{
+ PVBOXNETFLTINS pThis = IFPORT_2_VBOXNETFLTINS(pIfPort);
+
+ /*
+ * Input validation.
+ */
+ AssertPtr(pThis);
+ Assert(pThis->MyPort.u32Version == INTNETTRUNKIFPORT_VERSION);
+
+ vboxNetFltRetain(pThis, false /* fBusy */);
+ vboxNetFltPortOsNotifyMacAddress(pThis, hIf, pMac);
+ vboxNetFltRelease(pThis, false /* fBusy */);
+}
+
+
+/**
+ * @copydoc INTNETTRUNKIFPORT::pfnConnectInterface
+ */
+static DECLCALLBACK(int) vboxNetFltPortConnectInterface(PINTNETTRUNKIFPORT pIfPort, INTNETIFHANDLE hIf)
+{
+ PVBOXNETFLTINS pThis = IFPORT_2_VBOXNETFLTINS(pIfPort);
+ int rc;
+
+ /*
+ * Input validation.
+ */
+ AssertPtr(pThis);
+ Assert(pThis->MyPort.u32Version == INTNETTRUNKIFPORT_VERSION);
+
+ vboxNetFltRetain(pThis, false /* fBusy */);
+ rc = vboxNetFltPortOsConnectInterface(pThis, hIf);
+ vboxNetFltRelease(pThis, false /* fBusy */);
+
+ return rc;
+}
+
+
+/**
+ * @copydoc INTNETTRUNKIFPORT::pfnDisconnectInterface
+ */
+static DECLCALLBACK(void) vboxNetFltPortDisconnectInterface(PINTNETTRUNKIFPORT pIfPort, INTNETIFHANDLE hIf)
+{
+ PVBOXNETFLTINS pThis = IFPORT_2_VBOXNETFLTINS(pIfPort);
+ int rc;
+
+ /*
+ * Input validation.
+ */
+ AssertPtr(pThis);
+ Assert(pThis->MyPort.u32Version == INTNETTRUNKIFPORT_VERSION);
+
+ vboxNetFltRetain(pThis, false /* fBusy */);
+ rc = vboxNetFltPortOsDisconnectInterface(pThis, hIf);
+ vboxNetFltRelease(pThis, false /* fBusy */);
+ AssertRC(rc); /** @todo fix vboxNetFltPortOsDisconnectInterface. */
+}
+
+
+/**
* @copydoc INTNETTRUNKIFPORT::pfnDisconnectAndRelease
*/
static DECLCALLBACK(void) vboxNetFltPortDisconnectAndRelease(PINTNETTRUNKIFPORT pIfPort)
@@ -869,16 +931,10 @@ static int vboxNetFltConnectIt(PVBOXNETFLTINS pThis, PINTNETTRUNKSWPORT pSwitchP
Assert(!pThis->cBusy);
#ifdef VBOXNETFLT_STATIC_CONFIG
Assert(vboxNetFltGetState(pThis) == kVBoxNetFltInsState_Unconnected);
- /* INTNETTRUNKIFSTATE_DISCONNECTING means "not connected" here
- * we use the INTNETTRUNKIFSTATE_DISCONNECTING state for consistency of cases when trunk
- * was never connected and was connected and disconnected.
- * In the latter case we end up with INTNETTRUNKIFSTATE_DICONNECTING,
- * so use the same state for the former */
- Assert(pThis->enmTrunkState == INTNETTRUNKIFSTATE_DISCONNECTING);
#else
Assert(vboxNetFltGetState(pThis) == kVBoxNetFltInsState_Initializing);
- Assert(pThis->enmTrunkState == INTNETTRUNKIFSTATE_INACTIVE);
#endif
+ Assert(pThis->enmTrunkState == INTNETTRUNKIFSTATE_INACTIVE);
/*
* Do the job.
@@ -894,16 +950,7 @@ static int vboxNetFltConnectIt(PVBOXNETFLTINS pThis, PINTNETTRUNKSWPORT pSwitchP
else
pThis->pSwitchPort = NULL;
-#ifdef VBOXNETFLT_STATIC_CONFIG
- /* INTNETTRUNKIFSTATE_DISCONNECTING means "not connected" here
- * we use the INTNETTRUNKIFSTATE_DISCONNECTING state for consistency of cases when trunk
- * was never connected and was connected and disconnected.
- * In the latter case we end up with INTNETTRUNKIFSTATE_DISCONNECTING,
- * so use the same state for the former */
- Assert(pThis->enmTrunkState == INTNETTRUNKIFSTATE_DISCONNECTING);
-#else
Assert(pThis->enmTrunkState == INTNETTRUNKIFSTATE_INACTIVE);
-#endif
return rc;
}
@@ -929,6 +976,10 @@ static int vboxNetFltNewInstance(PVBOXNETFLTGLOBALS pGlobals, const char *pszNam
{
/*
* Allocate and initialize a new instance before requesting the mutex.
+ * Note! That in a static config we'll initialize the trunk state to
+ * disconnecting and flip it in vboxNetFltFactoryCreateAndConnect
+ * later on. This better reflext the state and it works better with
+ * assertions in the destruction path.
*/
int rc;
size_t const cchName = strlen(pszName);
@@ -943,15 +994,15 @@ static int vboxNetFltNewInstance(PVBOXNETFLTGLOBALS pGlobals, const char *pszNam
pNew->MyPort.pfnSetState = vboxNetFltPortSetState;
pNew->MyPort.pfnWaitForIdle = vboxNetFltPortWaitForIdle;
pNew->MyPort.pfnXmit = vboxNetFltPortXmit;
+ pNew->MyPort.pfnNotifyMacAddress = vboxNetFltPortNotifyMacAddress;
+ pNew->MyPort.pfnConnectInterface = vboxNetFltPortConnectInterface;
+ pNew->MyPort.pfnDisconnectInterface = vboxNetFltPortDisconnectInterface;
pNew->MyPort.u32VersionEnd = INTNETTRUNKIFPORT_VERSION;
pNew->pSwitchPort = pSwitchPort;
pNew->pGlobals = pGlobals;
pNew->hSpinlock = NIL_RTSPINLOCK;
pNew->enmState = kVBoxNetFltInsState_Initializing;
#ifdef VBOXNETFLT_STATIC_CONFIG
- /* for consistency of cases when trunk was never connected and was connected and disconnected.
- * In the latter case we end up with INTNETTRUNKIFSTATE_DISCONNECTING,
- * so use the same state for the former */
pNew->enmTrunkState = INTNETTRUNKIFSTATE_DISCONNECTING;
#else
pNew->enmTrunkState = INTNETTRUNKIFSTATE_INACTIVE;
@@ -1204,10 +1255,13 @@ static DECLCALLBACK(int) vboxNetFltFactoryCreateAndConnect(PINTNETTRUNKFACTORY p
{
if (vboxNetFltGetState(pCur) == kVBoxNetFltInsState_Unconnected)
{
+ pCur->enmTrunkState = INTNETTRUNKIFSTATE_INACTIVE; /** @todo protect me? */
pCur->fDisablePromiscuous = !!(fFlags & INTNETTRUNKFACTORY_FLAG_NO_PROMISC);
rc = vboxNetFltConnectIt(pCur, pSwitchPort, ppIfPort);
if (RT_SUCCESS(rc))
pCur = NULL; /* Don't release it, reference given to the caller. */
+ else
+ pCur->enmTrunkState = INTNETTRUNKIFSTATE_DISCONNECTING;
}
else
rc = VERR_INTNET_FLT_IF_BUSY;
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
index 2bb676377..472d1c52f 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFltInternal.h 29108 2010-05-05 20:17:42Z vboxsync $ */
+/* $Id: VBoxNetFltInternal.h 29494 2010-05-14 18:35:33Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Internal Header.
*/
@@ -115,8 +115,10 @@ typedef struct VBOXNETFLTINS
/** Whether we should not attempt to set promiscuous mode at all. */
bool fDisablePromiscuous;
#if (ARCH_BITS == 32) && defined(__GNUC__)
+#if 0
uint32_t u32Padding; /**< Alignment padding, will assert in ASMAtomicUoWriteU64 otherwise. */
#endif
+#endif
/** The timestamp of the last rediscovery. */
uint64_t volatile NanoTSLastRediscovery;
/** Reference count. */
@@ -379,6 +381,32 @@ DECLHIDDEN(int) vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32
DECLHIDDEN(void) vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive);
/**
+ * This is called when a network interface has obtained a new MAC address.
+ *
+ * @param pThis The instance.
+ * @param hIf The handle to the network.
+ * @param pMac Pointer to the new MAC address.
+ */
+DECLHIDDEN(void) vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf, PCRTMAC pMac);
+
+/**
+ * This is called when an interface is connected to the network.
+ *
+ * @return IPRT status code.
+ * @param pThis The instance.
+ * @param hIf The handle to the network.
+ */
+DECLHIDDEN(int) vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf);
+
+/**
+ * This is called when a VM host disconnects from the network.
+ *
+ * @param pThis The instance.
+ * @param hIf The handle to the network.
+ */
+DECLHIDDEN(int) vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf);
+
+/**
* This is called to when disconnecting from a network.
*
* @return IPRT status code.
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp b/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
index 3e7d035ea..6dc210506 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
+++ b/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFlt-darwin.cpp 28830 2010-04-27 14:05:25Z vboxsync $ */
+/* $Id: VBoxNetFlt-darwin.cpp 29491 2010-05-14 17:46:22Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Darwin Specific Code.
*/
@@ -1190,3 +1190,25 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis)
return VINF_SUCCESS;
}
+
+void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf, PCRTMAC pMac)
+{
+ NOREF(pThis); NOREF(hIf); NOREF(pMac);
+}
+
+
+int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
+
+int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c b/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c
index 4d13c2350..ba5f67de9 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFlt-freebsd.c 28830 2010-04-27 14:05:25Z vboxsync $ */
+/* $Id: VBoxNetFlt-freebsd.c 29491 2010-05-14 17:46:22Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), FreeBSD Specific Code.
*/
@@ -744,3 +744,23 @@ int vboxNetFltOsConnectIt(PVBOXNETFLTINS pThis)
{
return VINF_SUCCESS;
}
+
+void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf, PCRTMAC pMac)
+{
+ NOREF(pThis); NOREF(hIf); NOREF(pMac);
+}
+
+int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
+int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c b/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
index 3287ffe08..fb53b2e31 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFlt-linux.c 28830 2010-04-27 14:05:25Z vboxsync $ */
+/* $Id: VBoxNetFlt-linux.c 29491 2010-05-14 17:46:22Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Linux Specific Code.
*/
@@ -1764,3 +1764,25 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis)
return VINF_SUCCESS;
}
+
+void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf, PCRTMAC pMac)
+{
+ NOREF(pThis); NOREF(hIf); NOREF(pMac);
+}
+
+
+int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
+
+int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
index 41a59ce57..04be964b5 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFlt-solaris.c 28961 2010-05-03 08:22:37Z vboxsync $ */
+/* $Id: VBoxNetFlt-solaris.c 29491 2010-05-14 17:46:22Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Solaris Specific Code.
*/
@@ -3686,7 +3686,6 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis)
pThis->u.s.fAttaching = false;
pThis->u.s.fVLAN = false;
pThis->u.s.hFastMtx = NIL_RTSEMFASTMUTEX;
- pThis->u.s.fVLAN = false;
#ifdef VBOXNETFLT_SOLARIS_IPV6_POLLING
pThis->u.s.hPollMtx = NIL_RTSEMFASTMUTEX;
#endif
@@ -3705,6 +3704,28 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThis)
}
+void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf, PCRTMAC pMac)
+{
+ NOREF(pThis); NOREF(hIf); NOREF(pMac);
+}
+
+
+int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
+
+int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
+
int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst)
{
LogFlowFunc((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p pSG=%p fDst=%d\n", pThis, pSG, fDst));
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
index 4c2ae1570..02c978407 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFltBow-solaris.c 28830 2010-04-27 14:05:25Z vboxsync $ */
+/* $Id: VBoxNetFltBow-solaris.c 29491 2010-05-14 17:46:22Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Solaris Specific Code.
*/
@@ -45,15 +45,22 @@
#include <sys/strsun.h>
#include <sys/sunddi.h>
+#include <sys/vnic_mgmt.h>
+#include <sys/mac_client.h>
+#include <sys/mac_provider.h>
+#include <sys/dls.h>
+
+#if 0
#include "include/mac_provider.h" /* dependency for other headers */
#include "include/mac_client.h" /* for mac_* */
#include "include/mac_client_priv.h" /* for mac_info, mac_capab_get etc. */
-#if 0
+#if 1
#include "include/dls.h" /* for dls_mgmt_* */
#include "include/dld_ioc.h" /* required by vnic.h */
#include "include/vnic.h" /* for vnic_ioc_diag_t */
#include "include/vnic_impl.h" /* for vnic_dev_create */
#endif
+#endif
#define VBOXNETFLT_OS_SPECFIC 1
#include "../VBoxNetFltInternal.h"
@@ -68,7 +75,7 @@
/** The dynamically created VNIC name */
#define VBOXFLT_VNIC_NAME "vboxvnic"
/** Debugging switch for using symbols in kmdb */
-# define LOCAL static
+# define LOCAL static
#if defined(DEBUG_ramshankar)
# undef Log
@@ -79,6 +86,19 @@
# define LOCAL
#endif
+/** VLAN tag masking, should probably be in IPRT? */
+#define VLAN_ID(vlan) (((vlan) >> 0) & 0x0fffu)
+#define VLAN_CFI(vlan) (((vlan) >> 12) & 0x0001u)
+#define VLAN_PRI(vlan) (((vlan) >> 13) & 0x0007u)
+#define VLAN_TAG(pri,cfi,vid) (((pri) << 13) | ((cfi) << 12) | ((vid) << 0))
+
+typedef struct VLANHEADER
+{
+ uint16_t Type;
+ uint16_t Data;
+} VLANHEADER;
+typedef struct VLANHEADER *PVLANHEADER;
+
/*******************************************************************************
* Kernel Entry Hooks *
@@ -520,9 +540,9 @@ LOCAL int vboxNetFltSolarisMBlkToSG(PVBOXNETFLTINS pThis, mblk_t *pMsg, PINTNETS
*
* @param pMsg Pointer to the message to analyze and dump.
*/
-static void vboxNetFltSolarisAnalyzeMBlk(mblk_t *pMsg)
+LOCAL void vboxNetFltSolarisAnalyzeMBlk(mblk_t *pMsg)
{
- LogFlow((DEVICE_NAME ":vboxNetFltSolarisAnalyzeMBlk pMsg=%p\n", pMsg));
+ LogFlowFunc((DEVICE_NAME ":vboxNetFltSolarisAnalyzeMBlk pMsg=%p\n", pMsg));
PCRTNETETHERHDR pEthHdr = (PCRTNETETHERHDR)pMsg->b_rptr;
uint8_t *pb = pMsg->b_rptr;
@@ -532,9 +552,9 @@ static void vboxNetFltSolarisAnalyzeMBlk(mblk_t *pMsg)
if (!pMsg->b_cont)
{
if (pIpHdr->ip_p == RTNETIPV4_PROT_ICMP)
- LogFlow((DEVICE_NAME ":ICMP D=%.6Rhxs S=%.6Rhxs T=%04x\n", pb, pb + 6, RT_BE2H_U16(*(uint16_t *)(pb + 12))));
+ LogRel((DEVICE_NAME ":ICMP D=%.6Rhxs S=%.6Rhxs T=%04x\n", pb, pb + 6, RT_BE2H_U16(*(uint16_t *)(pb + 12))));
else if (pIpHdr->ip_p == RTNETIPV4_PROT_TCP)
- LogFlow((DEVICE_NAME ":TCP D=%.6Rhxs S=%.6Rhxs\n", pb, pb + 6));
+ LogRel((DEVICE_NAME ":TCP D=%.6Rhxs S=%.6Rhxs\n", pb, pb + 6));
else if (pIpHdr->ip_p == RTNETIPV4_PROT_UDP)
{
PCRTNETUDP pUdpHdr = (PCRTNETUDP)((uint32_t *)pIpHdr + pIpHdr->ip_hl);
@@ -553,35 +573,28 @@ static void vboxNetFltSolarisAnalyzeMBlk(mblk_t *pMsg)
}
else if (pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_VLAN))
{
- typedef struct VLANHEADER
- {
- int Pcp:3;
- int Cfi:1;
- int Vid:12;
- } VLANHEADER;
-
- VLANHEADER *pVlanHdr = (VLANHEADER *)(pMsg->b_rptr + sizeof(RTNETETHERHDR));
- LogFlow((DEVICE_NAME ":VLAN Pcp=%d Cfi=%d Id=%d\n", pVlanHdr->Pcp, pVlanHdr->Cfi, pVlanHdr->Vid >> 4));
- LogFlow((DEVICE_NAME "%.*Rhxd\n", MBLKL(pMsg), pMsg->b_rptr));
+ PVLANHEADER pVlanHdr = (PVLANHEADER)(pMsg->b_rptr + sizeof(RTNETETHERHDR) - sizeof(pEthHdr->EtherType));
+ LogRel((DEVICE_NAME ":VLAN Pcp=%u Cfi=%u Id=%u\n", VLAN_PRI(RT_BE2H_U16(pVlanHdr->Data)), VLAN_CFI(RT_BE2H_U16(pVlanHdr->Data)), VLAN_ID(RT_BE2H_U16(pVlanHdr->Data))));
+ LogRel((DEVICE_NAME "%.*Rhxd\n", sizeof(VLANHEADER), pVlanHdr));
}
else if (pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_ARP))
{
PRTNETARPHDR pArpHdr = (PRTNETARPHDR)(pEthHdr + 1);
- LogFlow((DEVICE_NAME ":ARP Op=%d\n", pArpHdr->ar_oper));
+ LogRel((DEVICE_NAME ":ARP Op=%d\n", pArpHdr->ar_oper));
}
else if (pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_IPV6))
{
- LogFlow((DEVICE_NAME ":IPv6 D=%.6Rhxs S=%.6Rhxs\n", pb, pb + 6));
+ LogRel((DEVICE_NAME ":IPv6 D=%.6Rhxs S=%.6Rhxs\n", pb, pb + 6));
}
else if (pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_IPX_1)
|| pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_IPX_2)
|| pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_IPX_3))
{
- LogFlow((DEVICE_NAME ":IPX packet.\n"));
+ LogRel((DEVICE_NAME ":IPX packet.\n"));
}
else
{
- LogFlow((DEVICE_NAME ":Unknown EtherType=%x D=%.6Rhxs S=%.6Rhxs\n", RT_H2BE_U16(pEthHdr->EtherType), &pEthHdr->DstMac,
+ LogRel((DEVICE_NAME ":Unknown EtherType=%x D=%.6Rhxs S=%.6Rhxs\n", RT_H2BE_U16(pEthHdr->EtherType), &pEthHdr->DstMac,
&pEthHdr->SrcMac));
/* LogFlow((DEVICE_NAME ":%.*Rhxd\n", MBLKL(pMsg), pMsg->b_rptr)); */
}
@@ -630,15 +643,22 @@ LOCAL void vboxNetFltSolarisRecv(void *pvData, mac_resource_handle_t hResource,
/*
* Route all received packets into the internal network.
*/
- unsigned cSegs = vboxNetFltSolarisMBlkCalcSGSegs(pThis, pMsg);
- PINTNETSG pSG = (PINTNETSG)alloca(RT_OFFSETOF(INTNETSG, aSegs[cSegs]));
- int rc = vboxNetFltSolarisMBlkToSG(pThis, pMsg, pSG, cSegs, fSrc);
- if (RT_SUCCESS(rc))
- pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, pSG, fSrc);
- else
- LogRel((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG failed. rc=%d\n", rc));
-
+ uint16_t cFailed = 0;
+ for (mblk_t *pCurMsg = pMsg; pCurMsg != NULL; pCurMsg = pCurMsg->b_next)
+ {
+ unsigned cSegs = vboxNetFltSolarisMBlkCalcSGSegs(pThis, pCurMsg);
+ PINTNETSG pSG = (PINTNETSG)alloca(RT_OFFSETOF(INTNETSG, aSegs[cSegs]));
+ int rc = vboxNetFltSolarisMBlkToSG(pThis, pMsg, pSG, cSegs, fSrc);
+ if (RT_SUCCESS(rc))
+ pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, pSG, fSrc);
+ else
+ cFailed++;
+ }
vboxNetFltRelease(pThis, true /* fBusy */);
+
+ if (RT_UNLIKELY(cFailed))
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG failed for %u packets.\n", cFailed));
+
freemsgchain(pMsg);
NOREF(hResource);
@@ -646,7 +666,23 @@ LOCAL void vboxNetFltSolarisRecv(void *pvData, mac_resource_handle_t hResource,
/**
- * Create a VNIC dynamically over the given interface.
+ * Destroy a created VNIC.
+ *
+ * @param pThis The VM connection instance.
+ */
+LOCAL void vboxNetFltSolarisDestroyVNIC(PVBOXNETFLTINS pThis)
+{
+ if (pThis->u.s.fCreatedVNIC)
+ {
+ vnic_delete(pThis->u.s.VNICLinkId, 0 /* Flags */);
+ pThis->u.s.VNICLinkId = DATALINK_INVALID_LINKID;
+ pThis->u.s.fCreatedVNIC = false;
+ }
+}
+
+
+/**
+ * Create a non-persistent VNIC over the given interface.
*
* @param pThis The VM connection instance.
*
@@ -654,89 +690,63 @@ LOCAL void vboxNetFltSolarisRecv(void *pvData, mac_resource_handle_t hResource,
*/
LOCAL int vboxNetFltSolarisCreateVNIC(PVBOXNETFLTINS pThis)
{
-#if 0
LogFlow((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC pThis=%p\n", pThis));
- datalink_id_t InterfaceLinkId;
- int rc = dls_mgmt_get_linkid(pThis->szName, &InterfaceLinkId);
+ char szVNICName[sizeof(VBOXFLT_VNIC_NAME) + 32];
+ RTStrPrintf(szVNICName, sizeof(szVNICName), "%s%d", VBOXFLT_VNIC_NAME, pThis->u.s.uInstance);
+
+ /* -XXX- @todo remove hardcoded Guest MAC address, should be sent from guest later. */
+ RTMAC GuestMac;
+ GuestMac.au8[0] = 0x08;
+ GuestMac.au8[1] = 0x00;
+ GuestMac.au8[2] = 0x27;
+ GuestMac.au8[3] = 0xFE;
+ GuestMac.au8[4] = 0x21;
+ GuestMac.au8[5] = 0x03;
+
+ AssertCompile(sizeof(RTMAC) <= MAXMACADDRLEN);
+ uchar_t MacAddr[MAXMACADDRLEN];
+ bzero(MacAddr, sizeof(MacAddr));
+ bcopy(GuestMac.au8, MacAddr, RT_MIN(sizeof(GuestMac), sizeof(MacAddr)));
+
+ vnic_mac_addr_type_t AddrType = VNIC_MAC_ADDR_TYPE_FIXED;
+ vnic_ioc_diag_t Diag = VNIC_IOC_DIAG_NONE;
+ int MacSlot = 0;
+ int MacLen = sizeof(GuestMac);
+ uint32_t fFlags = 0; /* no VNIC_IOC_CREATE_NODUPCHECK */
+ int rc = vnic_create(szVNICName, pThis->szName, &AddrType, &MacLen, MacAddr, &MacSlot, 0 /* Mac-Prefix Length */, 0 /* VLAN-ID */,
+ fFlags, &pThis->u.s.VNICLinkId, &Diag, NULL /* Reserved */);
if (!rc)
{
- dev_t DeviceNum = makedevice(ddi_driver_major(g_pVBoxNetFltSolarisDip), pThis->u.s.uInstance);
- char szVNICName[sizeof(VBOXFLT_VNIC_NAME) + 16];
- RTStrPrintf(szVNICName, sizeof(szVNICName), "%s%d", VBOXFLT_VNIC_NAME, pThis->u.s.uInstance);
- LogRel((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC Creating VNIC '%s' over '%s'\n", szVNICName, pThis->szName));
- rc = dls_mgmt_create(szVNICName, DeviceNum, DATALINK_CLASS_VNIC, DL_ETHER, B_FALSE /* Persist */, &pThis->u.s.VNICLinkId);
+ pThis->u.s.fCreatedVNIC = true;
+ pThis->u.s.uInstance++;
+
+ /*
+ * Now try opening the created VNIC.
+ */
+ rc = mac_open_by_linkid(pThis->u.s.VNICLinkId, &pThis->u.s.hInterface);
if (!rc)
{
- /* -XXX- @todo remove hardcoded Guest MAC address, should be sent from guest later. */
- RTMAC GuestMac;
- GuestMac.au8[0] = 0x08;
- GuestMac.au8[1] = 0x00;
- GuestMac.au8[2] = 0x27;
- GuestMac.au8[3] = 0xFE;
- GuestMac.au8[4] = 0x21;
- GuestMac.au8[5] = 0x03;
-
- AssertCompile(sizeof(RTMAC) <= MAXMACADDRLEN);
- uchar_t MacAddr[MAXMACADDRLEN];
- bzero(MacAddr, sizeof(MacAddr));
- bcopy(GuestMac.au8, MacAddr, RT_MIN(sizeof(GuestMac), sizeof(MacAddr)));
-
- int MacSlot = 0;
- vnic_ioc_diag_t Diag = VNIC_IOC_DIAG_NONE;
- vnic_mac_addr_type_t MacAddrType = VNIC_MAC_ADDR_TYPE_FIXED;
- int cbMac = sizeof(RTMAC);
- int fFlags = VNIC_IOC_CREATE_NODUPCHECK | VNIC_IOC_CREATE_REQ_HWRINGS;
- rc = vnic_dev_create(pThis->u.s.VNICLinkId, InterfaceLinkId, &MacAddrType, &cbMac, MacAddr,
- &MacSlot, 0 /* Mac Prefix */, 0 /* VLAN Id */, NULL /* Resources Caps */,
- fFlags, &Diag, kcred);
- if (rc)
- {
- if (Diag == VNIC_IOC_DIAG_NO_HWRINGS)
- {
- /*
- * No hardware rings available, retry without requesting hardware ring.
- */
- LogRel((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC No hardware rings available for VNIC over '%s'. Recreating VNIC '%s'\n", pThis->szName,
- szVNICName));
-
- fFlags = VNIC_IOC_CREATE_NODUPCHECK;
- rc = vnic_dev_create(pThis->u.s.VNICLinkId, InterfaceLinkId, &MacAddrType, &cbMac, MacAddr,
- &MacSlot, 0 /* Mac Prefix */, 0 /* VLAN Id */, NULL /* Resources Caps */,
- fFlags, &Diag, kcred);
- }
- }
-
- if (!rc)
- {
- pThis->u.s.fCreatedVNIC = true;
- pThis->u.s.uInstance++;
- LogFlow((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC successfully created VNIC '%s' over '%s'\n", "vboxvnic", pThis->szName));
- return VINF_SUCCESS;
- }
- else
- {
- LogRel((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC failed to create VNIC over '%s'. rc=%d Diagnosis=%d\n", pThis->szName,
- rc, Diag));
- rc = VERR_INTNET_FLT_VNIC_CREATE_FAILED;
- }
-
- dls_mgmt_destroy(pThis->u.s.VNICLinkId, B_FALSE /* Persist */);
+ Assert(pThis->u.s.hInterface);
+ LogFlow((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC successfully created VNIC '%s' over '%s'\n", szVNICName, pThis->szName));
+ return VINF_SUCCESS;
}
else
{
- LogRel((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC failed to create a link id for a VNIC over '%s' rc=%d\n", pThis->szName, rc));
- rc = VERR_INTNET_FLT_VNIC_CREATE_FAILED;
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC failed to open VNIC '%s' over '%s'. rc=%d\n", szVNICName,
+ pThis->szName, rc));
}
+
+ vboxNetFltSolarisDestroyVNIC(pThis);
+ rc = VERR_INTNET_FLT_IF_FAILED;
}
else
{
- LogRel((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC failed to find interface '%s' rc=%d\n", pThis->szName, rc));
- rc = VERR_INTNET_FLT_IF_NOT_FOUND;
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC failed! rc=%d Diag=%d\n", rc, (int)Diag));
+ rc = VERR_INTNET_FLT_IF_FAILED;
}
return rc;
-#endif
}
@@ -771,13 +781,6 @@ LOCAL int vboxNetFltSolarisAttachToInterface(PVBOXNETFLTINS pThis, bool fRedisco
mac_close(pThis->u.s.hInterface);
pThis->u.s.hInterface = NULL;
rc = vboxNetFltSolarisCreateVNIC(pThis);
- if (RT_SUCCESS(rc))
- rc = mac_open_by_linkid(pThis->u.s.VNICLinkId, &pThis->u.s.hInterface);
- else
- {
- pThis->u.s.hInterface = NULL;
- LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to create VNIC. rc=%Rrc\n", rc));
- }
}
else
rc = VINF_SUCCESS;
@@ -788,88 +791,123 @@ LOCAL int vboxNetFltSolarisAttachToInterface(PVBOXNETFLTINS pThis, bool fRedisco
*/
if (RT_SUCCESS(rc))
{
- const mac_info_t *pMacInfo = mac_info(pThis->u.s.hInterface);
- if (RT_LIKELY(pMacInfo))
- {
- if ( pMacInfo->mi_media == DL_ETHER
- && pMacInfo->mi_nativemedia == DL_ETHER)
- {
- /*
- * Obtain the MAC address of the interface.
- */
- AssertCompile(sizeof(RTMAC) == ETHERADDRL);
- mac_unicast_primary_get(pThis->u.s.hInterface, (uint8_t *)&pThis->u.s.MacAddr.au8);
+ /*
+ * Obtain the MAC address of the interface.
+ */
+ Assert(pThis->u.s.hInterface);
+ AssertCompile(sizeof(RTMAC) == ETHERADDRL);
+ mac_unicast_primary_get(pThis->u.s.hInterface, (uint8_t *)&pThis->u.s.MacAddr.au8);
+
+ LogFlow((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface MAC address of %s is %.*Rhxs\n", pThis->szName,
+ sizeof(pThis->u.s.MacAddr), &pThis->u.s.MacAddr));
- LogFlow((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface MAC address of %s is %.*Rhxs\n", pThis->szName,
- sizeof(pThis->u.s.MacAddr), &pThis->u.s.MacAddr));
+ /** @todo Obtain the MTU size using mac_sdu_get() */
+ /** @todo Obtain capabilities (hardware checksum etc.) using mac_capab_get() */
- /** @todo Obtain the MTU size using mac_sdu_get() */
- /** @todo Obtain capabilities (hardware checksum etc.) using mac_capab_get() */
+ /*
+ * Open a client connection to the lower MAC interface.
+ */
+ rc = mac_client_open(pThis->u.s.hInterface, &pThis->u.s.hClient,
+ NULL, /* name of this client */
+ MAC_OPEN_FLAGS_USE_DATALINK_NAME | /* client name same as underlying NIC */
+ MAC_OPEN_FLAGS_MULTI_PRIMARY /* allow multiple primary unicasts */
+ );
+ if (RT_LIKELY(!rc))
+ {
+ /** @todo -XXX- if possible we must move unicast_add and rx_set to when the Guest advertises it's MAC to us. */
+
+ /*
+ * Set a unicast address for this client and the packet receive callback.
+ * We want to use the primary unicast address of the underlying interface (VNIC) hence we pass NULL.
+ * Also we don't really set the RX function here, this is done when we activate promiscuous mode.
+ */
+ mac_diag_t MacDiag;
+ rc = mac_unicast_add(pThis->u.s.hClient, NULL /* MAC Address */,
+ MAC_UNICAST_PRIMARY | MAC_UNICAST_STRIP_DISABLE |
+ MAC_UNICAST_DISABLE_TX_VID_CHECK | MAC_UNICAST_NODUPCHECK | MAC_UNICAST_HW,
+ &pThis->u.s.hUnicast, 0 /* VLAN id */, &MacDiag);
+ if (!rc)
+ {
+ if (vboxNetFltTryRetainBusyNotDisconnected(pThis))
+ {
+ Assert(pThis->pSwitchPort);
+ pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
+ pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, false); /** @todo Promisc */
+ pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
+ pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
+ vboxNetFltRelease(pThis, true /*fBusy*/);
+ }
/*
- * Open a client connection to the lower MAC interface.
+ * If the user passed in the VNIC, we need to obtain the datalink ID now.
*/
- rc = mac_client_open(pThis->u.s.hInterface, &pThis->u.s.hClient,
- NULL /* name of this client */,
- MAC_OPEN_FLAGS_USE_DATALINK_NAME | /* client name same as underlying NIC */
- MAC_OPEN_FLAGS_MULTI_PRIMARY /* allow multiple primary unicasts */
- );
- if (RT_LIKELY(!rc))
- {
- /** @todo -XXX- if possible we must move unicast_add and rx_set to when the Guest advertises it's MAC to us. */
+ if (pThis->u.s.fCreatedVNIC == false)
+ rc = dls_mgmt_get_linkid(pThis->szName, &pThis->u.s.VNICLinkId);
+ if (!rc)
+ {
/*
- * Set a unicast address for this client and the packet receive callback.
- * We want to use the primary unicast address of the underlying interface (VNIC) hence we pass NULL.
- * Also we don't really set the RX function here, this is done when we activate promiscuous mode.
+ * Modify the MAC address of the VNIC to match the guest's MAC address
*/
- mac_diag_t MacDiag;
- rc = mac_unicast_add(pThis->u.s.hClient, NULL /* MAC Address */,
- MAC_UNICAST_PRIMARY | MAC_UNICAST_STRIP_DISABLE |
- MAC_UNICAST_DISABLE_TX_VID_CHECK | MAC_UNICAST_NODUPCHECK | MAC_UNICAST_HW,
- &pThis->u.s.hUnicast, 0 /* VLAN id */, &MacDiag);
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface success!\n"));
+
+ RTMAC GuestMac;
+ GuestMac.au8[0] = 0x08;
+ GuestMac.au8[1] = 0x00;
+ GuestMac.au8[2] = 0x27;
+ GuestMac.au8[3] = 0xFE;
+ GuestMac.au8[4] = 0x21;
+ GuestMac.au8[5] = 0x03;
+
+ uchar_t MacAddr[MAXMACADDRLEN];
+ bcopy(GuestMac.au8, MacAddr, sizeof(GuestMac));
+
+ vnic_mac_addr_type_t AddrType = VNIC_MAC_ADDR_TYPE_FIXED;
+ vnic_ioc_diag_t Result = VNIC_IOC_DIAG_NONE;
+ int MacSlot = 0;
+ int MacLen = sizeof(GuestMac);
+ rc = vnic_modify_addr(pThis->u.s.VNICLinkId, &AddrType, &MacLen, MacAddr, &MacSlot, 0 /* Mac-Prefix Length */, &Result);
if (!rc)
{
- /*
- * Report MAC address, promiscuous mode and capabilities.
- */
- if (vboxNetFltTryRetainBusyNotDisconnected(pThis))
- {
- Assert(pThis->pSwitchPort);
- pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
- pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, false); /** @todo Promisc */
- pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
- pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
- vboxNetFltRelease(pThis, true /*fBusy*/);
- }
-
- LogFlow((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface successfully attached over '%s'\n", pThis->szName));
- return VINF_SUCCESS;
- }
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface vnic_modify successful %s mac %.*Rhxs\n", pThis->szName,
+ sizeof(GuestMac), &GuestMac));
+
+ mac_unicast_remove(pThis->u.s.hClient, pThis->u.s.hUnicast);
+ pThis->u.s.hUnicast = NULL;
+ rc = mac_unicast_add(pThis->u.s.hClient, NULL /* MAC Address */,
+ MAC_UNICAST_PRIMARY | MAC_UNICAST_STRIP_DISABLE |
+ MAC_UNICAST_DISABLE_TX_VID_CHECK | MAC_UNICAST_NODUPCHECK | MAC_UNICAST_HW,
+ &pThis->u.s.hUnicast, 0 /* VLAN id */, &MacDiag);
- LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to set client MAC address over link '%s' rc=%d\n",
- pThis->szName, rc));
+ if (!rc)
+ return VINF_SUCCESS;
- mac_client_close(pThis->u.s.hClient, 0 /* fFlags */);
- pThis->u.s.hClient = NULL;
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to set client MAC address (2) '%s' rc=%d\n",
+ pThis->szName, rc));
+ }
+ else
+ {
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to modify MAC address for VNIC over '%s' rc=%d\n",
+ pThis->szName, rc));
+ }
}
else
{
- LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to create client over link '%s' rc=%d\n",
- pThis->szName, rc));
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to obtain VNIC link id for '%s' rc=%d\n",
+ pThis->szName, rc));
}
}
else
- {
- LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface media type incompatible: %d %d\n", pMacInfo->mi_media,
- pMacInfo->mi_nativemedia));
- rc = EPROTO;
- }
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to set client MAC address over link '%s' rc=%d\n",
+ pThis->szName, rc));
+
+ mac_client_close(pThis->u.s.hClient, 0 /* fFlags */);
+ pThis->u.s.hClient = NULL;
}
else
{
- LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to obtain info for link '%s'\n", pThis->szName));
- rc = ENXIO;
+ LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to create client over link '%s' rc=%d\n",
+ pThis->szName, rc));
}
}
else
@@ -883,6 +921,8 @@ LOCAL int vboxNetFltSolarisAttachToInterface(PVBOXNETFLTINS pThis, bool fRedisco
mac_close(pThis->u.s.hInterface);
pThis->u.s.hInterface = NULL;
}
+
+ vboxNetFltSolarisDestroyVNIC(pThis);
}
else
LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to open link '%s' rc=%d\n", pThis->szName, rc));
@@ -928,15 +968,7 @@ LOCAL int vboxNetFltSolarisDetachFromInterface(PVBOXNETFLTINS pThis)
pThis->u.s.hInterface = NULL;
}
- if (pThis->u.s.fCreatedVNIC)
- {
-#if 0
- vnic_dev_delete(pThis->u.s.VNICLinkId, 0 /* Flags -- ununsed in snv_127 */, kcred);
- dls_mgmt_destroy(pThis->u.s.VNICLinkId, B_FALSE /* Persist */);
- pThis->u.s.VNICLinkId = DATALINK_INVALID_LINKID;
- pThis->u.s.fCreatedVNIC = false;
-#endif
- }
+ vboxNetFltSolarisDestroyVNIC(pThis);
}
@@ -1061,3 +1093,23 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst)
return rc;
}
+
+void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf, PCRTMAC pMac)
+{
+ LogRel((DEVICE_NAME ":vboxNetFltPortOSNotifyMacAddress %s %.6Rhxs\n", pThis->szName, pMac));
+}
+
+
+int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ LogRel((DEVICE_NAME ":vboxNetFltPortOsConnectInterface\n"));
+ return VINF_SUCCESS;
+}
+
+
+int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ LogRel((DEVICE_NAME ":vboxNetFltPortOsDisconnectInterface\n"));
+ return VINF_SUCCESS;
+}
+
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c
index 056bfdc12..a78403715 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFlt-win.c 29108 2010-05-05 20:17:42Z vboxsync $ */
+/* $Id: VBoxNetFlt-win.c 29643 2010-05-18 15:26:50Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Windows Specific Code. Integration with IntNet/NetFlt
*/
@@ -114,10 +114,8 @@ static VBOXNETFLTGLOBALS g_VBoxNetFltGlobals;
volatile static bool g_bIdcInitialized;
INIT_IDC_INFO g_InitIdcInfo;
-#ifdef VBOX_LOOPBACK_USEFLAGS
UINT g_fPacketDontLoopBack;
UINT g_fPacketIsLoopedBack;
-#endif
#define LIST_ENTRY_2_JOB(pListEntry) \
( (PJOB)((uint8_t *)(pListEntry) - RT_OFFSETOF(JOB, ListEntry)) )
@@ -1717,16 +1715,9 @@ DECLHIDDEN(PNDIS_PACKET) vboxNetFltWinNdisPacketFromSG(PADAPT pAdapt, PINTNETSG
if(bCopyMemory)
{
fStatus = vboxNetFltWinMemAlloc(&pvMemBuf, pSG->cbTotal);
+ Assert(fStatus == NDIS_STATUS_SUCCESS);
if(fStatus == NDIS_STATUS_SUCCESS)
- {
IntNetSgRead(pSG, pvMemBuf);
- }
- else
- {
- AssertFailed();
- NdisFreePacket(pPacket);
- pPacket = NULL;
- }
}
else
{
@@ -1954,10 +1945,8 @@ DriverEntry(
{
NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
int rc;
-#ifdef VBOX_LOOPBACK_USEFLAGS
ULONG MjVersion;
ULONG MnVersion;
-#endif
NdisAllocateSpinLock(&g_GlobalLock);
@@ -1973,7 +1962,6 @@ DriverEntry(
AssertRC(rc);
if(RT_SUCCESS(rc))
{
-#ifdef VBOX_LOOPBACK_USEFLAGS
PsGetVersion(&MjVersion, &MnVersion,
NULL, /* PULONG BuildNumber OPTIONAL */
NULL /* PUNICODE_STRING CSDVersion OPTIONAL */
@@ -1988,7 +1976,6 @@ DriverEntry(
}
g_fPacketIsLoopedBack = NDIS_FLAGS_IS_LOOPBACK_PACKET;
-#endif
Status = vboxNetFltWinJobInitQueue(&g_JobQueue);
Assert(Status == STATUS_SUCCESS);
@@ -2633,7 +2620,7 @@ DECLHIDDEN(bool) vboxNetFltWinMatchPackets(PNDIS_PACKET pPacket1, PNDIS_PACKET p
}
ucbLength2Match = MIN(ucbMatch, cbLength1);
- ucbLength2Match = MIN(ucbMatch, cbLength2);
+ ucbLength2Match = MIN(ucbLength2Match, cbLength2);
if(memcmp((PVOID*)pMemBuf1, (PVOID*)pMemBuf2, ucbLength2Match))
{
@@ -2735,7 +2722,7 @@ DECLHIDDEN(bool) vboxNetFltWinMatchPacketAndSG(PNDIS_PACKET pPacket, PINTNETSG p
}
ucbLength2Match = MIN(ucbMatch, cbLength1);
- ucbLength2Match = MIN(ucbMatch, cbLength2);
+ ucbLength2Match = MIN(ucbLength2Match, cbLength2);
if(memcmp((PVOID*)pMemBuf1, (PVOID*)pMemBuf2, ucbLength2Match))
{
@@ -2824,7 +2811,7 @@ static bool vboxNetFltWinMatchSGs(PINTNETSG pSG1, PINTNETSG pSG2, const INT cbMa
}
ucbLength2Match = MIN(ucbMatch, cbLength1);
- ucbLength2Match = MIN(ucbMatch, cbLength2);
+ ucbLength2Match = MIN(ucbLength2Match, cbLength2);
if(memcmp(pMemBuf1, pMemBuf2, ucbLength2Match))
{
@@ -3216,6 +3203,32 @@ static bool vboxNetFltWinIsPromiscuous2(PVBOXNETFLTINS pThis)
#endif
}
+
+/**
+ * Report the MAC address, promiscuous mode setting, GSO capabilities and
+ * no-preempt destinations to the internal network.
+ *
+ * Does nothing if we're not currently connected to an internal network.
+ *
+ * @param pThis The instance data.
+ */
+static void vboxNetFltWinReportStuff(PVBOXNETFLTINS pThis)
+{
+ /** @todo Keep these up to date, esp. the promiscuous mode bit. */
+ if ( pThis->pSwitchPort
+ && vboxNetFltTryRetainBusyNotDisconnected(pThis))
+ {
+ pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
+ pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort,
+ vboxNetFltWinIsPromiscuous2(pThis));
+ pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0,
+ INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
+ /** @todo We should be able to do pfnXmit at DISPATCH_LEVEL... */
+ pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
+ vboxNetFltRelease(pThis, true /*fBusy*/);
+ }
+}
+
/**
* Worker for vboxNetFltWinAttachToInterface.
*
@@ -3305,19 +3318,8 @@ static void vboxNetFltWinAttachToInterfaceWorker(PATTACH_INFO pAttachInfo)
vboxNetFltRelease(pThis, false);
/* 5. Report MAC address, promiscuousness and GSO capabilities. */
- /** @todo Keep these up to date, esp. the promiscuous mode bit. */
- if ( pThis->pSwitchPort
- && vboxNetFltTryRetainBusyNotDisconnected(pThis))
- {
- pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
- pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort,
- vboxNetFltWinIsPromiscuous2(pThis));
- pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0,
- INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
- /** @todo We should be able to do pfnXmit at DISPATCH_LEVEL... */
- pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
- vboxNetFltRelease(pThis, true /*fBusy*/);
- }
+ vboxNetFltWinReportStuff(pThis);
+
return;
}
AssertBreakpoint();
@@ -3470,6 +3472,14 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst)
{
NDIS_STATUS fStatus;
+#ifndef VBOX_LOOPBACK_USEFLAGS
+ /* force "don't loopback" flags to prevent loopback branch invocation in any case
+ * to avoid ndis misbehave */
+ NdisGetPacketFlags(pPacket) |= g_fPacketDontLoopBack;
+#else
+ /* this is done by default in vboxNetFltWinNdisPacketFromSG */
+#endif
+
#if defined(DEBUG_NETFLT_PACKETS) || !defined(VBOX_LOOPBACK_USEFLAGS)
vboxNetFltWinLbPutSendPacket(pAdapt, pPacket, true /* bFromIntNet */);
#endif
@@ -3717,6 +3727,9 @@ static int vboxNetFltWinConnectIt(PVBOXNETFLTINS pThis)
vboxNetFltWinJobSynchExecAtPassive(vboxNetFltWinConnectItWorker, &Info);
+ if (RT_SUCCESS(Info.Status))
+ vboxNetFltWinReportStuff(pThis);
+
return Info.Status;
}
@@ -3758,3 +3771,22 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis)
return VINF_SUCCESS;
}
+void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf, PCRTMAC pMac)
+{
+ NOREF(pThis); NOREF(hIf); NOREF(pMac);
+}
+
+int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
+int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, INTNETIFHANDLE hIf)
+{
+ /* Nothing to do */
+ NOREF(pThis); NOREF(hIf);
+ return VINF_SUCCESS;
+}
+
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h
index ae00a5a36..07a673f9a 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFlt-win.h 29108 2010-05-05 20:17:42Z vboxsync $ */
+/* $Id: VBoxNetFlt-win.h 29643 2010-05-18 15:26:50Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Windows Specific Code. Integration with IntNet/NetFlt
*/
@@ -29,10 +29,8 @@
/** global lock */
extern NDIS_SPIN_LOCK g_GlobalLock;
-#ifdef VBOX_LOOPBACK_USEFLAGS
extern UINT g_fPacketDontLoopBack;
extern UINT g_fPacketIsLoopedBack;
-#endif
/*
* Debug Print API
@@ -47,6 +45,11 @@ extern UINT g_fPacketIsLoopedBack;
#endif /* if DBG */
+/** get the PVBOXNETFLTINS from PADAPT */
+#define PADAPT_2_PVBOXNETFLTINS(_pAdapt) ( (PVBOXNETFLTINS)((uint8_t *)(_pAdapt) - RT_OFFSETOF(VBOXNETFLTINS, u.s.IfAdaptor)) )
+/** get the PADAPT from PVBOXNETFLTINS */
+#define PVBOXNETFLTINS_2_PADAPT(_pNetFlt) ( &(_pNetFlt)->u.s.IfAdaptor )
+
DECLHIDDEN(NTSTATUS) vboxNetFltWinPtDispatch(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp);
DECLHIDDEN(VOID) vboxNetFltWinUnload(IN PDRIVER_OBJECT DriverObject);
@@ -412,7 +415,12 @@ DECLINLINE(PNDIS_PACKET) vboxNetFltWinLbSearchLoopBackBySG(PADAPT pAdapt, PINTNE
DECLINLINE(bool) vboxNetFltWinLbRemoveSendPacket(PADAPT pAdapt, PNDIS_PACKET pPacket)
{
PSEND_RSVD pSrv = (PSEND_RSVD)pPacket->ProtocolReserved;
- return vboxNetFltWinInterlockedSearchListEntry(&pAdapt->SendPacketQueue, &pSrv->ListEntry, true);
+ bool bRet = vboxNetFltWinInterlockedSearchListEntry(&pAdapt->SendPacketQueue, &pSrv->ListEntry, true);
+#ifdef DEBUG_misha
+ PVBOXNETFLTINS pNetFlt = PADAPT_2_PVBOXNETFLTINS(pAdapt);
+ Assert(bRet == (pNetFlt->enmTrunkState == INTNETTRUNKIFSTATE_ACTIVE));
+#endif
+ return bRet;
}
# endif
@@ -476,11 +484,6 @@ extern RTMAC g_vboxNetFltWinVerifyMACGuest;
* PADAPT, PVBOXNETFLTINS reference/dereference (i.e. retain/release) API *
**************************************************************************/
-/** get the PVBOXNETFLTINS from PADAPT */
-#define PADAPT_2_PVBOXNETFLTINS(_pAdapt) ( (PVBOXNETFLTINS)((uint8_t *)(_pAdapt) - RT_OFFSETOF(VBOXNETFLTINS, u.s.IfAdaptor)) )
-/** get the PADAPT from PVBOXNETFLTINS */
-#define PVBOXNETFLTINS_2_PADAPT(_pNetFlt) ( &(_pNetFlt)->u.s.IfAdaptor )
-
DECLHIDDEN(void) vboxNetFltWinWaitDereference(PADAPT_DEVICE pState);
DECLINLINE(void) vboxNetFltWinReferenceModeNetFlt(PVBOXNETFLTINS pIns)
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h
index 42792a985..7fb051939 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltCommon-win.h
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFltCommon-win.h 29108 2010-05-05 20:17:42Z vboxsync $ */
+/* $Id: VBoxNetFltCommon-win.h 29643 2010-05-18 15:26:50Z vboxsync $ */
/** @file
* VBoxNetFltCommon.h - Network Filter Driver (Host), Windows Specific Code. Common headeer with commonly used defines and decls
*/
@@ -469,9 +469,7 @@ C_ASSERT(sizeof(TRANSFERDATA_RSVD) <= PROTOCOL_RESERVED_SIZE_IN_PACKET);
C_ASSERT(sizeof(NDIS_DEVICE_POWER_STATE) == sizeof(uint32_t));
C_ASSERT(sizeof(UINT) == sizeof(uint32_t));
-#ifdef VBOX_LOOPBACK_USEFLAGS
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K 0x400
-#endif
#include "../VBoxNetFltInternal.h"
#include "VBoxNetFlt-win.h"
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c
index f55bb511c..3c4f40cb7 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFltMp-win.c 29108 2010-05-05 20:17:42Z vboxsync $ */
+/* $Id: VBoxNetFltMp-win.c 29592 2010-05-18 07:22:57Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Windows Specific Code. Miniport edge of ndis filter driver
*/
@@ -445,6 +445,9 @@ static NDIS_STATUS
vboxNetFltWinSendPassThru(
IN PADAPT pAdapt,
IN PNDIS_PACKET pPacket
+#ifdef VBOXNETFLT_NO_PACKET_QUEUE
+ , bool bNetFltActive
+#endif
)
{
PNDIS_PACKET pMyPacket;
@@ -456,7 +459,12 @@ vboxNetFltWinSendPassThru(
if (fStatus == NDIS_STATUS_SUCCESS)
{
#if !defined(VBOX_LOOPBACK_USEFLAGS) /* || defined(DEBUG_NETFLT_PACKETS) */
+# ifdef VBOXNETFLT_NO_PACKET_QUEUE
+ if (bNetFltActive)
+ vboxNetFltWinLbPutSendPacket(pAdapt, pMyPacket, false /* bFromIntNet */);
+# else
/* no need for the loop enqueue & check in a passthru mode , ndis will do everything for us */
+# endif
#endif
NdisSend(&fStatus,
pAdapt->hBindingHandle,
@@ -466,6 +474,10 @@ vboxNetFltWinSendPassThru(
#ifndef WIN9X
NdisIMCopySendCompletePerPacketInfo (pPacket, pMyPacket);
#endif
+#if defined(VBOXNETFLT_NO_PACKET_QUEUE) && !defined(VBOX_LOOPBACK_USEFLAGS)
+ if (bNetFltActive)
+ vboxNetFltWinLbRemoveSendPacket(pAdapt, pMyPacket);
+#endif
NdisFreePacket(pMyPacket);
}
}
@@ -837,7 +849,11 @@ vboxNetFltWinMpSendPackets(
)
{
#ifndef VBOXNETADP
- fStatus = vboxNetFltWinSendPassThru(pAdapt, pPacket);
+ fStatus = vboxNetFltWinSendPassThru(pAdapt, pPacket
+#ifdef VBOXNETFLT_NO_PACKET_QUEUE
+ , !!cNetFltRefs
+#endif
+ );
#else
if(!cNetFltRefs)
{
diff --git a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c
index 182e8fd5f..b5bf5578c 100644
--- a/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c
+++ b/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c
@@ -1,4 +1,4 @@
-/* $Id: VBoxNetFltPt-win.c 29108 2010-05-05 20:17:42Z vboxsync $ */
+/* $Id: VBoxNetFltPt-win.c 29616 2010-05-18 11:55:55Z vboxsync $ */
/** @file
* VBoxNetFlt - Network Filter Driver (Host), Windows Specific Code. Protocol edge of ndis filter driver
*/
@@ -1353,9 +1353,10 @@ vboxNetFltWinPtReceiveActive(
pLb = vboxNetFltWinLbSearchLoopBackBySG(pAdapt, pSG, false);
if(pLb)
{
+#ifndef DEBUG_NETFLT_RECV_NOPACKET
/* should not be here */
Assert(0);
-
+#endif
if(!vboxNetFltWinLbIsFromIntNet(pLb))
{
PNDIS_PACKET pMyPacket;
@@ -1701,7 +1702,7 @@ vboxNetFltWinPtReceive(
if(bNetFltActive)
{
#ifndef VBOX_LOOPBACK_USEFLAGS
- pLb = vboxNetFltWinLbSearchLoopBack(pAdapt, pPacket, true /* ??? no need to keep it, so remove */);
+ pLb = vboxNetFltWinLbSearchLoopBack(pAdapt, pPacket, false);
if(!pLb)
#endif
{
@@ -2030,7 +2031,7 @@ vboxNetFltWinPtReceivePacket(
if(bNetFltActive)
{
#ifndef VBOX_LOOPBACK_USEFLAGS
- PNDIS_PACKET pLb = vboxNetFltWinLbSearchLoopBack(pAdapt, pPacket, true /* ??? no need to keep it, so remove */);
+ PNDIS_PACKET pLb = vboxNetFltWinLbSearchLoopBack(pAdapt, pPacket, false);
if(!pLb)
#endif
{
diff --git a/src/VBox/HostServices/GuestControl/service.cpp b/src/VBox/HostServices/GuestControl/service.cpp
index d3cdb093a..d377bbc3b 100644
--- a/src/VBox/HostServices/GuestControl/service.cpp
+++ b/src/VBox/HostServices/GuestControl/service.cpp
@@ -1,4 +1,4 @@
-/* $Id: service.cpp 29220 2010-05-07 15:09:53Z vboxsync $ */
+/* $Id: service.cpp 29438 2010-05-12 21:50:16Z vboxsync $ */
/** @file
* Guest Control Service: Controlling the guest.
*/
@@ -219,6 +219,7 @@ private:
int clientDisconnect(uint32_t u32ClientID, void *pvClient);
int sendHostCmdToGuest(HostCmd *pCmd, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
int retrieveNextHostCmd(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
+ int cancelPendingWaits(uint32_t u32ClientID);
int notifyHost(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
int processHostCmd(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
void call(VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID,
@@ -442,6 +443,29 @@ int Service::retrieveNextHostCmd(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHa
return rc;
}
+int Service::cancelPendingWaits(uint32_t u32ClientID)
+{
+ int rc = VINF_SUCCESS;
+ CallListIter it = mClientList.begin();
+ while (it != mClientList.end())
+ {
+ if (it->mClientID == u32ClientID)
+ {
+ if (it->mNumParms >= 2)
+ {
+ it->mParms[0].setUInt32(GETHOSTMSG_EXEC_HOST_CANCEL_WAIT); /* Message ID */
+ it->mParms[1].setUInt32(0); /* Required parameters for message */
+ }
+ if (mpHelpers)
+ mpHelpers->pfnCallComplete(it->mHandle, rc);
+ it = mClientList.erase(it);
+ }
+ else
+ it++;
+ }
+ return rc;
+}
+
int Service::notifyHost(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
{
LogFlowFunc(("eFunction=%ld, cParms=%ld, paParms=%p\n",
@@ -502,6 +526,7 @@ int Service::processHostCmd(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM
guest.mHandle, guest.mNumParms, guest.mParms);
/* In any case the client did something, so wake up and remove from list. */
+ AssertPtr(mpHelpers);
mpHelpers->pfnCallComplete(guest.mHandle, rc);
mClientList.pop_front();
@@ -558,6 +583,11 @@ void Service::call(VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID,
rc = retrieveNextHostCmd(u32ClientID, callHandle, cParms, paParms);
break;
+ case GUEST_CANCEL_PENDING_WAITS:
+ LogFlowFunc(("GUEST_CANCEL_PENDING_WAITS\n"));
+ rc = cancelPendingWaits(u32ClientID);
+ break;
+
/* The guest notifies the host that some output at stdout/stderr is available. */
case GUEST_EXEC_SEND_OUTPUT:
LogFlowFunc(("GUEST_EXEC_SEND_OUTPUT\n"));
@@ -577,6 +607,7 @@ void Service::call(VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID,
if (rc != VINF_HGCM_ASYNC_EXECUTE)
{
/* Tell the client that the call is complete (unblocks waiting). */
+ AssertPtr(mpHelpers);
mpHelpers->pfnCallComplete(callHandle, rc);
}
}
diff --git a/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
index 50ce881c1..9984a89e8 100644
--- a/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
+++ b/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
@@ -28,7 +28,6 @@
#define FBO 1 /* Disable this to see how the output is without the FBO in the middle of the processing chain. */
//#define SHOW_WINDOW_BACKGROUND 1 /* Define this to see the window background even if the window is clipped */
//#define DEBUG_VERBOSE /* Define this could get some debug info about the messages flow. */
-//#define DEBUG_poetzsch 1
#ifdef DEBUG_poetzsch
#define DEBUG_MSG(text) \
@@ -691,6 +690,9 @@ while(0);
glLoadIdentity();
glViewport(0, 0, r.size.width, r.size.height);
glOrtho(0, r.size.width, 0, r.size.height, -1, 1);
+ DEBUG_MSG_1(("frame[%i, %i, %i, %i]\n", (int)r.origin.x, (int)r.origin.x, (int)r.size.width, (int)r.size.height));
+ DEBUG_MSG_1(("m_Pos(%i,%i) m_Size(%i,%i)\n", (int)m_Pos.x, (int)m_Pos.y, (int)m_Size.width, (int)m_Size.height));
+ DEBUG_MSG_1(("m_RootShift(%i, %i)\n", (int)m_RootShift.x, (int)m_RootShift.y));
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glTranslatef(0.0f, m_RootShift.y, 0.0f);
@@ -766,13 +768,22 @@ while(0);
- (void)createFBO
{
- GLuint fboid = m_FBOId;
+ GLint oldTexId;
+ GLint oldFBId;
DEBUG_MSG(("createFBO %p\n", self));
[self deleteFBO];
-if (0&&!fboid)
- GL_SAVE_STATE;
+ //GL_SAVE_STATE;
+#if 0
+ CHECK_GL_ERROR();
+ glPushAttrib(GL_ACCUM_BUFFER_BIT);
+ glPopAttrib();
+ CHECK_GL_ERROR();
+#endif
+
+ glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &oldTexId);
+ glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &oldFBId);
/* If not previously setup generate IDs for FBO and its associated texture. */
if (!m_FBOId)
@@ -802,7 +813,7 @@ if (0&&!fboid)
/* Bind to FBO */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_FBOId);
- glEnable(GL_TEXTURE_RECTANGLE_ARB);
+ /*glEnable(GL_TEXTURE_RECTANGLE_ARB);*/
GLfloat imageAspectRatio = m_FBOTexSize.width / m_FBOTexSize.height;
@@ -837,7 +848,8 @@ if (0&&!fboid)
/* The GPUs like the GL_BGRA / GL_UNSIGNED_INT_8_8_8_8_REV combination
* others are also valid, but might incur a costly software translation. */
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGB, m_FBOTexSize.width, m_FBOTexSize.height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
-
+ DEBUG_MSG(("m_FBOTexSize(%i,%i)\n", (int)m_FBOTexSize.width, (int)m_FBOTexSize.height));
+
/* Now attach texture to the FBO as its color destination */
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, m_FBOTexId, 0);
@@ -850,9 +862,8 @@ if (0&&!fboid)
if (GL_FRAMEBUFFER_COMPLETE_EXT != glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT))
DEBUG_MSG(("Framebuffer Object creation or update failed!\n"));
- glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glDisable(GL_TEXTURE_RECTANGLE_ARB);
+ glBindTexture(GL_TEXTURE_RECTANGLE_ARB, oldTexId);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, oldFBId ? oldFBId:m_FBOId);
/* Is there a dock tile preview enabled in the GUI? If so setup a
* additional thumbnail view for the dock tile. */
@@ -884,8 +895,8 @@ if (0&&!fboid)
if (GL_FRAMEBUFFER_COMPLETE_EXT != glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT))
DEBUG_MSG(("Framebuffer Thumb Object creation or update failed!\n"));
- glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindTexture(GL_TEXTURE_RECTANGLE_ARB, oldTexId);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, oldFBId ? oldFBId:m_FBOId);
m_DockTileView = [[DockOverlayView alloc] init];
[self reshapeDockTile];
@@ -901,8 +912,7 @@ if (0&&!fboid)
m_paClipRects[2] = m_FBOTexSize.width;
m_paClipRects[3] = m_FBOTexSize.height;
-if (0&&!fboid)
- GL_RESTORE_STATE;
+ //GL_RESTORE_STATE;
}
- (void)deleteFBO
@@ -930,8 +940,6 @@ if (0&&!fboid)
}
if (m_FBOTexId > 0)
{
- glEnable(GL_TEXTURE_RECTANGLE_ARB);
- glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
glDeleteTextures(1, &m_FBOTexId);
m_FBOTexId = 0;
}
@@ -1017,6 +1025,7 @@ if (0&&!fboid)
// [m_pGLCtx flushBuffer];
glFlush();
// glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ DEBUG_MSG_1(("swapFBO bound:%i, self:%i\n", tmpFB, m_FBOId));
if (tmpFB == m_FBOId)
{
if ([self lockFocusIfCanDraw])
@@ -1093,6 +1102,7 @@ if (0&&!fboid)
if (m_pSharedGLCtx)
{
NSRect r = [self frame];
+ DEBUG_MSG_1(("rF2V frame[%i, %i, %i, %i]\n", (int)r.origin.x, (int)r.origin.y, (int)r.size.width, (int)r.size.height));
if (m_FBOTexId > 0)
{
@@ -1473,6 +1483,7 @@ void cocoaViewDisplay(NativeViewRef pView)
{
NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init];
+ DEBUG_MSG_1(("cocoaViewDisplay %p\n", pView));
[(OverlayView*)pView swapFBO];
[pPool release];
diff --git a/src/VBox/Installer/linux/vboxdrv.sh.in b/src/VBox/Installer/linux/vboxdrv.sh.in
index 904f68518..550efaad9 100644
--- a/src/VBox/Installer/linux/vboxdrv.sh.in
+++ b/src/VBox/Installer/linux/vboxdrv.sh.in
@@ -163,12 +163,9 @@ start()
if ! rm -f $DEVICE; then
failure "Cannot remove $DEVICE"
fi
- # HACK: disable the hardware performance counter framework for non-root
- if [ -f /proc/sys/kernel/perf_counter_paranoid ]; then
- echo 2 > /proc/sys/kernel/perf_counter_paranoid
- fi
- if [ -f /proc/sys/kernel/perf_event_paranoid ]; then
- echo 2 > /proc/sys/kernel/perf_event_paranoid
+ # HACK: disable the hardware performance counter framework
+ if [ -e /proc/sys/kernel/perf_counter_paranoid ]; then
+ echo 2 > /proc/sys/kernel/perf_counter_paranoid
fi
if ! $MODPROBE vboxdrv > /dev/null 2>&1; then
failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
diff --git a/src/VBox/Main/ConsoleImpl.cpp b/src/VBox/Main/ConsoleImpl.cpp
index 3caf321f4..e1faceff1 100644
--- a/src/VBox/Main/ConsoleImpl.cpp
+++ b/src/VBox/Main/ConsoleImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: ConsoleImpl.cpp 29363 2010-05-11 15:12:07Z vboxsync $ */
+/* $Id: ConsoleImpl.cpp 29580 2010-05-17 18:23:00Z vboxsync $ */
/** @file
* VBox Console COM Class implementation
*/
@@ -440,7 +440,7 @@ HRESULT Console::init(IMachine *aMachine, IInternalMachineControl *aControl)
unconst(mMachine) = aMachine;
unconst(mControl) = aControl;
- memset(&mCallbackData, 0, sizeof(mCallbackData));
+ mCallbackData.clear();
/* Cache essential properties and objects */
@@ -617,7 +617,7 @@ void Console::uninit()
/* dynamically allocated members of mCallbackData are uninitialized
* at the end of powerDown() */
- Assert(!mCallbackData.mpsc.valid && mCallbackData.mpsc.shape == NULL);
+ Assert(!mCallbackData.mpsc.valid && mCallbackData.mpsc.shape.isNull());
Assert(!mCallbackData.mcc.valid);
Assert(!mCallbackData.klc.valid);
@@ -3025,7 +3025,7 @@ STDMETHODIMP Console::RegisterCallback(IConsoleCallback *aCallback)
mCallbackData.mpsc.yHot,
mCallbackData.mpsc.width,
mCallbackData.mpsc.height,
- mCallbackData.mpsc.shape);
+ ComSafeArrayAsInParam(mCallbackData.mpsc.shape));
if (mCallbackData.mcc.valid)
aCallback->OnMouseCapabilityChange(mCallbackData.mcc.supportsAbsolute,
mCallbackData.mcc.supportsRelative,
@@ -3214,8 +3214,8 @@ HRESULT Console::doMediumChange(IMediumAttachment *aMediumAttachment, bool fForc
ULONG uInstance;
rc = ctrl->COMGETTER(Instance)(&uInstance);
AssertComRC(rc);
- IoBackendType_T enmIoBackend;
- rc = ctrl->COMGETTER(IoBackend)(&enmIoBackend);
+ BOOL fUseHostIOCache;
+ rc = ctrl->COMGETTER(UseHostIOCache)(&fUseHostIOCache);
AssertComRC(rc);
/* protect mpVM */
@@ -3228,10 +3228,20 @@ HRESULT Console::doMediumChange(IMediumAttachment *aMediumAttachment, bool fForc
* here to make requests from under the lock in order to serialize them.
*/
PVMREQ pReq;
- int vrc = VMR3ReqCall(mpVM, VMCPUID_ANY, &pReq, 0 /* no wait! */, VMREQFLAGS_VBOX_STATUS,
- (PFNRT)Console::changeRemovableMedium, 7,
- this, pszDevice, uInstance, enmBus, enmIoBackend,
- aMediumAttachment, fForce);
+ int vrc = VMR3ReqCall(mpVM,
+ VMCPUID_ANY,
+ &pReq,
+ 0 /* no wait! */,
+ VMREQFLAGS_VBOX_STATUS,
+ (PFNRT)Console::changeRemovableMedium,
+ 7,
+ this,
+ pszDevice,
+ uInstance,
+ enmBus,
+ fUseHostIOCache,
+ aMediumAttachment,
+ fForce);
/* leave the lock before waiting for a result (EMT will call us back!) */
alock.leave();
@@ -3284,7 +3294,7 @@ DECLCALLBACK(int) Console::changeRemovableMedium(Console *pConsole,
const char *pcszDevice,
unsigned uInstance,
StorageBus_T enmBus,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
IMediumAttachment *aMediumAtt,
bool fForce)
{
@@ -3347,7 +3357,7 @@ DECLCALLBACK(int) Console::changeRemovableMedium(Console *pConsole,
pcszDevice,
uInstance,
enmBus,
- enmIoBackend,
+ fUseHostIOCache,
false /* fSetupMerge */,
0 /* uMergeSource */,
0 /* uMergeTarget */,
@@ -4460,8 +4470,8 @@ HRESULT Console::onlineMergeMedium(IMediumAttachment *aMediumAttachment,
ULONG uInstance;
rc = ctrl->COMGETTER(Instance)(&uInstance);
AssertComRC(rc);
- IoBackendType_T enmIoBackend;
- rc = ctrl->COMGETTER(IoBackend)(&enmIoBackend);
+ BOOL fUseHostIOCache;
+ rc = ctrl->COMGETTER(UseHostIOCache)(&fUseHostIOCache);
AssertComRC(rc);
unsigned uLUN;
@@ -4491,7 +4501,7 @@ HRESULT Console::onlineMergeMedium(IMediumAttachment *aMediumAttachment,
pcszDevice,
uInstance,
enmBus,
- enmIoBackend,
+ fUseHostIOCache,
true /* fSetupMerge */,
aSourceIdx,
aTargetIdx,
@@ -4566,7 +4576,7 @@ HRESULT Console::onlineMergeMedium(IMediumAttachment *aMediumAttachment,
pcszDevice,
uInstance,
enmBus,
- enmIoBackend,
+ fUseHostIOCache,
false /* fSetupMerge */,
0 /* uMergeSource */,
0 /* uMergeTarget */,
@@ -4631,7 +4641,7 @@ HRESULT Console::updateMachineState(MachineState_T aMachineState)
void Console::onMousePointerShapeChange(bool fVisible, bool fAlpha,
uint32_t xHot, uint32_t yHot,
uint32_t width, uint32_t height,
- void *pShape)
+ ComSafeArrayIn(BYTE,pShape))
{
#if 0
LogFlowThisFuncEnter();
@@ -4657,38 +4667,17 @@ void Console::onMousePointerShapeChange(bool fVisible, bool fAlpha,
bool wasValid = mCallbackData.mpsc.valid;
mCallbackData.mpsc.valid = false;
- if (pShape != NULL)
+ com::SafeArray <BYTE> aShape(ComSafeArrayInArg (pShape));
+ if (aShape.size() != 0)
{
- size_t cb = (width + 7) / 8 * height; /* size of the AND mask */
- cb = ((cb + 3) & ~3) + width * 4 * height; /* + gap + size of the XOR mask */
- /* try to reuse the old shape buffer if the size is the same */
- if (!wasValid)
- mCallbackData.mpsc.shape = NULL;
- else
- if (mCallbackData.mpsc.shape != NULL && mCallbackData.mpsc.shapeSize != cb)
- {
- RTMemFree(mCallbackData.mpsc.shape);
- mCallbackData.mpsc.shape = NULL;
- }
- if (mCallbackData.mpsc.shape == NULL)
- {
- mCallbackData.mpsc.shape = (BYTE *) RTMemAllocZ(cb);
- AssertReturnVoid(mCallbackData.mpsc.shape);
- }
- mCallbackData.mpsc.shapeSize = cb;
- memcpy(mCallbackData.mpsc.shape, pShape, cb);
+ mCallbackData.mpsc.shape.resize(aShape.size());
+ ::memcpy( mCallbackData.mpsc.shape.raw(), aShape.raw(), aShape.size());
}
else
- {
- if (wasValid && mCallbackData.mpsc.shape != NULL)
- RTMemFree(mCallbackData.mpsc.shape);
- mCallbackData.mpsc.shape = NULL;
- mCallbackData.mpsc.shapeSize = 0;
- }
-
+ mCallbackData.mpsc.shape.resize(0);
mCallbackData.mpsc.valid = true;
- CONSOLE_DO_CALLBACKS(OnMousePointerShapeChange,(fVisible, fAlpha, xHot, yHot, width, height, (BYTE *) pShape));
+ CONSOLE_DO_CALLBACKS(OnMousePointerShapeChange,(fVisible, fAlpha, xHot, yHot, width, height, ComSafeArrayInArg(pShape)));
#if 0
LogFlowThisFuncLeave();
@@ -5652,15 +5641,7 @@ HRESULT Console::powerDown(Progress *aProgress /*= NULL*/)
mVMDestroying = false;
if (SUCCEEDED(rc))
- {
- /* uninit dynamically allocated members of mCallbackData */
- if (mCallbackData.mpsc.valid)
- {
- if (mCallbackData.mpsc.shape != NULL)
- RTMemFree(mCallbackData.mpsc.shape);
- }
- memset(&mCallbackData, 0, sizeof(mCallbackData));
- }
+ mCallbackData.clear();
/* complete the progress */
if (aProgress)
@@ -7564,7 +7545,7 @@ DECLCALLBACK(int) Console::reconfigureMediumAttachment(Console *pConsole,
const char *pcszDevice,
unsigned uInstance,
StorageBus_T enmBus,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
bool fSetupMerge,
unsigned uMergeSource,
unsigned uMergeTarget,
@@ -7598,7 +7579,7 @@ DECLCALLBACK(int) Console::reconfigureMediumAttachment(Console *pConsole,
pcszDevice,
uInstance,
enmBus,
- enmIoBackend,
+ fUseHostIOCache,
fSetupMerge,
uMergeSource,
uMergeTarget,
@@ -7744,7 +7725,7 @@ DECLCALLBACK(int) Console::fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser)
ULONG lInstance;
StorageControllerType_T enmController;
StorageBus_T enmBus;
- IoBackendType_T enmIoBackend;
+ BOOL fUseHostIOCache;
/*
* We can't pass a storage controller object directly
@@ -7768,7 +7749,7 @@ DECLCALLBACK(int) Console::fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser)
rc = controller->COMGETTER(Bus)(&enmBus);
if (FAILED(rc))
throw rc;
- rc = controller->COMGETTER(IoBackend)(&enmIoBackend);
+ rc = controller->COMGETTER(UseHostIOCache)(&fUseHostIOCache);
if (FAILED(rc))
throw rc;
@@ -7787,7 +7768,7 @@ DECLCALLBACK(int) Console::fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser)
pcszDevice,
lInstance,
enmBus,
- enmIoBackend,
+ fUseHostIOCache,
false /* fSetupMerge */,
0 /* uMergeSource */,
0 /* uMergeTarget */,
diff --git a/src/VBox/Main/ConsoleImpl2.cpp b/src/VBox/Main/ConsoleImpl2.cpp
index e6a1bb256..3ff1af4ce 100644
--- a/src/VBox/Main/ConsoleImpl2.cpp
+++ b/src/VBox/Main/ConsoleImpl2.cpp
@@ -1,4 +1,4 @@
-/* $Id: ConsoleImpl2.cpp 29346 2010-05-11 12:52:28Z vboxsync $ */
+/* $Id: ConsoleImpl2.cpp 29564 2010-05-17 15:19:33Z vboxsync $ */
/** @file
* VBox Console COM Class implementation
*
@@ -29,6 +29,7 @@
# include "GuestImpl.h"
#endif
#include "VMMDev.h"
+#include "Global.h"
// generated header
#include "SchemaDefs.h"
@@ -37,14 +38,16 @@
#include "Logging.h"
#include <iprt/buildconfig.h>
-#include <iprt/string.h>
-#include <iprt/path.h>
+#include <iprt/ctype.h>
#include <iprt/dir.h>
+#include <iprt/file.h>
#include <iprt/param.h>
+#include <iprt/path.h>
+#include <iprt/string.h>
+#include <iprt/system.h>
#if 0 /* enable to play with lots of memory. */
# include <iprt/env.h>
#endif
-#include <iprt/file.h>
#include <VBox/vmapi.h>
#include <VBox/err.h>
@@ -100,11 +103,11 @@
#include "DHCPServerRunner.h"
-#if defined(RT_OS_DARWIN) && !defined(VBOX_OSE)
+#if defined(RT_OS_DARWIN)
# include "IOKit/IOKitLib.h"
-static int DarwinSmcKey(char *aKey, uint32_t iKeySize)
+static int DarwinSmcKey(char *pabKey, uint32_t cbKey)
{
/*
* Method as described in Amit Singh's article:
@@ -121,19 +124,19 @@ static int DarwinSmcKey(char *aKey, uint32_t iKeySize)
uint8_t data[32];
} AppleSMCBuffer;
- AssertReturn(iKeySize >= 65, VERR_INTERNAL_ERROR);
+ AssertReturn(cbKey >= 65, VERR_INTERNAL_ERROR);
io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault,
IOServiceMatching("AppleSMC"));
if (!service)
- return VERR_INTERNAL_ERROR;
+ return VERR_NOT_FOUND;
io_connect_t port = (io_connect_t)0;
kern_return_t kr = IOServiceOpen(service, mach_task_self(), 0, &port);
IOObjectRelease(service);
if (kr != kIOReturnSuccess)
- return VERR_INTERNAL_ERROR;
+ return RTErrConvertFromDarwin(kr);
AppleSMCBuffer inputStruct = { 0, {0}, 32, {0}, 5, };
AppleSMCBuffer outputStruct;
@@ -151,16 +154,16 @@ static int DarwinSmcKey(char *aKey, uint32_t iKeySize)
if (kr != kIOReturnSuccess)
{
IOServiceClose(port);
- return VERR_INTERNAL_ERROR;
+ return RTErrConvertFromDarwin(kr);
}
for (int j = 0; j < 32; j++)
- aKey[j + i*32] = outputStruct.data[j];
+ pabKey[j + i*32] = outputStruct.data[j];
}
IOServiceClose(port);
- aKey[64] = 0;
+ pabKey[64] = 0;
return VINF_SUCCESS;
}
@@ -235,21 +238,70 @@ static int findEfiRom(IVirtualBox* vbox, FirmwareType_T aFirmwareType, Utf8Str&
return S_OK;
}
-static int getSmcDeviceKey(IMachine* pMachine, BSTR * aKey)
+static int getSmcDeviceKey(IMachine *pMachine, BSTR *aKey, bool *pfGetKeyFromRealSMC)
{
-# if defined(RT_OS_DARWIN) && !defined(VBOX_OSE)
- int rc;
- char aKeyBuf[65];
+ *pfGetKeyFromRealSMC = false;
- rc = DarwinSmcKey(aKeyBuf, sizeof aKeyBuf);
+ /*
+ * The extra data takes precedence (if non-zero).
+ */
+ HRESULT hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/SmcDeviceKey"), aKey);
+ if (FAILED(hrc))
+ return Global::vboxStatusCodeFromCOM(hrc);
+ if ( SUCCEEDED(hrc)
+ && *aKey
+ && **aKey)
+ return VINF_SUCCESS;
+
+#ifdef RT_OS_DARWIN
+ /*
+ * Query it here and now.
+ */
+ char abKeyBuf[65];
+ int rc = DarwinSmcKey(abKeyBuf, sizeof(abKeyBuf));
if (SUCCEEDED(rc))
{
- Bstr(aKeyBuf).detachTo(aKey);
+ Bstr(abKeyBuf).detachTo(aKey);
return rc;
}
+ LogRel(("Warning: DarwinSmcKey failed with rc=%Rrc!\n", rc));
+
+#else
+ /*
+ * Is it apple hardware in bootcamp?
+ */
+ /** @todo implement + test RTSYSDMISTR_MANUFACTURER on all hosts.
+ * Currently falling back on the product name. */
+ char szManufacturer[256];
+ szManufacturer[0] = '\0';
+ RTSystemQueryDmiString(RTSYSDMISTR_MANUFACTURER, szManufacturer, sizeof(szManufacturer));
+ if (szManufacturer[0] != '\0')
+ {
+ if ( !strcmp(szManufacturer, "Apple Computer, Inc.")
+ || !strcmp(szManufacturer, "Apple Inc.")
+ )
+ *pfGetKeyFromRealSMC = true;
+ }
+ else
+ {
+ char szProdName[256];
+ szProdName[0] = '\0';
+ RTSystemQueryDmiString(RTSYSDMISTR_PRODUCT_NAME, szProdName, sizeof(szProdName));
+ if ( ( !strncmp(szProdName, "Mac", 3)
+ || !strncmp(szProdName, "iMac", 4)
+ || !strncmp(szProdName, "iMac", 4)
+ || !strncmp(szProdName, "Xserve", 6)
+ )
+ && !strchr(szProdName, ' ') /* no spaces */
+ && RT_C_IS_DIGIT(szProdName[strlen(szProdName) - 1]) /* version number */
+ )
+ *pfGetKeyFromRealSMC = true;
+ }
+
+ int rc = VINF_SUCCESS;
#endif
- return pMachine->GetExtraData(Bstr("VBoxInternal2/SmcDeviceKey"), aKey);
+ return rc;
}
/**
@@ -673,13 +725,15 @@ DECLCALLBACK(int) Console::configConstructor(PVM pVM, void *pvConsole)
#endif
if (fSmcEnabled)
{
- Bstr tmpStr2;
rc = CFGMR3InsertNode(pDevices, "smc", &pDev); RC_CHECK();
rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK();
rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK();
rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK();
- rc = getSmcDeviceKey(pMachine, tmpStr2.asOutParam()); RC_CHECK();
- rc = CFGMR3InsertString(pCfg, "DeviceKey", Utf8Str(tmpStr2).raw()); RC_CHECK();
+ bool fGetKeyFromRealSMC;
+ Bstr bstrKey;
+ rc = getSmcDeviceKey(pMachine, bstrKey.asOutParam(), &fGetKeyFromRealSMC); RC_CHECK();
+ rc = CFGMR3InsertString(pCfg, "DeviceKey", Utf8Str(bstrKey).raw()); RC_CHECK();
+ rc = CFGMR3InsertInteger(pCfg, "GetKeyFromRealSMC", fGetKeyFromRealSMC); RC_CHECK();
}
/*
@@ -1031,8 +1085,8 @@ DECLCALLBACK(int) Console::configConstructor(PVM pVM, void *pvConsole)
ULONG ulInstance = 999;
rc = ctrls[i]->COMGETTER(Instance)(&ulInstance); H();
- IoBackendType_T enmIoBackend;
- rc = ctrls[i]->COMGETTER(IoBackend)(&enmIoBackend); H();
+ BOOL fUseHostIOCache;
+ rc = ctrls[i]->COMGETTER(UseHostIOCache)(&fUseHostIOCache); H();
/* /Devices/<ctrldev>/ */
const char *pszCtrlDev = pConsole->convertControllerTypeToDev(enmCtrlType);
@@ -1225,7 +1279,7 @@ DECLCALLBACK(int) Console::configConstructor(PVM pVM, void *pvConsole)
pszCtrlDev,
ulInstance,
enmBus,
- enmIoBackend,
+ fUseHostIOCache,
false /* fSetupMerge */,
0 /* uMergeSource */,
0 /* uMergeTarget */,
@@ -2235,7 +2289,7 @@ int Console::configMediumAttachment(PCFGMNODE pCtlInst,
const char *pcszDevice,
unsigned uInstance,
StorageBus_T enmBus,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
bool fSetupMerge,
unsigned uMergeSource,
unsigned uMergeTarget,
@@ -2324,7 +2378,7 @@ int Console::configMediumAttachment(PCFGMNODE pCtlInst,
rc = configMedium(pLunL0,
!!fPassthrough,
lType,
- enmIoBackend,
+ fUseHostIOCache,
fSetupMerge,
uMergeSource,
uMergeTarget,
@@ -2355,7 +2409,7 @@ int Console::configMediumAttachment(PCFGMNODE pCtlInst,
int Console::configMedium(PCFGMNODE pLunL0,
bool fPassthrough,
DeviceType_T enmType,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
bool fSetupMerge,
unsigned uMergeSource,
unsigned uMergeTarget,
@@ -2465,6 +2519,14 @@ int Console::configMedium(PCFGMNODE pLunL0,
/* Index of last image */
uImage--;
+#if 0 /* Enable for I/O debugging */
+ rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL0); RC_CHECK();
+ rc = CFGMR3InsertString(pLunL0, "Driver", "DiskIntegrity"); RC_CHECK();
+ rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();
+ rc = CFGMR3InsertInteger(pCfg, "CheckConsistency", 0); RC_CHECK();
+ rc = CFGMR3InsertInteger(pCfg, "CheckDoubleCompletions", 1); RC_CHECK();
+#endif
+
rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK();
rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK();
rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK();
@@ -2495,7 +2557,7 @@ int Console::configMedium(PCFGMNODE pLunL0,
rc = CFGMR3InsertInteger(pCfg, "TempReadOnly", 1); RC_CHECK();
}
- if (enmIoBackend == IoBackendType_Unbuffered)
+ if (!fUseHostIOCache)
{
rc = CFGMR3InsertInteger(pCfg, "UseNewIo", 1); RC_CHECK();
}
diff --git a/src/VBox/Main/ConsoleVRDPServer.cpp b/src/VBox/Main/ConsoleVRDPServer.cpp
index 1bc252e63..5a58a83b1 100644
--- a/src/VBox/Main/ConsoleVRDPServer.cpp
+++ b/src/VBox/Main/ConsoleVRDPServer.cpp
@@ -1,4 +1,4 @@
-/* $Id: ConsoleVRDPServer.cpp 29386 2010-05-11 18:07:09Z vboxsync $ */
+/* $Id: ConsoleVRDPServer.cpp 29518 2010-05-17 10:06:22Z vboxsync $ */
/** @file
* VBox Console VRDP Helper class
*/
@@ -81,7 +81,7 @@ public:
STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
- ULONG width, ULONG height, BYTE *shape);
+ ULONG width, ULONG height, ComSafeArrayIn(BYTE,shape));
STDMETHOD(OnMouseCapabilityChange)(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor)
{
@@ -430,13 +430,14 @@ STDMETHODIMP VRDPConsoleCallback::OnMousePointerShapeChange(BOOL visible,
ULONG yHot,
ULONG width,
ULONG height,
- BYTE *shape)
+ ComSafeArrayIn(BYTE,inShape))
{
LogSunlover(("VRDPConsoleCallback::OnMousePointerShapeChange: %d, %d, %lux%lu, @%lu,%lu\n", visible, alpha, width, height, xHot, yHot));
if (m_server)
{
- if (!shape)
+ com::SafeArray <BYTE> aShape(ComSafeArrayInArg (inShape));
+ if (aShape.size() == 0)
{
if (!visible)
{
@@ -461,6 +462,7 @@ STDMETHODIMP VRDPConsoleCallback::OnMousePointerShapeChange(BOOL visible,
* So set pointer size to 32x32. This can be done safely
* because most pointers are 32x32.
*/
+ uint8_t* shape = aShape.raw();
dumpPointer(shape, width, height, true);
diff --git a/src/VBox/Main/DisplayImpl.cpp b/src/VBox/Main/DisplayImpl.cpp
index 8f7adb5de..3b380dc7b 100644
--- a/src/VBox/Main/DisplayImpl.cpp
+++ b/src/VBox/Main/DisplayImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: DisplayImpl.cpp 28927 2010-04-30 11:07:23Z vboxsync $ */
+/* $Id: DisplayImpl.cpp 29542 2010-05-17 13:41:20Z vboxsync $ */
/** @file
* VirtualBox COM class implementation
*/
@@ -2578,8 +2578,6 @@ STDMETHODIMP Display::TakeScreenShotToArray (ULONG aScreenId, ULONG width, ULONG
RTMemFree(pu8Data);
- RTMemFree(pu8Data);
-
LogFlowFunc (("rc=%08X\n", rc));
LogFlowFuncLeave();
return rc;
@@ -3830,9 +3828,21 @@ DECLCALLBACK(int) Display::displayVBVAMousePointerShape(PPDMIDISPLAYCONNECTOR pI
PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface);
Display *pThis = pDrv->pDisplay;
+ size_t cbShapeSize = 0;
+
+ if (pvShape)
+ {
+ cbShapeSize = (cx + 7) / 8 * cy; /* size of the AND mask */
+ cbShapeSize = ((cbShapeSize + 3) & ~3) + cx * 4 * cy; /* + gap + size of the XOR mask */
+ }
+ com::SafeArray<BYTE> shapeData(cbShapeSize);
+
+ if (pvShape)
+ ::memcpy(shapeData.raw(), pvShape, cbShapeSize);
+
/* Tell the console about it */
pDrv->pDisplay->mParent->onMousePointerShapeChange(fVisible, fAlpha,
- xHot, yHot, cx, cy, (void *)pvShape);
+ xHot, yHot, cx, cy, ComSafeArrayAsInParam(shapeData));
return VINF_SUCCESS;
}
diff --git a/src/VBox/Main/Global.cpp b/src/VBox/Main/Global.cpp
index 09431b67c..325f32106 100644
--- a/src/VBox/Main/Global.cpp
+++ b/src/VBox/Main/Global.cpp
@@ -1,4 +1,4 @@
-/* $Id: Global.cpp 29184 2010-05-07 08:25:43Z vboxsync $ */
+/* $Id: Global.cpp 29595 2010-05-18 08:05:46Z vboxsync $ */
/** @file
*
@@ -133,27 +133,27 @@ const Global::OSType Global::sOSTypes[SchemaDefs::OSTypeId_COUNT] =
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_Debian, "Debian",
VBOXOSTYPE_Debian, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 256, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 384, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_Debian_64, "Debian (64 bit)",
VBOXOSTYPE_Debian_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 256, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 384, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_OpenSUSE, "openSUSE",
VBOXOSTYPE_OpenSUSE, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 256, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 512, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_OpenSUSE_64, "openSUSE (64 bit)",
VBOXOSTYPE_OpenSUSE_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 256, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 512, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_Fedora, "Fedora",
VBOXOSTYPE_FedoraCore, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 384, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 512, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_Fedora_64, "Fedora (64 bit)",
VBOXOSTYPE_FedoraCore_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 384, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 512, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_Gentoo, "Gentoo",
VBOXOSTYPE_Gentoo, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
@@ -165,11 +165,11 @@ const Global::OSType Global::sOSTypes[SchemaDefs::OSTypeId_COUNT] =
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_Mandriva, "Mandriva",
VBOXOSTYPE_Mandriva, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 256, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 384, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_Mandriva_64, "Mandriva (64 bit)",
VBOXOSTYPE_Mandriva_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET,
- 256, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
+ 384, 12, 8 * _1K, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE,
StorageControllerType_IntelAhci, StorageBus_SATA },
{ "Linux", "Linux", SchemaDefs_OSTypeId_RedHat, "Red Hat",
VBOXOSTYPE_RedHat, VBOXOSHINT_RTCUTC,
@@ -405,10 +405,22 @@ Global::vboxStatusCodeFromCOM(HRESULT aComStatus)
switch (aComStatus)
{
case S_OK: return VINF_SUCCESS;
- case E_FAIL: return VERR_GENERAL_FAILURE;
+
+ /* Standard COM status codes. See also RTErrConvertFromDarwinCOM */
+ case E_UNEXPECTED: return VERR_COM_UNEXPECTED;
+ case E_NOTIMPL: return VERR_NOT_IMPLEMENTED;
+ case E_OUTOFMEMORY: return VERR_NO_MEMORY;
case E_INVALIDARG: return VERR_INVALID_PARAMETER;
+ case E_NOINTERFACE: return VERR_NOT_SUPPORTED;
case E_POINTER: return VERR_INVALID_POINTER;
+#ifdef E_HANDLE
+ case E_HANDLE: return VERR_INVALID_HANDLE;
+#endif
+ case E_ABORT: return VERR_CANCELLED;
+ case E_FAIL: return VERR_GENERAL_FAILURE;
+ case E_ACCESSDENIED: return VERR_ACCESS_DENIED;
+ /* VirtualBox status codes */
case VBOX_E_OBJECT_NOT_FOUND: return VERR_COM_OBJECT_NOT_FOUND;
case VBOX_E_INVALID_VM_STATE: return VERR_COM_INVALID_VM_STATE;
case VBOX_E_VM_ERROR: return VERR_COM_VM_ERROR;
@@ -421,10 +433,13 @@ Global::vboxStatusCodeFromCOM(HRESULT aComStatus)
case VBOX_E_XML_ERROR: return VERR_COM_XML_ERROR;
case VBOX_E_INVALID_SESSION_STATE: return VERR_COM_INVALID_SESSION_STATE;
case VBOX_E_OBJECT_IN_USE: return VERR_COM_OBJECT_IN_USE;
+ case VBOX_E_DONT_CALL_AGAIN: return VERR_COM_DONT_CALL_AGAIN;
default:
if (SUCCEEDED(aComStatus))
return VINF_SUCCESS;
+ /** @todo Check for the win32 facility and use the
+ * RTErrConvertFromWin32 function on windows. */
return VERR_UNRESOLVED_ERROR;
}
}
@@ -436,11 +451,22 @@ Global::vboxStatusCodeToCOM(int aVBoxStatus)
switch (aVBoxStatus)
{
case VINF_SUCCESS: return S_OK;
- case VERR_GENERAL_FAILURE: return E_FAIL;
- case VERR_UNRESOLVED_ERROR: return E_FAIL;
+
+ /* Standard COM status codes. */
+ case VERR_COM_UNEXPECTED: return E_UNEXPECTED;
+ case VERR_NOT_IMPLEMENTED: return E_NOTIMPL;
+ case VERR_NO_MEMORY: return E_OUTOFMEMORY;
case VERR_INVALID_PARAMETER: return E_INVALIDARG;
+ case VERR_NOT_SUPPORTED: return E_NOINTERFACE;
case VERR_INVALID_POINTER: return E_POINTER;
+#ifdef E_HANDLE
+ case VERR_INVALID_HANDLE: return E_HANDLE;
+#endif
+ case VERR_CANCELLED: return E_ABORT;
+ case VERR_GENERAL_FAILURE: return E_FAIL;
+ case VERR_ACCESS_DENIED: return E_ACCESSDENIED;
+ /* VirtualBox COM status codes */
case VERR_COM_OBJECT_NOT_FOUND: return VBOX_E_OBJECT_NOT_FOUND;
case VERR_COM_INVALID_VM_STATE: return VBOX_E_INVALID_VM_STATE;
case VERR_COM_VM_ERROR: return VBOX_E_VM_ERROR;
@@ -453,6 +479,10 @@ Global::vboxStatusCodeToCOM(int aVBoxStatus)
case VERR_COM_XML_ERROR: return VBOX_E_XML_ERROR;
case VERR_COM_INVALID_SESSION_STATE: return VBOX_E_INVALID_SESSION_STATE;
case VERR_COM_OBJECT_IN_USE: return VBOX_E_OBJECT_IN_USE;
+ case VERR_COM_DONT_CALL_AGAIN: return VBOX_E_DONT_CALL_AGAIN;
+
+ /* Other errors. */
+ case VERR_UNRESOLVED_ERROR: return E_FAIL;
default:
AssertMsgFailed(("%Rrc\n", aVBoxStatus));
diff --git a/src/VBox/Main/GuestImpl.cpp b/src/VBox/Main/GuestImpl.cpp
index 8169c36a1..13e7395a7 100644
--- a/src/VBox/Main/GuestImpl.cpp
+++ b/src/VBox/Main/GuestImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: GuestImpl.cpp 29309 2010-05-10 15:44:55Z vboxsync $ */
+/* $Id: GuestImpl.cpp 29645 2010-05-18 15:41:46Z vboxsync $ */
/** @file
*
@@ -83,6 +83,13 @@ HRESULT Guest::init (Console *aParent)
else
mMemoryBalloonSize = 0; /* Default is no ballooning */
+ BOOL fPageFusionEnabled;
+ ret = mParent->machine()->COMGETTER(PageFusionEnabled)(&fPageFusionEnabled);
+ if (ret == S_OK)
+ mfPageFusionEnabled = fPageFusionEnabled;
+ else
+ mfPageFusionEnabled = false; /* Default is no page fusion*/
+
mStatUpdateInterval = 0; /* Default is not to report guest statistics at all */
/* Clear statistics. */
@@ -207,13 +214,29 @@ STDMETHODIMP Guest::COMGETTER(SupportsGraphics) (BOOL *aSupportsGraphics)
return S_OK;
}
-STDMETHODIMP Guest::COMGETTER(PageFusionEnabled) (BOOL *enabled)
+STDMETHODIMP Guest::COMGETTER(PageFusionEnabled) (BOOL *aPageFusionEnabled)
{
- return E_NOTIMPL;
+ CheckComArgOutPointerValid(aPageFusionEnabled);
+
+ AutoCaller autoCaller(this);
+ if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+ AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+ *aPageFusionEnabled = mfPageFusionEnabled;
+
+ return S_OK;
}
-STDMETHODIMP Guest::COMSETTER(PageFusionEnabled) (BOOL enabled)
+STDMETHODIMP Guest::COMSETTER(PageFusionEnabled) (BOOL aPageFusionEnabled)
{
+ AutoCaller autoCaller(this);
+ if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+ AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+ /** todo; API complete, but not implemented */
+
return E_NOTIMPL;
}
@@ -314,25 +337,36 @@ STDMETHODIMP Guest::InternalGetStatistics(ULONG *aCpuUser, ULONG *aCpuKernel, UL
*aMemBalloon = mCurrentGuestStat[GUESTSTATTYPE_MEMBALLOON] * (_4K/_1K); /* page (4K) -> 1KB units */
*aMemCache = mCurrentGuestStat[GUESTSTATTYPE_MEMCACHE] * (_4K/_1K); /* page (4K) -> 1KB units */
*aPageTotal = mCurrentGuestStat[GUESTSTATTYPE_PAGETOTAL] * (_4K/_1K); /* page (4K) -> 1KB units */
- *aMemShared = 0; /** todo */
Console::SafeVMPtr pVM (mParent);
if (pVM.isOk())
{
- uint64_t uFreeTotal, uAllocTotal, uBalloonedTotal;
+ uint64_t uFreeTotal, uAllocTotal, uBalloonedTotal, uSharedTotal;
*aMemFreeTotal = 0;
- int rc = PGMR3QueryVMMMemoryStats(pVM.raw(), &uAllocTotal, &uFreeTotal, &uBalloonedTotal);
+ int rc = PGMR3QueryVMMMemoryStats(pVM.raw(), &uAllocTotal, &uFreeTotal, &uBalloonedTotal, &uSharedTotal);
AssertRC(rc);
if (rc == VINF_SUCCESS)
{
*aMemAllocTotal = (ULONG)(uAllocTotal / _1K); /* bytes -> KB */
*aMemFreeTotal = (ULONG)(uFreeTotal / _1K);
*aMemBalloonTotal = (ULONG)(uBalloonedTotal / _1K);
- *aMemSharedTotal = 0; /** todo */
+ *aMemSharedTotal = (ULONG)(uSharedTotal / _1K);
+ }
+
+ /* Query the missing per-VM memory statistics. */
+ *aMemShared = 0;
+ uint64_t uTotalMem, uPrivateMem, uSharedMem, uZeroMem;
+ rc = PGMR3QueryMemoryStats(pVM.raw(), &uTotalMem, &uPrivateMem, &uSharedMem, &uZeroMem);
+ if (rc == VINF_SUCCESS)
+ {
+ *aMemShared = (ULONG)(uSharedMem / _1K);
}
}
else
+ {
*aMemFreeTotal = 0;
+ *aMemShared = 0;
+ }
return S_OK;
}
@@ -672,19 +706,19 @@ void Guest::destroyCtrlCallbackContext(Guest::CallbackListIter it)
RTMemFree(it->pvData);
it->pvData = NULL;
it->cbData = 0;
+ }
- /* Notify outstanding waits for progress ... */
- if (!it->pProgress.isNull())
- {
- /* Only cancel if not canceled before! */
- BOOL fCancelled;
- if (SUCCEEDED(it->pProgress->COMGETTER(Canceled)(&fCancelled)) && !fCancelled)
- it->pProgress->Cancel();
- /*
- * Do *not NULL pProgress here, because waiting function like executeProcess()
- * will still rely on this object for checking whether they have to give up!
- */
- }
+ /* Notify outstanding waits for progress ... */
+ if (it->pProgress && !it->pProgress.isNull())
+ {
+ /* Only cancel if not canceled before! */
+ BOOL fCancelled;
+ if (SUCCEEDED(it->pProgress->COMGETTER(Canceled)(&fCancelled)) && !fCancelled)
+ it->pProgress->Cancel();
+ /*
+ * Do *not NULL pProgress here, because waiting function like executeProcess()
+ * will still rely on this object for checking whether they have to give up!
+ */
}
LogFlowFuncLeave();
}
@@ -734,7 +768,6 @@ uint32_t Guest::addCtrlCallbackContext(eVBoxGuestCtrlCallbackType enmType, void
STDMETHODIMP Guest::ExecuteProcess(IN_BSTR aCommand, ULONG aFlags,
ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
- IN_BSTR aStdIn, IN_BSTR aStdOut, IN_BSTR aStdErr,
IN_BSTR aUserName, IN_BSTR aPassword,
ULONG aTimeoutMS, ULONG *aPID, IProgress **aProgress)
{
@@ -747,9 +780,13 @@ STDMETHODIMP Guest::ExecuteProcess(IN_BSTR aCommand, ULONG aFlags,
CheckComArgOutPointerValid(aPID);
CheckComArgOutPointerValid(aProgress);
+ /* Do not allow anonymous executions (with system rights). */
+ if (RT_UNLIKELY((aUserName) == NULL || *(aUserName) == '\0'))
+ return setError(E_INVALIDARG, tr("No user name specified"));
+
AutoCaller autoCaller(this);
- if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+ if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
if (aFlags != 0) /* Flags are not supported at the moment. */
return E_INVALIDARG;
@@ -790,13 +827,15 @@ STDMETHODIMP Guest::ExecuteProcess(IN_BSTR aCommand, ULONG aFlags,
papszArgv = (char**)RTMemAlloc(sizeof(char*) * (uNumArgs + 1));
AssertReturn(papszArgv, E_OUTOFMEMORY);
for (unsigned i = 0; RT_SUCCESS(vrc) && i < uNumArgs; i++)
- vrc = RTStrAPrintf(&papszArgv[i], "%s", Utf8Str(args[i]).raw());
+ {
+ int cbLen = RTStrAPrintf(&papszArgv[i], "%s", Utf8Str(args[i]).raw());
+ if (cbLen < 0)
+ vrc = VERR_NO_MEMORY;
+
+ }
papszArgv[uNumArgs] = NULL;
}
- Utf8Str Utf8StdIn(aStdIn);
- Utf8Str Utf8StdOut(aStdOut);
- Utf8Str Utf8StdErr(aStdErr);
Utf8Str Utf8UserName(aUserName);
Utf8Str Utf8Password(aPassword);
if (RT_SUCCESS(vrc))
@@ -844,9 +883,6 @@ STDMETHODIMP Guest::ExecuteProcess(IN_BSTR aCommand, ULONG aFlags,
paParms[i++].setUInt32(uNumEnv);
paParms[i++].setUInt32(cbEnv);
paParms[i++].setPointer((void*)pvEnv, cbEnv);
- paParms[i++].setPointer((void*)Utf8StdIn.raw(), (uint32_t)strlen(Utf8StdIn.raw()) + 1);
- paParms[i++].setPointer((void*)Utf8StdOut.raw(), (uint32_t)strlen(Utf8StdOut.raw()) + 1);
- paParms[i++].setPointer((void*)Utf8StdErr.raw(), (uint32_t)strlen(Utf8StdErr.raw()) + 1);
paParms[i++].setPointer((void*)Utf8UserName.raw(), (uint32_t)strlen(Utf8UserName.raw()) + 1);
paParms[i++].setPointer((void*)Utf8Password.raw(), (uint32_t)strlen(Utf8Password.raw()) + 1);
paParms[i++].setUInt32(aTimeoutMS);
@@ -992,6 +1028,11 @@ STDMETHODIMP Guest::ExecuteProcess(IN_BSTR aCommand, ULONG aFlags,
rc = setError(VBOX_E_IPRT_ERROR,
tr("The guest reported an unknown process status (%u)"), pData->u32Status);
}
+ else if (vrc == VERR_PERMISSION_DENIED)
+ {
+ rc = setError(VBOX_E_IPRT_ERROR,
+ tr("Invalid user/password credentials"));
+ }
else
{
rc = setError(E_UNEXPECTED,
@@ -1007,7 +1048,7 @@ STDMETHODIMP Guest::ExecuteProcess(IN_BSTR aCommand, ULONG aFlags,
else /* Operation was canceled. */
{
rc = setError(VBOX_E_IPRT_ERROR,
- tr("The operation was canceled."));
+ tr("The operation was canceled"));
}
}
else /* HGCM related error codes .*/
@@ -1203,7 +1244,7 @@ STDMETHODIMP Guest::GetProcessOutput(ULONG aPID, ULONG aFlags, ULONG aTimeoutMS,
else if (vrc == VERR_CANCELLED)
{
rc = setError(VBOX_E_IPRT_ERROR,
- tr("The operation was canceled."));
+ tr("The operation was canceled"));
}
else
{
diff --git a/src/VBox/Main/HostImpl.cpp b/src/VBox/Main/HostImpl.cpp
index f984c19d5..a1edc2dd3 100644
--- a/src/VBox/Main/HostImpl.cpp
+++ b/src/VBox/Main/HostImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: HostImpl.cpp 29385 2010-05-11 18:05:44Z vboxsync $ */
+/* $Id: HostImpl.cpp 29620 2010-05-18 12:15:55Z vboxsync $ */
/** @file
* VirtualBox COM class implementation: Host
*/
@@ -767,6 +767,20 @@ STDMETHODIMP Host::COMGETTER(ProcessorOnlineCount)(ULONG *aCount)
}
/**
+ * Returns the number of installed physical processor cores.
+ *
+ * @returns COM status code
+ * @param count address of result variable
+ */
+STDMETHODIMP Host::COMGETTER(ProcessorCoreCount)(ULONG *aCount)
+{
+ CheckComArgOutPointerValid(aCount);
+ // no locking required
+
+ return E_NOTIMPL;
+}
+
+/**
* Returns the (approximate) maximum speed of the given host CPU in MHz
*
* @returns COM status code
@@ -2296,7 +2310,7 @@ HRESULT Host::checkUSBProxyService()
if (m->pUSBProxyService->getLastError() == VINF_SUCCESS)
#ifdef RT_OS_LINUX
return setWarning (VBOX_E_HOST_ERROR,
-# ifdef VBOX_USB_WITH_DBUS
+# ifdef VBOX_WITH_DBUS
tr ("The USB Proxy Service could not be started, because neither the USB file system (usbfs) nor the hardware information service (hal) is available")
# else
tr ("The USB Proxy Service could not be started, because the USB file system (usbfs) is not available")
@@ -2341,6 +2355,8 @@ void Host::registerMetrics(PerformanceCollector *aCollector)
"Total physical memory free inside the hypervisor.");
pm::SubMetric *ramVMMBallooned = new pm::SubMetric("RAM/VMM/Ballooned",
"Total physical memory ballooned by the hypervisor.");
+ pm::SubMetric *ramVMMShared = new pm::SubMetric("RAM/VMM/Shared",
+ "Total physical memory shared between VMs.");
/* Create and register base metrics */
@@ -2353,7 +2369,7 @@ void Host::registerMetrics(PerformanceCollector *aCollector)
pm::BaseMetric *cpuMhz = new pm::HostCpuMhz(hal, objptr, cpuMhzSM);
aCollector->registerBaseMetric (cpuMhz);
pm::BaseMetric *ramUsage = new pm::HostRamUsage(hal, objptr, ramUsageTotal, ramUsageUsed,
- ramUsageFree, ramVMMUsed, ramVMMFree, ramVMMBallooned);
+ ramUsageFree, ramVMMUsed, ramVMMFree, ramVMMBallooned, ramVMMShared);
aCollector->registerBaseMetric (ramUsage);
aCollector->registerMetric(new pm::Metric(cpuLoad, cpuLoadUser, 0));
@@ -2435,6 +2451,14 @@ void Host::registerMetrics(PerformanceCollector *aCollector)
new pm::AggregateMin()));
aCollector->registerMetric(new pm::Metric(ramUsage, ramVMMBallooned,
new pm::AggregateMax()));
+
+ aCollector->registerMetric(new pm::Metric(ramUsage, ramVMMShared, 0));
+ aCollector->registerMetric(new pm::Metric(ramUsage, ramVMMShared,
+ new pm::AggregateAvg()));
+ aCollector->registerMetric(new pm::Metric(ramUsage, ramVMMShared,
+ new pm::AggregateMin()));
+ aCollector->registerMetric(new pm::Metric(ramUsage, ramVMMShared,
+ new pm::AggregateMax()));
}
void Host::unregisterMetrics (PerformanceCollector *aCollector)
diff --git a/src/VBox/Main/MachineImpl.cpp b/src/VBox/Main/MachineImpl.cpp
index ec7238724..e13be6044 100644
--- a/src/VBox/Main/MachineImpl.cpp
+++ b/src/VBox/Main/MachineImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: MachineImpl.cpp 29422 2010-05-12 14:08:52Z vboxsync $ */
+/* $Id: MachineImpl.cpp 29620 2010-05-18 12:15:55Z vboxsync $ */
/** @file
* Implementation of IMachine in VBoxSVC.
*/
@@ -69,6 +69,7 @@
#include <VBox/param.h>
#include <VBox/settings.h>
#include <VBox/ssm.h>
+#include <VBox/feature.h>
#ifdef VBOX_WITH_GUEST_PROPS
# include <VBox/HostServices/GuestPropertySvc.h>
@@ -161,6 +162,7 @@ Machine::HWData::HWData()
mCPUCount = 1;
mCPUHotPlugEnabled = false;
mMemoryBalloonSize = 0;
+ mPageFusionEnabled = false;
mVRAMSize = 8;
mAccelerate3DEnabled = false;
mAccelerate2DVideoEnabled = false;
@@ -1464,14 +1466,34 @@ STDMETHODIMP Machine::COMSETTER(MemoryBalloonSize)(ULONG memoryBalloonSize)
STDMETHODIMP Machine::COMGETTER(PageFusionEnabled) (BOOL *enabled)
{
- NOREF(enabled);
- return E_NOTIMPL;
+ if (!enabled)
+ return E_POINTER;
+
+ AutoCaller autoCaller(this);
+ if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+ AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+ *enabled = mHWData->mPageFusionEnabled;
+ return S_OK;
}
STDMETHODIMP Machine::COMSETTER(PageFusionEnabled) (BOOL enabled)
{
+#ifdef VBOX_WITH_PAGE_SHARING
+ AutoCaller autoCaller(this);
+ if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+ AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+ setModified(IsModified_MachineData);
+ mHWData.backup();
+ mHWData->mPageFusionEnabled = enabled;
+ return S_OK;
+#else
NOREF(enabled);
- return E_NOTIMPL;
+ return setError(E_NOTIMPL, tr("Page fusion is only supported on 64-bit hosts"));
+#endif
}
STDMETHODIMP Machine::COMGETTER(Accelerate3DEnabled)(BOOL *enabled)
@@ -4966,7 +4988,10 @@ STDMETHODIMP Machine::ReadLog(ULONG aIdx, ULONG64 aOffset, ULONG64 aSize, ComSaf
* not need the lock and potentially takes a long time. */
alock.release();
- size_t cbData = (size_t)RT_MIN(aSize, 2048);
+ /* Limit the chunk size to 32K for now, as that gives better performance
+ * over (XP)COM, and keeps the SOAP reply size under 1M for the webservice.
+ * One byte expands to approx. 25 bytes of breathtaking XML. */
+ size_t cbData = (size_t)RT_MIN(aSize, 32768);
com::SafeArray<BYTE> logData(cbData);
RTFILE LogFile;
@@ -6768,6 +6793,7 @@ HRESULT Machine::loadHardware(const settings::Hardware &data)
}
mHWData->mMemorySize = data.ulMemorySizeMB;
+ mHWData->mPageFusionEnabled = data.fPageFusionEnabled;
// boot order
for (size_t i = 0;
@@ -6929,7 +6955,7 @@ HRESULT Machine::loadStorageControllers(const settings::Storage &data,
rc = pCtl->COMSETTER(PortCount)(ctlData.ulPortCount);
if (FAILED(rc)) return rc;
- rc = pCtl->COMSETTER(IoBackend)(ctlData.ioBackendType);
+ rc = pCtl->COMSETTER(UseHostIOCache)(ctlData.fUseHostIOCache);
if (FAILED(rc)) return rc;
/* Set IDE emulation settings (only for AHCI controller). */
@@ -7826,6 +7852,7 @@ HRESULT Machine::saveHardware(settings::Hardware &data)
// memory
data.ulMemorySizeMB = mHWData->mMemorySize;
+ data.fPageFusionEnabled = mHWData->mPageFusionEnabled;
// firmware
data.firmwareType = mHWData->mFirmwareType;
@@ -8005,11 +8032,11 @@ HRESULT Machine::saveStorageControllers(settings::Storage &data)
ComAssertComRCRet(rc, rc);
ctl.ulPortCount = portCount;
- /* Save I/O backend */
- IoBackendType_T ioBackendType;
- rc = pCtl->COMGETTER(IoBackend)(&ioBackendType);
+ /* Save fUseHostIOCache */
+ BOOL fUseHostIOCache;
+ rc = pCtl->COMGETTER(UseHostIOCache)(&fUseHostIOCache);
ComAssertComRCRet(rc, rc);
- ctl.ioBackendType = ioBackendType;
+ ctl.fUseHostIOCache = !!fUseHostIOCache;
/* Save IDE emulation settings. */
if (ctl.controllerType == StorageControllerType_IntelAhci)
@@ -9193,6 +9220,7 @@ void Machine::registerMetrics(PerformanceCollector *aCollector, Machine *aMachin
pm::SubMetric *guestMemTotal = new pm::SubMetric("Guest/RAM/Usage/Total", "Total amount of physical guest RAM.");
pm::SubMetric *guestMemFree = new pm::SubMetric("Guest/RAM/Usage/Free", "Free amount of physical guest RAM.");
pm::SubMetric *guestMemBalloon = new pm::SubMetric("Guest/RAM/Usage/Balloon", "Amount of ballooned physical guest RAM.");
+ pm::SubMetric *guestMemShared = new pm::SubMetric("Guest/RAM/Usage/Shared", "Amount of shared physical guest RAM.");
pm::SubMetric *guestMemCache = new pm::SubMetric("Guest/RAM/Usage/Cache", "Total amount of guest (disk) cache memory.");
pm::SubMetric *guestPagedTotal = new pm::SubMetric("Guest/Pagefile/Usage/Total", "Total amount of space in the page file.");
@@ -9201,7 +9229,7 @@ void Machine::registerMetrics(PerformanceCollector *aCollector, Machine *aMachin
pm::BaseMetric *guestCpuLoad = new pm::GuestCpuLoad(mGuestHAL, aMachine, guestLoadUser, guestLoadKernel, guestLoadIdle);
aCollector->registerBaseMetric(guestCpuLoad);
- pm::BaseMetric *guestCpuMem = new pm::GuestRamUsage(mGuestHAL, aMachine, guestMemTotal, guestMemFree, guestMemBalloon,
+ pm::BaseMetric *guestCpuMem = new pm::GuestRamUsage(mGuestHAL, aMachine, guestMemTotal, guestMemFree, guestMemBalloon, guestMemShared,
guestMemCache, guestPagedTotal);
aCollector->registerBaseMetric(guestCpuMem);
@@ -9235,6 +9263,11 @@ void Machine::registerMetrics(PerformanceCollector *aCollector, Machine *aMachin
aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemBalloon, new pm::AggregateMin()));
aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemBalloon, new pm::AggregateMax()));
+ aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemShared, 0));
+ aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemShared, new pm::AggregateAvg()));
+ aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemShared, new pm::AggregateMin()));
+ aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemShared, new pm::AggregateMax()));
+
aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemCache, 0));
aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemCache, new pm::AggregateAvg()));
aCollector->registerMetric(new pm::Metric(guestCpuMem, guestMemCache, new pm::AggregateMin()));
diff --git a/src/VBox/Main/MediumImpl.cpp b/src/VBox/Main/MediumImpl.cpp
index 3eaefc0c5..edfff34c9 100644
--- a/src/VBox/Main/MediumImpl.cpp
+++ b/src/VBox/Main/MediumImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: MediumImpl.cpp 29386 2010-05-11 18:07:09Z vboxsync $ */
+/* $Id: MediumImpl.cpp 29618 2010-05-18 12:07:30Z vboxsync $ */
/** @file
* VirtualBox COM class implementation
*/
@@ -95,7 +95,7 @@ struct Medium::Data
autoReset(false),
setImageId(false),
setParentId(false),
- hostDrive(FALSE),
+ hostDrive(false),
implicit(false),
numCreateDiffTasks(0),
vdDiskIfaces(NULL)
@@ -133,15 +133,15 @@ struct Medium::Data
HDDOpenMode hddOpenMode;
- BOOL autoReset : 1;
+ bool autoReset : 1;
/** the following members are invalid after changing UUID on open */
- BOOL setImageId : 1;
- BOOL setParentId : 1;
+ bool setImageId : 1;
+ bool setParentId : 1;
const Guid imageId;
const Guid parentId;
- BOOL hostDrive : 1;
+ bool hostDrive : 1;
typedef std::map <Bstr, Bstr> PropertyMap;
PropertyMap properties;
@@ -746,7 +746,7 @@ HRESULT Medium::init(VirtualBox *aVirtualBox,
m->state = MediumState_NotCreated;
/* cannot be a host drive */
- m->hostDrive = FALSE;
+ m->hostDrive = false;
/* No storage unit is created yet, no need to queryInfo() */
@@ -834,7 +834,7 @@ HRESULT Medium::init(VirtualBox *aVirtualBox,
m->devType = aDeviceType;
/* cannot be a host drive */
- m->hostDrive = FALSE;
+ m->hostDrive = false;
/* remember the open mode (defaults to ReadWrite) */
m->hddOpenMode = enOpenMode;
@@ -846,9 +846,9 @@ HRESULT Medium::init(VirtualBox *aVirtualBox,
if (FAILED(rc)) return rc;
/* save the new uuid values, will be used by queryInfo() */
- m->setImageId = aSetImageId;
+ m->setImageId = !!aSetImageId;
unconst(m->imageId) = aImageId;
- m->setParentId = aSetParentId;
+ m->setParentId = !!aSetParentId;
unconst(m->parentId) = aParentId;
/* get all the information about the medium from the storage unit */
@@ -927,7 +927,7 @@ HRESULT Medium::init(VirtualBox *aVirtualBox,
unconst(m->id) = data.uuid;
/* assume not a host drive */
- m->hostDrive = FALSE;
+ m->hostDrive = false;
/* optional */
m->strDescription = data.strDescription;
@@ -1547,8 +1547,8 @@ STDMETHODIMP Medium::COMGETTER(AutoReset)(BOOL *aAutoReset)
if (m->pParent)
*aAutoReset = FALSE;
-
- *aAutoReset = m->autoReset;
+ else
+ *aAutoReset = m->autoReset;
return S_OK;
}
@@ -1566,9 +1566,9 @@ STDMETHODIMP Medium::COMSETTER(AutoReset)(BOOL aAutoReset)
tr("Hard disk '%s' is not differencing"),
m->strLocationFull.raw());
- if (m->autoReset != aAutoReset)
+ if (m->autoReset != !!aAutoReset)
{
- m->autoReset = aAutoReset;
+ m->autoReset = !!aAutoReset;
return m->pVirtualBox->saveSettings();
}
@@ -3011,7 +3011,7 @@ HRESULT Medium::saveSettings(settings::Medium &data)
/* optional, only for diffs, default is false */
if (m->pParent)
- data.fAutoReset = !!m->autoReset;
+ data.fAutoReset = m->autoReset;
else
data.fAutoReset = false;
@@ -5400,7 +5400,7 @@ HRESULT Medium::taskCreateDiffHandler(Medium::CreateDiffTask &task)
/* back to NotCreated on failure */
pTarget->m->state = MediumState_NotCreated;
- pTarget->m->autoReset = FALSE;
+ pTarget->m->autoReset = false;
/* reset UUID to prevent it from being reused next time */
if (fGenerateUuid)
diff --git a/src/VBox/Main/Performance.cpp b/src/VBox/Main/Performance.cpp
index ca70759f6..7ed72b063 100644
--- a/src/VBox/Main/Performance.cpp
+++ b/src/VBox/Main/Performance.cpp
@@ -1,4 +1,4 @@
-/* $Id: Performance.cpp 29225 2010-05-07 16:01:34Z vboxsync $ */
+/* $Id: Performance.cpp 29631 2010-05-18 12:59:09Z vboxsync $ */
/** @file
*
@@ -163,15 +163,14 @@ int CollectorGuestHAL::preCollect(const CollectorHints& /* hints */, uint64_t iT
if ( mGuest
&& iTick != mLastTick)
{
- ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal, ulMemSharedTotal, uMemShared;
+ ULONG ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal, ulMemSharedTotal;
- /** todo shared stats. */
mGuest->InternalGetStatistics(&mCpuUser, &mCpuKernel, &mCpuIdle,
- &mMemTotal, &mMemFree, &mMemBalloon, &mMemCache, &uMemShared,
+ &mMemTotal, &mMemFree, &mMemBalloon, &mMemShared, &mMemCache,
&mPageTotal, &ulMemAllocTotal, &ulMemFreeTotal, &ulMemBalloonTotal, &ulMemSharedTotal);
if (mHostHAL)
- mHostHAL->setMemHypervisorStats(ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal);
+ mHostHAL->setMemHypervisorStats(ulMemAllocTotal, ulMemFreeTotal, ulMemBalloonTotal, ulMemSharedTotal);
mLastTick = iTick;
}
@@ -287,6 +286,7 @@ void HostRamUsage::init(ULONG period, ULONG length)
mAllocVMM->init(mLength);
mFreeVMM->init(mLength);
mBalloonVMM->init(mLength);
+ mSharedVMM->init(mLength);
}
void HostRamUsage::preCollect(CollectorHints& hints, uint64_t /* iTick */)
@@ -305,12 +305,13 @@ void HostRamUsage::collect()
mAvailable->put(available);
}
- ULONG allocVMM, freeVMM, balloonVMM;
+ ULONG allocVMM, freeVMM, balloonVMM, sharedVMM;
- mHAL->getMemHypervisorStats(&allocVMM, &freeVMM, &balloonVMM);
+ mHAL->getMemHypervisorStats(&allocVMM, &freeVMM, &balloonVMM, &sharedVMM);
mAllocVMM->put(allocVMM);
mFreeVMM->put(freeVMM);
mBalloonVMM->put(balloonVMM);
+ mSharedVMM->put(sharedVMM);
}
@@ -418,6 +419,7 @@ void GuestRamUsage::init(ULONG period, ULONG length)
mTotal->init(mLength);
mFree->init(mLength);
mBallooned->init(mLength);
+ mShared->init(mLength);
mCache->init(mLength);
mPagedTotal->init(mLength);
}
@@ -429,12 +431,13 @@ void GuestRamUsage::preCollect(CollectorHints& hints, uint64_t iTick)
void GuestRamUsage::collect()
{
- ULONG ulMemTotal = 0, ulMemFree = 0, ulMemBalloon = 0, ulMemCache = 0, ulPageTotal = 0;
+ ULONG ulMemTotal = 0, ulMemFree = 0, ulMemBalloon = 0, ulMemShared = 0, ulMemCache = 0, ulPageTotal = 0;
- mGuestHAL->getGuestMemLoad(&ulMemTotal, &ulMemFree, &ulMemBalloon, &ulMemCache, &ulPageTotal);
+ mGuestHAL->getGuestMemLoad(&ulMemTotal, &ulMemFree, &ulMemBalloon, &ulMemShared, &ulMemCache, &ulPageTotal);
mTotal->put(ulMemTotal);
mFree->put(ulMemFree);
mBallooned->put(ulMemBalloon);
+ mShared->put(ulMemShared);
mCache->put(ulMemCache);
mPagedTotal->put(ulPageTotal);
}
diff --git a/src/VBox/Main/PerformanceImpl.cpp b/src/VBox/Main/PerformanceImpl.cpp
index 12dc23fd2..d447d65e4 100644
--- a/src/VBox/Main/PerformanceImpl.cpp
+++ b/src/VBox/Main/PerformanceImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: PerformanceImpl.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: PerformanceImpl.cpp 29620 2010-05-18 12:15:55Z vboxsync $ */
/** @file
*
@@ -75,6 +75,10 @@ static const char *g_papcszMetricNames[] =
"RAM/VMM/Ballooned:avg",
"RAM/VMM/Ballooned:min",
"RAM/VMM/Ballooned:max",
+ "RAM/VMM/Shared",
+ "RAM/VMM/Shared:avg",
+ "RAM/VMM/Shared:min",
+ "RAM/VMM/Shared:max",
"Guest/CPU/Load/User",
"Guest/CPU/Load/User:avg",
"Guest/CPU/Load/User:min",
@@ -99,6 +103,10 @@ static const char *g_papcszMetricNames[] =
"Guest/RAM/Usage/Balloon:avg",
"Guest/RAM/Usage/Balloon:min",
"Guest/RAM/Usage/Balloon:max",
+ "Guest/RAM/Usage/Shared",
+ "Guest/RAM/Usage/Shared:avg",
+ "Guest/RAM/Usage/Shared:min",
+ "Guest/RAM/Usage/Shared:max",
"Guest/RAM/Usage/Cache",
"Guest/RAM/Usage/Cache:avg",
"Guest/RAM/Usage/Cache:min",
diff --git a/src/VBox/Main/SnapshotImpl.cpp b/src/VBox/Main/SnapshotImpl.cpp
index 1afdb0ff5..de7b96012 100644
--- a/src/VBox/Main/SnapshotImpl.cpp
+++ b/src/VBox/Main/SnapshotImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: SnapshotImpl.cpp 29421 2010-05-12 13:34:58Z vboxsync $ */
+/* $Id: SnapshotImpl.cpp 29540 2010-05-17 12:37:33Z vboxsync $ */
/** @file
*
@@ -1702,14 +1702,6 @@ void SessionMachine::restoreSnapshotHandler(RestoreSnapshotTask &aTask)
return;
}
- AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
- /* discard all current changes to mUserData (name, OSType etc.) (note that
- * the machine is powered off, so there is no need to inform the direct
- * session) */
- if (mData->flModifications)
- rollback(false /* aNotify */);
-
HRESULT rc = S_OK;
bool stateRestored = false;
@@ -1717,6 +1709,14 @@ void SessionMachine::restoreSnapshotHandler(RestoreSnapshotTask &aTask)
try
{
+ AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+ /* Discard all current changes to mUserData (name, OSType etc.).
+ * Note that the machine is powered off, so there is no need to inform
+ * the direct session. */
+ if (mData->flModifications)
+ rollback(false /* aNotify */);
+
/* Delete the saved state file if the machine was Saved prior to this
* operation */
if (aTask.machineStateBackup == MachineState_Saved)
diff --git a/src/VBox/Main/StorageControllerImpl.cpp b/src/VBox/Main/StorageControllerImpl.cpp
index 23c13cd40..d30326672 100644
--- a/src/VBox/Main/StorageControllerImpl.cpp
+++ b/src/VBox/Main/StorageControllerImpl.cpp
@@ -1,4 +1,4 @@
-/* $Id: StorageControllerImpl.cpp 29002 2010-05-04 11:14:34Z vboxsync $ */
+/* $Id: StorageControllerImpl.cpp 29480 2010-05-14 15:24:19Z vboxsync $ */
/** @file
*
@@ -44,7 +44,7 @@ struct BackupableStorageControllerData
mStorageControllerType(StorageControllerType_PIIX4),
mInstance(0),
mPortCount(2),
- mIoBackendType(IoBackendType_Buffered),
+ fUseHostIOCache(true),
mPortIde0Master(0),
mPortIde0Slave(1),
mPortIde1Master(2),
@@ -61,8 +61,8 @@ struct BackupableStorageControllerData
ULONG mInstance;
/** Number of usable ports. */
ULONG mPortCount;
- /** I/O backend type */
- IoBackendType_T mIoBackendType;
+ /** Whether to use the host IO caches. */
+ BOOL fUseHostIOCache;
/** The following is only for the SATA controller atm. */
/** Port which acts as primary master for ide emulation. */
@@ -144,9 +144,9 @@ HRESULT StorageController::init(Machine *aParent,
m->bd->mInstance = aInstance;
m->bd->mStorageBus = aStorageBus;
if (aStorageBus != StorageBus_IDE)
- m->bd->mIoBackendType = IoBackendType_Unbuffered;
+ m->bd->fUseHostIOCache = false;
else
- m->bd->mIoBackendType = IoBackendType_Buffered;
+ m->bd->fUseHostIOCache = true;
switch (aStorageBus)
{
@@ -607,7 +607,7 @@ STDMETHODIMP StorageController::COMSETTER(Instance) (ULONG aInstance)
return S_OK;
}
-STDMETHODIMP StorageController::COMGETTER(IoBackend) (IoBackendType_T *aIoBackend)
+STDMETHODIMP StorageController::COMGETTER(UseHostIOCache) (BOOL *fUseHostIOCache)
{
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc())) return autoCaller.rc();
@@ -616,12 +616,12 @@ STDMETHODIMP StorageController::COMGETTER(IoBackend) (IoBackendType_T *aIoBacken
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
- *aIoBackend = m->bd->mIoBackendType;
+ *fUseHostIOCache = m->bd->fUseHostIOCache;
return S_OK;
}
-STDMETHODIMP StorageController::COMSETTER(IoBackend) (IoBackendType_T aIoBackend)
+STDMETHODIMP StorageController::COMSETTER(UseHostIOCache) (BOOL fUseHostIOCache)
{
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc())) return autoCaller.rc();
@@ -632,10 +632,10 @@ STDMETHODIMP StorageController::COMSETTER(IoBackend) (IoBackendType_T aIoBackend
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
- if (m->bd->mIoBackendType != aIoBackend)
+ if (m->bd->fUseHostIOCache != !!fUseHostIOCache)
{
m->bd.backup();
- m->bd->mIoBackendType = aIoBackend;
+ m->bd->fUseHostIOCache = !!fUseHostIOCache;
alock.release();
AutoWriteLock mlock(m->pParent COMMA_LOCKVAL_SRC_POS); // m->pParent is const, needs no locking
diff --git a/src/VBox/Main/VMMDevInterface.cpp b/src/VBox/Main/VMMDevInterface.cpp
index 7e3797afa..0ec3395d8 100644
--- a/src/VBox/Main/VMMDevInterface.cpp
+++ b/src/VBox/Main/VMMDevInterface.cpp
@@ -1,4 +1,4 @@
-/* $Id: VMMDevInterface.cpp 29404 2010-05-12 10:11:28Z vboxsync $ */
+/* $Id: VMMDevInterface.cpp 29589 2010-05-18 06:55:00Z vboxsync $ */
/** @file
* VirtualBox Driver Interface to VMM device.
*/
@@ -283,8 +283,18 @@ DECLCALLBACK(void) vmmdevUpdatePointerShape(PPDMIVMMDEVCONNECTOR pInterface, boo
PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
/* tell the console about it */
+ size_t cbShapeSize = 0;
+
+ if (pShape)
+ {
+ cbShapeSize = (width + 7) / 8 * height; /* size of the AND mask */
+ cbShapeSize = ((cbShapeSize + 3) & ~3) + width * 4 * height; /* + gap + size of the XOR mask */
+ }
+ com::SafeArray<BYTE> shapeData(cbShapeSize);
+ if (pShape)
+ ::memcpy(shapeData.raw(), pShape, cbShapeSize);
pDrv->pVMMDev->getParent()->onMousePointerShapeChange(fVisible, fAlpha,
- xHot, yHot, width, height, pShape);
+ xHot, yHot, width, height, ComSafeArrayAsInParam(shapeData));
}
DECLCALLBACK(int) iface_VideoAccelEnable(PPDMIVMMDEVCONNECTOR pInterface, bool fEnable, VBVAMEMORY *pVbvaMemory)
@@ -483,6 +493,33 @@ DECLCALLBACK(int) vmmdevQueryBalloonSize(PPDMIVMMDEVCONNECTOR pInterface, uint32
}
/**
+ * Query the current page fusion setting
+ *
+ * @returns VBox status code.
+ * @param pInterface Pointer to this interface.
+ * @param pfPageFusionEnabled Pointer to boolean
+ * @thread The emulation thread.
+ */
+DECLCALLBACK(int) vmmdevIsPageFusionEnabled(PPDMIVMMDEVCONNECTOR pInterface, bool *pfPageFusionEnabled)
+{
+ PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
+ BOOL val = 0;
+
+ if (!pfPageFusionEnabled)
+ return VERR_INVALID_POINTER;
+
+ /* store that information in IGuest */
+ Guest* guest = pDrv->pVMMDev->getParent()->getGuest();
+ Assert(guest);
+ if (!guest)
+ return VERR_INVALID_PARAMETER; /** @todo wrong error */
+
+ guest->COMGETTER(PageFusionEnabled)(&val);
+ *pfPageFusionEnabled = !!val;
+ return VINF_SUCCESS;
+}
+
+/**
* Report new guest statistics
*
* @returns VBox status code.
@@ -738,6 +775,7 @@ DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle,
pData->Connector.pfnReportStatistics = vmmdevReportStatistics;
pData->Connector.pfnQueryStatisticsInterval = vmmdevQueryStatisticsInterval;
pData->Connector.pfnQueryBalloonSize = vmmdevQueryBalloonSize;
+ pData->Connector.pfnIsPageFusionEnabled = vmmdevIsPageFusionEnabled;
#ifdef VBOX_WITH_HGCM
pData->HGCMConnector.pfnConnect = iface_hgcmConnect;
diff --git a/src/VBox/Main/VirtualBoxCallbackImpl.cpp b/src/VBox/Main/VirtualBoxCallbackImpl.cpp
index 69dc93ea2..c4cd5f73d 100644
--- a/src/VBox/Main/VirtualBoxCallbackImpl.cpp
+++ b/src/VBox/Main/VirtualBoxCallbackImpl.cpp
@@ -161,12 +161,12 @@ STDMETHODIMP CallbackWrapper::OnGuestPropertyChange(IN_BSTR aMachineId, IN_BSTR
// IConsoleCallback methods
/////////////////////////////////////////////////////////////////////////////
STDMETHODIMP CallbackWrapper::OnMousePointerShapeChange(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
- ULONG width, ULONG height, BYTE *shape)
+ ULONG width, ULONG height, ComSafeArrayIn(BYTE, shape))
{
if (mConsoleCallback.isNull())
return S_OK;
- return mConsoleCallback->OnMousePointerShapeChange(visible, alpha, xHot, yHot, width, height, shape);
+ return mConsoleCallback->OnMousePointerShapeChange(visible, alpha, xHot, yHot, width, height, ComSafeArrayInArg(shape));
}
diff --git a/src/VBox/Main/idl/VirtualBox.xidl b/src/VBox/Main/idl/VirtualBox.xidl
index 09bb857c6..b28f960d1 100644
--- a/src/VBox/Main/idl/VirtualBox.xidl
+++ b/src/VBox/Main/idl/VirtualBox.xidl
@@ -1094,31 +1094,6 @@
</const>
</enum>
- <enum
- name="IoBackendType"
- uuid="2a7e16d1-4e6b-4d5d-b0c9-b9bbe6c5b2ad"
- >
- <desc>
- Type of I/O backend used for the image files in a virtual machine.
- </desc>
- <const name="Buffered" value="1">
- <desc>Image files will use the host cache if possible.
- The storage controller emulation will use a dedicated I/O thread, enable the host I/O cache and
- use synchronous file APIs on the host.
- This type does not work with the Async I/O manager on Linux hosts.
- This was the only option in the API before VirtualBox 3.2 and is still the default for IDE controllers.</desc>
- </const>
- <const name="Unbuffered" value="2">
- <desc>Image files will not use the host cache.
- The storage controller emulation will use asynchronous I/O APIs on the host. This makes it possible
- to turn off the host I/O caches because it can handle unaligned access to the file.
- This should be used on OS X and Linux hosts if a high I/O load is expected
- or many virtual machines are running to prevent I/O cache related hangs.
- This is new with the API of version 3.2 and is now the default for non-IDE storage controllers.</desc>
- </const>
- </enum>
-
-
<!--
// IVirtualBoxErrorInfo
/////////////////////////////////////////////////////////////////////////
@@ -6196,9 +6171,9 @@
Height of the pointer shape in pixels.
</desc>
</param>
- <param name="shape" type="octet" mod="ptr" dir="in">
+ <param name="shape" type="octet" safearray="yes" dir="in">
<desc>
- Address of the shape buffer.
+ Shape buffer arrays.
The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
followed by a 32-bpp XOR (color) mask.
@@ -7620,7 +7595,7 @@
<interface
name="IHost" extends="$unknown"
- uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
+ uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
wsmap="managed"
>
<desc>
@@ -7690,6 +7665,10 @@
<desc>Number of (logical) CPUs online in the host system.</desc>
</attribute>
+ <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
+ <desc>Number of physical processor cores installed in the host system.</desc>
+ </attribute>
+
<method name="getProcessorSpeed">
<desc>Query the (approximate) maximum speed of a specified host CPU in
Megahertz.
@@ -8427,7 +8406,7 @@
<interface
name="IGuestOSType" extends="$unknown"
- uuid="8aa950f6-668c-4388-b251-3809b404e862"
+ uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
wsmap="struct"
>
<desc>
@@ -8521,7 +8500,7 @@
<interface
name="IGuest" extends="$unknown"
- uuid="27211d55-8b11-4f07-9519-b7563ea2dc29"
+ uuid="d915dff1-ed38-495a-91f1-ab6c53932468"
wsmap="managed"
>
<desc>
@@ -8586,11 +8565,8 @@
<desc>Guest system memory balloon size in megabytes (transient property).</desc>
</attribute>
- <attribute name="PageFusionEnabled" type="boolean">
- <desc>
- Flag whether VirtualBox allows page fusion for this machine
- (64 bits host only; transient property).
- </desc>
+ <attribute name="pageFusionEnabled" type="boolean">
+ <desc>Flag whether page fusion is enabled or not.</desc>
</attribute>
<attribute name="statisticsUpdateInterval" type="unsigned long">
@@ -8706,24 +8682,6 @@
variable just set its name ("NAME") without a value.
</desc>
</param>
- <param name="stdIn" type="wstring" dir="in">
- <desc>
- What to do with the standard input (stdin) of the command being
- executed. Currently not used and has to be set to an empty value.
- </desc>
- </param>
- <param name="stdOut" type="wstring" dir="in">
- <desc>
- What to do with the standard output (stdout) of the command being
- executed. Currently not used and has to be set to an empty value.
- </desc>
- </param>
- <param name="stdErr" type="wstring" dir="in">
- <desc>
- What to do with the standard error (stderr) of the command being
- executed. Currently not used and has to be set to an empty value.
- </desc>
- </param>
<param name="userName" type="wstring" dir="in">
<desc>
User name under which the command will be executed; has to exist
@@ -13761,7 +13719,7 @@ Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
<interface
name="IStorageController" extends="$unknown"
- uuid="7635f4ec-8a28-44b5-9223-315a87b710fb"
+ uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
wsmap="managed"
>
<desc>
@@ -13844,9 +13802,18 @@ Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
</desc>
</attribute>
- <attribute name="ioBackend" type="IoBackendType">
+ <attribute name="useHostIOCache" type="boolean">
<desc>
- The I/O backend to use for the given storage controller.
+ If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
+ caches and use synchronous file APIs on the host. This was the only option in the API before
+ VirtualBox 3.2 and is still the default for IDE controllers.
+
+ If false, the host I/O cache will be disabled for image files attached to this storage controller.
+ Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
+ it possible to turn off the host I/O caches because the emulation can handle unaligned access to
+ the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
+ virtual machines are running at the same time to prevent I/O cache related hangs.
+ This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
</desc>
</attribute>
diff --git a/src/VBox/Main/include/ConsoleImpl.h b/src/VBox/Main/include/ConsoleImpl.h
index f762a6c18..aad6de296 100644
--- a/src/VBox/Main/include/ConsoleImpl.h
+++ b/src/VBox/Main/include/ConsoleImpl.h
@@ -1,4 +1,4 @@
-/* $Id: ConsoleImpl.h 29385 2010-05-11 18:05:44Z vboxsync $ */
+/* $Id: ConsoleImpl.h 29580 2010-05-17 18:23:00Z vboxsync $ */
/** @file
* VBox Console COM Class definition
*/
@@ -20,6 +20,7 @@
#include "VirtualBoxBase.h"
#include "SchemaDefs.h"
+#include "VBox/com/array.h"
class Guest;
class Keyboard;
@@ -205,7 +206,7 @@ public:
void onMousePointerShapeChange(bool fVisible, bool fAlpha,
uint32_t xHot, uint32_t yHot,
uint32_t width, uint32_t height,
- void *pShape);
+ ComSafeArrayIn(uint8_t, aShape));
void onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor);
void onStateChange(MachineState_T aMachineState);
void onAdditionsStateChange();
@@ -441,7 +442,7 @@ private:
const char *pcszDevice,
unsigned uInstance,
StorageBus_T enmBus,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
bool fSetupMerge,
unsigned uMergeSource,
unsigned uMergeTarget,
@@ -455,7 +456,7 @@ private:
int configMedium(PCFGMNODE pLunL0,
bool fPassthrough,
DeviceType_T enmType,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
bool fSetupMerge,
unsigned uMergeSource,
unsigned uMergeTarget,
@@ -467,7 +468,7 @@ private:
const char *pcszDevice,
unsigned uInstance,
StorageBus_T enmBus,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
bool fSetupMerge,
unsigned uMergeSource,
unsigned uMergeTarget,
@@ -478,7 +479,7 @@ private:
const char *pcszDevice,
unsigned uInstance,
StorageBus_T enmBus,
- IoBackendType_T enmIoBackend,
+ bool fUseHostIOCache,
IMediumAttachment *aMediumAtt,
bool fForce);
@@ -674,8 +675,7 @@ private:
uint32_t yHot;
uint32_t width;
uint32_t height;
- BYTE *shape;
- size_t shapeSize;
+ com::SafeArray<BYTE> shape;
}
mpsc;
@@ -698,6 +698,16 @@ private:
bool scrollLock;
}
klc;
+
+ void clear()
+ {
+ /* We cannot do memset() on mpsc to avoid cleaning shape's vtable */
+ mpsc.shape.setNull();
+ mpsc.valid = mpsc.visible = mpsc.alpha = false;
+ mpsc.xHot = mpsc.yHot = mpsc.width = mpsc.height = 0;
+ ::memset(&mcc, 0, sizeof mcc);
+ ::memset(&klc, 0, sizeof klc);
+ }
}
mCallbackData;
diff --git a/src/VBox/Main/include/DisplayImpl.h b/src/VBox/Main/include/DisplayImpl.h
index 0c72568de..ec2427546 100644
--- a/src/VBox/Main/include/DisplayImpl.h
+++ b/src/VBox/Main/include/DisplayImpl.h
@@ -1,4 +1,4 @@
-/* $Id: DisplayImpl.h 28973 2010-05-03 12:30:09Z vboxsync $ */
+/* $Id: DisplayImpl.h 29518 2010-05-17 10:06:22Z vboxsync $ */
/** @file
* VirtualBox COM class implementation
*/
@@ -149,7 +149,7 @@ public:
// IConsoleCallback methods
STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
- ULONG width, ULONG height, BYTE *shape)
+ ULONG width, ULONG height, ComSafeArrayIn(BYTE,shape))
{
return S_OK;
}
diff --git a/src/VBox/Main/include/GuestImpl.h b/src/VBox/Main/include/GuestImpl.h
index 96de18bbe..cb9039f22 100644
--- a/src/VBox/Main/include/GuestImpl.h
+++ b/src/VBox/Main/include/GuestImpl.h
@@ -79,10 +79,10 @@ public:
STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion);
STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics);
- STDMETHOD(COMGETTER(PageFusionEnabled)) (BOOL *enabled);
- STDMETHOD(COMSETTER(PageFusionEnabled)) (BOOL enabled);
STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize);
+ STDMETHOD(COMGETTER(PageFusionEnabled)) (BOOL *aPageFusionEnabled);
+ STDMETHOD(COMSETTER(PageFusionEnabled)) (BOOL aPageFusionEnabled);
STDMETHOD(COMGETTER(StatisticsUpdateInterval)) (ULONG *aUpdateInterval);
STDMETHOD(COMSETTER(StatisticsUpdateInterval)) (ULONG aUpdateInterval);
@@ -91,7 +91,6 @@ public:
IN_BSTR aDomain, BOOL aAllowInteractiveLogon);
STDMETHOD(ExecuteProcess)(IN_BSTR aCommand, ULONG aFlags,
ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
- IN_BSTR aStdIn, IN_BSTR aStdOut, IN_BSTR aStdErr,
IN_BSTR aUserName, IN_BSTR aPassword,
ULONG aTimeoutMS, ULONG *aPID, IProgress **aProgress);
STDMETHOD(GetProcessOutput)(ULONG aPID, ULONG aFlags, ULONG aTimeoutMS, ULONG64 aSize, ComSafeArrayOut(BYTE, aData));
@@ -171,6 +170,7 @@ private:
ULONG mMemoryBalloonSize;
ULONG mStatUpdateInterval;
ULONG mCurrentGuestStat[GUESTSTATTYPE_MAX];
+ BOOL mfPageFusionEnabled;
Console *mParent;
Data mData;
diff --git a/src/VBox/Main/include/HostImpl.h b/src/VBox/Main/include/HostImpl.h
index 615ccead4..7d0dc7977 100644
--- a/src/VBox/Main/include/HostImpl.h
+++ b/src/VBox/Main/include/HostImpl.h
@@ -1,4 +1,4 @@
-/* $Id: HostImpl.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: HostImpl.h 29615 2010-05-18 11:54:24Z vboxsync $ */
/** @file
* Implemenation of IHost.
*/
@@ -66,6 +66,7 @@ public:
STDMETHOD(COMGETTER(NetworkInterfaces))(ComSafeArrayOut (IHostNetworkInterface *, aNetworkInterfaces));
STDMETHOD(COMGETTER(ProcessorCount))(ULONG *count);
STDMETHOD(COMGETTER(ProcessorOnlineCount))(ULONG *count);
+ STDMETHOD(COMGETTER(ProcessorCoreCount))(ULONG *count);
STDMETHOD(GetProcessorSpeed)(ULONG cpuId, ULONG *speed);
STDMETHOD(GetProcessorDescription)(ULONG cpuId, BSTR *description);
STDMETHOD(GetProcessorFeature) (ProcessorFeature_T feature, BOOL *supported);
diff --git a/src/VBox/Main/include/MachineImpl.h b/src/VBox/Main/include/MachineImpl.h
index ab7d673e0..e66b135f6 100644
--- a/src/VBox/Main/include/MachineImpl.h
+++ b/src/VBox/Main/include/MachineImpl.h
@@ -1,4 +1,4 @@
-/* $Id: MachineImpl.h 29385 2010-05-11 18:05:44Z vboxsync $ */
+/* $Id: MachineImpl.h 29462 2010-05-14 11:27:59Z vboxsync $ */
/** @file
* VirtualBox COM class implementation
*/
@@ -258,6 +258,7 @@ public:
Guid mHardwareUUID; /**< If Null, use mData.mUuid. */
ULONG mMemorySize;
ULONG mMemoryBalloonSize;
+ BOOL mPageFusionEnabled;
ULONG mVRAMSize;
ULONG mMonitorCount;
BOOL mHWVirtExEnabled;
diff --git a/src/VBox/Main/include/Performance.h b/src/VBox/Main/include/Performance.h
index 5bde7d929..06f174993 100644
--- a/src/VBox/Main/include/Performance.h
+++ b/src/VBox/Main/include/Performance.h
@@ -1,4 +1,4 @@
-/* $Id: Performance.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: Performance.h 29632 2010-05-18 13:22:37Z vboxsync $ */
/** @file
*
@@ -134,7 +134,7 @@ namespace pm
class CollectorHAL
{
public:
- CollectorHAL() : mMemAllocVMM(0), mMemFreeVMM(0), mMemBalloonedVMM(0) {};
+ CollectorHAL() : mMemAllocVMM(0), mMemFreeVMM(0), mMemBalloonedVMM(0), mMemSharedVMM(0) {};
virtual ~CollectorHAL() { };
virtual int preCollect(const CollectorHints& /* hints */, uint64_t /* iTick */) { return VINF_SUCCESS; }
/** Returns averaged CPU usage in 1/1000th per cent across all host's CPUs. */
@@ -158,25 +158,28 @@ namespace pm
/** Disable metrics collecting (if applicable) */
virtual int disable();
- virtual int setMemHypervisorStats(ULONG memAlloc, ULONG memFree, ULONG memBallooned)
+ virtual int setMemHypervisorStats(ULONG memAlloc, ULONG memFree, ULONG memBallooned, ULONG memShared)
{
mMemAllocVMM = memAlloc;
mMemFreeVMM = memFree;
mMemBalloonedVMM = memBallooned;
+ mMemSharedVMM = memShared;
return S_OK;
}
- virtual void getMemHypervisorStats(ULONG *pMemAlloc, ULONG *pMemFree, ULONG *pMemBallooned)
+ virtual void getMemHypervisorStats(ULONG *pMemAlloc, ULONG *pMemFree, ULONG *pMemBallooned, ULONG *pMemShared)
{
*pMemAlloc = mMemAllocVMM;
*pMemFree = mMemFreeVMM;
*pMemBallooned = mMemBalloonedVMM;
+ *pMemShared = mMemSharedVMM;
}
private:
ULONG mMemAllocVMM;
ULONG mMemFreeVMM;
ULONG mMemBalloonedVMM;
+ ULONG mMemSharedVMM;
};
class CollectorGuestHAL : public CollectorHAL
@@ -184,7 +187,7 @@ namespace pm
public:
CollectorGuestHAL(Machine *machine, CollectorHAL *hostHAL) : CollectorHAL(), cEnabled(0), mMachine(machine), mConsole(NULL), mGuest(NULL),
mLastTick(0), mHostHAL(hostHAL), mCpuUser(0), mCpuKernel(0), mCpuIdle(0), mMemTotal(0), mMemFree(0),
- mMemBalloon(0), mMemCache(0), mPageTotal(0) {};
+ mMemBalloon(0), mMemShared(0), mMemCache(0), mPageTotal(0) {};
~CollectorGuestHAL();
virtual int preCollect(const CollectorHints& hints, uint64_t iTick);
@@ -203,11 +206,12 @@ namespace pm
}
/** Return guest memory information in KB. */
- void getGuestMemLoad(ULONG *pulMemTotal, ULONG *pulMemFree, ULONG *pulMemBalloon, ULONG *pulMemCache, ULONG *pulPageTotal)
+ void getGuestMemLoad(ULONG *pulMemTotal, ULONG *pulMemFree, ULONG *pulMemBalloon, ULONG *pulMemShared, ULONG *pulMemCache, ULONG *pulPageTotal)
{
*pulMemTotal = mMemTotal;
*pulMemFree = mMemFree;
*pulMemBalloon = mMemBalloon;
+ *pulMemShared = mMemShared;
*pulMemCache = mMemCache;
*pulPageTotal = mPageTotal;
}
@@ -228,6 +232,7 @@ namespace pm
ULONG mMemTotal;
ULONG mMemFree;
ULONG mMemBalloon;
+ ULONG mMemShared;
ULONG mMemCache;
ULONG mPageTotal;
};
@@ -336,9 +341,9 @@ namespace pm
class HostRamUsage : public BaseMetric
{
public:
- HostRamUsage(CollectorHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *used, SubMetric *available, SubMetric *allocVMM, SubMetric *freeVMM, SubMetric *balloonVMM)
- : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mUsed(used), mAvailable(available), mAllocVMM(allocVMM), mFreeVMM(freeVMM), mBalloonVMM(balloonVMM) {};
- ~HostRamUsage() { delete mTotal; delete mUsed; delete mAvailable; delete mAllocVMM; delete mFreeVMM; delete mBalloonVMM; };
+ HostRamUsage(CollectorHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *used, SubMetric *available, SubMetric *allocVMM, SubMetric *freeVMM, SubMetric *balloonVMM, SubMetric *sharedVMM)
+ : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mUsed(used), mAvailable(available), mAllocVMM(allocVMM), mFreeVMM(freeVMM), mBalloonVMM(balloonVMM), mSharedVMM(sharedVMM) {};
+ ~HostRamUsage() { delete mTotal; delete mUsed; delete mAvailable; delete mAllocVMM; delete mFreeVMM; delete mBalloonVMM; delete mSharedVMM; };
void init(ULONG period, ULONG length);
void preCollect(CollectorHints& hints, uint64_t iTick);
@@ -354,6 +359,7 @@ namespace pm
SubMetric *mAllocVMM;
SubMetric *mFreeVMM;
SubMetric *mBalloonVMM;
+ SubMetric *mSharedVMM;
};
class MachineCpuLoad : public BaseMetric
@@ -433,9 +439,9 @@ namespace pm
class GuestRamUsage : public BaseMetric
{
public:
- GuestRamUsage(CollectorGuestHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *free, SubMetric *balloon, SubMetric *cache, SubMetric *pagedtotal)
- : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mFree(free), mBallooned(balloon), mCache(cache), mPagedTotal(pagedtotal), mGuestHAL(hal) {};
- ~GuestRamUsage() { delete mTotal; delete mFree; delete mBallooned; delete mCache; delete mPagedTotal; };
+ GuestRamUsage(CollectorGuestHAL *hal, ComPtr<IUnknown> object, SubMetric *total, SubMetric *free, SubMetric *balloon, SubMetric *shared, SubMetric *cache, SubMetric *pagedtotal)
+ : BaseMetric(hal, "RAM/Usage", object), mTotal(total), mFree(free), mBallooned(balloon), mCache(cache), mPagedTotal(pagedtotal), mShared(shared), mGuestHAL(hal) {};
+ ~GuestRamUsage() { delete mTotal; delete mFree; delete mBallooned; delete mShared; delete mCache; delete mPagedTotal; };
void init(ULONG period, ULONG length);
void preCollect(CollectorHints& hints, uint64_t iTick);
@@ -445,7 +451,7 @@ namespace pm
ULONG getMaxValue() { return INT32_MAX; };
ULONG getScale() { return 1; }
private:
- SubMetric *mTotal, *mFree, *mBallooned, *mCache, *mPagedTotal;
+ SubMetric *mTotal, *mFree, *mBallooned, *mCache, *mPagedTotal, *mShared;
CollectorGuestHAL *mGuestHAL;
};
diff --git a/src/VBox/Main/include/StorageControllerImpl.h b/src/VBox/Main/include/StorageControllerImpl.h
index 393552bd9..81dfc665a 100644
--- a/src/VBox/Main/include/StorageControllerImpl.h
+++ b/src/VBox/Main/include/StorageControllerImpl.h
@@ -1,4 +1,4 @@
-/* $Id: StorageControllerImpl.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: StorageControllerImpl.h 29480 2010-05-14 15:24:19Z vboxsync $ */
/** @file
*
@@ -72,8 +72,8 @@ public:
STDMETHOD(COMSETTER(PortCount)) (ULONG aPortCount);
STDMETHOD(COMGETTER(Instance)) (ULONG *aInstance);
STDMETHOD(COMSETTER(Instance)) (ULONG aInstance);
- STDMETHOD(COMGETTER(IoBackend)) (IoBackendType_T *aIoBackend);
- STDMETHOD(COMSETTER(IoBackend)) (IoBackendType_T aIoBackend);
+ STDMETHOD(COMGETTER(UseHostIOCache)) (BOOL *fUseHostIOCache);
+ STDMETHOD(COMSETTER(UseHostIOCache)) (BOOL fUseHostIOCache);
// StorageController methods
STDMETHOD(GetIDEEmulationPort) (LONG DevicePosition, LONG *aPortNumber);
diff --git a/src/VBox/Main/include/VirtualBoxCallbackImpl.h b/src/VBox/Main/include/VirtualBoxCallbackImpl.h
index b96faf8c1..9955c5b3c 100644
--- a/src/VBox/Main/include/VirtualBoxCallbackImpl.h
+++ b/src/VBox/Main/include/VirtualBoxCallbackImpl.h
@@ -73,7 +73,7 @@ public:
// IConsoleCallback
STDMETHOD(OnMousePointerShapeChange)(BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
- ULONG width, ULONG height, BYTE *shape);
+ ULONG width, ULONG height, ComSafeArrayIn(BYTE, shape));
STDMETHOD(OnMouseCapabilityChange)(BOOL supportsAbsolute, BOOL supportsRelative, BOOL needsHostCursor);
STDMETHOD(OnKeyboardLedsChange)(BOOL fNumLock, BOOL fCapsLock, BOOL fScrollLock);
STDMETHOD(OnStateChange)(MachineState_T machineState);
diff --git a/src/VBox/Main/xml/Settings.cpp b/src/VBox/Main/xml/Settings.cpp
index 7dd9cb87e..7ff36f93d 100644
--- a/src/VBox/Main/xml/Settings.cpp
+++ b/src/VBox/Main/xml/Settings.cpp
@@ -1,4 +1,4 @@
-/* $Id: Settings.cpp 29386 2010-05-11 18:07:09Z vboxsync $ */
+/* $Id: Settings.cpp 29593 2010-05-18 07:23:46Z vboxsync $ */
/** @file
* Settings File Manipulation API.
*
@@ -1490,7 +1490,8 @@ Hardware::Hardware()
pointingHidType(PointingHidType_PS2Mouse),
keyboardHidType(KeyboardHidType_PS2Keyboard),
clipboardMode(ClipboardMode_Bidirectional),
- ulMemoryBalloonSize(0)
+ ulMemoryBalloonSize(0),
+ fPageFusionEnabled(false)
{
mapBootOrder[0] = DeviceType_Floppy;
mapBootOrder[1] = DeviceType_DVD;
@@ -1546,6 +1547,7 @@ bool Hardware::operator==(const Hardware& h) const
&& (llSharedFolders == h.llSharedFolders)
&& (clipboardMode == h.clipboardMode)
&& (ulMemoryBalloonSize == h.ulMemoryBalloonSize)
+ && (fPageFusionEnabled == h.fPageFusionEnabled)
&& (llGuestProperties == h.llGuestProperties)
&& (strNotificationPatterns == h.strNotificationPatterns)
)
@@ -1583,7 +1585,7 @@ bool StorageController::operator==(const StorageController &s) const
&& (controllerType == s.controllerType)
&& (ulPortCount == s.ulPortCount)
&& (ulInstance == s.ulInstance)
- && (ioBackendType == s.ioBackendType)
+ && (fUseHostIOCache == s.fUseHostIOCache)
&& (lIDE0MasterEmulationPort == s.lIDE0MasterEmulationPort)
&& (lIDE0SlaveEmulationPort == s.lIDE0SlaveEmulationPort)
&& (lIDE1MasterEmulationPort == s.lIDE1MasterEmulationPort)
@@ -2074,19 +2076,7 @@ void MachineConfigFile::readStorageControllerAttributes(const xml::ElementNode &
elmStorageController.getAttributeValue("IDE1MasterEmulationPort", sctl.lIDE1MasterEmulationPort);
elmStorageController.getAttributeValue("IDE1SlaveEmulationPort", sctl.lIDE1SlaveEmulationPort);
- Utf8Str strIoBackend;
- if (elmStorageController.getAttributeValue("IoBackend", strIoBackend))
- {
- if (strIoBackend == "Buffered")
- sctl.ioBackendType = IoBackendType_Buffered;
- else if (strIoBackend == "Unbuffered")
- sctl.ioBackendType = IoBackendType_Unbuffered;
- else
- throw ConfigFileError(this,
- &elmStorageController,
- N_("Invalid value '%s' in StorageController/@IoBackend"),
- strIoBackend.c_str());
- }
+ elmStorageController.getAttributeValue("useHostIOCache", sctl.fUseHostIOCache);
}
/**
@@ -2172,7 +2162,10 @@ void MachineConfigFile::readHardware(const xml::ElementNode &elmHardware,
readCpuIdTree(*pelmCPUChild, hw.llCpuIdLeafs);
}
else if (pelmHwChild->nameEquals("Memory"))
+ {
pelmHwChild->getAttributeValue("RAMSize", hw.ulMemorySizeMB);
+ pelmHwChild->getAttributeValue("PageFusion", hw.fPageFusionEnabled);
+ }
else if (pelmHwChild->nameEquals("Firmware"))
{
Utf8Str strFirmwareType;
@@ -3128,6 +3121,10 @@ void MachineConfigFile::buildHardwareXML(xml::ElementNode &elmParent,
xml::ElementNode *pelmMemory = pelmHardware->createChild("Memory");
pelmMemory->setAttribute("RAMSize", hw.ulMemorySizeMB);
+ if (m->sv >= SettingsVersion_v1_10)
+ {
+ pelmMemory->setAttribute("PageFusion", hw.fPageFusionEnabled);
+ }
if ( (m->sv >= SettingsVersion_v1_9)
&& (hw.firmwareType >= FirmwareType_EFI)
@@ -3711,17 +3708,8 @@ void MachineConfigFile::buildStorageControllersXML(xml::ElementNode &elmParent,
if (sc.ulInstance)
pelmController->setAttribute("Instance", sc.ulInstance);
- if (m->sv >= SettingsVersion_v1_9)
- {
- const char *pcszIoBackend;
- switch (sc.ioBackendType)
- {
- case IoBackendType_Unbuffered: pcszIoBackend = "Unbuffered"; break;
- default: /*case IoBackendType_Buffered:*/ pcszIoBackend = "Buffered"; break;
- }
-
- pelmController->setAttribute("IoBackend", pcszIoBackend);
- }
+ if (m->sv >= SettingsVersion_v1_10)
+ pelmController->setAttribute("useHostIOCache", sc.fUseHostIOCache);
if (sc.controllerType == StorageControllerType_IntelAhci)
{
@@ -3986,8 +3974,8 @@ void MachineConfigFile::bumpSettingsVersionIfNeeded()
else if (att.deviceType == DeviceType_Floppy)
++cFloppies;
- // The I/O backend setting is only supported with v.10
- if (sctl.ioBackendType != IoBackendType_Buffered)
+ // Disabling the host IO cache requires settings version 1.10
+ if (!sctl.fUseHostIOCache)
{
m->sv = SettingsVersion_v1_10;
break;
@@ -4016,6 +4004,12 @@ void MachineConfigFile::bumpSettingsVersionIfNeeded()
)
m->sv = SettingsVersion_v1_10;
+ // VirtualBox 3.2 adds support for page fusion
+ if ( m->sv < SettingsVersion_v1_10
+ && hardwareMachine.fPageFusionEnabled
+ )
+ m->sv = SettingsVersion_v1_10;
+
// VirtualBox 3.2 adds NAT and boot priority to the NIC config in Main.
if (m->sv < SettingsVersion_v1_10)
{
diff --git a/src/VBox/Main/xpcom/server_module.cpp b/src/VBox/Main/xpcom/server_module.cpp
index 215c6856d..27499b9f7 100644
--- a/src/VBox/Main/xpcom/server_module.cpp
+++ b/src/VBox/Main/xpcom/server_module.cpp
@@ -73,7 +73,7 @@ enum
/** Amount of time to wait for the server to establish a connection, ms */
VBoxSVC_Timeout = 30000,
/** How often to perform a connection check, ms */
- VBoxSVC_WaitSlice = 100,
+ VBoxSVC_WaitSlice = 100
};
/**
diff --git a/src/VBox/Runtime/Makefile.kmk b/src/VBox/Runtime/Makefile.kmk
index a2950071e..5086f698d 100644
--- a/src/VBox/Runtime/Makefile.kmk
+++ b/src/VBox/Runtime/Makefile.kmk
@@ -1,4 +1,4 @@
-# $Id: Makefile.kmk 29279 2010-05-09 23:29:11Z vboxsync $
+# $Id: Makefile.kmk 29582 2010-05-17 19:40:34Z vboxsync $
## @file
# Sub-Makefile for the IPRT (IPRT).
#
@@ -1059,6 +1059,8 @@ endif
ifdef IPRT_WITH_LZO
VBoxRT_LIBS += lzo2
endif
+VBoxRT_LIBS.linux = \
+ crypt
VBoxRT_LIBS.darwin = \
iconv
VBoxRT_LIBS.freebsd = \
@@ -1225,6 +1227,7 @@ RuntimeR0_SOURCES = \
common/misc/RTAssertMsg2Weak.cpp \
common/misc/RTAssertMsg2WeakV.cpp \
common/misc/buildconfig.cpp \
+ common/misc/once.cpp \
common/misc/sanity-c.c \
common/misc/sanity-cpp.cpp \
common/misc/term.cpp \
diff --git a/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp b/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp
index 96a6f520b..7ee70e824 100644
--- a/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp
+++ b/src/VBox/Runtime/generic/RTMpCpuId-generic.cpp
@@ -1,4 +1,4 @@
-/* $Id: RTMpCpuId-generic.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: RTMpCpuId-generic.cpp 29500 2010-05-14 21:43:06Z vboxsync $ */
/** @file
* IPRT - Multiprocessor, Generic RTMpCpuId.
*/
@@ -32,6 +32,7 @@
#include "internal/iprt.h"
#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
RTDECL(RTCPUID) RTMpCpuId(void)
diff --git a/src/VBox/Runtime/include/internal/fileaio.h b/src/VBox/Runtime/include/internal/fileaio.h
index 2ac90be71..6ff4ced99 100644
--- a/src/VBox/Runtime/include/internal/fileaio.h
+++ b/src/VBox/Runtime/include/internal/fileaio.h
@@ -1,4 +1,4 @@
-/* $Id: fileaio.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: fileaio.h 29451 2010-05-13 15:38:48Z vboxsync $ */
/** @file
* IPRT - Internal RTFileAio header.
*/
@@ -97,6 +97,14 @@ typedef enum RTFILEAIOREQSTATE
return rc; \
} while (0)
+/** Checks if a request in the given states and sserts if not. */
+#define RTFIELAIOREQ_ASSERT_STATE(pReq, State) \
+ do { \
+ AssertPtr((pReq)); \
+ Assert((pReq)->u32Magic == RTFILEAIOREQ_MAGIC); \
+ Assert((pReq)->enmState == RTFILEAIOREQSTATE_##State); \
+ } while (0)
+
/** Sets the request into a specific state. */
#define RTFILEAIOREQ_SET_STATE(pReq, State) \
do { \
diff --git a/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c
index 5a18fd192..18d9f6669 100644
--- a/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c
@@ -1,4 +1,4 @@
-/* $Id: mp-r0drv-freebsd.c 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: mp-r0drv-freebsd.c 29499 2010-05-14 21:19:32Z vboxsync $ */
/** @file
* IPRT - Multiprocessor, Ring-0 Driver, FreeBSD.
*/
@@ -138,7 +138,7 @@ RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
Args.pvUser2 = pvUser2;
Args.idCpu = NIL_RTCPUID;
Args.cHits = 0;
- smp_rendezvous(NULL, rtmpOnAllFreeBSDWrapper, NULL, &Args);
+ smp_rendezvous(NULL, rtmpOnAllFreeBSDWrapper, smp_no_rendevous_barrier, &Args);
return VINF_SUCCESS;
}
@@ -174,7 +174,7 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
Args.idCpu = RTMpCpuId();
Args.cHits = 0;
#if __FreeBSD_version >= 700000
- smp_rendezvous_cpus(Mask, NULL, rtmpOnOthersFreeBSDWrapper, NULL, &Args);
+ smp_rendezvous_cpus(Mask, NULL, rtmpOnOthersFreeBSDWrapper, smp_no_rendevous_barrier, &Args);
#else
smp_rendezvous(NULL, rtmpOnOthersFreeBSDWrapper, NULL, &Args);
#endif
@@ -219,7 +219,7 @@ RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1
Args.cHits = 0;
#if __FreeBSD_version >= 700000
Mask = (cpumask_t)1 << idCpu;
- smp_rendezvous_cpus(Mask, NULL, rtmpOnSpecificFreeBSDWrapper, NULL, &Args);
+ smp_rendezvous_cpus(Mask, NULL, rtmpOnSpecificFreeBSDWrapper, smp_no_rendevous_barrier, &Args);
#else
smp_rendezvous(NULL, rtmpOnSpecificFreeBSDWrapper, NULL, &Args);
#endif
@@ -249,7 +249,7 @@ RTDECL(int) RTMpPokeCpu(RTCPUID idCpu)
return VERR_CPU_NOT_FOUND;
Mask = (cpumask_t)1 << idCpu;
- smp_rendezvous_cpus(Mask, NULL, rtmpFreeBSDPokeCallback, NULL, NULL);
+ smp_rendezvous_cpus(Mask, NULL, rtmpFreeBSDPokeCallback, smp_no_rendevous_barrier, NULL);
return VINF_SUCCESS;
}
diff --git a/src/VBox/Runtime/r0drv/freebsd/spinlock-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/spinlock-r0drv-freebsd.c
index 4eed4fdc2..f208aea90 100644
--- a/src/VBox/Runtime/r0drv/freebsd/spinlock-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/spinlock-r0drv-freebsd.c
@@ -1,4 +1,4 @@
-/* $Id: spinlock-r0drv-freebsd.c 22677 2009-09-01 15:10:42Z vboxsync $ */
+/* $Id: spinlock-r0drv-freebsd.c 29500 2010-05-14 21:43:06Z vboxsync $ */
/** @file
* IPRT - Spinlocks, Ring-0 Driver, FreeBSD.
*/
@@ -39,6 +39,7 @@
#include <iprt/alloc.h>
#include <iprt/assert.h>
#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
#include <iprt/thread.h>
#include <iprt/mp.h>
diff --git a/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
index 5ec3a74c6..6cf6a8128 100644
--- a/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
+++ b/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
@@ -1,4 +1,4 @@
-/* $Id: thread-r0drv-freebsd.c 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: thread-r0drv-freebsd.c 29500 2010-05-14 21:43:06Z vboxsync $ */
/** @file
* IPRT - Threads (Part 1), Ring-0 Driver, FreeBSD.
*/
@@ -32,6 +32,7 @@
#include <iprt/thread.h>
#include <iprt/asm.h>
+#include <iprt/asm-amd64-x86.h>
#include <iprt/assert.h>
#include <iprt/err.h>
#include <iprt/mp.h>
diff --git a/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c
index 51c1c5226..8475df1ad 100644
--- a/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c
@@ -1,4 +1,4 @@
-/* $Id: semevent-r0drv-linux.c 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: semevent-r0drv-linux.c 29648 2010-05-18 16:15:42Z vboxsync $ */
/** @file
* IPRT - Single Release Event Semaphores, Ring-0 Driver, Linux.
*/
@@ -142,7 +142,7 @@ static int rtSemEventWait(PRTSEMEVENTINTERNAL pThis, RTMSINTERVAL cMillies, bool
int rc = VINF_SUCCESS;
long lTimeout = cMillies == RT_INDEFINITE_WAIT ? MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(cMillies);
#ifdef IPRT_DEBUG_SEMS
- snprintf(current->comm, TASK_COMM_LEN, "e%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
+ snprintf(current->comm, sizeof(current->comm), "e%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
#endif
for (;;)
{
@@ -182,7 +182,7 @@ static int rtSemEventWait(PRTSEMEVENTINTERNAL pThis, RTMSINTERVAL cMillies, bool
finish_wait(&pThis->Head, &Wait);
#ifdef IPRT_DEBUG_SEMS
- snprintf(current->comm, TASK_COMM_LEN, "e%lx:%d", IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
+ snprintf(current->comm, sizeof(current->comm), "e%lx:%d", IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
#endif
return rc;
}
diff --git a/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c
index 19701a15a..c405c8ac3 100644
--- a/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c
@@ -1,4 +1,4 @@
-/* $Id: semeventmulti-r0drv-linux.c 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: semeventmulti-r0drv-linux.c 29648 2010-05-18 16:15:42Z vboxsync $ */
/** @file
* IPRT - Multiple Release Event Semaphores, Ring-0 Driver, Linux.
*/
@@ -166,7 +166,7 @@ static int rtSemEventMultiWait(PRTSEMEVENTMULTIINTERNAL pThis, RTMSINTERVAL cMil
int rc = VINF_SUCCESS;
long lTimeout = cMillies == RT_INDEFINITE_WAIT ? MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(cMillies);
#ifdef IPRT_DEBUG_SEMS
- snprintf(current->comm, TASK_COMM_LEN, "E%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
+ snprintf(current->comm, sizeof(current->comm), "E%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
#endif
for (;;)
{
@@ -206,7 +206,7 @@ static int rtSemEventMultiWait(PRTSEMEVENTMULTIINTERNAL pThis, RTMSINTERVAL cMil
finish_wait(&pThis->Head, &Wait);
#ifdef IPRT_DEBUG_SEMS
- snprintf(current->comm, TASK_COMM_LEN, "E%lx:%d", IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
+ snprintf(current->comm, sizeof(current->comm), "E%lx:%d", IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
#endif
return rc;
}
diff --git a/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c
index a24e8a63c..29f6787c0 100644
--- a/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c
@@ -1,4 +1,4 @@
-/* $Id: semfastmutex-r0drv-linux.c 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: semfastmutex-r0drv-linux.c 29648 2010-05-18 16:15:42Z vboxsync $ */
/** @file
* IPRT - Fast Mutex Semaphores, Ring-0 Driver, Linux.
*/
@@ -114,11 +114,11 @@ RTDECL(int) RTSemFastMutexRequest(RTSEMFASTMUTEX hFastMtx)
AssertMsgReturn(pThis->u32Magic == RTSEMFASTMUTEX_MAGIC, ("u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis), VERR_INVALID_HANDLE);
#ifdef IPRT_DEBUG_SEMS
- snprintf(current->comm, TASK_COMM_LEN, "d%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
+ snprintf(current->comm, sizeof(current->comm), "d%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
#endif
down(&pThis->Semaphore);
#ifdef IPRT_DEBUG_SEMS
- snprintf(current->comm, TASK_COMM_LEN, "o%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
+ snprintf(current->comm, sizeof(current->comm), "o%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
AssertRelease(pThis->Owner == NIL_RTNATIVETHREAD);
ASMAtomicUoWriteSize(&pThis->Owner, RTThreadNativeSelf());
#endif
@@ -142,7 +142,7 @@ RTDECL(int) RTSemFastMutexRelease(RTSEMFASTMUTEX hFastMtx)
#endif
up(&pThis->Semaphore);
#ifdef IPRT_DEBUG_SEMS
- snprintf(current->comm, TASK_COMM_LEN, "u%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
+ snprintf(current->comm, sizeof(current->comm), "u%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
#endif
return VINF_SUCCESS;
}
diff --git a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
index 8820de30c..433714980 100644
--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
@@ -1,4 +1,4 @@
-/* $Id: the-linux-kernel.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: the-linux-kernel.h 29648 2010-05-18 16:15:42Z vboxsync $ */
/** @file
* IPRT - Include all necessary headers for the Linux kernel.
*/
@@ -321,7 +321,7 @@ DECLINLINE(unsigned long) msecs_to_jiffies(unsigned int cMillies)
*/
#ifdef IPRT_DEBUG_SEMS
# define IPRT_DEBUG_SEMS_STATE(pThis, chState) \
- snprintf(current->comm, TASK_COMM_LEN, "%c%lx", (chState), IPRT_DEBUG_SEMS_ADDRESS(pThis));
+ snprintf(current->comm, sizeof(current->comm), "%c%lx", (chState), IPRT_DEBUG_SEMS_ADDRESS(pThis));
#else
# define IPRT_DEBUG_SEMS_STATE(pThis, chState) do { } while (0)
#endif
@@ -332,7 +332,7 @@ DECLINLINE(unsigned long) msecs_to_jiffies(unsigned int cMillies)
*/
#ifdef IPRT_DEBUG_SEMS
# define IPRT_DEBUG_SEMS_STATE_RC(pThis, chState, rc) \
- snprintf(current->comm, TASK_COMM_LEN, "%c%lx:%d", (chState), IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
+ snprintf(current->comm, sizeof(current->comm), "%c%lx:%d", (chState), IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
#else
# define IPRT_DEBUG_SEMS_STATE_RC(pThis, chState, rc) do { } while (0)
#endif
diff --git a/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c b/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c
index 20b3dfc4f..0936c35ac 100644
--- a/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c
+++ b/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c
@@ -1368,9 +1368,11 @@ vbi_pages_premap(page_t **pp_pages, size_t size, uint64_t *pphysaddrs)
{
/*
* prepare pages for mapping into kernel/user space, we need to
- * downgrade the exclusive page lock to a shared lock.
+ * downgrade the exclusive page lock to a shared lock if the
+ * pages is locked exclusively.
*/
- page_downgrade(pp_pages[i]);
+ if (page_tryupgrade(pp_pages[i]) == 1)
+ page_downgrade(pp_pages[i]);
pphysaddrs[i] = vbi_page_to_pa(pp_pages, i);
}
diff --git a/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp b/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp
index 060c8f4a5..bea8c0aec 100644
--- a/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp
+++ b/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp
@@ -1,4 +1,4 @@
-/* $Id: RTSystemQueryDmiString-darwin.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: RTSystemQueryDmiString-darwin.cpp 29560 2010-05-17 15:08:09Z vboxsync $ */
/** @file
* IPRT - RTSystemQueryDmiString, darwin ring-3.
*/
@@ -48,6 +48,7 @@
#define PROP_PRODUCT_VERSION "version"
#define PROP_PRODUCT_SERIAL "IOPlatformSerialNumber"
#define PROP_PRODUCT_UUID "IOPlatformUUID"
+#define PROP_MANUFACTURER "manufacturer"
RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t cbBuf)
@@ -64,6 +65,7 @@ RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t c
case RTSYSDMISTR_PRODUCT_VERSION: PropStringRef = CFSTR(PROP_PRODUCT_VERSION); break;
case RTSYSDMISTR_PRODUCT_SERIAL: PropStringRef = CFSTR(PROP_PRODUCT_SERIAL); break;
case RTSYSDMISTR_PRODUCT_UUID: PropStringRef = CFSTR(PROP_PRODUCT_UUID); break;
+ case RTSYSDMISTR_MANUFACTURER: PropStringRef = CFSTR(PROP_MANUFACTURER); break;
default:
return VERR_NOT_SUPPORTED;
}
@@ -92,7 +94,9 @@ RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t c
while ((ServiceObject = IOIteratorNext(Iterator)))
{
if ( enmString == RTSYSDMISTR_PRODUCT_NAME
- || enmString == RTSYSDMISTR_PRODUCT_VERSION)
+ || enmString == RTSYSDMISTR_PRODUCT_VERSION
+ || enmString == RTSYSDMISTR_MANUFACTURER
+ )
{
CFDataRef DataRef = (CFDataRef)IORegistryEntryCreateCFProperty(ServiceObject, PropStringRef,
kCFAllocatorDefault, kNilOptions);
diff --git a/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp b/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp
index 4c6ed2193..91cfbcd66 100644
--- a/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp
+++ b/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp
@@ -1,4 +1,4 @@
-/* $Id: RTSystemQueryDmiString-linux.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: RTSystemQueryDmiString-linux.cpp 29642 2010-05-18 14:44:56Z vboxsync $ */
/** @file
* IPRT - RTSystemQueryDmiString, linux ring-3.
*/
@@ -52,6 +52,7 @@ RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t c
case RTSYSDMISTR_PRODUCT_VERSION: pszSysFsName = "id/product_version"; break;
case RTSYSDMISTR_PRODUCT_UUID: pszSysFsName = "id/product_uuid"; break;
case RTSYSDMISTR_PRODUCT_SERIAL: pszSysFsName = "id/product_serial"; break;
+ case RTSYSDMISTR_MANUFACTURER: pszSysFsName = "id/sys_vendor"; break;
default:
return VERR_NOT_SUPPORTED;
}
diff --git a/src/VBox/Runtime/r3/posix/fileaio-posix.cpp b/src/VBox/Runtime/r3/posix/fileaio-posix.cpp
index 7f5ac6944..7e67876ee 100644
--- a/src/VBox/Runtime/r3/posix/fileaio-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/fileaio-posix.cpp
@@ -1,4 +1,4 @@
-/* $Id: fileaio-posix.cpp 29129 2010-05-06 10:40:30Z vboxsync $ */
+/* $Id: fileaio-posix.cpp 29477 2010-05-14 14:59:29Z vboxsync $ */
/** @file
* IPRT - File async I/O, native implementation for POSIX compliant host platforms.
*/
@@ -68,6 +68,11 @@
/** Invalid entry in the waiting array. */
#define RTFILEAIOCTX_WAIT_ENTRY_INVALID (~0U)
+/** No-op replacement for rtFileAioCtxDump for non debug builds */
+#ifndef LOG_ENABLED
+# define rtFileAioCtxDump(pCtxInt) do {} while (0)
+#endif
+
/*******************************************************************************
* Structures and Typedefs *
*******************************************************************************/
@@ -198,6 +203,7 @@ static int rtFileAioCtxProcessEvents(PRTFILEAIOCTXINTERNAL pCtxInt)
while ( (pCtxInt->iFirstFree < pCtxInt->cReqsWaitMax)
&& pReqHead)
{
+ RTFIELAIOREQ_ASSERT_STATE(pReqHead, SUBMITTED);
pCtxInt->apReqs[pCtxInt->iFirstFree] = pReqHead;
pReqHead->iWaitingList = pCtxInt->iFirstFree;
pReqHead = pReqHead->pNext;
@@ -214,6 +220,7 @@ static int rtFileAioCtxProcessEvents(PRTFILEAIOCTXINTERNAL pCtxInt)
/* Append the rest to the wait list. */
if (pReqHead)
{
+ RTFIELAIOREQ_ASSERT_STATE(pReqHead, SUBMITTED);
if (!pCtxInt->pReqsWaitHead)
{
Assert(!pCtxInt->pReqsWaitTail);
@@ -230,7 +237,10 @@ static int rtFileAioCtxProcessEvents(PRTFILEAIOCTXINTERNAL pCtxInt)
/* Update tail. */
while (pReqHead->pNext)
+ {
+ RTFIELAIOREQ_ASSERT_STATE(pReqHead->pNext, SUBMITTED);
pReqHead = pReqHead->pNext;
+ }
pCtxInt->pReqsWaitTail = pReqHead;
pCtxInt->pReqsWaitTail->pNext = NULL;
@@ -578,6 +588,30 @@ RTDECL(int) RTFileAioCtxAssociateWithFile(RTFILEAIOCTX hAioCtx, RTFILE hFile)
return VINF_SUCCESS;
}
+#ifdef LOG_ENABLED
+/**
+ * Dumps the state of a async I/O context.
+ */
+static void rtFileAioCtxDump(PRTFILEAIOCTXINTERNAL pCtxInt)
+{
+ LogFlow(("cRequests=%d\n", pCtxInt->cRequests));
+ LogFlow(("cMaxRequests=%u\n", pCtxInt->cMaxRequests));
+ LogFlow(("hThreadWait=%#p\n", pCtxInt->hThreadWait));
+ LogFlow(("fWokenUp=%RTbool\n", pCtxInt->fWokenUp));
+ LogFlow(("fWaiting=%RTbool\n", pCtxInt->fWaiting));
+ LogFlow(("fWokenUpInternal=%RTbool\n", pCtxInt->fWokenUpInternal));
+ for (unsigned i = 0; i < RT_ELEMENTS(pCtxInt->apReqsNewHead); i++)
+ LogFlow(("apReqsNewHead[%u]=%#p\n", i, pCtxInt->apReqsNewHead[i]));
+ LogFlow(("pReqToCancel=%#p\n", pCtxInt->pReqToCancel));
+ LogFlow(("pReqsWaitHead=%#p\n", pCtxInt->pReqsWaitHead));
+ LogFlow(("pReqsWaitTail=%#p\n", pCtxInt->pReqsWaitTail));
+ LogFlow(("cReqsWaitMax=%u\n", pCtxInt->cReqsWaitMax));
+ LogFlow(("iFirstFree=%u\n", pCtxInt->iFirstFree));
+ for (unsigned i = 0; i < pCtxInt->cReqsWaitMax; i++)
+ LogFlow(("apReqs[%u]=%#p\n", i, pCtxInt->apReqs[i]));
+}
+#endif
+
RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size_t cReqs)
{
int rc = VINF_SUCCESS;
@@ -588,6 +622,8 @@ RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size
AssertReturn(cReqs != 0, VERR_INVALID_POINTER);
AssertPtrReturn(pahReqs, VERR_INVALID_PARAMETER);
+ rtFileAioCtxDump(pCtxInt);
+
/* Check that we don't exceed the limit */
if (ASMAtomicUoReadS32(&pCtxInt->cRequests) + cReqs > pCtxInt->cMaxRequests)
return VERR_FILE_AIO_LIMIT_EXCEEDED;
@@ -631,6 +667,9 @@ RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size
pReqInt->pCtxInt = pCtxInt;
+ if (pReqInt->fFlush)
+ break;
+
/* Link them together. */
pReqInt->pNext = pHead;
if (pHead)
@@ -639,9 +678,6 @@ RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size
pHead = pReqInt;
RTFILEAIOREQ_SET_STATE(pReqInt, SUBMITTED);
- if (pReqInt->fFlush)
- break;
-
cReqsSubmit++;
i++;
}
@@ -712,12 +748,12 @@ RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size
}
}
ASMAtomicAddS32(&pCtxInt->cRequests, cReqsSubmitted);
- AssertMsg(pCtxInt->cRequests > 0, ("Adding requests resulted in overflow\n"));
+ AssertMsg(pCtxInt->cRequests >= 0, ("Adding requests resulted in overflow\n"));
break;
}
ASMAtomicAddS32(&pCtxInt->cRequests, cReqsSubmit);
- AssertMsg(pCtxInt->cRequests > 0, ("Adding requests resulted in overflow\n"));
+ AssertMsg(pCtxInt->cRequests >= 0, ("Adding requests resulted in overflow\n"));
cReqs -= cReqsSubmit;
pahReqs += cReqsSubmit;
}
@@ -731,7 +767,6 @@ RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size
if (cReqs && RT_SUCCESS_NP(rc))
{
pReqInt = pahReqs[0];
- RTFILEAIOREQ_VALID_RETURN(pReqInt);
if (pReqInt->fFlush)
{
@@ -742,26 +777,31 @@ RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size
rcPosix = aio_fsync(O_SYNC, &pReqInt->AioCB);
if (RT_UNLIKELY(rcPosix < 0))
{
- rc = RTErrConvertFromErrno(errno);
- RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
- pReqInt->Rc = rc;
- pReqInt->cbTransfered = 0;
-
- /* Unlink from the list. */
- PRTFILEAIOREQINTERNAL pNext, pPrev;
- pNext = pReqInt->pNext;
- pPrev = pReqInt->pPrev;
- if (pNext)
- pNext->pPrev = pPrev;
- if (pPrev)
- pPrev->pNext = pNext;
+ if (errno == EAGAIN)
+ {
+ rc = VERR_FILE_AIO_INSUFFICIENT_RESSOURCES;
+ RTFILEAIOREQ_SET_STATE(pReqInt, PREPARED);
+ }
else
- pHead = pNext;
+ {
+ rc = RTErrConvertFromErrno(errno);
+ RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
+ pReqInt->Rc = rc;
+ }
+ pReqInt->cbTransfered = 0;
break;
}
+ /* Link them together. */
+ pReqInt->pNext = pHead;
+ if (pHead)
+ pHead->pPrev = pReqInt;
+ pReqInt->pPrev = NULL;
+ pHead = pReqInt;
+ RTFILEAIOREQ_SET_STATE(pReqInt, SUBMITTED);
+
ASMAtomicIncS32(&pCtxInt->cRequests);
- AssertMsg(pCtxInt->cRequests > 0, ("Adding requests resulted in overflow\n"));
+ AssertMsg(pCtxInt->cRequests >= 0, ("Adding requests resulted in overflow\n"));
cReqs--;
pahReqs++;
}
@@ -803,6 +843,8 @@ RTDECL(int) RTFileAioCtxSubmit(RTFILEAIOCTX hAioCtx, PRTFILEAIOREQ pahReqs, size
rtFileAioCtxWakeup(pCtxInt);
}
+ rtFileAioCtxDump(pCtxInt);
+
return rc;
}
@@ -817,6 +859,9 @@ RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL
struct timespec *pTimeout = NULL;
uint64_t StartNanoTS = 0;
+ LogFlowFunc(("hAioCtx=%#p cMinReqs=%zu cMillies=%u pahReqs=%#p cReqs=%zu pcbReqs=%#p\n",
+ hAioCtx, cMinReqs, cMillies, pahReqs, cReqs, pcReqs));
+
/* Check parameters. */
AssertPtrReturn(pCtxInt, VERR_INVALID_HANDLE);
AssertPtrReturn(pcReqs, VERR_INVALID_POINTER);
@@ -824,6 +869,8 @@ RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL
AssertReturn(cReqs != 0, VERR_INVALID_PARAMETER);
AssertReturn(cReqs >= cMinReqs, VERR_OUT_OF_RANGE);
+ rtFileAioCtxDump(pCtxInt);
+
int32_t cRequestsWaiting = ASMAtomicReadS32(&pCtxInt->cRequests);
if (RT_UNLIKELY(cRequestsWaiting <= 0))
@@ -865,12 +912,16 @@ RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL
}
#endif
+ LogFlow(("Waiting for %d requests to complete\n", pCtxInt->iFirstFree));
+ rtFileAioCtxDump(pCtxInt);
+
ASMAtomicXchgBool(&pCtxInt->fWaiting, true);
int rcPosix = aio_suspend((const struct aiocb * const *)pCtxInt->apReqs,
pCtxInt->iFirstFree, pTimeout);
ASMAtomicXchgBool(&pCtxInt->fWaiting, false);
if (rcPosix < 0)
{
+ LogFlow(("aio_suspend failed %d nent=%u\n", errno, pCtxInt->iFirstFree));
/* Check that this is an external wakeup event. */
if (errno == EINTR)
rc = rtFileAioCtxProcessEvents(pCtxInt);
@@ -983,6 +1034,8 @@ RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL
Assert(pCtxInt->hThreadWait == RTThreadSelf());
ASMAtomicWriteHandle(&pCtxInt->hThreadWait, NIL_RTTHREAD);
+ rtFileAioCtxDump(pCtxInt);
+
return rc;
}
diff --git a/src/VBox/Runtime/r3/posix/pipe-posix.cpp b/src/VBox/Runtime/r3/posix/pipe-posix.cpp
index f414aee70..029bb411b 100644
--- a/src/VBox/Runtime/r3/posix/pipe-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/pipe-posix.cpp
@@ -1,4 +1,4 @@
-/* $Id: pipe-posix.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: pipe-posix.cpp 29559 2010-05-17 15:07:02Z vboxsync $ */
/** @file
* IPRT - Anonymous Pipes, POSIX Implementation.
*/
@@ -424,7 +424,7 @@ RTDECL(int) RTPipeReadBlocking(RTPIPE hPipe, void *pvBuf, size_t cbToRead, size_
int rc = rtPipeTryBlocking(pThis);
if (RT_SUCCESS(rc))
{
- size_t cbTotalRead = 0;;
+ size_t cbTotalRead = 0;
while (cbToRead > 0)
{
ssize_t cbRead = read(pThis->fd, pvBuf, RT_MIN(cbToRead, SSIZE_MAX));
@@ -433,7 +433,7 @@ RTDECL(int) RTPipeReadBlocking(RTPIPE hPipe, void *pvBuf, size_t cbToRead, size_
rc = RTErrConvertFromErrno(errno);
break;
}
- if (!cbRead && cbToRead > 0 && rtPipePosixHasHup(pThis))
+ if (!cbRead && rtPipePosixHasHup(pThis))
{
rc = VERR_BROKEN_PIPE;
break;
diff --git a/src/VBox/Runtime/r3/posix/process-posix.cpp b/src/VBox/Runtime/r3/posix/process-posix.cpp
index 19e857f98..412617bff 100644
--- a/src/VBox/Runtime/r3/posix/process-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/process-posix.cpp
@@ -1,4 +1,4 @@
-/* $Id: process-posix.cpp 29328 2010-05-11 10:14:47Z vboxsync $ */
+/* $Id: process-posix.cpp 29636 2010-05-18 13:43:55Z vboxsync $ */
/** @file
* IPRT - Process, POSIX.
*/
@@ -38,6 +38,11 @@
#include <sys/wait.h>
#include <fcntl.h>
#include <signal.h>
+#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS)
+# include <crypt.h>
+# include <pwd.h>
+# include <shadow.h>
+#endif
#if defined(RT_OS_LINUX) || defined(RT_OS_OS2)
# define HAVE_POSIX_SPAWN 1
#endif
@@ -58,9 +63,77 @@
#include <iprt/pipe.h>
#include <iprt/socket.h>
#include <iprt/string.h>
+#include <iprt/mem.h>
#include "internal/process.h"
+/**
+ * Check the credentials and return the gid/uid of user.
+ *
+ * @param pszUser username
+ * @param pszPasswd password
+ * @param gid where to store the GID of the user
+ * @param uid where to store the UID of the user
+ * @returns IPRT status code
+ */
+static int rtCheckCredentials(const char *pszUser, const char *pszPasswd, gid_t *gid, uid_t *uid)
+{
+#if defined(RT_OS_LINUX)
+ struct passwd *pw;
+
+ pw = getpwnam(pszUser);
+ if (!pw)
+ return VERR_PERMISSION_DENIED;
+
+ if (!pszPasswd)
+ pszPasswd = "";
+
+ struct spwd *spwd;
+ /* works only if /etc/shadow is accessible */
+ spwd = getspnam(pszUser);
+ if (spwd)
+ pw->pw_passwd = spwd->sp_pwdp;
+
+ /* be reentrant */
+ struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data));
+ char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data);
+ if (strcmp(pszEncPasswd, pw->pw_passwd))
+ return VERR_PERMISSION_DENIED;
+ RTMemTmpFree(data);
+
+ *gid = pw->pw_gid;
+ *uid = pw->pw_uid;
+ return VINF_SUCCESS;
+
+#elif defined(RT_OS_SOLARIS)
+ struct passwd *ppw, pw;
+ char szBuf[1024];
+
+ if (getpwnam_r(pszUser, &pw, szBuf, sizeof(szBuf), &ppw) != 0 || ppw == NULL)
+ return VERR_PERMISSION_DENIED;
+
+ if (!pszPasswd)
+ pszPasswd = "";
+
+ struct spwd spwd;
+ char szPwdBuf[1024];
+ /* works only if /etc/shadow is accessible */
+ if (getspnam_r(pszUser, &spwd, szPwdBuf, sizeof(szPwdBuf)) != NULL)
+ ppw->pw_passwd = spwd.sp_pwdp;
+
+ char *pszEncPasswd = crypt(pszPasswd, ppw->pw_passwd);
+ if (strcmp(pszEncPasswd, ppw->pw_passwd))
+ return VERR_PERMISSION_DENIED;
+
+ *gid = ppw->pw_gid;
+ *uid = ppw->pw_uid;
+ return VINF_SUCCESS;
+
+#else
+ return VERR_PERMISSION_DENIED;
+#endif
+}
+
RTR3DECL(int) RTProcCreate(const char *pszExec, const char * const *papszArgs, RTENV Env, unsigned fFlags, PRTPROCESS pProcess)
{
@@ -147,8 +220,9 @@ RTR3DECL(int) RTProcCreateEx(const char *pszExec, const char * const *papszArg
gid_t gid = ~(gid_t)0;
if (pszAsUser)
{
- AssertMsgFailed(("Implement get uid by name lookup\n"));
- return VERR_NOT_IMPLEMENTED;
+ rc = rtCheckCredentials(pszAsUser, pszPassword, &gid, &uid);
+ if (RT_FAILURE(rc))
+ return rc;
}
/*
diff --git a/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp b/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp
index 8a3b2bd18..3f5634264 100644
--- a/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp
+++ b/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp
@@ -1,4 +1,4 @@
-/* $Id: RTSystemQueryDmiString-solaris.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: RTSystemQueryDmiString-solaris.cpp 29560 2010-05-17 15:08:09Z vboxsync $ */
/** @file
* IPRT - RTSystemQueryDmiString, solaris ring-3.
*/
@@ -84,6 +84,7 @@ RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t c
case RTSYSDMISTR_PRODUCT_NAME: rc = RTStrCopy(pszBuf, cbBuf, hSMBInfo.smbi_product); break;
case RTSYSDMISTR_PRODUCT_VERSION: rc = RTStrCopy(pszBuf, cbBuf, hSMBInfo.smbi_version); break;
case RTSYSDMISTR_PRODUCT_SERIAL: rc = RTStrCopy(pszBuf, cbBuf, hSMBInfo.smbi_serial); break;
+ case RTSYSDMISTR_MANUFACTURER: rc = RTStrCopy(pszBuf, cbBuf, hSMBInfo.smbi_manufacturer); break;
default: /* make gcc happy */
rc = VERR_NOT_SUPPORTED;
diff --git a/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp b/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp
index f8ef7d142..af3b7b79b 100644
--- a/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp
+++ b/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp
@@ -1,4 +1,4 @@
-/* $Id: RTSystemQueryDmiString-win.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: RTSystemQueryDmiString-win.cpp 29578 2010-05-17 16:56:04Z vboxsync $ */
/** @file
* IPRT - RTSystemQueryDmiString, windows ring-3.
*/
@@ -59,6 +59,8 @@ static HRESULT rtSystemDmiWinInitialize(void)
NULL, /* Authentication info. */
EOAC_NONE, /* Additional capabilities. */
NULL); /* Reserved. */
+ if (hrc == RPC_E_TOO_LATE)
+ hrc = S_OK;
}
return hrc;
}
@@ -152,6 +154,8 @@ RTDECL(int) RTSystemQueryDmiString(RTSYSDMISTR enmString, char *pszBuf, size_t c
case RTSYSDMISTR_PRODUCT_VERSION: pszPropName = "Version"; break;
case RTSYSDMISTR_PRODUCT_UUID: pszPropName = "UUID"; break;
case RTSYSDMISTR_PRODUCT_SERIAL: pszPropName = "IdentifyingNumber"; break;
+ case RTSYSDMISTR_MANUFACTURER: pszPropName = "Vendor"; break;
+
default:
return VERR_NOT_SUPPORTED;
}
diff --git a/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp b/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp
index 9a3dde46d..d0c8f1098 100644
--- a/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp
+++ b/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp
@@ -1,4 +1,4 @@
-/* $Id: tstRTSystemQueryDmi.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: tstRTSystemQueryDmi.cpp 29560 2010-05-17 15:08:09Z vboxsync $ */
/** @file
* IPRT Testcase - RTSystemQueryDmi*.
*/
@@ -59,6 +59,9 @@ int main()
rc = RTSystemQueryDmiString(RTSYSDMISTR_PRODUCT_SERIAL, szInfo, sizeof(szInfo));
RTTestIPrintf(RTTESTLVL_ALWAYS, "PRODUCT_SERIAL: \"%s\", rc=%Rrc\n", szInfo, rc);
+ rc = RTSystemQueryDmiString(RTSYSDMISTR_MANUFACTURER, szInfo, sizeof(szInfo));
+ RTTestIPrintf(RTTESTLVL_ALWAYS, "MANUFACTURER: \"%s\", rc=%Rrc\n", szInfo, rc);
+
/*
* Check that unsupported stuff is terminated correctly.
*/
diff --git a/src/VBox/VMM/GMM.cpp b/src/VBox/VMM/GMM.cpp
index 7554b1ba5..c2d879389 100644
--- a/src/VBox/VMM/GMM.cpp
+++ b/src/VBox/VMM/GMM.cpp
@@ -1,4 +1,4 @@
-/* $Id: GMM.cpp 29424 2010-05-12 15:11:09Z vboxsync $ */
+/* $Id: GMM.cpp 29620 2010-05-18 12:15:55Z vboxsync $ */
/** @file
* GMM - Global Memory Manager, ring-3 request wrappers.
*/
@@ -289,7 +289,7 @@ GMMR3DECL(int) GMMR3BalloonedPages(PVM pVM, GMMBALLOONACTION enmAction, uint32_
/**
* @see GMMR0QueryVMMMemoryStatsReq
*/
-GMMR3DECL(int) GMMR3QueryHypervisorMemoryStats(PVM pVM, uint64_t *pcTotalAllocPages, uint64_t *pcTotalFreePages, uint64_t *pcTotalBalloonPages)
+GMMR3DECL(int) GMMR3QueryHypervisorMemoryStats(PVM pVM, uint64_t *pcTotalAllocPages, uint64_t *pcTotalFreePages, uint64_t *pcTotalBalloonPages, uint64_t *puTotalBalloonSize)
{
GMMMEMSTATSREQ Req;
Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
@@ -297,10 +297,12 @@ GMMR3DECL(int) GMMR3QueryHypervisorMemoryStats(PVM pVM, uint64_t *pcTotalAllocP
Req.cAllocPages = 0;
Req.cFreePages = 0;
Req.cBalloonedPages = 0;
+ Req.cSharedPages = 0;
*pcTotalAllocPages = 0;
*pcTotalFreePages = 0;
*pcTotalBalloonPages = 0;
+ *puTotalBalloonSize = 0;
/* Must be callable from any thread, so can't use VMMR3CallR0. */
int rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0, VMMR0_DO_GMM_QUERY_HYPERVISOR_MEM_STATS, 0, &Req.Hdr);
@@ -309,6 +311,7 @@ GMMR3DECL(int) GMMR3QueryHypervisorMemoryStats(PVM pVM, uint64_t *pcTotalAllocP
*pcTotalAllocPages = Req.cAllocPages;
*pcTotalFreePages = Req.cFreePages;
*pcTotalBalloonPages = Req.cBalloonedPages;
+ *puTotalBalloonSize = Req.cSharedPages;
}
return rc;
}
@@ -384,7 +387,10 @@ GMMR3DECL(int) GMMR3RegisterSharedModule(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pR
{
pReq->Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
pReq->Hdr.cbReq = RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[pReq->cRegions]);
- return VMMR3CallR0(pVM, VMMR0_DO_GMM_REGISTER_SHARED_MODULE, 0, &pReq->Hdr);
+ int rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_REGISTER_SHARED_MODULE, 0, &pReq->Hdr);
+ if (rc == VINF_SUCCESS)
+ rc = pReq->rc;
+ return rc;
}
/**
diff --git a/src/VBox/VMM/IOM.cpp b/src/VBox/VMM/IOM.cpp
index c21144de3..434b7d098 100644
--- a/src/VBox/VMM/IOM.cpp
+++ b/src/VBox/VMM/IOM.cpp
@@ -1,4 +1,4 @@
-/* $Id: IOM.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: IOM.cpp 29436 2010-05-12 20:57:57Z vboxsync $ */
/** @file
* IOM - Input / Output Monitor.
*/
@@ -465,19 +465,13 @@ PIOMMMIOSTATS iomR3MMIOStatsCreate(PVM pVM, RTGCPHYS GCPhys, const char *pszDesc
pStats->Core.Key = GCPhys;
if (RTAvloGCPhysInsert(&pVM->iom.s.pTreesR3->MMIOStatTree, &pStats->Core))
{
- /* register the statistics counters. */
- rc = STAMR3RegisterF(pVM, &pStats->ReadR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-R3", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->WriteR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-R3", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->ReadRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-RZ", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->WriteRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-RZ", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->ReadRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-RZtoR3", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->WriteRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-RZtoR3", GCPhys); AssertRC(rc);
-
- /* Profiling */
- rc = STAMR3RegisterF(pVM, &pStats->ProfReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp-Read-R3/Prof", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->ProfWriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp-Write-R3/Prof", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->ProfReadRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp-Read-RZ/Prof", GCPhys); AssertRC(rc);
- rc = STAMR3RegisterF(pVM, &pStats->ProfWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp-Write-RZ/Prof", GCPhys); AssertRC(rc);
+ rc = STAMR3RegisterF(pVM, &pStats->Accesses, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp", GCPhys); AssertRC(rc);
+ rc = STAMR3RegisterF(pVM, &pStats->ProfReadR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp/Read-R3", GCPhys); AssertRC(rc);
+ rc = STAMR3RegisterF(pVM, &pStats->ProfWriteR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp/Write-R3", GCPhys); AssertRC(rc);
+ rc = STAMR3RegisterF(pVM, &pStats->ProfReadRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp/Read-RZ", GCPhys); AssertRC(rc);
+ rc = STAMR3RegisterF(pVM, &pStats->ProfWriteRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc, "/IOM/MMIO/%RGp/Write-RZ", GCPhys); AssertRC(rc);
+ rc = STAMR3RegisterF(pVM, &pStats->ReadRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp/Read-RZtoR3", GCPhys); AssertRC(rc);
+ rc = STAMR3RegisterF(pVM, &pStats->WriteRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp/Write-RZtoR3", GCPhys); AssertRC(rc);
return pStats;
}
diff --git a/src/VBox/VMM/IOMInternal.h b/src/VBox/VMM/IOMInternal.h
index 1655e3d0d..2dfafa38c 100644
--- a/src/VBox/VMM/IOMInternal.h
+++ b/src/VBox/VMM/IOMInternal.h
@@ -1,4 +1,4 @@
-/* $Id: IOMInternal.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: IOMInternal.h 29436 2010-05-12 20:57:57Z vboxsync $ */
/** @file
* IOM - Internal header file.
*/
@@ -102,31 +102,25 @@ typedef struct IOMMMIOSTATS
/** Avl node core with the address as Key. */
AVLOGCPHYSNODECORE Core;
- /** Number of reads to this address from R3. */
- STAMCOUNTER ReadR3;
- /** Profiling read handler overhead in R3. */
- STAMPROFILEADV ProfReadR3;
+ /** Number of accesses (subtract ReadRZToR3 and WriteRZToR3 to get the right
+ * number). */
+ STAMCOUNTER Accesses;
- /** Number of writes to this address from R3. */
- STAMCOUNTER WriteR3;
+ /** Profiling read handler overhead in R3. */
+ STAMPROFILE ProfReadR3;
/** Profiling write handler overhead in R3. */
- STAMPROFILEADV ProfWriteR3;
+ STAMPROFILE ProfWriteR3;
+ /** Counting and profiling reads in R0/RC. */
+ STAMPROFILE ProfReadRZ;
+ /** Counting and profiling writes in R0/RC. */
+ STAMPROFILE ProfWriteRZ;
- /** Number of reads to this address from R0/RC. */
- STAMCOUNTER ReadRZ;
- /** Profiling read handler overhead in R0/RC. */
- STAMPROFILEADV ProfReadRZ;
/** Number of reads to this address from R0/RC which was serviced in R3. */
STAMCOUNTER ReadRZToR3;
-
- /** Number of writes to this address from R0/RC. */
- STAMCOUNTER WriteRZ;
- /** Profiling write handler overhead in R0/RC. */
- STAMPROFILEADV ProfWriteRZ;
/** Number of writes to this address from R0/RC which was serviced in R3. */
STAMCOUNTER WriteRZToR3;
} IOMMMIOSTATS;
-AssertCompileMemberAlignment(IOMMMIOSTATS, ReadR3, 8);
+AssertCompileMemberAlignment(IOMMMIOSTATS, Accesses, 8);
/** Pointer to I/O port statistics. */
typedef IOMMMIOSTATS *PIOMMMIOSTATS;
diff --git a/src/VBox/VMM/Makefile.kmk b/src/VBox/VMM/Makefile.kmk
index 51f914728..dd72ab3fc 100644
--- a/src/VBox/VMM/Makefile.kmk
+++ b/src/VBox/VMM/Makefile.kmk
@@ -1,4 +1,4 @@
-# $Id: Makefile.kmk 29329 2010-05-11 10:18:30Z vboxsync $
+# $Id: Makefile.kmk 29566 2010-05-17 15:23:06Z vboxsync $
## @file
# Top-level makefile for the VMM.
#
@@ -52,9 +52,6 @@ endif
ifdef VBOX_WITH_RAW_MODE
VMMR3_DEFS += VBOX_WITH_RAW_MODE
endif
-ifdef VBOX_WITH_PAGE_SHARING
- VMMR3_DEFS += VBOX_WITH_PAGE_SHARING
-endif
VMMR3_DEFS.darwin = VMM_R0_SWITCH_STACK
VMMR3_DEFS.darwin.x86 = \
VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3 \
@@ -431,9 +428,6 @@ endif
ifdef VBOX_WITH_RAW_MODE
VMMR0_DEFS += VBOX_WITH_RAW_MODE
endif
-ifdef VBOX_WITH_PAGE_SHARING
- VMMR0_DEFS += VBOX_WITH_PAGE_SHARING
-endif
VMMR0_DEFS.darwin = VMM_R0_SWITCH_STACK
VMMR0_DEFS.darwin.x86 = \
VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 \
@@ -459,6 +453,7 @@ VMMR0_SOURCES = \
VMMR0/PDMR0Device.cpp \
VMMR0/PDMR0Driver.cpp \
VMMR0/PGMR0.cpp \
+ VMMR0/PGMR0SharedPage.cpp \
VMMR0/TRPMR0.cpp \
VMMR0/TRPMR0A.asm \
VMMR0/VMMR0.cpp \
diff --git a/src/VBox/VMM/PDMAsyncCompletion.cpp b/src/VBox/VMM/PDMAsyncCompletion.cpp
index 8bd012d0a..9937ef1f3 100644
--- a/src/VBox/VMM/PDMAsyncCompletion.cpp
+++ b/src/VBox/VMM/PDMAsyncCompletion.cpp
@@ -1,4 +1,4 @@
-/* $Id: PDMAsyncCompletion.cpp 28853 2010-04-27 19:20:58Z vboxsync $ */
+/* $Id: PDMAsyncCompletion.cpp 29496 2010-05-14 19:09:40Z vboxsync $ */
/** @file
* PDM Async I/O - Transport data asynchronous in R3 using EMT.
*/
@@ -765,8 +765,8 @@ static PPDMASYNCCOMPLETIONTASK pdmR3AsyncCompletionGetTask(PPDMASYNCCOMPLETIONEN
/* Clear list pointers for safety. */
pTask->pPrev = NULL;
pTask->pNext = NULL;
-#ifdef VBOX_WITH_STATISTICS
pTask->tsNsStart = RTTimeNanoTS();
+#ifdef VBOX_WITH_STATISTICS
STAM_COUNTER_INC(&pEndpoint->StatIoOpsStarted);
#endif
}
@@ -784,9 +784,14 @@ static PPDMASYNCCOMPLETIONTASK pdmR3AsyncCompletionGetTask(PPDMASYNCCOMPLETIONEN
static void pdmR3AsyncCompletionPutTask(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, PPDMASYNCCOMPLETIONTASK pTask)
{
PPDMASYNCCOMPLETIONEPCLASS pEndpointClass = pEndpoint->pEpClass;
+ uint64_t tsRun = RTTimeNanoTS() - pTask->tsNsStart;
+
+ if (RT_UNLIKELY(tsRun >= (uint64_t)10*1000*1000*1000))
+ {
+ LogRel(("AsyncCompletion: Task completed after %llu seconds\n", tsRun / ((uint64_t)1000*1000*1000)));
+ }
#ifdef VBOX_WITH_STATISTICS
- uint64_t tsRun = RTTimeNanoTS() - pTask->tsNsStart;
uint64_t iStatIdx;
if (tsRun < 1000)
diff --git a/src/VBox/VMM/PDMAsyncCompletionFile.cpp b/src/VBox/VMM/PDMAsyncCompletionFile.cpp
index 03d7e1869..4d4c2c2d2 100644
--- a/src/VBox/VMM/PDMAsyncCompletionFile.cpp
+++ b/src/VBox/VMM/PDMAsyncCompletionFile.cpp
@@ -1,4 +1,4 @@
-/* $Id: PDMAsyncCompletionFile.cpp 29121 2010-05-06 09:09:33Z vboxsync $ */
+/* $Id: PDMAsyncCompletionFile.cpp 29587 2010-05-17 21:42:26Z vboxsync $ */
/** @file
* PDM Async I/O - Transport data asynchronous in R3 using EMT.
*/
@@ -631,11 +631,7 @@ static int pdmacFileInitialize(PPDMASYNCCOMPLETIONEPCLASS pClassGlobals, PCFGMNO
LogRel(("AIOMgr: Default manager type is \"%s\"\n", pdmacFileMgrTypeToName(pEpClassFile->enmMgrTypeOverride)));
/* Query default backend type */
-#ifndef RT_OS_LINUX
- rc = CFGMR3QueryStringAllocDef(pCfgNode, "FileBackend", &pszVal, "Buffered");
-#else /* Linux can't use buffered with async */
rc = CFGMR3QueryStringAllocDef(pCfgNode, "FileBackend", &pszVal, "NonBuffered");
-#endif
AssertLogRelRCReturn(rc, rc);
rc = pdmacFileBackendTypeFromName(pszVal, &pEpClassFile->enmEpBackendDefault);
@@ -657,12 +653,7 @@ static int pdmacFileInitialize(PPDMASYNCCOMPLETIONEPCLASS pClassGlobals, PCFGMNO
else
{
/* No configuration supplied, set defaults */
- pEpClassFile->enmMgrTypeOverride = PDMACEPFILEMGRTYPE_ASYNC;
-#ifdef RT_OS_LINUX
pEpClassFile->enmEpBackendDefault = PDMACFILEEPBACKEND_NON_BUFFERED;
-#else
- pEpClassFile->enmEpBackendDefault = PDMACFILEEPBACKEND_BUFFERED;
-#endif
}
}
@@ -671,7 +662,7 @@ static int pdmacFileInitialize(PPDMASYNCCOMPLETIONEPCLASS pClassGlobals, PCFGMNO
if (RT_SUCCESS(rc))
{
/* Check if the cache was disabled by the user. */
- rc = CFGMR3QueryBoolDef(pCfgNode, "CacheEnabled", &pEpClassFile->fCacheEnabled, false);
+ rc = CFGMR3QueryBoolDef(pCfgNode, "CacheEnabled", &pEpClassFile->fCacheEnabled, true);
AssertLogRelRCReturn(rc, rc);
if (pEpClassFile->fCacheEnabled)
@@ -920,11 +911,20 @@ static int pdmacFileEpRangesLockedDestroy(PAVLRFOFFNODECORE pNode, void *pvUser)
static int pdmacFileEpClose(PPDMASYNCCOMPLETIONENDPOINT pEndpoint)
{
+ int rc = VINF_SUCCESS;
PPDMASYNCCOMPLETIONENDPOINTFILE pEpFile = (PPDMASYNCCOMPLETIONENDPOINTFILE)pEndpoint;
PPDMASYNCCOMPLETIONEPCLASSFILE pEpClassFile = (PPDMASYNCCOMPLETIONEPCLASSFILE)pEndpoint->pEpClass;
+ /* Free the cached data. */
+ if (pEpFile->fCaching)
+ {
+ rc = pdmacFileEpCacheFlush(pEpFile);
+ AssertRC(rc);
+ pdmacFileEpCacheDestroy(pEpFile);
+ }
+
/* Make sure that all tasks finished for this endpoint. */
- int rc = pdmacFileAioMgrCloseEndpoint(pEpFile->pAioMgr, pEpFile);
+ rc = pdmacFileAioMgrCloseEndpoint(pEpFile->pAioMgr, pEpFile);
AssertRC(rc);
/* endpoint and real file size should better be equal now. */
@@ -948,10 +948,6 @@ static int pdmacFileEpClose(PPDMASYNCCOMPLETIONENDPOINT pEndpoint)
MMR3HeapFree(pTaskFree);
}
- /* Free the cached data. */
- if (pEpFile->fCaching)
- pdmacFileEpCacheDestroy(pEpFile);
-
/* Remove from the bandwidth manager */
pdmacFileBwUnref(pEpFile->pBwMgr);
@@ -1040,7 +1036,7 @@ static int pdmacFileEpFlush(PPDMASYNCCOMPLETIONTASK pTask,
if (pEpFile->fCaching)
{
- int rc = pdmacFileEpCacheFlush(pEpFile, pTaskFile);
+ int rc = pdmacFileEpCacheFlush(pEpFile);
AssertRC(rc);
}
diff --git a/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp b/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp
index fde50846f..da10bcb79 100644
--- a/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp
+++ b/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp
@@ -1,4 +1,4 @@
-/* $Id: PDMAsyncCompletionFileCache.cpp 29250 2010-05-09 17:53:58Z vboxsync $ */
+/* $Id: PDMAsyncCompletionFileCache.cpp 29587 2010-05-17 21:42:26Z vboxsync $ */
/** @file
* PDM Async I/O - Transport data asynchronous in R3 using EMT.
* File data cache.
@@ -1143,9 +1143,17 @@ static int pdmacFileEpCacheEntryDestroy(PAVLRFOFFNODECORE pNode, void *pvUser)
while (ASMAtomicReadU32(&pEntry->fFlags) & (PDMACFILECACHE_ENTRY_IO_IN_PROGRESS | PDMACFILECACHE_ENTRY_IS_DIRTY))
{
+ /* Leave the locks to let the I/O thread make progress but reference the entry to prevent eviction. */
+ pdmacFileEpCacheEntryRef(pEntry);
RTSemRWReleaseWrite(pEndpointCache->SemRWEntries);
+ pdmacFileCacheLockLeave(pCache);
+
RTThreadSleep(250);
+
+ /* Re-enter all locks */
+ pdmacFileCacheLockEnter(pCache);
RTSemRWRequestWrite(pEndpointCache->SemRWEntries, RT_INDEFINITE_WAIT);
+ pdmacFileEpCacheEntryRelease(pEntry);
}
AssertMsg(!(pEntry->fFlags & (PDMACFILECACHE_ENTRY_IO_IN_PROGRESS | PDMACFILECACHE_ENTRY_IS_DIRTY)),
@@ -2174,12 +2182,11 @@ int pdmacFileEpCacheWrite(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCO
return rc;
}
-int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCOMPLETIONTASKFILE pTask)
+int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint)
{
int rc = VINF_SUCCESS;
- LogFlowFunc((": pEndpoint=%#p{%s} pTask=%#p\n",
- pEndpoint, pEndpoint->Core.pszUri, pTask));
+ LogFlowFunc((": pEndpoint=%#p{%s}\n", pEndpoint, pEndpoint->Core.pszUri));
/* Commit dirty entries in the cache. */
pdmacFileCacheEndpointCommit(&pEndpoint->DataCache);
diff --git a/src/VBox/VMM/PDMAsyncCompletionFileInternal.h b/src/VBox/VMM/PDMAsyncCompletionFileInternal.h
index 44bbe1b22..391dacb54 100644
--- a/src/VBox/VMM/PDMAsyncCompletionFileInternal.h
+++ b/src/VBox/VMM/PDMAsyncCompletionFileInternal.h
@@ -1,4 +1,4 @@
-/* $Id: PDMAsyncCompletionFileInternal.h 29323 2010-05-11 10:04:23Z vboxsync $ */
+/* $Id: PDMAsyncCompletionFileInternal.h 29587 2010-05-17 21:42:26Z vboxsync $ */
/** @file
* PDM Async I/O - Transport data asynchronous in R3 using EMT.
*/
@@ -403,8 +403,6 @@ typedef struct PDMACFILEENDPOINTCACHE
/** Node of the cache endpoint list. */
RTLISTNODE NodeCacheEndpoint;
#ifdef VBOX_WITH_STATISTICS
- /** Alignment */
- bool afAlignment[3];
/** Number of times a write was deferred because the cache entry was still in progress */
STAMCOUNTER StatWriteDeferred;
#endif
@@ -429,21 +427,6 @@ typedef enum PDMACFILEEPBACKEND
typedef PDMACFILEEPBACKEND *PPDMACFILEEPBACKEND;
/**
- * Backend type for the endpoint.
- */
-typedef enum PDMACFILEEPBACKEND
-{
- /** Non buffered. */
- PDMACFILEEPBACKEND_NON_BUFFERED = 0,
- /** Buffered (i.e host cache enabled) */
- PDMACFILEEPBACKEND_BUFFERED,
- /** 32bit hack */
- PDMACFILEEPBACKEND_32BIT_HACK = 0x7fffffff
-} PDMACFILEEPBACKEND;
-/** Pointer to a backend type. */
-typedef PDMACFILEEPBACKEND *PPDMACFILEEPBACKEND;
-
-/**
* Global data for the file endpoint class.
*/
typedef struct PDMASYNCCOMPLETIONEPCLASSFILE
@@ -685,6 +668,11 @@ typedef struct PDMACTASKFILE
uint32_t offBounceBuffer;
/** Flag whether this is a prefetch request. */
bool fPrefetch;
+ /** Already prepared native I/O request.
+ * Used if the request is prepared already but
+ * was not queued because the host has not enough
+ * resources. */
+ RTFILEAIOREQ hReq;
/** Completion function to call on completion. */
PFNPDMACTASKCOMPLETED pfnCompleted;
/** User data */
@@ -738,7 +726,7 @@ int pdmacFileEpCacheRead(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCOM
int pdmacFileEpCacheWrite(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCOMPLETIONTASKFILE pTask,
RTFOFF off, PCRTSGSEG paSegments, size_t cSegments,
size_t cbWrite);
-int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCOMPLETIONTASKFILE pTask);
+int pdmacFileEpCacheFlush(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint);
RT_C_DECLS_END
diff --git a/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp b/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
index 92b10f400..bde1ee239 100644
--- a/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
+++ b/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
@@ -1,4 +1,4 @@
-/* $Id: PDMAsyncCompletionFileNormal.cpp 29228 2010-05-07 17:08:58Z vboxsync $ */
+/* $Id: PDMAsyncCompletionFileNormal.cpp 29474 2010-05-14 14:56:39Z vboxsync $ */
/** @file
* PDM Async I/O - Transport data asynchronous in R3 using EMT.
* Async File I/O manager.
@@ -595,22 +595,8 @@ static int pdmacFileAioMgrNormalReqsEnqueue(PPDMACEPFILEMGR pAioMgr,
if (rc == VERR_FILE_AIO_INSUFFICIENT_RESSOURCES)
{
- PPDMACTASKFILE pTasksWaiting;
-
- pdmacFileAioMgrNormalRequestFree(pAioMgr, pahReqs[i]);
-
- if (pTask->cbBounceBuffer)
- RTMemPageFree(pTask->pvBounceBuffer, pTask->cbBounceBuffer);
-
- pTask->fPrefetch = false;
- pTask->cbBounceBuffer = 0;
-
- /* Free the lock and process pending tasks if neccessary */
- pTasksWaiting = pdmacFileAioMgrNormalRangeLockFree(pAioMgr, pEndpoint, pTask->pRangeLock);
-
+ pTask->hReq = pahReqs[i];
pdmacFileAioMgrEpAddTask(pEndpoint, pTask);
- if (pTasksWaiting)
- pdmacFileAioMgrEpAddTaskList(pEndpoint, pTasksWaiting);
}
else
{
@@ -626,6 +612,8 @@ static int pdmacFileAioMgrNormalReqsEnqueue(PPDMACEPFILEMGR pAioMgr,
{
int rc2 = RTFileAioCtxSubmit(pAioMgr->hAioCtx, ahReqsResubmit, cReqsResubmit);
AssertRC(rc2);
+ pEndpoint->AioMgr.cRequestsActive += cReqsResubmit;
+ pAioMgr->cRequestsActive += cReqsResubmit;
cReqsResubmit = 0;
}
}
@@ -635,6 +623,8 @@ static int pdmacFileAioMgrNormalReqsEnqueue(PPDMACEPFILEMGR pAioMgr,
{
int rc2 = RTFileAioCtxSubmit(pAioMgr->hAioCtx, ahReqsResubmit, cReqsResubmit);
AssertRC(rc2);
+ pEndpoint->AioMgr.cRequestsActive += cReqsResubmit;
+ pAioMgr->cRequestsActive += cReqsResubmit;
cReqsResubmit = 0;
}
else if ( pEndpoint->pFlushReq
@@ -1028,6 +1018,8 @@ static int pdmacFileAioMgrNormalProcessTaskList(PPDMACTASKFILE pTaskHead,
RTFILEAIOREQ hReq = pdmacFileAioMgrNormalRequestAlloc(pAioMgr);
AssertMsg(hReq != NIL_RTFILEAIOREQ, ("Out of request handles\n"));
+ LogFlow(("Flush request %#p\n", hReq));
+
rc = RTFileAioReqPrepareFlush(hReq, pEndpoint->File, pCurr);
if (RT_FAILURE(rc))
{
@@ -1061,19 +1053,28 @@ static int pdmacFileAioMgrNormalProcessTaskList(PPDMACTASKFILE pTaskHead,
{
RTFILEAIOREQ hReq = NIL_RTFILEAIOREQ;
- if (pEndpoint->enmBackendType == PDMACFILEEPBACKEND_BUFFERED)
- rc = pdmacFileAioMgrNormalTaskPrepareBuffered(pAioMgr, pEndpoint, pCurr, &hReq);
- else if (pEndpoint->enmBackendType == PDMACFILEEPBACKEND_NON_BUFFERED)
- rc = pdmacFileAioMgrNormalTaskPrepareNonBuffered(pAioMgr, pEndpoint, pCurr, &hReq);
+ if (pCurr->hReq == NIL_RTFILEAIOREQ)
+ {
+ if (pEndpoint->enmBackendType == PDMACFILEEPBACKEND_BUFFERED)
+ rc = pdmacFileAioMgrNormalTaskPrepareBuffered(pAioMgr, pEndpoint, pCurr, &hReq);
+ else if (pEndpoint->enmBackendType == PDMACFILEEPBACKEND_NON_BUFFERED)
+ rc = pdmacFileAioMgrNormalTaskPrepareNonBuffered(pAioMgr, pEndpoint, pCurr, &hReq);
+ else
+ AssertMsgFailed(("Invalid backend type %d\n", pEndpoint->enmBackendType));
+
+ AssertRC(rc);
+ }
else
- AssertMsgFailed(("Invalid backend type %d\n", pEndpoint->enmBackendType));
+ {
+ LogFlow(("Task %#p has I/O request %#p already\n", pCurr, pCurr->hReq));
+ hReq = pCurr->hReq;
+ }
- AssertRC(rc);
+ LogFlow(("Read/Write request %#p\n", hReq));
if (hReq != NIL_RTFILEAIOREQ)
{
apReqs[cRequests] = hReq;
- pEndpoint->AioMgr.cReqsProcessed++;
cRequests++;
}
break;
@@ -1340,8 +1341,16 @@ static void pdmacFileAioMgrNormalReqComplete(PPDMACEPFILEMGR pAioMgr, RTFILEAIOR
PPDMACTASKFILE pTask = (PPDMACTASKFILE)RTFileAioReqGetUser(hReq);
PPDMACTASKFILE pTasksWaiting;
+ LogFlowFunc(("pAioMgr=%#p hReq=%#p\n", pAioMgr, hReq));
+
pEndpoint = pTask->pEndpoint;
+ pTask->hReq = NIL_RTFILEAIOREQ;
+
+ pAioMgr->cRequestsActive--;
+ pEndpoint->AioMgr.cRequestsActive--;
+ pEndpoint->AioMgr.cReqsProcessed++;
+
/*
* It is possible that the request failed on Linux with kernels < 2.6.23
* if the passed buffer was allocated with remap_pfn_range or if the file
@@ -1353,10 +1362,6 @@ static void pdmacFileAioMgrNormalReqComplete(PPDMACEPFILEMGR pAioMgr, RTFILEAIOR
/* Free bounce buffers and the IPRT request. */
pdmacFileAioMgrNormalRequestFree(pAioMgr, hReq);
- pAioMgr->cRequestsActive--;
- pEndpoint->AioMgr.cRequestsActive--;
- pEndpoint->AioMgr.cReqsProcessed++;
-
if (pTask->enmTransferType == PDMACTASKFILETRANSFER_FLUSH)
{
LogFlow(("Async flushes are not supported for this endpoint, disabling\n"));
@@ -1431,10 +1436,6 @@ static void pdmacFileAioMgrNormalReqComplete(PPDMACEPFILEMGR pAioMgr, RTFILEAIOR
pEndpoint->pFlushReq = NULL;
pdmacFileAioMgrNormalRequestFree(pAioMgr, hReq);
- pAioMgr->cRequestsActive--;
- pEndpoint->AioMgr.cRequestsActive--;
- pEndpoint->AioMgr.cReqsProcessed++;
-
/* Call completion callback */
LogFlow(("Flush task=%#p completed with %Rrc\n", pTask, rcReq));
pTask->pfnCompleted(pTask, pTask->pvUser, rcReq);
@@ -1489,11 +1490,12 @@ static void pdmacFileAioMgrNormalReqComplete(PPDMACEPFILEMGR pAioMgr, RTFILEAIOR
}
AssertRC(rc);
- rc = RTFileAioCtxSubmit(pAioMgr->hAioCtx, &hReq, 1);
- AssertRC(rc);
- }
- else if (pTask->fPrefetch)
- {
+ rc = pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &hReq, 1);
+ AssertMsg(RT_SUCCESS(rc) || (rc == VERR_FILE_AIO_INSUFFICIENT_RESSOURCES),
+ ("Unexpected return code rc=%Rrc\n", rc));
+ }
+ else if (pTask->fPrefetch)
+ {
Assert(pTask->enmTransferType == PDMACTASKFILETRANSFER_WRITE);
Assert(pTask->cbBounceBuffer);
@@ -1516,8 +1518,9 @@ static void pdmacFileAioMgrNormalReqComplete(PPDMACEPFILEMGR pAioMgr, RTFILEAIOR
rc = RTFileAioReqPrepareWrite(hReq, pEndpoint->File,
offStart, pTask->pvBounceBuffer, cbToTransfer, pTask);
AssertRC(rc);
- rc = RTFileAioCtxSubmit(pAioMgr->hAioCtx, &hReq, 1);
- AssertRC(rc);
+ rc = pdmacFileAioMgrNormalReqsEnqueue(pAioMgr, pEndpoint, &hReq, 1);
+ AssertMsg(RT_SUCCESS(rc) || (rc == VERR_FILE_AIO_INSUFFICIENT_RESSOURCES),
+ ("Unexpected return code rc=%Rrc\n", rc));
}
else
{
@@ -1533,14 +1536,13 @@ static void pdmacFileAioMgrNormalReqComplete(PPDMACEPFILEMGR pAioMgr, RTFILEAIOR
pdmacFileAioMgrNormalRequestFree(pAioMgr, hReq);
- pAioMgr->cRequestsActive--;
- pEndpoint->AioMgr.cRequestsActive--;
- pEndpoint->AioMgr.cReqsProcessed++;
-
/* Free the lock and process pending tasks if neccessary */
pTasksWaiting = pdmacFileAioMgrNormalRangeLockFree(pAioMgr, pEndpoint, pTask->pRangeLock);
- rc = pdmacFileAioMgrNormalProcessTaskList(pTasksWaiting, pAioMgr, pEndpoint);
- AssertRC(rc);
+ if (pTasksWaiting)
+ {
+ rc = pdmacFileAioMgrNormalProcessTaskList(pTasksWaiting, pAioMgr, pEndpoint);
+ AssertRC(rc);
+ }
/* Call completion callback */
LogFlow(("Task=%#p completed with %Rrc\n", pTask, rcReq));
@@ -1642,12 +1644,12 @@ int pdmacFileAioMgrNormal(RTTHREAD ThreadSelf, void *pvUser)
else
cReqsWait = pAioMgr->cRequestsActive;
- LogFlow(("Waiting for %d of %d tasks to complete\n", pAioMgr->cRequestsActive, cReqsWait));
+ LogFlow(("Waiting for %d of %d tasks to complete\n", 1, cReqsWait));
rc = RTFileAioCtxWait(pAioMgr->hAioCtx,
- cReqsWait,
+ 1,
RT_INDEFINITE_WAIT, apReqs,
- RT_ELEMENTS(apReqs), &cReqsCompleted);
+ cReqsWait, &cReqsCompleted);
if (RT_FAILURE(rc) && (rc != VERR_INTERRUPTED))
CHECK_RC(pAioMgr, rc);
diff --git a/src/VBox/VMM/PDMAsyncCompletionInternal.h b/src/VBox/VMM/PDMAsyncCompletionInternal.h
index 4568de567..cf5789b28 100644
--- a/src/VBox/VMM/PDMAsyncCompletionInternal.h
+++ b/src/VBox/VMM/PDMAsyncCompletionInternal.h
@@ -1,4 +1,4 @@
-/* $Id: PDMAsyncCompletionInternal.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: PDMAsyncCompletionInternal.h 29496 2010-05-14 19:09:40Z vboxsync $ */
/** @file
* PDM - Pluggable Device Manager, Async I/O Completion internal header.
*/
@@ -236,10 +236,8 @@ typedef struct PDMASYNCCOMPLETIONTASK
void *pvUser;
/** Task id. */
uint32_t uTaskId;
-#ifdef VBOX_WITH_STATISTICS
/** Start timestamp. */
uint64_t tsNsStart;
-#endif
} PDMASYNCCOMPLETIONTASK;
/**
diff --git a/src/VBox/VMM/PDMDevHlp.cpp b/src/VBox/VMM/PDMDevHlp.cpp
index e94b96fa9..8a55437d8 100644
--- a/src/VBox/VMM/PDMDevHlp.cpp
+++ b/src/VBox/VMM/PDMDevHlp.cpp
@@ -1,4 +1,4 @@
-/* $Id: PDMDevHlp.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: PDMDevHlp.cpp 29521 2010-05-17 10:14:22Z vboxsync $ */
/** @file
* PDM - Pluggable Device and Driver Manager, Device Helpers.
*/
@@ -35,6 +35,7 @@
#include <VBox/err.h>
#include <iprt/asm.h>
#include <iprt/assert.h>
+#include <iprt/ctype.h>
#include <iprt/string.h>
#include <iprt/thread.h>
@@ -1851,6 +1852,55 @@ static DECLCALLBACK(int) pdmR3DevHlp_LdrGetR0InterfaceSymbols(PPDMDEVINS pDevIns
}
+/** @interface_method_impl{PDMDEVHLP,pfnCallR0} */
+static DECLCALLBACK(int) pdmR3DevHlp_CallR0(PPDMDEVINS pDevIns, uint32_t uOperation, uint64_t u64Arg)
+{
+ PDMDEV_ASSERT_DEVINS(pDevIns);
+ PVM pVM = pDevIns->Internal.s.pVMR3;
+ VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
+ LogFlow(("pdmR3DevHlp_CallR0: caller='%s'/%d: uOperation=%#x u64Arg=%#RX64\n",
+ pDevIns->pReg->szName, pDevIns->iInstance, uOperation, u64Arg));
+
+ /*
+ * Resolve the ring-0 entry point. There is not need to remember this like
+ * we do for drivers since this is mainly for construction time hacks and
+ * other things that aren't performance critical.
+ */
+ int rc;
+ if (pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_R0)
+ {
+ char szSymbol[ sizeof("devR0") + sizeof(pDevIns->pReg->szName) + sizeof("ReqHandler")];
+ strcat(strcat(strcpy(szSymbol, "devR0"), pDevIns->pReg->szName), "ReqHandler");
+ szSymbol[sizeof("devR0") - 1] = RT_C_TO_UPPER(szSymbol[sizeof("devR0") - 1]);
+
+ PFNPDMDRVREQHANDLERR0 pfnReqHandlerR0;
+ rc = PDMR3LdrGetSymbolR0Lazy(pVM, pDevIns->pReg->szR0Mod, szSymbol, &pfnReqHandlerR0);
+ if (RT_SUCCESS(rc))
+ {
+ /*
+ * Make the ring-0 call.
+ */
+ PDMDEVICECALLREQHANDLERREQ Req;
+ Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
+ Req.Hdr.cbReq = sizeof(Req);
+ Req.pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
+ Req.pfnReqHandlerR0 = pfnReqHandlerR0;
+ Req.uOperation = uOperation;
+ Req.u32Alignment = 0;
+ Req.u64Arg = u64Arg;
+ rc = SUPR3CallVMMR0Ex(pVM->pVMR0, NIL_VMCPUID, VMMR0_DO_PDM_DEVICE_CALL_REQ_HANDLER, 0, &Req.Hdr);
+ }
+ else
+ pfnReqHandlerR0 = NIL_RTR0PTR;
+ }
+ else
+ rc = VERR_ACCESS_DENIED;
+ LogFlow(("pdmR3DevHlp_CallR0: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName,
+ pDevIns->iInstance, rc));
+ return rc;
+}
+
+
/** @interface_method_impl{PDMDEVHLPR3,pfnGetVM} */
static DECLCALLBACK(PVM) pdmR3DevHlp_GetVM(PPDMDEVINS pDevIns)
{
@@ -2927,6 +2977,7 @@ const PDMDEVHLPR3 g_pdmR3DevHlpTrusted =
pdmR3DevHlp_AssertOther,
pdmR3DevHlp_LdrGetRCInterfaceSymbols,
pdmR3DevHlp_LdrGetR0InterfaceSymbols,
+ pdmR3DevHlp_CallR0,
0,
0,
0,
@@ -3122,6 +3173,7 @@ const PDMDEVHLPR3 g_pdmR3DevHlpUnTrusted =
pdmR3DevHlp_AssertOther,
pdmR3DevHlp_LdrGetRCInterfaceSymbols,
pdmR3DevHlp_LdrGetR0InterfaceSymbols,
+ pdmR3DevHlp_CallR0,
0,
0,
0,
diff --git a/src/VBox/VMM/PDMDriver.cpp b/src/VBox/VMM/PDMDriver.cpp
index abdd9297e..9939a9b7b 100644
--- a/src/VBox/VMM/PDMDriver.cpp
+++ b/src/VBox/VMM/PDMDriver.cpp
@@ -1,4 +1,4 @@
-/* $Id: PDMDriver.cpp 28853 2010-04-27 19:20:58Z vboxsync $ */
+/* $Id: PDMDriver.cpp 29521 2010-05-17 10:14:22Z vboxsync $ */
/** @file
* PDM - Pluggable Device and Driver Manager, Driver parts.
*/
@@ -32,11 +32,12 @@
#include <VBox/log.h>
#include <iprt/assert.h>
-#include <iprt/thread.h>
-#include <iprt/string.h>
#include <iprt/asm.h>
-#include <iprt/alloc.h>
+#include <iprt/ctype.h>
+#include <iprt/mem.h>
+#include <iprt/thread.h>
#include <iprt/path.h>
+#include <iprt/string.h>
/*******************************************************************************
@@ -1318,6 +1319,8 @@ static DECLCALLBACK(int) pdmR3DrvHlp_CallR0(PPDMDRVINS pDrvIns, uint32_t uOperat
{
char szSymbol[ sizeof("drvR0") + sizeof(pDrvIns->pReg->szName) + sizeof("ReqHandler")];
strcat(strcat(strcpy(szSymbol, "drvR0"), pDrvIns->pReg->szName), "ReqHandler");
+ szSymbol[sizeof("drvR0") - 1] = RT_C_TO_UPPER(szSymbol[sizeof("drvR0") - 1]);
+
rc = PDMR3LdrGetSymbolR0Lazy(pVM, pDrvIns->pReg->szR0Mod, szSymbol, &pfnReqHandlerR0);
if (RT_SUCCESS(rc))
pDrvIns->Internal.s.pfnReqHandlerR0 = pfnReqHandlerR0;
diff --git a/src/VBox/VMM/PDMInternal.h b/src/VBox/VMM/PDMInternal.h
index eae28cb04..f148e28ce 100644
--- a/src/VBox/VMM/PDMInternal.h
+++ b/src/VBox/VMM/PDMInternal.h
@@ -1,10 +1,10 @@
-/* $Id: PDMInternal.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: PDMInternal.h 29521 2010-05-17 10:14:22Z vboxsync $ */
/** @file
* PDM - Internal header file.
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/VMM/PGM.cpp b/src/VBox/VMM/PGM.cpp
index 5dbad08f5..4957e2f90 100644
--- a/src/VBox/VMM/PGM.cpp
+++ b/src/VBox/VMM/PGM.cpp
@@ -1,4 +1,4 @@
-/* $Id: PGM.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: PGM.cpp 29646 2010-05-18 15:44:08Z vboxsync $ */
/** @file
* PGM - Page Manager and Monitor. (Mixing stuff here, not good?)
*/
@@ -1563,6 +1563,7 @@ static void pgmR3InitStats(PVM pVM)
STAM_REL_REG(pVM, &pPGM->cAllPages, STAMTYPE_U32, "/PGM/Page/cAllPages", STAMUNIT_COUNT, "The total number of pages.");
STAM_REL_REG(pVM, &pPGM->cPrivatePages, STAMTYPE_U32, "/PGM/Page/cPrivatePages", STAMUNIT_COUNT, "The number of private pages.");
STAM_REL_REG(pVM, &pPGM->cSharedPages, STAMTYPE_U32, "/PGM/Page/cSharedPages", STAMUNIT_COUNT, "The number of shared pages.");
+ STAM_REL_REG(pVM, &pPGM->cReusedSharedPages, STAMTYPE_U32, "/PGM/Page/cReusedSharedPages", STAMUNIT_COUNT, "The number of reused shared pages.");
STAM_REL_REG(pVM, &pPGM->cZeroPages, STAMTYPE_U32, "/PGM/Page/cZeroPages", STAMUNIT_COUNT, "The number of zero backed pages.");
STAM_REL_REG(pVM, &pPGM->cPureMmioPages, STAMTYPE_U32, "/PGM/Page/cPureMmioPages", STAMUNIT_COUNT, "The number of pure MMIO pages.");
STAM_REL_REG(pVM, &pPGM->cMonitoredPages, STAMTYPE_U32, "/PGM/Page/cMonitoredPages", STAMUNIT_COUNT, "The number of write monitored pages.");
@@ -2328,6 +2329,11 @@ static DECLCALLBACK(void) pgmR3ResetNoMorePhysWritesFlag(PVM pVM, VMSTATE enmSta
*/
VMMR3DECL(int) PGMR3Term(PVM pVM)
{
+ /* Must free shared pages here. */
+ pgmLock(pVM);
+ pgmR3PhysRamTerm(pVM);
+ pgmUnlock(pVM);
+
PGMDeregisterStringFormatTypes();
return PDMR3CritSectDelete(&pVM->pgm.s.CritSect);
}
diff --git a/src/VBox/VMM/PGMInternal.h b/src/VBox/VMM/PGMInternal.h
index 4723f58aa..e8948e67f 100644
--- a/src/VBox/VMM/PGMInternal.h
+++ b/src/VBox/VMM/PGMInternal.h
@@ -1,4 +1,4 @@
-/* $Id: PGMInternal.h 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: PGMInternal.h 29646 2010-05-18 15:44:08Z vboxsync $ */
/** @file
* PGM - Internal header file.
*/
@@ -2804,6 +2804,7 @@ typedef struct PGM
uint32_t cAllPages; /**< The total number of pages. (Should be Private + Shared + Zero + Pure MMIO.) */
uint32_t cPrivatePages; /**< The number of private pages. */
uint32_t cSharedPages; /**< The number of shared pages. */
+ uint32_t cReusedSharedPages; /**< The number of reused shared pages. */
uint32_t cZeroPages; /**< The number of zero backed pages. */
uint32_t cPureMmioPages; /**< The number of pure MMIO pages. */
uint32_t cMonitoredPages; /**< The number of write monitored pages. */
@@ -2811,7 +2812,7 @@ typedef struct PGM
uint32_t cWriteLockedPages; /**< The number of write locked pages. */
uint32_t cReadLockedPages; /**< The number of read locked pages. */
uint32_t cBalloonedPages; /**< The number of ballooned pages. */
- uint32_t aAlignment4[1];
+/* uint32_t aAlignment4[1]; */
/** The number of times we were forced to change the hypervisor region location. */
STAMCOUNTER cRelocations;
@@ -3394,6 +3395,7 @@ int pgmR3PhysRamPreAllocate(PVM pVM);
int pgmR3PhysRamReset(PVM pVM);
int pgmR3PhysRomReset(PVM pVM);
int pgmR3PhysChunkMap(PVM pVM, uint32_t idChunk, PPPGMCHUNKR3MAP ppChunk);
+int pgmR3PhysRamTerm(PVM pVM);
int pgmR3PoolInit(PVM pVM);
void pgmR3PoolRelocate(PVM pVM);
diff --git a/src/VBox/VMM/PGMPhys.cpp b/src/VBox/VMM/PGMPhys.cpp
index 7ee9beeed..d30fc87e5 100644
--- a/src/VBox/VMM/PGMPhys.cpp
+++ b/src/VBox/VMM/PGMPhys.cpp
@@ -1,4 +1,4 @@
-/* $Id: PGMPhys.cpp 29319 2010-05-11 09:31:01Z vboxsync $ */
+/* $Id: PGMPhys.cpp 29646 2010-05-18 15:44:08Z vboxsync $ */
/** @file
* PGM - Page Manager and Monitor, Physical Memory Addressing.
*/
@@ -966,13 +966,14 @@ VMMR3DECL(int) PGMR3PhysChangeMemBalloon(PVM pVM, bool fInflate, unsigned cPages
* @param puTotalAllocSize Pointer to total allocated memory inside VMMR0 (in bytes)
* @param puTotalFreeSize Pointer to total free (allocated but not used yet) memory inside VMMR0 (in bytes)
* @param puTotalBalloonSize Pointer to total ballooned memory inside VMMR0 (in bytes)
+ * @param puTotalSharedSize Pointer to total shared memory inside VMMR0 (in bytes)
*/
-VMMR3DECL(int) PGMR3QueryVMMMemoryStats(PVM pVM, uint64_t *puTotalAllocSize, uint64_t *puTotalFreeSize, uint64_t *puTotalBalloonSize)
+VMMR3DECL(int) PGMR3QueryVMMMemoryStats(PVM pVM, uint64_t *puTotalAllocSize, uint64_t *puTotalFreeSize, uint64_t *puTotalBalloonSize, uint64_t *puTotalSharedSize)
{
int rc;
- uint64_t cAllocPages = 0, cFreePages = 0, cBalloonPages = 0;
- rc = GMMR3QueryHypervisorMemoryStats(pVM, &cAllocPages, &cFreePages, &cBalloonPages);
+ uint64_t cAllocPages = 0, cFreePages = 0, cBalloonPages = 0, cSharedPages = 0;
+ rc = GMMR3QueryHypervisorMemoryStats(pVM, &cAllocPages, &cFreePages, &cBalloonPages, &cSharedPages);
AssertRCReturn(rc, rc);
if (puTotalAllocSize)
@@ -984,6 +985,38 @@ VMMR3DECL(int) PGMR3QueryVMMMemoryStats(PVM pVM, uint64_t *puTotalAllocSize, uin
if (puTotalBalloonSize)
*puTotalBalloonSize = cBalloonPages * _4K;
+ if (puTotalSharedSize)
+ *puTotalSharedSize = cSharedPages * _4K;
+
+ Log(("PGMR3QueryVMMMemoryStats: all=%x free=%x ballooned=%x shared=%x\n", cAllocPages, cFreePages, cBalloonPages, cSharedPages));
+ return VINF_SUCCESS;
+}
+
+/**
+ * Query memory stats for the VM
+ *
+ * @returns VBox status code.
+ * @param pVM The VM handle.
+ * @param puTotalAllocSize Pointer to total allocated memory inside the VM (in bytes)
+ * @param puTotalFreeSize Pointer to total free (allocated but not used yet) memory inside the VM (in bytes)
+ * @param puTotalBalloonSize Pointer to total ballooned memory inside the VM (in bytes)
+ * @param puTotalSharedSize Pointer to total shared memory inside the VM (in bytes)
+ */
+VMMR3DECL(int) PGMR3QueryMemoryStats(PVM pVM, uint64_t *pulTotalMem, uint64_t *pulPrivateMem, uint64_t *puTotalSharedMem, uint64_t *puTotalZeroMem)
+{
+ if (pulTotalMem)
+ *pulTotalMem = (uint64_t)pVM->pgm.s.cAllPages * _4K;
+
+ if (pulPrivateMem)
+ *pulPrivateMem = (uint64_t)pVM->pgm.s.cPrivatePages * _4K;
+
+ if (puTotalSharedMem)
+ *puTotalSharedMem = (uint64_t)pVM->pgm.s.cReusedSharedPages * _4K;
+
+ if (puTotalZeroMem)
+ *puTotalZeroMem = (uint64_t)pVM->pgm.s.cZeroPages * _4K;
+
+ Log(("PGMR3QueryMemoryStats: all=%x private=%x reused=%x zero=%x\n", pVM->pgm.s.cAllPages, pVM->pgm.s.cPrivatePages, pVM->pgm.s.cReusedSharedPages, pVM->pgm.s.cZeroPages));
return VINF_SUCCESS;
}
@@ -1370,6 +1403,8 @@ int pgmR3PhysRamReset(PVM pVM)
rc = GMMR3ResetSharedModules(pVM);
AssertRC(rc);
#endif
+ /* Reset counter. */
+ pVM->pgm.s.cReusedSharedPages = 0;
/*
* We batch up pages that should be freed instead of calling GMM for
@@ -1500,6 +1535,83 @@ int pgmR3PhysRamReset(PVM pVM)
return VINF_SUCCESS;
}
+/**
+ * Frees all RAM during VM termination
+ *
+ * ASSUMES that the caller owns the PGM lock.
+ *
+ * @returns VBox status code.
+ * @param pVM Pointer to the shared VM structure.
+ */
+int pgmR3PhysRamTerm(PVM pVM)
+{
+ Assert(PGMIsLockOwner(pVM));
+
+ /* Reset the memory balloon. */
+ int rc = GMMR3BalloonedPages(pVM, GMMBALLOONACTION_RESET, 0);
+ AssertRC(rc);
+
+#ifdef VBOX_WITH_PAGE_SHARING
+ /* Clear all registered shared modules. */
+ rc = GMMR3ResetSharedModules(pVM);
+ AssertRC(rc);
+#endif
+
+ /*
+ * We batch up pages that should be freed instead of calling GMM for
+ * each and every one of them.
+ */
+ uint32_t cPendingPages = 0;
+ PGMMFREEPAGESREQ pReq;
+ rc = GMMR3FreePagesPrepare(pVM, &pReq, PGMPHYS_FREE_PAGE_BATCH_SIZE, GMMACCOUNT_BASE);
+ AssertLogRelRCReturn(rc, rc);
+
+ /*
+ * Walk the ram ranges.
+ */
+ for (PPGMRAMRANGE pRam = pVM->pgm.s.pRamRangesR3; pRam; pRam = pRam->pNextR3)
+ {
+ uint32_t iPage = pRam->cb >> PAGE_SHIFT;
+ AssertMsg(((RTGCPHYS)iPage << PAGE_SHIFT) == pRam->cb, ("%RGp %RGp\n", (RTGCPHYS)iPage << PAGE_SHIFT, pRam->cb));
+
+ /* Replace all RAM pages by ZERO pages. */
+ while (iPage-- > 0)
+ {
+ PPGMPAGE pPage = &pRam->aPages[iPage];
+ switch (PGM_PAGE_GET_TYPE(pPage))
+ {
+ case PGMPAGETYPE_RAM:
+ /* Free all shared pages. Private pages are automatically freed during GMM VM cleanup. */
+ if (PGM_PAGE_IS_SHARED(pPage))
+ {
+ rc = pgmPhysFreePage(pVM, pReq, &cPendingPages, pPage, pRam->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT));
+ AssertLogRelRCReturn(rc, rc);
+ }
+ break;
+
+ case PGMPAGETYPE_MMIO2_ALIAS_MMIO:
+ case PGMPAGETYPE_MMIO2:
+ case PGMPAGETYPE_ROM_SHADOW: /* handled by pgmR3PhysRomReset. */
+ case PGMPAGETYPE_ROM:
+ case PGMPAGETYPE_MMIO:
+ break;
+ default:
+ AssertFailed();
+ }
+ } /* for each page */
+ }
+
+ /*
+ * Finish off any pages pending freeing.
+ */
+ if (cPendingPages)
+ {
+ rc = GMMR3FreePagesPerform(pVM, pReq, cPendingPages);
+ AssertLogRelRCReturn(rc, rc);
+ }
+ GMMR3FreePagesCleanup(pReq);
+ return VINF_SUCCESS;
+}
/**
* This is the interface IOM is using to register an MMIO region.
diff --git a/src/VBox/VMM/PGMSharedPage.cpp b/src/VBox/VMM/PGMSharedPage.cpp
index b48763184..44c503c2c 100644
--- a/src/VBox/VMM/PGMSharedPage.cpp
+++ b/src/VBox/VMM/PGMSharedPage.cpp
@@ -1,4 +1,4 @@
-/* $Id: PGMSharedPage.cpp 29424 2010-05-12 15:11:09Z vboxsync $ */
+/* $Id: PGMSharedPage.cpp 29603 2010-05-18 09:08:35Z vboxsync $ */
/** @file
* PGM - Page Manager and Monitor, Shared page handling
*/
@@ -19,7 +19,7 @@
/*******************************************************************************
* Header Files *
*******************************************************************************/
-#define LOG_GROUP LOG_GROUP_PGM_PHYS
+#define LOG_GROUP LOG_GROUP_PGM_SHARED
#include <VBox/pgm.h>
#include <VBox/stam.h>
#include "PGMInternal.h"
@@ -135,11 +135,15 @@ VMMR3DECL(int) PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *p
*/
static DECLCALLBACK(VBOXSTRICTRC) pgmR3SharedModuleRegRendezvous(PVM pVM, PVMCPU pVCpu, void *pvUser)
{
+ /* Flush all pending handy page operations before changing any shared page assignments. */
+ int rc = PGMR3PhysAllocateHandyPages(pVM);
+ AssertRC(rc);
+
return GMMR3CheckSharedModules(pVM);
}
/**
- * Shared module unregistration helper (called on the way out).
+ * Shared module check helper (called on the way out).
*
* @param pVM The VM handle.
*/
diff --git a/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp b/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
index a73a3bc50..6219d09ca 100644
--- a/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
+++ b/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
@@ -1,4 +1,4 @@
-/* $Id: IOMAllMMIO.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: IOMAllMMIO.cpp 29436 2010-05-12 20:57:57Z vboxsync $ */
/** @file
* IOM - Input / Output Monitor - Any Context, MMIO & String I/O.
*/
@@ -81,13 +81,14 @@ DECLINLINE(int) iomMMIODoWrite(PVM pVM, PIOMMMIORANGE pRange, RTGCPHYS GCPhysFau
Assert(pStats);
#endif
+ STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfWrite), a);
int rc;
if (RT_LIKELY(pRange->CTX_SUFF(pfnWriteCallback)))
- rc = pRange->CTX_SUFF(pfnWriteCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhysFault, (void *)pvData, cb); /* @todo fix const!! */
+ rc = pRange->CTX_SUFF(pfnWriteCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhysFault, (void *)pvData, cb); /** @todo fix const!! */
else
rc = VINF_SUCCESS;
- if (rc != VINF_IOM_HC_MMIO_WRITE)
- STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Write));
+ STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a);
+ STAM_COUNTER_INC(&pStats->Accesses);
return rc;
}
@@ -102,6 +103,7 @@ DECLINLINE(int) iomMMIODoRead(PVM pVM, PIOMMMIORANGE pRange, RTGCPHYS GCPhys, vo
Assert(pStats);
#endif
+ STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfRead), a);
int rc;
if (RT_LIKELY(pRange->CTX_SUFF(pfnReadCallback)))
rc = pRange->CTX_SUFF(pfnReadCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhys, pvValue, cbValue);
@@ -136,8 +138,8 @@ DECLINLINE(int) iomMMIODoRead(PVM pVM, PIOMMMIORANGE pRange, RTGCPHYS GCPhys, vo
break;
}
}
- if (rc != VINF_IOM_HC_MMIO_READ)
- STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Read));
+ STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfRead), a);
+ STAM_COUNTER_INC(&pStats->Accesses);
return rc;
}
@@ -1088,12 +1090,10 @@ int iomMMIOHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pCtxCore, RTGCPHYS
? !pRange->CTX_SUFF(pfnWriteCallback) && pRange->pfnWriteCallbackR3
: !pRange->CTX_SUFF(pfnReadCallback) && pRange->pfnReadCallbackR3)
{
-# ifdef VBOX_WITH_STATISTICS
if (uErrorCode & X86_TRAP_PF_RW)
STAM_COUNTER_INC(&pStats->CTX_MID_Z(Write,ToR3));
else
STAM_COUNTER_INC(&pStats->CTX_MID_Z(Read,ToR3));
-# endif
STAM_PROFILE_STOP(&pVM->iom.s.StatRZMMIOHandler, a);
STAM_COUNTER_INC(&pVM->iom.s.StatRZMMIOFailures);
@@ -1368,24 +1368,28 @@ VMMDECL(VBOXSTRICTRC) IOMMMIORead(PVM pVM, RTGCPHYS GCPhys, uint32_t *pu32Value,
return VINF_IOM_HC_MMIO_READ;
# endif
}
+ STAM_COUNTER_INC(&pStats->Accesses);
#endif /* VBOX_WITH_STATISTICS */
+
if (pRange->CTX_SUFF(pfnReadCallback))
{
/*
* Perform the read and deal with the result.
*/
-#ifdef VBOX_WITH_STATISTICS
- STAM_PROFILE_ADV_START(&pStats->CTX_SUFF_Z(ProfRead), a);
-#endif
+ STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfRead), a);
rc = pRange->CTX_SUFF(pfnReadCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhys, pu32Value, (unsigned)cbValue);
-#ifdef VBOX_WITH_STATISTICS
- STAM_PROFILE_ADV_STOP(&pStats->CTX_SUFF_Z(ProfRead), a);
- if (rc != VINF_IOM_HC_MMIO_READ)
- STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Read));
-#endif
+ STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfRead), a);
switch (rc)
{
case VINF_SUCCESS:
+ Log4(("IOMMMIORead: GCPhys=%RGp *pu32=%08RX32 cb=%d rc=VINF_SUCCESS\n", GCPhys, *pu32Value, cbValue));
+ iomUnlock(pVM);
+ return rc;
+#ifndef IN_RING3
+ case VINF_IOM_HC_MMIO_READ:
+ case VINF_IOM_HC_MMIO_READ_WRITE:
+ STAM_COUNTER_INC(&pStats->CTX_MID_Z(Read,ToR3));
+#endif
default:
Log4(("IOMMMIORead: GCPhys=%RGp *pu32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, *pu32Value, cbValue, rc));
iomUnlock(pVM);
@@ -1430,9 +1434,8 @@ VMMDECL(VBOXSTRICTRC) IOMMMIORead(PVM pVM, RTGCPHYS GCPhys, uint32_t *pu32Value,
/*
* Lookup the ring-3 range.
*/
-#ifdef VBOX_WITH_STATISTICS
- STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Read));
-#endif
+ STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfRead), a); /** @todo STAM_PROFILE_ADD_ZERO_PERIOD */
+ STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfRead), a);
/* Unassigned memory; this is actually not supposed to happen. */
switch (cbValue)
{
@@ -1491,6 +1494,7 @@ VMMDECL(VBOXSTRICTRC) IOMMMIOWrite(PVM pVM, RTGCPHYS GCPhys, uint32_t u32Value,
return VINF_IOM_HC_MMIO_WRITE;
# endif
}
+ STAM_COUNTER_INC(&pStats->Accesses);
#endif /* VBOX_WITH_STATISTICS */
/*
@@ -1499,14 +1503,13 @@ VMMDECL(VBOXSTRICTRC) IOMMMIOWrite(PVM pVM, RTGCPHYS GCPhys, uint32_t u32Value,
*/
if (pRange->CTX_SUFF(pfnWriteCallback))
{
-#ifdef VBOX_WITH_STATISTICS
- STAM_PROFILE_ADV_START(&pStats->CTX_SUFF_Z(ProfWrite), a);
-#endif
+ STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfWrite), a);
rc = pRange->CTX_SUFF(pfnWriteCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhys, &u32Value, (unsigned)cbValue);
-#ifdef VBOX_WITH_STATISTICS
- STAM_PROFILE_ADV_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a);
- if (rc != VINF_IOM_HC_MMIO_WRITE)
- STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Write));
+ STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a);
+#ifndef IN_RING3
+ if ( rc == VINF_IOM_HC_MMIO_WRITE
+ || rc == VINF_IOM_HC_MMIO_READ_WRITE)
+ STAM_COUNTER_INC(&pStats->CTX_MID_Z(Write,ToR3));
#endif
Log4(("IOMMMIOWrite: GCPhys=%RGp u32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, u32Value, cbValue, rc));
iomUnlock(pVM);
@@ -1524,9 +1527,8 @@ VMMDECL(VBOXSTRICTRC) IOMMMIOWrite(PVM pVM, RTGCPHYS GCPhys, uint32_t u32Value,
/*
* No write handler, nothing to do.
*/
-#ifdef VBOX_WITH_STATISTICS
- STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Write));
-#endif
+ STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfWrite), a);
+ STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a);
Log4(("IOMMMIOWrite: GCPhys=%RGp u32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, u32Value, cbValue, VINF_SUCCESS));
iomUnlock(pVM);
return VINF_SUCCESS;
@@ -1557,9 +1559,7 @@ VMMDECL(VBOXSTRICTRC) IOMMMIOWrite(PVM pVM, RTGCPHYS GCPhys, uint32_t u32Value,
*/
VMMDECL(VBOXSTRICTRC) IOMInterpretINSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer)
{
-#ifdef VBOX_WITH_STATISTICS
STAM_COUNTER_INC(&pVM->iom.s.StatInstIns);
-#endif
/*
* We do not support REPNE or decrementing destination
@@ -1720,9 +1720,7 @@ VMMDECL(VBOXSTRICTRC) IOMInterpretINS(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUST
*/
VMMDECL(VBOXSTRICTRC) IOMInterpretOUTSEx(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uPort, uint32_t uPrefix, uint32_t cbTransfer)
{
-#ifdef VBOX_WITH_STATISTICS
STAM_COUNTER_INC(&pVM->iom.s.StatInstOuts);
-#endif
/*
* We do not support segment prefixes, REPNE or
diff --git a/src/VBox/VMM/VMMAll/PGMAllBth.h b/src/VBox/VMM/VMMAll/PGMAllBth.h
index 56b343719..205b7c4de 100644
--- a/src/VBox/VMM/VMMAll/PGMAllBth.h
+++ b/src/VBox/VMM/VMMAll/PGMAllBth.h
@@ -243,20 +243,6 @@ PGM_BTH_DECL(int, Trap0eHandler)(PVMCPU pVCpu, RTGCUINT uErr, PCPUMCTXCORE pRegF
Assert(pPDDst);
# endif
-# if !defined(PGM_WITHOUT_MAPPINGS) && ((PGM_GST_TYPE == PGM_TYPE_32BIT) || (PGM_GST_TYPE == PGM_TYPE_PAE))
- /*
- * Check for write conflicts with our hypervisor mapping early on. If the guest happens to access a non-present page,
- * where our hypervisor is currently mapped, then we'll create a #PF storm in the guest.
- */
- if ( (uErr & (X86_TRAP_PF_P | X86_TRAP_PF_RW)) == (X86_TRAP_PF_P | X86_TRAP_PF_RW)
- && MMHyperIsInsideArea(pVM, pvFault))
- {
- /* Force a CR3 sync to check for conflicts and emulate the instruction. */
- VMCPU_FF_SET(pVCpu, VMCPU_FF_PGM_SYNC_CR3);
- return VINF_EM_RAW_EMULATE_INSTR;
- }
-# endif
-
# if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE)
/* Dirty page handling. */
if (uErr & X86_TRAP_PF_RW) /* write fault? */
diff --git a/src/VBox/VMM/VMMR0/GMMR0.cpp b/src/VBox/VMM/VMMR0/GMMR0.cpp
index c0a7d56ee..201d345da 100644
--- a/src/VBox/VMM/VMMR0/GMMR0.cpp
+++ b/src/VBox/VMM/VMMR0/GMMR0.cpp
@@ -1,4 +1,4 @@
-/* $Id: GMMR0.cpp 29426 2010-05-12 15:15:11Z vboxsync $ */
+/* $Id: GMMR0.cpp 29639 2010-05-18 14:18:40Z vboxsync $ */
/** @file
* GMM - Global Memory Manager.
*/
@@ -150,6 +150,7 @@
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_GMM
+#include <VBox/vm.h>
#include <VBox/gmm.h>
#include "GMMR0Internal.h"
#include <VBox/gvm.h>
@@ -503,6 +504,8 @@ typedef struct GMM
uint64_t cAllocatedPages;
/** The number of pages that are shared. A subset of cAllocatedPages. */
uint64_t cSharedPages;
+ /** The number of pages that are actually shared between VMs. */
+ uint64_t cDuplicatePages;
/** The number of pages that are shared that has been left behind by
* VMs not doing proper cleanups. */
uint64_t cLeftBehindSharedPages;
@@ -850,6 +853,7 @@ GMMR0DECL(void) GMMR0CleanupVM(PGVM pGVM)
pGMM->cOverCommittedPages = 0;
pGMM->cAllocatedPages = 0;
pGMM->cSharedPages = 0;
+ pGMM->cDuplicatePages = 0;
pGMM->cLeftBehindSharedPages = 0;
pGMM->cChunks = 0;
pGMM->cBalloonedPages = 0;
@@ -858,7 +862,7 @@ GMMR0DECL(void) GMMR0CleanupVM(PGVM pGVM)
#endif
{
/*
- * Walk the entire pool looking for pages that belongs to this VM
+ * Walk the entire pool looking for pages that belong to this VM
* and left over mappings. (This'll only catch private pages, shared
* pages will be 'left behind'.)
*/
@@ -2096,7 +2100,7 @@ GMMR0DECL(int) GMMR0AllocateHandyPages(PVM pVM, VMCPUID idCpu, uint32_t cPagesTo
}
else
{
- Log(("GMMR0AllocateHandyPages: #%#x/%#x: Not private! %.*Rhxs\n", iPage, paPages[iPage].idPage, sizeof(*pPage), pPage));
+ Log(("GMMR0AllocateHandyPages: #%#x/%#x: Not private! %.*Rhxs (type %d)\n", iPage, paPages[iPage].idPage, sizeof(*pPage), pPage, pPage->Common.u2State));
rc = VERR_GMM_PAGE_NOT_PRIVATE;
break;
}
@@ -2121,10 +2125,18 @@ GMMR0DECL(int) GMMR0AllocateHandyPages(PVM pVM, VMCPUID idCpu, uint32_t cPagesTo
Assert(pGVM->gmm.s.cSharedPages);
Assert(pGVM->gmm.s.Allocated.cBasePages);
+ Log(("GMMR0AllocateHandyPages: free shared page %x cRefs=%d\n", paPages[iPage].idSharedPage, pPage->Shared.cRefs));
pGVM->gmm.s.cSharedPages--;
pGVM->gmm.s.Allocated.cBasePages--;
if (!--pPage->Shared.cRefs)
+ {
gmmR0FreeSharedPage(pGMM, paPages[iPage].idSharedPage, pPage);
+ }
+ else
+ {
+ Assert(pGMM->cDuplicatePages);
+ pGMM->cDuplicatePages--;
+ }
paPages[iPage].idSharedPage = NIL_GMM_PAGEID;
}
@@ -2495,6 +2507,7 @@ static void gmmR0FreeChunk(PGMM pGMM, PGVM pGVM, PGMMCHUNK pChunk)
{
/** @todo R0 -> VM request */
/* The chunk can be owned by more than one VM if fBoundMemoryMode is false! */
+ Log(("gmmR0FreeChunk: chunk still has %d mappings; don't free!\n", pChunk->cMappings));
}
else
{
@@ -2647,7 +2660,7 @@ DECLINLINE(void) gmmR0ConvertToSharedPage(PGMM pGMM, PGVM pGVM, RTHCPHYS HCPhys,
pGVM->gmm.s.cPrivatePages--;
/* Modify the page structure. */
- pPage->Shared.pfn = (uint32_t)(HCPhys >> PAGE_SHIFT);
+ pPage->Shared.pfn = (uint32_t)(uint64_t)(HCPhys >> PAGE_SHIFT);
pPage->Shared.cRefs = 1;
pPage->Common.u2State = GMM_PAGE_STATE_SHARED;
}
@@ -2664,8 +2677,11 @@ DECLINLINE(void) gmmR0UseSharedPage(PGMM pGMM, PGVM pGVM, PGMMPAGE pPage)
Assert(pGMM->cSharedPages > 0);
Assert(pGMM->cAllocatedPages > 0);
+ pGMM->cDuplicatePages++;
+
pPage->Shared.cRefs++;
pGVM->gmm.s.cSharedPages++;
+ pGVM->gmm.s.Allocated.cBasePages++;
}
#endif
@@ -2769,7 +2785,14 @@ static int gmmR0FreePages(PGMM pGMM, PGVM pGVM, uint32_t cPages, PGMMFREEPAGEDES
pGVM->gmm.s.cSharedPages--;
Assert(pPage->Shared.cRefs);
if (!--pPage->Shared.cRefs)
+ {
gmmR0FreeSharedPage(pGMM, idPage, pPage);
+ }
+ else
+ {
+ Assert(pGMM->cDuplicatePages);
+ pGMM->cDuplicatePages--;
+ }
}
else
{
@@ -3073,6 +3096,7 @@ GMMR0DECL(int) GMMR0QueryHypervisorMemoryStatsReq(PVM pVM, PGMMMEMSTATSREQ pReq)
pReq->cFreePages = (pGMM->cChunks << (GMM_CHUNK_SHIFT- PAGE_SHIFT)) - pGMM->cAllocatedPages;
pReq->cBalloonedPages = pGMM->cBalloonedPages;
pReq->cMaxPages = pGMM->cMaxPages;
+ pReq->cSharedPages = pGMM->cDuplicatePages;
GMM_CHECK_SANITY_UPON_LEAVING(pGMM);
return VINF_SUCCESS;
@@ -3165,7 +3189,7 @@ static int gmmR0UnmapChunk(PGMM pGMM, PGVM pGVM, PGMMCHUNK pChunk)
else if (pChunk->hGVM == pGVM->hSelf)
return VINF_SUCCESS;
- Log(("gmmR0MapChunk: Chunk %#x is not mapped into pGVM=%p/%#x\n", pChunk->Core.Key, pGVM, pGVM->hSelf));
+ Log(("gmmR0UnmapChunk: Chunk %#x is not mapped into pGVM=%p/%#x\n", pChunk->Core.Key, pGVM, pGVM->hSelf));
return VERR_GMM_CHUNK_NOT_MAPPED;
}
@@ -3208,7 +3232,12 @@ static int gmmR0MapChunk(PGMM pGMM, PGVM pGVM, PGMMCHUNK pChunk, PRTR3PTR ppvR3)
{
*ppvR3 = RTR0MemObjAddressR3(pChunk->paMappings[i].MapObj);
Log(("gmmR0MapChunk: chunk %#x is already mapped at %p!\n", pChunk->Core.Key, *ppvR3));
+#ifdef VBOX_WITH_PAGE_SHARING
+ /* The ring-3 chunk cache can be out of sync; don't fail. */
+ return VINF_SUCCESS;
+#else
return VERR_GMM_CHUNK_ALREADY_MAPPED;
+#endif
}
}
@@ -3473,6 +3502,8 @@ GMMR0DECL(int) GMMR0RegisterSharedModule(PVM pVM, VMCPUID idCpu, VBOXOSFAMILY en
if (RT_FAILURE(rc))
return rc;
+ Log(("GMMR0RegisterSharedModule %s %s base %RGv size %x\n", pszModuleName, pszVersion, GCBaseAddr, cbModule));
+
/*
* Take the sempahore and do some more validations.
*/
@@ -3531,6 +3562,7 @@ GMMR0DECL(int) GMMR0RegisterSharedModule(PVM pVM, VMCPUID idCpu, VBOXOSFAMILY en
for (unsigned i = 0; i < cRegions; i++)
{
+ Log(("New region %d base=%RGv size %x\n", i, pRegions[i].GCRegionAddr, pRegions[i].cbRegion));
pGlobalModule->aRegions[i].GCRegionAddr = pRegions[i].GCRegionAddr;
pGlobalModule->aRegions[i].cbRegion = pRegions[i].cbRegion;
pGlobalModule->aRegions[i].u32Alignment = 0;
@@ -3543,6 +3575,9 @@ GMMR0DECL(int) GMMR0RegisterSharedModule(PVM pVM, VMCPUID idCpu, VBOXOSFAMILY en
pGlobalModule->cUsers++;
rc = VINF_SUCCESS;
+ bool ret = RTAvlGCPtrInsert(&pGMM->pGlobalSharedModuleTree, &pGlobalModule->Core);
+ Assert(ret);
+
Log(("GMMR0RegisterSharedModule: new global module %s\n", pszModuleName));
}
else
@@ -3605,7 +3640,9 @@ GMMR0DECL(int) GMMR0RegisterSharedModuleReq(PVM pVM, VMCPUID idCpu, PGMMREGISTE
AssertPtrReturn(pReq, VERR_INVALID_POINTER);
AssertMsgReturn(pReq->Hdr.cbReq >= sizeof(*pReq) && pReq->Hdr.cbReq == RT_UOFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[pReq->cRegions]), ("%#x != %#x\n", pReq->Hdr.cbReq, sizeof(*pReq)), VERR_INVALID_PARAMETER);
- return GMMR0RegisterSharedModule(pVM, idCpu, pReq->enmGuestOS, pReq->szName, pReq->szVersion, pReq->GCBaseAddr, pReq->cbModule, pReq->cRegions, pReq->aRegions);
+ /* Pass back return code in the request packet to preserve informational codes. (VMMR3CallR0 chokes on them) */
+ pReq->rc = GMMR0RegisterSharedModule(pVM, idCpu, pReq->enmGuestOS, pReq->szName, pReq->szVersion, pReq->GCBaseAddr, pReq->cbModule, pReq->cRegions, pReq->aRegions);
+ return VINF_SUCCESS;
}
/**
@@ -3664,6 +3701,8 @@ GMMR0DECL(int) GMMR0UnregisterSharedModule(PVM pVM, VMCPUID idCpu, char *pszModu
if (pRec->aRegions[i].paHCPhysPageID)
RTMemFree(pRec->aRegions[i].paHCPhysPageID);
+ /* Remove from the tree and free memory. */
+ RTAvlGCPtrRemove(&pGMM->pGlobalSharedModuleTree, GCBaseAddr);
RTMemFree(pRec);
}
}
@@ -3673,6 +3712,8 @@ GMMR0DECL(int) GMMR0UnregisterSharedModule(PVM pVM, VMCPUID idCpu, char *pszModu
else
Assert(!pRecVM->pGlobalModule);
+ /* Remove from the tree and free memory. */
+ RTAvlGCPtrRemove(&pGVM->gmm.s.pSharedModuleTree, GCBaseAddr);
RTMemFree(pRecVM);
GMM_CHECK_SANITY_UPON_LEAVING(pGMM);
@@ -3717,6 +3758,8 @@ GMMR0DECL(int) GMMR0UnregisterSharedModuleReq(PVM pVM, VMCPUID idCpu, PGMMUNREG
* - if a shared page is new, then it changes the GMM page type to shared and returns it in the paPageDesc array
* - if a shared page already exists, then it checks if the VM page is identical and if so frees the VM page and returns the shared page in the paPageDesc array
*
+ * Note: assumes the caller has acquired the GMM semaphore!!
+ *
* @returns VBox status code.
* @param pGMM Pointer to the GMM instance data.
* @param pGVM Pointer to the GVM instance data.
@@ -3763,6 +3806,9 @@ GMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule,
/* We've seen this shared page for the first time? */
if (pGlobalRegion->paHCPhysPageID[i] == NIL_GMM_PAGEID)
{
+new_shared_page:
+ Log(("New shared page guest %RGp host %RHp\n", paPageDesc[i].GCPhys, paPageDesc[i].HCPhys));
+
/* Easy case: just change the internal page type. */
PGMMPAGE pPage = gmmR0GetPage(pGMM, paPageDesc[i].uHCPhysPageId);
if (!pPage)
@@ -3771,7 +3817,6 @@ GMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule,
rc = VERR_PGM_PHYS_INVALID_PAGE_ID;
goto end;
}
- Log(("New shared page guest %RGp host %RHp\n", paPageDesc[i].GCPhys, paPageDesc[i].HCPhys));
AssertMsg(paPageDesc[i].GCPhys == (pPage->Private.pfn << 12), ("desc %RGp gmm %RGp\n", paPageDesc[i].HCPhys, (pPage->Private.pfn << 12)));
@@ -3788,6 +3833,8 @@ GMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule,
Assert(paPageDesc[i].uHCPhysPageId != pGlobalRegion->paHCPhysPageID[i]);
+ Log(("Replace existing page guest %RGp host %RHp id %x -> id %x\n", paPageDesc[i].GCPhys, paPageDesc[i].HCPhys, paPageDesc[i].uHCPhysPageId, pGlobalRegion->paHCPhysPageID[i]));
+
/* Get the shared page source. */
PGMMPAGE pPage = gmmR0GetPage(pGMM, pGlobalRegion->paHCPhysPageID[i]);
if (!pPage)
@@ -3796,9 +3843,16 @@ GMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule,
rc = VERR_PGM_PHYS_INVALID_PAGE_ID;
goto end;
}
- Assert(pPage->Common.u2State == GMM_PAGE_STATE_SHARED);
+ if (pPage->Common.u2State != GMM_PAGE_STATE_SHARED)
+ {
+ /* Page was freed at some point; invalidate this entry. */
+ /** todo this isn't really bullet proof. */
+ Log(("Old shared page was freed -> create a new one\n"));
+ pGlobalRegion->paHCPhysPageID[i] = NIL_GMM_PAGEID;
+ goto new_shared_page; /* ugly goto */
+ }
- Log(("Replace existing page guest %RGp host %RHp -> %RHp\n", paPageDesc[i].GCPhys, paPageDesc[i].HCPhys, pPage->Shared.pfn << PAGE_SHIFT));
+ Log(("Replace existing page guest host %RHp -> %RHp\n", paPageDesc[i].HCPhys, ((uint64_t)pPage->Shared.pfn) << PAGE_SHIFT));
/* Calculate the virtual address of the local page. */
pChunk = gmmR0GetChunk(pGMM, paPageDesc[i].uHCPhysPageId >> GMM_CHUNKID_SHIFT);
@@ -3826,6 +3880,7 @@ GMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule,
/* Get the virtual address of the physical page; map the chunk into the VM process if not already done. */
if (!gmmR0IsChunkMapped(pGVM, pChunk, (PRTR3PTR)&pbChunk))
{
+ Log(("Map chunk into process!\n"));
rc = gmmR0MapChunk(pGMM, pGVM, pChunk, (PRTR3PTR)&pbChunk);
if (rc != VINF_SUCCESS)
{
@@ -3854,7 +3909,7 @@ GMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule,
gmmR0UseSharedPage(pGMM, pGVM, pPage);
/* Pass along the new physical address & page id. */
- paPageDesc[i].HCPhys = pPage->Shared.pfn << PAGE_SHIFT;
+ paPageDesc[i].HCPhys = ((uint64_t)pPage->Shared.pfn) << PAGE_SHIFT;
paPageDesc[i].uHCPhysPageId = pGlobalRegion->paHCPhysPageID[i];
}
}
@@ -3874,14 +3929,17 @@ static DECLCALLBACK(int) gmmR0CleanupSharedModule(PAVLGCPTRNODECORE pNode, void
{
PGVM pGVM = (PGVM)pvGVM;
PGMMSHAREDMODULEPERVM pRecVM = (PGMMSHAREDMODULEPERVM)pNode;
+ PGMM pGMM;
+ GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
- Assert(pRecVM->pGlobalModule);
+ Assert(pRecVM->pGlobalModule || pRecVM->fCollision);
if (pRecVM->pGlobalModule)
{
PGMMSHAREDMODULE pRec = pRecVM->pGlobalModule;
Assert(pRec);
Assert(pRec->cUsers);
+ Log(("gmmR0CleanupSharedModule: %s %s cUsers=%d\n", pRec->szName, pRec->szVersion, pRec->cUsers));
pRec->cUsers--;
if (pRec->cUsers == 0)
{
@@ -3889,6 +3947,8 @@ static DECLCALLBACK(int) gmmR0CleanupSharedModule(PAVLGCPTRNODECORE pNode, void
if (pRec->aRegions[i].paHCPhysPageID)
RTMemFree(pRec->aRegions[i].paHCPhysPageID);
+ /* Remove from the tree and free memory. */
+ RTAvlGCPtrRemove(&pGMM->pGlobalSharedModuleTree, pRec->Core.Key);
RTMemFree(pRec);
}
}
@@ -3924,6 +3984,7 @@ GMMR0DECL(int) GMMR0ResetSharedModules(PVM pVM, VMCPUID idCpu)
AssertRC(rc);
if (GMM_CHECK_SANITY_UPON_ENTERING(pGMM))
{
+ Log(("GMMR0ResetSharedModules\n"));
RTAvlGCPtrDestroy(&pGVM->gmm.s.pSharedModuleTree, gmmR0CleanupSharedModule, pGVM);
rc = VINF_SUCCESS;
@@ -3955,23 +4016,71 @@ DECLCALLBACK(int) gmmR0CheckSharedModule(PAVLGCPTRNODECORE pNode, void *pvUser)
PGMMSHAREDMODULEPERVM pLocalModule = (PGMMSHAREDMODULEPERVM)pNode;
PGMMSHAREDMODULE pGlobalModule = pLocalModule->pGlobalModule;
- Log(("gmmR0CheckSharedModule: check %s %s base=%RGv size=%x collision=%d\n", pGlobalModule->szName, pGlobalModule->szVersion, pGlobalModule->Core.Key, pGlobalModule->cbModule, pLocalModule->fCollision));
- if (!pLocalModule->fCollision)
+ if ( !pLocalModule->fCollision
+ && pGlobalModule)
{
+ Log(("gmmR0CheckSharedModule: check %s %s base=%RGv size=%x collision=%d\n", pGlobalModule->szName, pGlobalModule->szVersion, pGlobalModule->Core.Key, pGlobalModule->cbModule, pLocalModule->fCollision));
PGMR0SharedModuleCheckRegion(pInfo->pGVM->pVM, pInfo->idCpu, pGlobalModule, pInfo->pGVM);
}
return 0;
}
#endif
+#ifdef DEBUG_sandervl
+/**
+ * Setup for a GMMR0CheckSharedModules call (to allow log flush jumps back to ring 3)
+ *
+ * @returns VBox status code.
+ * @param pVM VM handle
+ */
+GMMR0DECL(int) GMMR0CheckSharedModulesStart(PVM pVM)
+{
+ /*
+ * Validate input and get the basics.
+ */
+ PGMM pGMM;
+ GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
+
+ /*
+ * Take the sempahore and do some more validations.
+ */
+ int rc = RTSemFastMutexRequest(pGMM->Mtx);
+ AssertRC(rc);
+ if (!GMM_CHECK_SANITY_UPON_ENTERING(pGMM))
+ rc = VERR_INTERNAL_ERROR_5;
+ else
+ rc = VINF_SUCCESS;
+
+ return rc;
+}
+
+/**
+ * Clean up after a GMMR0CheckSharedModules call (to allow log flush jumps back to ring 3)
+ *
+ * @returns VBox status code.
+ * @param pVM VM handle
+ */
+GMMR0DECL(int) GMMR0CheckSharedModulesEnd(PVM pVM)
+{
+ /*
+ * Validate input and get the basics.
+ */
+ PGMM pGMM;
+ GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
+
+ RTSemFastMutexRelease(pGMM->Mtx);
+ return VINF_SUCCESS;
+}
+#endif
+
/**
* Check all shared modules for the specified VM
*
* @returns VBox status code.
* @param pVM VM handle
- * @param idCpu VCPU id
+ * @param pVCpu VMCPU handle
*/
-GMMR0DECL(int) GMMR0CheckSharedModules(PVM pVM, VMCPUID idCpu)
+GMMR0DECL(int) GMMR0CheckSharedModules(PVM pVM, PVMCPU pVCpu)
{
#ifdef VBOX_WITH_PAGE_SHARING
/*
@@ -3980,31 +4089,37 @@ GMMR0DECL(int) GMMR0CheckSharedModules(PVM pVM, VMCPUID idCpu)
PGMM pGMM;
GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
PGVM pGVM;
- int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
+ int rc = GVMMR0ByVMAndEMT(pVM, pVCpu->idCpu, &pGVM);
if (RT_FAILURE(rc))
return rc;
+# ifndef DEBUG_sandervl
/*
* Take the sempahore and do some more validations.
*/
rc = RTSemFastMutexRequest(pGMM->Mtx);
AssertRC(rc);
+# endif
if (GMM_CHECK_SANITY_UPON_ENTERING(pGMM))
{
GMMCHECKSHAREDMODULEINFO Info;
+ Log(("GMMR0CheckSharedModules\n"));
Info.pGVM = pGVM;
- Info.idCpu = idCpu;
+ Info.idCpu = pVCpu->idCpu;
RTAvlGCPtrDoWithAll(&pGVM->gmm.s.pSharedModuleTree, true /* fFromLeft */, gmmR0CheckSharedModule, &Info);
+ Log(("GMMR0CheckSharedModules done!\n"));
rc = VINF_SUCCESS;
GMM_CHECK_SANITY_UPON_LEAVING(pGMM);
}
else
rc = VERR_INTERNAL_ERROR_5;
+# ifndef DEBUG_sandervl
RTSemFastMutexRelease(pGMM->Mtx);
+# endif
return rc;
#else
return VERR_NOT_IMPLEMENTED;
diff --git a/src/VBox/VMM/VMMR0/PDMR0Device.cpp b/src/VBox/VMM/VMMR0/PDMR0Device.cpp
index 61f158cea..2beff3e09 100644
--- a/src/VBox/VMM/VMMR0/PDMR0Device.cpp
+++ b/src/VBox/VMM/VMMR0/PDMR0Device.cpp
@@ -1,4 +1,4 @@
-/* $Id: PDMR0Device.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: PDMR0Device.cpp 29521 2010-05-17 10:14:22Z vboxsync $ */
/** @file
* PDM - Pluggable Device and Driver Manager, R0 Device parts.
*/
@@ -717,7 +717,7 @@ static DECLCALLBACK(bool) pdmR0DrvHlp_AssertOther(PPDMDRVINS pDrvIns, const char
/**
- * The Raw-Mode Context Driver Helper Callbacks.
+ * The Ring-0 Context Driver Helper Callbacks.
*/
extern DECLEXPORT(const PDMDRVHLPR0) g_pdmR0DrvHlp =
{
@@ -808,3 +808,31 @@ static void pdmR0IoApicSetIrq(PVM pVM, int iIrq, int iLevel)
AssertMsgFailed(("We're out of devhlp queue items!!!\n"));
}
}
+
+
+/**
+ * PDMDevHlpCallR0 helper.
+ *
+ * @returns See PFNPDMDEVREQHANDLERR0.
+ * @param pVM The VM handle (for validation).
+ * @param pReq The request buffer.
+ */
+VMMR0_INT_DECL(int) PDMR0DeviceCallReqHandler(PVM pVM, PPDMDEVICECALLREQHANDLERREQ pReq)
+{
+ /*
+ * Validate input and make the call.
+ */
+ AssertPtrReturn(pVM, VERR_INVALID_POINTER);
+ AssertPtrReturn(pReq, VERR_INVALID_POINTER);
+ AssertMsgReturn(pReq->Hdr.cbReq == sizeof(*pReq), ("%#x != %#x\n", pReq->Hdr.cbReq, sizeof(*pReq)), VERR_INVALID_PARAMETER);
+
+ PPDMDEVINS pDevIns = pReq->pDevInsR0;
+ AssertPtrReturn(pDevIns, VERR_INVALID_POINTER);
+ AssertReturn(pDevIns->Internal.s.pVMR0 == pVM, VERR_INVALID_PARAMETER);
+
+ PFNPDMDEVREQHANDLERR0 pfnReqHandlerR0 = pReq->pfnReqHandlerR0;
+ AssertPtrReturn(pfnReqHandlerR0, VERR_INVALID_POINTER);
+
+ return pfnReqHandlerR0(pDevIns, pReq->uOperation, pReq->u64Arg);
+}
+
diff --git a/src/VBox/VMM/VMMR0/PGMR0.cpp b/src/VBox/VMM/VMMR0/PGMR0.cpp
index 8ff0132cb..0f74636c8 100644
--- a/src/VBox/VMM/VMMR0/PGMR0.cpp
+++ b/src/VBox/VMM/VMMR0/PGMR0.cpp
@@ -1,4 +1,4 @@
-/* $Id: PGMR0.cpp 29424 2010-05-12 15:11:09Z vboxsync $ */
+/* $Id: PGMR0.cpp 29468 2010-05-14 12:16:44Z vboxsync $ */
/** @file
* PGM - Page Manager and Monitor, Ring-0.
*/
@@ -301,219 +301,3 @@ VMMR0DECL(int) PGMR0Trap0eHandlerNestedPaging(PVM pVM, PVMCPU pVCpu, PGMMODE enm
return rc;
}
-#ifdef VBOX_WITH_PAGE_SHARING
-/**
- * Check a registered module for shared page changes
- *
- * @returns The following VBox status codes.
- *
- * @param pVM The VM handle.
- * @param idCpu VCPU id
- * @param pModule Module description
- * @param pGVM Pointer to the GVM instance data.
- */
-VMMR0DECL(int) PGMR0SharedModuleCheckRegion(PVM pVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PGVM pGVM)
-{
- int rc = VINF_SUCCESS;
- PGMMSHAREDPAGEDESC paPageDesc = NULL;
- uint32_t cbPreviousRegion = 0;
- bool fFlushTLBs = false;
- PVMCPU pVCpu = &pVM->aCpus[idCpu];
-
- Log(("PGMR0SharedModuleCheck: check %s %s base=%RGv size=%x\n", pModule->szName, pModule->szVersion, pModule->Core.Key, pModule->cbModule));
-
- pgmLock(pVM);
-
- /* Check every region of the shared module. */
- for (unsigned i = 0; i < pModule->cRegions; i++)
- {
- Assert((pModule->aRegions[i].cbRegion & 0xfff) == 0);
- Assert((pModule->aRegions[i].GCRegionAddr & 0xfff) == 0);
-
- RTGCPTR GCRegion = pModule->aRegions[i].GCRegionAddr;
- unsigned cbRegion = pModule->aRegions[i].cbRegion & ~0xfff;
- unsigned idxPage = 0;
- bool fValidChanges = false;
-
- if (cbPreviousRegion < cbRegion)
- {
- if (paPageDesc)
- RTMemFree(paPageDesc);
-
- paPageDesc = (PGMMSHAREDPAGEDESC)RTMemAlloc((cbRegion >> PAGE_SHIFT) * sizeof(*paPageDesc));
- if (!paPageDesc)
- {
- AssertFailed();
- rc = VERR_NO_MEMORY;
- goto end;
- }
- cbPreviousRegion = cbRegion;
- }
-
- while (cbRegion)
- {
- RTGCPHYS GCPhys;
- uint64_t fFlags;
-
- rc = PGMGstGetPage(pVCpu, GCRegion, &fFlags, &GCPhys);
- if ( rc == VINF_SUCCESS
- && !(fFlags & X86_PTE_RW)) /* important as we make assumptions about this below! */
- {
- PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, GCPhys);
- if ( pPage
- && !PGM_PAGE_IS_SHARED(pPage))
- {
- fValidChanges = true;
- paPageDesc[idxPage].uHCPhysPageId = PGM_PAGE_GET_PAGEID(pPage);
- paPageDesc[idxPage].HCPhys = PGM_PAGE_GET_HCPHYS(pPage);
- paPageDesc[idxPage].GCPhys = GCPhys;
- }
- else
- paPageDesc[idxPage].uHCPhysPageId = NIL_GMM_PAGEID;
- }
- else
- paPageDesc[idxPage].uHCPhysPageId = NIL_GMM_PAGEID;
-
- idxPage++;
- GCRegion += PAGE_SIZE;
- cbRegion -= PAGE_SIZE;
- }
-
- if (fValidChanges)
- {
- rc = GMMR0SharedModuleCheckRange(pGVM, pModule, i, idxPage, paPageDesc);
- AssertRC(rc);
- if (RT_FAILURE(rc))
- break;
-
- for (unsigned i = 0; i < idxPage; i++)
- {
- /* Any change for this page? */
- if (paPageDesc[i].uHCPhysPageId != NIL_GMM_PAGEID)
- {
- /** todo: maybe cache these to prevent the nth lookup. */
- PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, paPageDesc[i].GCPhys);
- if (!pPage)
- {
- /* Should never happen. */
- AssertFailed();
- rc = VERR_PGM_PHYS_INVALID_PAGE_ID;
- goto end;
- }
- Assert(!PGM_PAGE_IS_SHARED(pPage));
-
- Log(("PGMR0SharedModuleCheck: shared page gc phys %RGp host %RHp->%RHp\n", paPageDesc[i].GCPhys, PGM_PAGE_GET_HCPHYS(pPage), paPageDesc[i].HCPhys));
- if (paPageDesc[i].HCPhys != PGM_PAGE_GET_HCPHYS(pPage))
- {
- bool fFlush = false;
-
- /* Page was replaced by an existing shared version of it; clear all references first. */
- rc = pgmPoolTrackUpdateGCPhys(pVM, paPageDesc[i].GCPhys, pPage, true /* clear the entries */, &fFlush);
- if (RT_FAILURE(rc))
- {
- AssertRC(rc);
- goto end;
- }
- Assert(rc == VINF_SUCCESS || (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_PGM_SYNC_CR3) && (pVCpu->pgm.s.fSyncFlags & PGM_SYNC_CLEAR_PGM_POOL)));
- if (rc = VINF_SUCCESS)
- fFlushTLBs |= fFlush;
-
- /* Update the physical address and page id now. */
- PGM_PAGE_SET_HCPHYS(pPage, paPageDesc[i].HCPhys);
- PGM_PAGE_SET_PAGEID(pPage, paPageDesc[i].uHCPhysPageId);
-
- /* Invalidate page map TLB entry for this page too. */
- PGMPhysInvalidatePageMapTLBEntry(pVM, paPageDesc[i].GCPhys);
- }
- /* else nothing changed (== this page is now a shared page), so no need to flush anything. */
-
- pVM->pgm.s.cSharedPages++;
- pVM->pgm.s.cPrivatePages--;
- PGM_PAGE_SET_STATE(pPage, PGM_PAGE_STATE_SHARED);
- }
- }
- }
- else
- rc = VINF_SUCCESS; /* nothing to do. */
- }
-
-end:
- pgmUnlock(pVM);
- if (fFlushTLBs)
- PGM_INVL_ALL_VCPU_TLBS(pVM);
-
- if (paPageDesc)
- RTMemFree(paPageDesc);
-
- return rc;
-}
-#endif
-
-#if 0
-/**
- * Shared module registration helper (called on the way out).
- *
- * @param pVM The VM handle.
- * @param pReq Registration request info
- */
-static DECLCALLBACK(void) pgmR3SharedModuleRegisterHelper(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq)
-{
- int rc;
-
- rc = GMMR3RegisterSharedModule(pVM, pReq);
- Assert(rc == VINF_SUCCESS || rc == VINF_PGM_SHARED_MODULE_COLLISION || rc == VINF_PGM_SHARED_MODULE_ALREADY_REGISTERED);
- if (rc == VINF_PGM_SHARED_MODULE_ALREADY_REGISTERED)
- {
- PVMCPU pVCpu = VMMGetCpu(pVM);
- unsigned cFlushedPages = 0;
-
- /** todo count copy-on-write actions in the trap handler so we don't have to check everything all the time! */
-
- /* Count the number of shared pages that were changed (copy-on-write). */
- for (unsigned i = 0; i < pReq->cRegions; i++)
- {
- Assert((pReq->aRegions[i].cbRegion & 0xfff) == 0);
- Assert((pReq->aRegions[i].GCRegionAddr & 0xfff) == 0);
-
- RTGCPTR GCRegion = pReq->aRegions[i].GCRegionAddr;
- uint32_t cbRegion = pReq->aRegions[i].cbRegion & ~0xfff;
-
- while (cbRegion)
- {
- RTGCPHYS GCPhys;
- uint64_t fFlags;
-
- rc = PGMGstGetPage(pVCpu, GCRegion, &fFlags, &GCPhys);
- if ( rc == VINF_SUCCESS
- && !(fFlags & X86_PTE_RW))
- {
- PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, GCPhys);
- if ( pPage
- && !PGM_PAGE_IS_SHARED(pPage))
- {
- cFlushedPages++;
- }
- }
-
- GCRegion += PAGE_SIZE;
- cbRegion -= PAGE_SIZE;
- }
- }
-
- if (cFlushedPages > 32)
- rc = VINF_SUCCESS; /* force recheck below */
- }
- /* Full (re)check needed? */
- if (rc == VINF_SUCCESS)
- {
- pReq->Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
- pReq->Hdr.cbReq = RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[pReq->cRegions]);
-
- /* We must stall other VCPUs as we'd otherwise have to send IPI flush commands for every single change we make. */
- rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, pgmR3SharedModuleRegRendezvous, pReq);
- AssertRC(rc);
- }
- RTMemFree(pReq);
- return;
-}
-#endif
diff --git a/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp b/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp
new file mode 100644
index 000000000..c6424dc08
--- /dev/null
+++ b/src/VBox/VMM/VMMR0/PGMR0SharedPage.cpp
@@ -0,0 +1,181 @@
+/* $Id: PGMR0.cpp 61539 2010-05-12 15:11:09Z sandervl $ */
+/** @file
+ * PGM - Page Manager and Monitor, Ring-0.
+ */
+
+/*
+ * Copyright (C) 2007 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/*******************************************************************************
+* Header Files *
+*******************************************************************************/
+#define LOG_GROUP LOG_GROUP_PGM_SHARED
+#include <VBox/pgm.h>
+#include <VBox/gmm.h>
+#include "../PGMInternal.h"
+#include <VBox/vm.h>
+#include "../PGMInline.h"
+#include <VBox/log.h>
+#include <VBox/err.h>
+#include <iprt/assert.h>
+#include <iprt/mem.h>
+
+
+#ifdef VBOX_WITH_PAGE_SHARING
+/**
+ * Check a registered module for shared page changes
+ *
+ * @returns The following VBox status codes.
+ *
+ * @param pVM The VM handle.
+ * @param idCpu VCPU id
+ * @param pModule Module description
+ * @param pGVM Pointer to the GVM instance data.
+ */
+VMMR0DECL(int) PGMR0SharedModuleCheckRegion(PVM pVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PGVM pGVM)
+{
+ int rc = VINF_SUCCESS;
+ PGMMSHAREDPAGEDESC paPageDesc = NULL;
+ uint32_t cbPreviousRegion = 0;
+ bool fFlushTLBs = false;
+ PVMCPU pVCpu = &pVM->aCpus[idCpu];
+
+ Log(("PGMR0SharedModuleCheck: check %s %s base=%RGv size=%x\n", pModule->szName, pModule->szVersion, pModule->Core.Key, pModule->cbModule));
+
+ pgmLock(pVM);
+
+ /* Check every region of the shared module. */
+ for (unsigned idxModule = 0; idxModule < pModule->cRegions; idxModule++)
+ {
+ Assert((pModule->aRegions[idxModule].cbRegion & 0xfff) == 0);
+ Assert((pModule->aRegions[idxModule].GCRegionAddr & 0xfff) == 0);
+
+ RTGCPTR GCRegion = pModule->aRegions[idxModule].GCRegionAddr;
+ unsigned cbRegion = pModule->aRegions[idxModule].cbRegion & ~0xfff;
+ unsigned idxPage = 0;
+ bool fValidChanges = false;
+
+ if (cbPreviousRegion < cbRegion)
+ {
+ if (paPageDesc)
+ RTMemFree(paPageDesc);
+
+ paPageDesc = (PGMMSHAREDPAGEDESC)RTMemAlloc((cbRegion >> PAGE_SHIFT) * sizeof(*paPageDesc));
+ if (!paPageDesc)
+ {
+ AssertFailed();
+ rc = VERR_NO_MEMORY;
+ goto end;
+ }
+ cbPreviousRegion = cbRegion;
+ }
+
+ while (cbRegion)
+ {
+ RTGCPHYS GCPhys;
+ uint64_t fFlags;
+
+ rc = PGMGstGetPage(pVCpu, GCRegion, &fFlags, &GCPhys);
+ if ( rc == VINF_SUCCESS
+ && !(fFlags & X86_PTE_RW)) /* important as we make assumptions about this below! */
+ {
+ PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, GCPhys);
+ if ( pPage
+ && !PGM_PAGE_IS_SHARED(pPage))
+ {
+ fValidChanges = true;
+ paPageDesc[idxPage].uHCPhysPageId = PGM_PAGE_GET_PAGEID(pPage);
+ paPageDesc[idxPage].HCPhys = PGM_PAGE_GET_HCPHYS(pPage);
+ paPageDesc[idxPage].GCPhys = GCPhys;
+ }
+ else
+ paPageDesc[idxPage].uHCPhysPageId = NIL_GMM_PAGEID;
+ }
+ else
+ paPageDesc[idxPage].uHCPhysPageId = NIL_GMM_PAGEID;
+
+ idxPage++;
+ GCRegion += PAGE_SIZE;
+ cbRegion -= PAGE_SIZE;
+ }
+
+ if (fValidChanges)
+ {
+ rc = GMMR0SharedModuleCheckRange(pGVM, pModule, idxModule, idxPage, paPageDesc);
+ AssertRC(rc);
+ if (RT_FAILURE(rc))
+ break;
+
+ for (unsigned i = 0; i < idxPage; i++)
+ {
+ /* Any change for this page? */
+ if (paPageDesc[i].uHCPhysPageId != NIL_GMM_PAGEID)
+ {
+ /** todo: maybe cache these to prevent the nth lookup. */
+ PPGMPAGE pPage = pgmPhysGetPage(&pVM->pgm.s, paPageDesc[i].GCPhys);
+ if (!pPage)
+ {
+ /* Should never happen. */
+ AssertFailed();
+ rc = VERR_PGM_PHYS_INVALID_PAGE_ID;
+ goto end;
+ }
+ Assert(!PGM_PAGE_IS_SHARED(pPage));
+
+ Log(("PGMR0SharedModuleCheck: shared page gc virt=%RGv phys %RGp host %RHp->%RHp\n", pModule->aRegions[idxModule].GCRegionAddr + i * PAGE_SIZE, paPageDesc[i].GCPhys, PGM_PAGE_GET_HCPHYS(pPage), paPageDesc[i].HCPhys));
+ if (paPageDesc[i].HCPhys != PGM_PAGE_GET_HCPHYS(pPage))
+ {
+ bool fFlush = false;
+
+ /* Page was replaced by an existing shared version of it; clear all references first. */
+ rc = pgmPoolTrackUpdateGCPhys(pVM, paPageDesc[i].GCPhys, pPage, true /* clear the entries */, &fFlush);
+ if (RT_FAILURE(rc))
+ {
+ AssertRC(rc);
+ goto end;
+ }
+ Assert(rc == VINF_SUCCESS || (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_PGM_SYNC_CR3) && (pVCpu->pgm.s.fSyncFlags & PGM_SYNC_CLEAR_PGM_POOL)));
+ if (rc == VINF_SUCCESS)
+ fFlushTLBs |= fFlush;
+
+ /* Update the physical address and page id now. */
+ PGM_PAGE_SET_HCPHYS(pPage, paPageDesc[i].HCPhys);
+ PGM_PAGE_SET_PAGEID(pPage, paPageDesc[i].uHCPhysPageId);
+
+ /* Invalidate page map TLB entry for this page too. */
+ PGMPhysInvalidatePageMapTLBEntry(pVM, paPageDesc[i].GCPhys);
+ pVM->pgm.s.cReusedSharedPages++;
+ }
+ /* else nothing changed (== this page is now a shared page), so no need to flush anything. */
+
+ pVM->pgm.s.cSharedPages++;
+ pVM->pgm.s.cPrivatePages--;
+ PGM_PAGE_SET_STATE(pPage, PGM_PAGE_STATE_SHARED);
+ }
+ }
+ }
+ else
+ rc = VINF_SUCCESS; /* nothing to do. */
+ }
+
+end:
+ pgmUnlock(pVM);
+ if (fFlushTLBs)
+ PGM_INVL_ALL_VCPU_TLBS(pVM);
+
+ if (paPageDesc)
+ RTMemFree(paPageDesc);
+
+ return rc;
+}
+#endif
+
diff --git a/src/VBox/VMM/VMMR0/VMMR0.cpp b/src/VBox/VMM/VMMR0/VMMR0.cpp
index 9b5a73783..8b69fe1ea 100644
--- a/src/VBox/VMM/VMMR0/VMMR0.cpp
+++ b/src/VBox/VMM/VMMR0/VMMR0.cpp
@@ -1,10 +1,10 @@
-/* $Id: VMMR0.cpp 29424 2010-05-12 15:11:09Z vboxsync $ */
+/* $Id: VMMR0.cpp 29561 2010-05-17 15:08:42Z vboxsync $ */
/** @file
* VMM - Host Context Ring 0.
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -43,6 +43,7 @@
#include <iprt/assert.h>
#include <iprt/crc32.h>
#include <iprt/mp.h>
+#include <iprt/once.h>
#include <iprt/stdarg.h>
#include <iprt/string.h>
#ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
@@ -70,7 +71,8 @@ RT_C_DECLS_END
* The runtime lives here (in VMMR0.r0) and VBoxDD*R0.r0 links against us. */
PFNRT g_VMMGCDeps[] =
{
- (PFNRT)RTCrc32
+ (PFNRT)RTCrc32,
+ (PFNRT)RTOnce
};
@@ -968,7 +970,17 @@ static int vmmR0EntryExWorker(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperatio
/* Select a valid VCPU context. */
ASMAtomicWriteU32(&pVCpu->idHostCpu, RTMpCpuId());
- int rc = GMMR0CheckSharedModules(pVM, idCpu);
+# ifdef DEBUG_sandervl
+ /* Make sure that log flushes can jump back to ring-3; annoying to get an incomplete log (this is risky though as the code doesn't take this into account). */
+ int rc = GMMR0CheckSharedModulesStart(pVM);
+ if (rc == VINF_SUCCESS)
+ {
+ rc = vmmR0CallRing3SetJmp(&pVCpu->vmm.s.CallRing3JmpBufR0, GMMR0CheckSharedModules, pVM, pVCpu); /* this may resume code. */
+ GMMR0CheckSharedModulesEnd(pVM);
+ }
+# else
+ int rc = GMMR0CheckSharedModules(pVM, pVCpu);
+# endif
/* Clear the VCPU context. */
ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID);
@@ -1014,6 +1026,13 @@ static int vmmR0EntryExWorker(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperatio
return PDMR0DriverCallReqHandler(pVM, (PPDMDRIVERCALLREQHANDLERREQ)pReqHdr);
}
+ case VMMR0_DO_PDM_DEVICE_CALL_REQ_HANDLER:
+ {
+ if (!pVM || !pReqHdr || u64Arg || idCpu != NIL_VMCPUID)
+ return VERR_INVALID_PARAMETER;
+ return PDMR0DeviceCallReqHandler(pVM, (PPDMDEVICECALLREQHANDLERREQ)pReqHdr);
+ }
+
/*
* Requests to the internal networking service.
*/
diff --git a/src/VBox/VMM/VMMR0/VMMR0.def b/src/VBox/VMM/VMMR0/VMMR0.def
index 5ac60f5cc..9ba09a4f2 100644
--- a/src/VBox/VMM/VMMR0/VMMR0.def
+++ b/src/VBox/VMM/VMMR0/VMMR0.def
@@ -1,4 +1,4 @@
-; $Id: VMMR0.def 28800 2010-04-27 08:22:32Z vboxsync $
+; $Id: VMMR0.def 29573 2010-05-17 16:00:54Z vboxsync $
;; @file
; VMM Ring 0 DLL - Definition file.
@@ -77,6 +77,7 @@ EXPORTS
RTAssertMsg2Weak
RTAssertShouldPanic
RTCrc32
+ RTOnce
RTTimeNanoTSLegacySync
RTTimeNanoTSLegacyAsync
RTTimeNanoTSLFenceSync
@@ -93,4 +94,5 @@ EXPORTS
nocrt_strcpy
nocrt_strcmp
nocrt_strchr
+ nocrt_strlen
diff --git a/src/VBox/VMM/testcase/tstCompiler.cpp b/src/VBox/VMM/testcase/tstCompiler.cpp
index fe4ce22ae..262f0901b 100644
--- a/src/VBox/VMM/testcase/tstCompiler.cpp
+++ b/src/VBox/VMM/testcase/tstCompiler.cpp
@@ -1,4 +1,4 @@
-/* $Id: tstCompiler.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: tstCompiler.cpp 29440 2010-05-13 01:44:08Z vboxsync $ */
/** @file
* Testing how the compiler deals with various things.
*
@@ -28,6 +28,8 @@
#include <iprt/err.h>
#include <VBox/x86.h>
#include <iprt/string.h>
+#include <iprt/message.h>
+#include <iprt/initterm.h>
#if 1
@@ -222,6 +224,10 @@ static void DisasFunction(const char *pszName, PFNRT pv)
int main()
{
+ int rc = RTR3Init();
+ if (RT_FAILURE(rc))
+ return RTMsgInitFailure(rc);
+
RTPrintf("tstBitFields: This testcase requires manual inspection of the output!\n"
"\n"
"tstBitFields: The compiler must be able to combine operations when\n"
diff --git a/src/VBox/VMM/testcase/tstVMStructRC.cpp b/src/VBox/VMM/testcase/tstVMStructRC.cpp
index 9cbe9e2fb..18477d1ab 100644
--- a/src/VBox/VMM/testcase/tstVMStructRC.cpp
+++ b/src/VBox/VMM/testcase/tstVMStructRC.cpp
@@ -1,4 +1,4 @@
-/* $Id: tstVMStructRC.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
+/* $Id: tstVMStructRC.cpp 29436 2010-05-12 20:57:57Z vboxsync $ */
/** @file
* tstVMMStructRC - Generate structure member and size checks from the
* RC perspective.
@@ -182,7 +182,8 @@ int main()
GEN_CHECK_OFF(IOMMMIORANGE, pfnFillCallbackRC);
GEN_CHECK_SIZE(IOMMMIOSTATS);
- GEN_CHECK_OFF(IOMMMIOSTATS, ReadR3);
+ GEN_CHECK_OFF(IOMMMIOSTATS, Accesses);
+ GEN_CHECK_OFF(IOMMMIOSTATS, WriteRZToR3);
GEN_CHECK_SIZE(IOMIOPORTRANGER0);
GEN_CHECK_OFF(IOMIOPORTRANGER0, Port);